summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-17 14:32:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-09-17 15:00:06 +0100
commitcca120ad92ecab741ca9683f3cf76d9e4fc81729 (patch)
tree537852af8db770dd76f12cda7148e6986e39fc1b /sd
parentc42d2a5c7a195c6d80160567a098d1387de741e5 (diff)
Resolves: fdo#80911 don't swap notes page width/height
Change-Id: I9826f69d03de85ea8d2b2c025121599877798852
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx28
1 files changed, 15 insertions, 13 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index c370a69530c2..a5ffa6ae69a8 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1361,6 +1361,7 @@ private:
{
SdDrawDocument* pDocument = mrBase.GetMainViewShell()->GetDoc();
rInfo.meOrientation = ORIENTATION_PORTRAIT;
+ bool bDoDodgyHeightWidthFit = !mpOptions->IsDraw() && !mpOptions->IsNotes();
if( ! mpOptions->IsBooklet())
{
@@ -1369,9 +1370,9 @@ private:
else if (rInfo.maPageSize.Width() < rInfo.maPageSize.Height())
rInfo.meOrientation = ORIENTATION_LANDSCAPE;
- // Draw should abide by specified paper size
+ // Draw and Notes should abide by their specified paper size
Size aPaperSize;
- if (mpOptions->IsDraw())
+ if (!bDoDodgyHeightWidthFit)
{
aPaperSize.setWidth(rInfo.maPageSize.Width());
aPaperSize.setHeight(rInfo.maPageSize.Height());
@@ -1382,18 +1383,19 @@ private:
aPaperSize.setHeight(rInfo.mpPrinter->GetPaperSize().Height());
}
- if( (rInfo.meOrientation == ORIENTATION_LANDSCAPE &&
- (aPaperSize.Width() < aPaperSize.Height()))
- ||
- (rInfo.meOrientation == ORIENTATION_PORTRAIT &&
- (aPaperSize.Width() > aPaperSize.Height()))
- )
- {
- maPrintSize = awt::Size(aPaperSize.Height(), aPaperSize.Width());
- }
- else
+ maPrintSize = awt::Size(aPaperSize.Width(), aPaperSize.Height());
+
+ if (bDoDodgyHeightWidthFit)
{
- maPrintSize = awt::Size(aPaperSize.Width(), aPaperSize.Height());
+ if( (rInfo.meOrientation == ORIENTATION_LANDSCAPE &&
+ (aPaperSize.Width() < aPaperSize.Height()))
+ ||
+ (rInfo.meOrientation == ORIENTATION_PORTRAIT &&
+ (aPaperSize.Width() > aPaperSize.Height()))
+ )
+ {
+ maPrintSize = awt::Size(aPaperSize.Height(), aPaperSize.Width());
+ }
}
return true;