Add FullSheetPreview support for convert-to endpoint of online Change-Id: I31e4f3cbcf0cf49c5446d9460bd42965ce756c0d Reviewed-on: https://gerrit.libreoffice.org/80397 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> 
diff --git a/desktop/source/lib/init.cxxb/desktop/source/lib/init.cxx index 63fd310..4fb369a 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx 
@@ -2169,7+2169,7 @@  // Check if watermark for pdf is passed by filteroptions... // It is not a real filter option so it must be filtered out. OUString watermarkText; OUString watermarkText, sFullSheetPreview; int aIndex = -1; if ((aIndex = aFilterOptions.indexOf(",Watermark=")) >= 0) {@@ -2180,6+2180,18 @@  aFilterOptions = temp + aFilterOptions.copy(bIndex+12); } aIndex = -1; if ((aIndex = aFilterOptions.indexOf(",FullSheetPreview=")) >= 0) { int bIndex = aFilterOptions.indexOf("FULLSHEETPREVEND"); sFullSheetPreview = aFilterOptions.copy(aIndex+18, bIndex-(aIndex+18)); OUString temp = aFilterOptions.copy(0, aIndex); aFilterOptions = temp + aFilterOptions.copy(bIndex+16); } bool bFullSheetPreview = sFullSheetPreview == "true"; // 'TakeOwnership' == this is a 'real' SaveAs (that is, the document // gets a new name). When this is not provided, the meaning of // saveAs() is more like save-a-copy, which allows saving to any@@ -2205,11+2217,25 @@  auto aFilteredOptionSeq = comphelper::containerToSequence<OUString>(aFilteredOptionVec); aFilterOptions = comphelper::string::convertCommaSeparated(aFilteredOptionSeq); aSaveMediaDescriptor[MediaDescriptor::PROP_FILTEROPTIONS()] <<= aFilterOptions; if(!watermarkText.isEmpty()) if(!watermarkText.isEmpty() || bFullSheetPreview) { uno::Sequence< beans::PropertyValue > aFilterData( 1 ); aFilterData[ 0 ].Name = "TiledWatermark"; aFilterData[ 0 ].Value <<= watermarkText; uno::Sequence< beans::PropertyValue > aFilterData( static_cast<int>(bFullSheetPreview) + static_cast<int>(!watermarkText.isEmpty()) ); if (!watermarkText.isEmpty()) { aFilterData[ 0 ].Name = "TiledWatermark"; aFilterData[ 0 ].Value <<= watermarkText; } if (bFullSheetPreview) { int nOptIndex = static_cast<int>(!watermarkText.isEmpty()); aFilterData[ nOptIndex ].Name = "SinglePageSheets"; aFilterData[ nOptIndex ].Value <<= true; } aSaveMediaDescriptor["FilterData"] <<= aFilterData; }
close