summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2011-10-30 20:59:31 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2011-10-30 21:13:52 +0400
commiteda6d8971dd5b33d572a123198bf0cca63120cf9 (patch)
treeae66e3aedd83439b7ab2ddec24ca982ce970ed1a
parente382cc5c08d0339e5ab7325f1e989222d0e261f5 (diff)
fix fdo#31966: inserting empty slide when printing handouts
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx20
1 files changed, 8 insertions, 12 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 9966f6c7b993..4c9228d7e48c 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1894,21 +1894,17 @@ private:
::std::vector<sal_uInt16> aPageIndices;
sal_uInt16 nPrinterPageIndex = 0;
StringRangeEnumerator::Iterator it = aRangeEnum.begin(), itEnd = aRangeEnum.end();
- bool bLastLoop = false;
+ bool bLastLoop = (it == itEnd);
while (!bLastLoop)
{
- if (it != itEnd)
- {
- sal_Int32 nPageIndex = *it;
- ++it;
- if (GetFilteredPage(nPageIndex, PK_STANDARD) == NULL)
- continue;
+ sal_Int32 nPageIndex = *it;
+ ++it;
+ bLastLoop = (it == itEnd);
+
+ if (GetFilteredPage(nPageIndex, PK_STANDARD))
aPageIndices.push_back(nPageIndex);
- }
- else
- {
- bLastLoop = true;
- }
+ else if (!bLastLoop)
+ continue;
// Create a printer page when we have found one page for each
// placeholder or when this is the last (and special) loop.