diff options
author | Vasily Melenchuk <Vasily.Melenchuk@cib.de> | 2017-12-12 11:32:06 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-01-23 23:28:57 +0100 |
commit | 0109da8d18d86037f6348c0ae29d1e243ee547e7 (patch) | |
tree | 82650516185b5e2477bd1f0a0712dbaaec0b422b /sd | |
parent | 3c23efb49c501ad9e4f99e33dd80fc2fdd7b7ba6 (diff) |
tdf#91362: Use document paper size for printing slides.
By default for priniting slides we use not default A4, but size provided
in slide properties.
Additinally renamed IsPageSize() -> IsPaperSize(): it is less ambiguous.
Reviewed-on: https://gerrit.libreoffice.org/46407
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Conflicts:
sd/source/ui/view/DocumentRenderer.cxx
Change-Id: Iaf38dedb32b14cd6fbdd2ad355ecf3208e32663e
Reviewed-on: https://gerrit.libreoffice.org/48452
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/DocumentRenderer.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 3eee8172e629..dc7b104d602e 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -143,7 +143,7 @@ namespace { return nQuality; } - bool IsPageSize() const + bool IsPaperSize() const { return GetBoolValue("PageOptions", sal_Int32(1)); } @@ -163,10 +163,10 @@ namespace { return GetBoolValue("PrintProspect", false); } - bool IsPrinterPreferred(DocumentType eDocType) const + bool IsPrinterPreferred() const { - bool bIsDraw = eDocType == DOCUMENT_TYPE_DRAW; - return IsTilePage() || IsPageSize() || IsBooklet() || (!bIsDraw && !IsNotes()); + return IsTilePage() || IsPaperSize() || IsBooklet() || + IsNotes() || IsHandout() || IsOutline(); } bool IsPrintExcluded() const @@ -1385,7 +1385,7 @@ private: // Draw and Notes should usually abide by their specified paper size Size aPaperSize; - if (!mpOptions->IsPrinterPreferred(pDocument->GetDocumentType())) + if (!mpOptions->IsPrinterPreferred()) { aPaperSize.setWidth(rInfo.maPageSize.Width()); aPaperSize.setHeight(rInfo.maPageSize.Height()); @@ -1398,7 +1398,7 @@ private: maPrintSize = awt::Size(aPaperSize.Width(), aPaperSize.Height()); - if (mpOptions->IsPrinterPreferred(pDocument->GetDocumentType())) + if (mpOptions->IsPrinterPreferred()) { if( (rInfo.meOrientation == ORIENTATION_LANDSCAPE && (aPaperSize.Width() < aPaperSize.Height())) @@ -1461,7 +1461,7 @@ private: aInfo.msTimeDate += GetSdrGlobalData().GetLocaleData()->getTime( ::tools::Time( ::tools::Time::SYSTEM ), false ); // Draw and Notes should usually use specified paper size when printing - if (!mpOptions->IsPrinterPreferred(mrBase.GetDocShell()->GetDocumentType())) + if (!mpOptions->IsPrinterPreferred()) { aInfo.maPrintSize = mrBase.GetDocument()->GetSdPage(0, PK_STANDARD)->GetSize(); maPrintSize = awt::Size(aInfo.maPrintSize.Width(), @@ -1775,7 +1775,7 @@ private: OSL_ASSERT(pDocument != nullptr); SdPage& rHandoutPage (*pDocument->GetSdPage(0, PK_HANDOUT)); - const bool bScalePage (mpOptions->IsPageSize()); + const bool bScalePage (mpOptions->IsPaperSize()); sal_uInt16 nPaperBin; if ( ! mpOptions->IsPaperBin()) @@ -1936,7 +1936,7 @@ private: // is it possible that the page size changed? const Size aPageSize = pPage->GetSize(); - if (mpOptions->IsPageSize()) + if (mpOptions->IsPrinterPreferred()) { const double fHorz ((double) rInfo.maPrintSize.Width() / aPageSize.Width()); const double fVert ((double) rInfo.maPrintSize.Height() / aPageSize.Height()); @@ -2169,7 +2169,7 @@ private: // (without the unprintable borders). // 3. Split the page into parts of the size of the // printable area. - const bool bScalePage (mpOptions->IsPageSize()); + const bool bScalePage (mpOptions->IsPaperSize()); const bool bCutPage (mpOptions->IsCutPage()); MapMode aMap (rInfo.maMap); if (bScalePage || bCutPage) |