Blame SOURCES/0001-n-up-printing-done-by-vcl-brochures-by-draw-impress.patch

ebc4bd
From 2c37487470c7ea76d493eb0554cf2f9458ed5075 Mon Sep 17 00:00:00 2001
ebc4bd
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
ebc4bd
Date: Tue, 23 Sep 2014 10:20:06 +0100
ebc4bd
Subject: [PATCH] n-up printing done by vcl, brochures by draw/impress
ebc4bd
ebc4bd
Change-Id: If38365d949ad91d50138798a0a386f9543eb4f22
ebc4bd
---
ebc4bd
 sd/source/ui/view/DocumentRenderer.cxx | 9 +++++----
ebc4bd
 1 file changed, 5 insertions(+), 4 deletions(-)
ebc4bd
ebc4bd
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
ebc4bd
index 723aa02e..1a903f7 100644
ebc4bd
--- a/sd/source/ui/view/DocumentRenderer.cxx
ebc4bd
+++ b/sd/source/ui/view/DocumentRenderer.cxx
ebc4bd
@@ -1362,7 +1362,7 @@ private:
ebc4bd
         SdDrawDocument* pDocument = mrBase.GetMainViewShell()->GetDoc();
ebc4bd
         bool bIsDraw = pDocument->GetDocumentType() == DOCUMENT_TYPE_DRAW;
ebc4bd
         rInfo.meOrientation = ORIENTATION_PORTRAIT;
ebc4bd
-        bool bDoDodgyHeightWidthFit = !bIsDraw && !mpOptions->IsNotes();
ebc4bd
+        bool bDoDodgyHeightWidthFit = mpOptions->IsBooklet() || (!bIsDraw && !mpOptions->IsNotes());
ebc4bd
 
ebc4bd
         if( ! mpOptions->IsBooklet())
ebc4bd
         {
ebc4bd
@@ -1371,7 +1371,8 @@ private:
ebc4bd
         else if (rInfo.maPageSize.Width() < rInfo.maPageSize.Height())
ebc4bd
             rInfo.meOrientation = ORIENTATION_LANDSCAPE;
ebc4bd
 
ebc4bd
-        // Draw and Notes should abide by their specified paper size
ebc4bd
+        // Draw and Notes should abide by their specified paper size, except
ebc4bd
+        // for booklets
ebc4bd
         Size aPaperSize;
ebc4bd
         if (!bDoDodgyHeightWidthFit)
ebc4bd
         {
ebc4bd
@@ -1448,8 +1449,8 @@ private:
ebc4bd
             if (mpOptions->IsTime())
ebc4bd
                 aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( Time( Time::SYSTEM ), false, false );
ebc4bd
 
ebc4bd
-            // Draw should use specified paper size when printing
ebc4bd
-            if (mrBase.GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_DRAW)
ebc4bd
+            // Draw should use specified paper size when printing, except for booklets
ebc4bd
+            if (!mpOptions->IsBooklet() && mrBase.GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_DRAW)
ebc4bd
             {
ebc4bd
                 aInfo.maPrintSize = mrBase.GetDocument()->GetSdPage(0, PK_STANDARD)->GetSize();
ebc4bd
                 maPrintSize = awt::Size(aInfo.maPrintSize.Width(),
ebc4bd
-- 
ebc4bd
1.9.3
ebc4bd