Blob Blame History Raw
From 6c0f9cc00e81862e888b680a83bd14c0f16811aa Mon Sep 17 00:00:00 2001
From: Ivan Timofeev <timofeev.i.s@gmail.com>
Date: Mon, 27 Feb 2012 16:26:39 +0400
Subject: [PATCH] fdo#31966: do not create an empty slide when printing
 handouts

Signed-off-by: Michael Meeks <michael.meeks@suse.com>
---
 sd/source/ui/view/DocumentRenderer.cxx |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 758e5ed..64cd478 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1967,8 +1967,8 @@ private:
 
             // Create a printer page when we have found one page for each
             // placeholder or when this is the last (and special) loop.
-            if (aPageIndices.size() == nShapeCount
-                || nIndex==nCount)
+            if (!aPageIndices.empty() &&
+                (aPageIndices.size() == nShapeCount || nIndex == nCount))
             {
                 maPrinterPages.push_back(
                     ::boost::shared_ptr<PrinterPage>(
-- 
1.7.7.6