diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2011-10-23 21:35:00 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2011-10-24 00:16:18 +0400 |
commit | a47a5ed0a5ffd948d48e02e5a9f0e2064096e7d4 (patch) | |
tree | ab094a16e307b04fe9c7815f2e4ba04efd612265 /sw | |
parent | 3d5caa7ce38c9441d05b01c6feaaaa5ff3bd51de (diff) |
always explicitly handle empty string of ranges
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/doc.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
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 ); |