diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 96a162917181..4580328c16b0 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1584,13 +1584,15 @@ void SwDoc::CalculatePagePairsForProspectPrinting( rValidPagesSet.clear(); rValidStartFrms.clear(); - rtl::OUString aPageRange = rOptions.getStringValue( "PageRange", rtl::OUString() ); + rtl::OUString aPageRange; // PageContent : // 0 -> print all pages (default if aPageRange is empty) // 1 -> print range according to PageRange // 2 -> print selection const sal_Int32 nContent = rOptions.getIntValue( "PrintContent", 0 ); - if (0 == nContent) + if (nContent == 1) + aPageRange = rOptions.getStringValue( "PageRange", rtl::OUString() ); + if (aPageRange.getLength() == 0) // empty string -> print all { // set page range to print to 'all pages' aPageRange = OUString::valueOf( (sal_Int32)1 ); diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx index 8e4879f1c709..47f56f29716f 100644 --- a/tools/inc/tools/multisel.hxx +++ b/tools/inc/tools/multisel.hxx @@ -191,8 +191,6 @@ public: - the string "-" means the sequence i_nMinNumber to i_nMaxNumber - single number that doesn't fit in [i_nMinNumber,i_nMaxNumber] will be ignored - range that doesn't fit in [i_nMinNumber,i_nMaxNumber] will be adjusted - - an empty string as input is valid and will result in the range [min,max] if given - or an empty vector, if not */ static bool getRangesFromString( const rtl::OUString& i_rPageRange, std::vector< sal_Int32 >& o_rPageVector, diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx index 13275a863673..68a9eacfa3c0 100644 --- a/tools/source/memtools/multisel.cxx +++ b/tools/source/memtools/multisel.cxx @@ -831,16 +831,6 @@ bool StringRangeEnumerator::setRange( const rtl::OUString& i_rNewRange, bool i_b mnCount = 0; maSequence.clear(); - // we love special cases - if( i_rNewRange.getLength() == 0 ) - { - if( mnMin >= 0 && mnMax >= 0 ) - { - insertRange( mnMin, mnMax, mnMin != mnMax, ! i_bStrict ); - } - return true; - } - const sal_Unicode* pInput = i_rNewRange.getStr(); rtl::OUStringBuffer aNumberBuf( 16 ); std::vector< sal_Int32 > aNumbers;