[Libreoffice-commits] .: sd/source
Ivan Timofeev
ivantimofeev at kemper.freedesktop.org
Sun Oct 30 10:14:53 PDT 2011
sd/source/ui/view/DocumentRenderer.cxx | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
New commits:
commit eda6d8971dd5b33d572a123198bf0cca63120cf9
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sun Oct 30 20:59:31 2011 +0400
fix fdo#31966: inserting empty slide when printing handouts
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 9966f6c..4c9228d 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.
More information about the Libreoffice-commits
mailing list