[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sd/source
Eilidh McAdam
eilidh at lanedo.com
Wed Aug 20 00:15:53 PDT 2014
sd/source/ui/view/DocumentRenderer.cxx | 33 ++++++++++++++++++++++++++++-----
1 file changed, 28 insertions(+), 5 deletions(-)
New commits:
commit a7eed1e17cfb101210db8aa839171f00d0730582
Author: Eilidh McAdam <eilidh at lanedo.com>
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.
Change-Id: If90bae4ac59cd95dd50fcd8deb25fd900756193e
Reviewed-on: https://gerrit.libreoffice.org/9866
Reviewed-by: Matúš Kukan <matus.kukan at collabora.com>
Tested-by: Matúš Kukan <matus.kukan at collabora.com>
(cherry picked from commit 7b31e45ec7106d2cfbdbb7915d97667ba710f81c)
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 59106a7..7080e9d 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1418,7 +1418,19 @@ private:
else if (rInfo.maPageSize.Width() < rInfo.maPageSize.Height())
rInfo.meOrientation = ORIENTATION_LANDSCAPE;
- const Size aPaperSize (rInfo.mpPrinter->GetPaperSize());
+ // Draw should abide by specified paper size
+ Size aPaperSize;
+ if (mpOptions->IsDraw())
+ {
+ aPaperSize.setWidth(rInfo.maPageSize.Width());
+ aPaperSize.setHeight(rInfo.maPageSize.Height());
+ }
+ else
+ {
+ aPaperSize.setWidth(rInfo.mpPrinter->GetPaperSize().Width());
+ aPaperSize.setHeight(rInfo.mpPrinter->GetPaperSize().Height());
+ }
+
if( (rInfo.meOrientation == ORIENTATION_LANDSCAPE &&
(aPaperSize.Width() < aPaperSize.Height()))
||
@@ -1483,10 +1495,21 @@ private:
if (mpOptions->IsTime())
aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( Time( Time::SYSTEM ), false, 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 (mpOptions->IsDraw())
+ {
+ 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())
{
More information about the Libreoffice-commits
mailing list