diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-23 14:30:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-07-24 09:57:08 +0200 |
commit | e271fce82e16359394fdeb818c2ec25a07532a8d (patch) | |
tree | 7a02fef73819170e1eab03737b6040c8f3277149 /reportdesign | |
parent | 2855f12072023930a15ea852e40d05de4a6be164 (diff) |
use officecfg to retrieve PrettyPrinting
Change-Id: Ia815acdb8050316293e23801d3ed5bfbeb3ab386
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119417
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/Library_rpt.mk | 4 | ||||
-rw-r--r-- | reportdesign/Library_rptxml.mk | 4 | ||||
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 3 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx | 4 |
4 files changed, 12 insertions, 3 deletions
diff --git a/reportdesign/Library_rpt.mk b/reportdesign/Library_rpt.mk index fb846e09ee8a..c3f63a678881 100644 --- a/reportdesign/Library_rpt.mk +++ b/reportdesign/Library_rpt.mk @@ -26,6 +26,10 @@ $(eval $(call gb_Library_set_precompiled_header,rpt,reportdesign/inc/pch/precomp $(eval $(call gb_Library_use_sdk_api,rpt)) +$(eval $(call gb_Library_use_custom_headers,rpt,\ + officecfg/registry \ +)) + $(eval $(call gb_Library_use_libraries,rpt,\ comphelper \ cppu \ diff --git a/reportdesign/Library_rptxml.mk b/reportdesign/Library_rptxml.mk index dff99605f0bc..5a1707c2af4c 100644 --- a/reportdesign/Library_rptxml.mk +++ b/reportdesign/Library_rptxml.mk @@ -21,6 +21,10 @@ $(eval $(call gb_Library_set_precompiled_header,rptxml,reportdesign/inc/pch/prec $(eval $(call gb_Library_use_sdk_api,rptxml)) +$(eval $(call gb_Library_use_custom_headers,rptxml,\ + officecfg/registry \ +)) + $(eval $(call gb_Library_use_libraries,rptxml,\ comphelper \ cppu \ 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 <vector> #include <string_view> +#include <officecfg/Office/Common.hxx> #include <ReportDefinition.hxx> #include <Functions.hxx> @@ -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 <officecfg/Office/Common.hxx> #include <com/sun/star/sdb/CommandType.hpp> #include <com/sun/star/chart2/data/XDatabaseDataProvider.hpp> #include <com/sun/star/chart/XComplexDescriptionAccess.hpp> @@ -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(" "); } |