diff options
author | Michael Stahl <mstahl@redhat.com> | 2011-11-02 17:49:42 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-11-02 17:49:42 +0100 |
commit | 66d9925bb6e9c43aacfe9e4ac6f1ee10a8e25166 (patch) | |
tree | ea3e9cb2bd0ca5a8fe7432908bdfdd5071f0773d /sd/source | |
parent | b2254d5d6fde8c28501e99e29bc824e935a25247 (diff) | |
parent | f6f5c89259867b5aeb86d5509f826da949d122c4 (diff) |
Merge branch 'master' of git://anongit.freedesktop.org/libreoffice/core
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 0e79d610ddc0..e862c3c0b7fa 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -1897,21 +1897,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. |