Blob Blame History Raw
From 93c47f3f0310135c5d6216de9b4d25fd7c06e7dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 18 Sep 2014 11:32:39 +0100
Subject: [PATCH] default n-up printing of notes to sensible 2 x 1 not 1 x 2

i.e. throw away the maFirstPageSize cache based on the initial slide view which
is typically in landscape mode

So that if we change to notes which are usually in portrait mode, and then
visit n-up print, we get a default layout based on the notes orientation and
not the slides orientation.

I hate printing

Change-Id: I8b7b81ce1eec0f9c5ecd7509b311cf4026958c2c
---
 vcl/source/window/printdlg.cxx | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index cf9642e..d9ebf7c 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1787,6 +1787,14 @@ IMPL_LINK( PrintDialog, UIOption_SelectHdl, ListBox*, i_pBox )
         sal_Int32 nVal( i_pBox->GetSelectEntryPos() );
         pVal->Value <<= nVal;
 
+        //If we are in impress we start in print slides mode and get a
+        //maFirstPageSize for slides which are usually landscape mode, if we
+        //change to notes which are usually in portrait mode, and then visit
+        //n-up print, we will assume notes are in landscape unless we throw
+        //away maFirstPageSize when we change page content type
+        if (pVal->Name == "PageContentType")
+            maFirstPageSize = Size();
+
         checkOptionalControlDependencies();
 
         // update preview and page settings
-- 
1.9.3