From e271fce82e16359394fdeb818c2ec25a07532a8d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 23 Jul 2021 14:30:42 +0200 Subject: use officecfg to retrieve PrettyPrinting Change-Id: Ia815acdb8050316293e23801d3ed5bfbeb3ab386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119417 Tested-by: Jenkins Reviewed-by: Noel Grandin --- reportdesign/source/core/api/ReportDefinition.cxx | 3 ++- reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'reportdesign/source') diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 839ec947ca36..3884d06198f9 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -1318,7 +1319,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) ); SvtSaveOptions aSaveOpt; - xInfoSet->setPropertyValue("UsePrettyPrinting", uno::makeAny(aSaveOpt.IsPrettyPrinting())); + xInfoSet->setPropertyValue("UsePrettyPrinting", uno::makeAny(officecfg::Office::Common::Save::Document::PrettyPrinting::get())); if ( aSaveOpt.IsSaveRelFSys() ) { const OUString sVal( aDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_DOCUMENTBASEURL(),OUString()) ); diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx index 04409a7d2ab0..19fdbbc119a9 100644 --- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx @@ -18,6 +18,7 @@ */ #include "xmlExportDocumentHandler.hxx" +#include #include #include #include @@ -40,8 +41,7 @@ using namespace ::xmloff::token; static void lcl_exportPrettyPrinting(const uno::Reference< xml::sax::XDocumentHandler >& _xDelegatee) { - SvtSaveOptions aSaveOpt; - if ( aSaveOpt.IsPrettyPrinting() ) + if ( officecfg::Office::Common::Save::Document::PrettyPrinting::get() ) { _xDelegatee->ignorableWhitespace(" "); } -- cgit