diff --git a/0001-Resolves-fdo-80911-don-t-swap-notes-page-width-heigh.patch b/0001-Resolves-fdo-80911-don-t-swap-notes-page-width-heigh.patch index 636e202..b9d0b24 100644 --- a/0001-Resolves-fdo-80911-don-t-swap-notes-page-width-heigh.patch +++ b/0001-Resolves-fdo-80911-don-t-swap-notes-page-width-heigh.patch @@ -1,27 +1,56 @@ -From 572f3640bc343edf389e63a92b832046f361a0dc Mon Sep 17 00:00:00 2001 +From c3f2c298d9deff2c6d71619b46789e741bbe5a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Wed, 17 Sep 2014 14:32:03 +0100 +Date: Thu, 18 Sep 2014 11:40:26 +0100 Subject: [PATCH] Resolves: fdo#80911 don't swap notes page width/height -Change-Id: I9826f69d03de85ea8d2b2c025121599877798852 +IsDraw doesn't mean the app/page is Draw + +it means a slide in impress. + +commit 7b31e45ec7106d2cfbdbb7915d97667ba710f81c +Date: Mon Jun 23 20:55:21 2014 +0100 + Make Draw use paper size when printing - fdo#63905 + + Previously, Draw/Impress use the default size from the printer. + Now Draw uses the paper size (specified in page formatting). + Impress still uses the old method - not sure if this is correct + but printing handouts etc probably complicate print/paper size. + +suggests the intent is for this to not affect Impress and to only +affect Draw, so this does that + +(cherry picked from commit f1f89f0202232635e7fbbd7ca47de51755b2bce0) + +Conflicts: + sd/source/ui/view/DocumentRenderer.cxx + +Change-Id: I481a824ef244fd837992c893f6de0c051af0a26b + (cherry picked from commit cca120ad92ecab741ca9683f3cf76d9e4fc81729) + +Conflicts: + sd/source/ui/view/DocumentRenderer.cxx + +Change-Id: I9826f69d03de85ea8d2b2c025121599877798852 --- - sd/source/ui/view/DocumentRenderer.cxx | 28 +++++++++++++++------------- - 1 file changed, 15 insertions(+), 13 deletions(-) + sd/source/ui/view/DocumentRenderer.cxx | 52 +++++++++++++++++++++++++--------- + 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx -index 7080e9d..1bfb039 100644 +index 4136e89..dee683a 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx -@@ -1410,6 +1410,7 @@ +@@ -1409,7 +1409,9 @@ private: + PrintInfo& rInfo) { SdDrawDocument* pDocument = mrBase.GetMainViewShell()->GetDoc(); ++ bool bIsDraw = pDocument->GetDocumentType() == DOCUMENT_TYPE_DRAW; rInfo.meOrientation = ORIENTATION_PORTRAIT; -+ bool bDoDodgyHeightWidthFit = !mpOptions->IsDraw() && !mpOptions->IsNotes(); ++ bool bDoDodgyHeightWidthFit = !bIsDraw && !mpOptions->IsNotes(); if( ! mpOptions->IsBooklet()) { -@@ -1418,19 +1419,32 @@ +@@ -1418,19 +1420,32 @@ private: else if (rInfo.maPageSize.Width() < rInfo.maPageSize.Height()) rInfo.meOrientation = ORIENTATION_LANDSCAPE; @@ -63,3 +92,32 @@ index 7080e9d..1bfb039 100644 } return true; +@@ -1483,10 +1498,21 @@ private: + + if (mpOptions->IsTime()) + aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( Time( Time::SYSTEM ), sal_False, sal_False ); +- aInfo.maPrintSize = aInfo.mpPrinter->GetOutputSize(); +- maPrintSize = awt::Size( +- aInfo.mpPrinter->GetPaperSize().Width(), +- aInfo.mpPrinter->GetPaperSize().Height()); ++ ++ // Draw should use specified paper size when printing ++ if (mrBase.GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_DRAW) ++ { ++ aInfo.maPrintSize = mrBase.GetDocument()->GetSdPage(0, PK_STANDARD)->GetSize(); ++ maPrintSize = awt::Size(aInfo.maPrintSize.Width(), ++ aInfo.maPrintSize.Height()); ++ } ++ else ++ { ++ aInfo.maPrintSize = aInfo.mpPrinter->GetOutputSize(); ++ maPrintSize = awt::Size( ++ aInfo.mpPrinter->GetPaperSize().Width(), ++ aInfo.mpPrinter->GetPaperSize().Height()); ++ } + + switch (mpOptions->GetOutputQuality()) + { +-- +1.9.3 + diff --git a/0001-default-n-up-printing-of-notes-to-sensible-2-x-1-not.patch b/0001-default-n-up-printing-of-notes-to-sensible-2-x-1-not.patch new file mode 100644 index 0000000..70c3c70 --- /dev/null +++ b/0001-default-n-up-printing-of-notes-to-sensible-2-x-1-not.patch @@ -0,0 +1,41 @@ +From 93c47f3f0310135c5d6216de9b4d25fd7c06e7dd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +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 + diff --git a/libreoffice.spec b/libreoffice.spec index fd54193..fb6e550 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -36,7 +36,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.3 -Release: 4%{?libo_prerelease}%{?dist} +Release: 5%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 Group: Applications/Productivity URL: http://www.libreoffice.org/ @@ -314,6 +314,7 @@ Patch59: 0001-set-up-java-on-aarch64.patch Patch60: 0001-fdo-82496-Change-picture-option-by-rightclicking.patch Patch61: 0001-create-a-master-document-template-type.patch Patch62: 0001-Resolves-fdo-80911-don-t-swap-notes-page-width-heigh.patch +Patch63: 0001-default-n-up-printing-of-notes-to-sensible-2-x-1-not.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice @@ -2255,8 +2256,11 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %endif %changelog +* Thu Sep 18 2014 Caolán McNamara - 1:4.2.6.3-5 +- default n-up printing of notes to sensible 2x1 + * Wed Sep 17 2014 Caolán McNamara - 1:4.2.6.3-4 -- Resolves: fdo#80911 don't swap notea page width and height +- Resolves: fdo#80911 don't swap notes page width and height * Wed Sep 10 2014 Caolán McNamara - 1:4.2.6.3-3 - create a master document template type