diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2019-09-30 20:39:39 +0300 |
---|---|---|
committer | Muhammet Kara <muhammet.kara@collabora.com> | 2019-10-11 10:13:22 +0200 |
commit | c11d96f0b521ee7df77576963b60178d2c40431b (patch) | |
tree | 7141da3e6e1f440cc16f74ea19a3bd25883fffcf /filter | |
parent | e6c4674418cd7423943599f3bd3cdf1643284690 (diff) |
Handle SinglePageSheets option for pdf export
When the single page sheets option is selected
on the pdf export dialog of Calc, a pdf for general
preview of the document is created, which is not
meant for printing.
Each sheet is exported as a single page, thus causing
the resulting pdf to have pages with different sizes.
This is a follow-up to commit 079cd016408d54d91
Change-Id: I038761f06bbf4b0425df89bcda4ee111a61be1d5
Reviewed-on: https://gerrit.libreoffice.org/79895
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/80635
Tested-by: Jenkins
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/pdf/pdfexport.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index b0a91ace6e4f..2cf302bda668 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -860,7 +860,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& pPDFExtOutDevData->SetIsReduceImageResolution( mbReduceImageResolution ); pPDFExtOutDevData->SetIsExportNamedDestinations( mbExportBmkToDest ); - Sequence< PropertyValue > aRenderOptions( 7 ); + Sequence< PropertyValue > aRenderOptions( 8 ); aRenderOptions[ 0 ].Name = "RenderDevice"; aRenderOptions[ 0 ].Value <<= uno::Reference<awt::XDevice>(xDevice.get()); aRenderOptions[ 1 ].Name = "ExportNotesPages"; @@ -876,6 +876,8 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& aRenderOptions[ 5 ].Value <<= aPageRange; aRenderOptions[ 6 ].Name = "ExportPlaceholders"; aRenderOptions[ 6 ].Value <<= mbExportPlaceholders; + aRenderOptions[ 7 ].Name = "SinglePageSheets"; + aRenderOptions[ 7 ].Value <<= mbSinglePageSheets; if( !aPageRange.isEmpty() || !aSelection.hasValue() ) { @@ -925,7 +927,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& } const bool bExportPages = !bExportNotesPages || !mbExportOnlyNotesPages; - if( aPageRange.isEmpty() ) + if( aPageRange.isEmpty() || mbSinglePageSheets) { aPageRange = OUString::number( 1 ) + "-" + OUString::number(nPageCount ); } |