summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Kitzinger <ulrich.kitzinger@muenchen.de>2014-04-16 16:04:19 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2014-10-06 10:52:45 +0200
commite9f3f8dbcd6491a284884d3f269f911cc2972203 (patch)
tree449dab35fe8ca375599499f11739708262f326a6
parentb22bb599d703dad93801e881350c2a3029c694bf (diff)
Patch von Lanedo für #11826 integriert.
Change-Id: Ic0e2306bfa8e943220d2d23177c241169c94a790
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx25
1 files changed, 20 insertions, 5 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index a544515609f1..11bb8ee3eb0d 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1438,7 +1438,11 @@ private:
else if (rInfo.maPageSize.Width() < rInfo.maPageSize.Height())
rInfo.meOrientation = ORIENTATION_LANDSCAPE;
- const Size aPaperSize (rInfo.mpPrinter->GetPaperSize());
+ Size aPaperSize (rInfo.mpPrinter->GetPaperSize());
+ // In Draw, use paper size set in page format
+ if (mpOptions->IsDraw())
+ aPaperSize = rInfo.maPageSize;
+
if( (rInfo.meOrientation == ORIENTATION_LANDSCAPE &&
(aPaperSize.Width() < aPaperSize.Height()))
||
@@ -1503,10 +1507,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());
+
+ // In Draw, use paper size set in page format
+ 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())
{