summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2021-11-10 14:34:39 +0200
committerAron Budea <aron.budea@collabora.com>2021-11-16 03:28:33 +0100
commit28389a78c38535f0b4229ebc43797bd90d7a15a2 (patch)
tree4de07b43dc0ac5f49466fc0c06e2abd51b926d5f
parent356e43b08d2b4872213fb31ea5a8138c58bf8038 (diff)
tdf#145354: Revert "tdf#91362: Use document paper size for printing slides"
Reverting it has been suggested a couple of times over the years, for instance in https://bugs.documentfoundation.org/show_bug.cgi?id=91362#c23 and in https://bugs.documentfoundation.org/show_bug.cgi?id=145354#c41 . The paper size for a presentation document is typically just made-up dimensions with no connection to any actual paper size. (Or transparency size.) What matters is the aspect ratio. This reverts commit 57991f885e60d04e93bf5004d4fdceee7d29f3d8 Change-Id: I5099039f5fdb836694f2b100fb28093584e8294b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125111 Tested-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 3c3f44de011d..53fe6770bb5a 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -153,7 +153,7 @@ namespace {
return nQuality;
}
- bool IsPaperSize() const
+ bool IsPageSize() const
{
return GetBoolValue("PageOptions", sal_Int32(1));
}
@@ -173,10 +173,10 @@ namespace {
return GetBoolValue("PrintProspect", false);
}
- bool IsPrinterPreferred() const
+ bool IsPrinterPreferred(DocumentType eDocType) const
{
- return IsTilePage() || IsPaperSize() || IsBooklet() ||
- IsNotes() || IsHandout() || IsOutline();
+ bool bIsDraw = eDocType == DocumentType::Draw;
+ return IsTilePage() || IsPageSize() || IsBooklet() || (!bIsDraw && !IsNotes());
}
bool IsPrintExcluded() const
@@ -1374,7 +1374,7 @@ private:
// Draw and Notes should usually abide by their specified paper size
Size aPaperSize;
- if (!mpOptions->IsPrinterPreferred())
+ if (!mpOptions->IsPrinterPreferred(pDocument->GetDocumentType()))
{
aPaperSize.setWidth(rInfo.maPageSize.Width());
aPaperSize.setHeight(rInfo.maPageSize.Height());
@@ -1387,7 +1387,7 @@ private:
maPrintSize = awt::Size(aPaperSize.Width(), aPaperSize.Height());
- if (mpOptions->IsPrinterPreferred())
+ if (mpOptions->IsPrinterPreferred(pDocument->GetDocumentType()))
{
if( (rInfo.meOrientation == Orientation::Landscape &&
(aPaperSize.Width() < aPaperSize.Height()))
@@ -1448,7 +1448,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())
+ if (!mpOptions->IsPrinterPreferred(mrBase.GetDocShell()->GetDocumentType()))
{
aInfo.maPrintSize = mrBase.GetDocument()->GetSdPage(0, PageKind::Standard)->GetSize();
maPrintSize = awt::Size(aInfo.maPrintSize.Width(),
@@ -1770,7 +1770,7 @@ private:
OSL_ASSERT(pDocument != nullptr);
SdPage& rHandoutPage (*pDocument->GetSdPage(0, PageKind::Handout));
- const bool bScalePage (mpOptions->IsPaperSize());
+ const bool bScalePage (mpOptions->IsPageSize());
sal_uInt16 nPaperBin;
if ( ! mpOptions->IsPaperBin())
@@ -1930,7 +1930,7 @@ private:
// is it possible that the page size changed?
const Size aPageSize = pPage->GetSize();
- if (mpOptions->IsPrinterPreferred())
+ if (mpOptions->IsPageSize())
{
const double fHorz (static_cast<double>(rInfo.maPrintSize.Width()) / aPageSize.Width());
const double fVert (static_cast<double>(rInfo.maPrintSize.Height()) / aPageSize.Height());
@@ -2159,7 +2159,7 @@ private:
// (without the unprintable borders).
// 3. Split the page into parts of the size of the
// printable area.
- const bool bScalePage (mpOptions->IsPaperSize());
+ const bool bScalePage (mpOptions->IsPageSize());
const bool bCutPage (mpOptions->IsCutPage());
MapMode aMap (rInfo.maMap);
if ( (bScalePage || bCutPage) && CheckForFrontBackPages( nPageIndex ) )