sc/source/filter/excel/excimp8.cxx | 9 ++++----- sc/source/filter/excel/expop2.cxx | 8 +++----- sc/source/filter/excel/xiescher.cxx | 9 ++++----- sc/source/filter/xcl97/xcl97rec.cxx | 11 +++++------ 4 files changed, 16 insertions(+), 21 deletions(-)
New commits: commit df1e72b853d2ec8c565c8cdf35087824e6a98f40 Author: Gabor Kelemen <[email protected]> AuthorDate: Mon Jan 1 02:15:52 2024 +0100 Commit: Thorsten Behrens <[email protected]> CommitDate: Fri Jan 5 19:02:00 2024 +0100 Use officecfg instead of SvtFilterOptions wrapper in sc Change-Id: I8f8ff35452147fe83a772d87eb94e86b8877cac8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161590 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <[email protected]> diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index 28a819f9d6fa..2df1ec268324 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -24,7 +24,7 @@ #include <scitems.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> -#include <unotools/fltrcfg.hxx> +#include <officecfg/Office/Calc.hxx> #include <sfx2/docfile.hxx> #include <sfx2/objsh.hxx> @@ -323,7 +323,6 @@ void ImportExcel8::ReadBasic() { ScDocShell* pShell = GetDocShell(); tools::SvRef<SotStorage> xRootStrg = GetRootStorage(); - const SvtFilterOptions& rFilterOpt = SvtFilterOptions::Get(); if( !pShell || !xRootStrg.is() ) return; @@ -331,9 +330,9 @@ void ImportExcel8::ReadBasic() { // #FIXME need to get rid of this, we can also do this from within oox // via the "ooo.vba.VBAGlobals" service - if( ( rFilterOpt.IsLoadExcelBasicCode() || - rFilterOpt.IsLoadExcelBasicStorage() ) && - rFilterOpt.IsLoadExcelBasicExecutable() ) + if( ( officecfg::Office::Calc::Filter::Import::VBA::Load::get() || + officecfg::Office::Calc::Filter::Import::VBA::Save::get() ) && + officecfg::Office::Calc::Filter::Import::VBA::Executable::get() ) { // see if we have the XCB stream tools::SvRef<SotStorageStream> xXCB = xRootStrg->OpenSotStream( "XCB", StreamMode::STD_READ ); diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx index 3ad57b358faf..936a09b2f3ed 100644 --- a/sc/source/filter/excel/expop2.cxx +++ b/sc/source/filter/excel/expop2.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <unotools/fltrcfg.hxx> - #include <osl/diagnose.h> #include <sfx2/objsh.hxx> #include <sfx2/docinf.hxx> @@ -35,6 +33,7 @@ #include <xehelper.hxx> #include <officecfg/Office/Calc.hxx> +#include <officecfg/Office/Common.hxx> #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include <com/sun/star/frame/XModel.hpp> @@ -82,8 +81,7 @@ ErrCode ExportBiff5::Write() eVbaExportMode = VBAExportMode::FULL_EXPORT; else { - const SvtFilterOptions& rFilterOpt = SvtFilterOptions::Get(); - if (rFilterOpt.IsLoadExcelBasicStorage()) + if ( officecfg::Office::Calc::Filter::Import::VBA::Save::get() ) eVbaExportMode = VBAExportMode::REEXPORT_STREAM; } } @@ -115,7 +113,7 @@ ErrCode ExportBiff5::Write() static_cast<cppu::OWeakObject*>(pDocShell->GetModel()), uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentProperties> xDocProps = xDPS->getDocumentProperties(); - if ( SvtFilterOptions::Get().IsEnableCalcPreview() ) + if ( officecfg::Office::Common::Filter::Microsoft::Export::EnableExcelPreview::get() ) { std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile(); diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index df2baef3468b..c6d0a972b78b 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -42,9 +42,9 @@ #include <com/sun/star/frame/XModel.hpp> #include <sfx2/objsh.hxx> +#include <officecfg/Office/Common.hxx> #include <unotools/moduleoptions.hxx> #include <comphelper/configuration.hxx> -#include <unotools/fltrcfg.hxx> #include <vcl/dibtools.hxx> #include <vcl/gdimtf.hxx> #include <vcl/outdev.hxx> @@ -3349,12 +3349,11 @@ XclImpDffConverter::XclImpDffConverter( const XclImpRoot& rRoot, SvStream& rDffS mnOleImpFlags( 0 ), mbNotifyMacroEventRead(false) { - const SvtFilterOptions& rFilterOpt = SvtFilterOptions::Get(); - if( rFilterOpt.IsMathType2Math() ) + if( officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::get() ) mnOleImpFlags |= OLE_MATHTYPE_2_STARMATH; - if( rFilterOpt.IsWinWord2Writer() ) + if( officecfg::Office::Common::Filter::Microsoft::Import::WinWordToWriter::get() ) mnOleImpFlags |= OLE_WINWORD_2_STARWRITER; - if( rFilterOpt.IsPowerPoint2Impress() ) + if( officecfg::Office::Common::Filter::Microsoft::Import::PowerPointToImpress::get() ) mnOleImpFlags |= OLE_POWERPOINT_2_STARIMPRESS; // try to open the 'Ctls' storage stream containing OCX control properties diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index e9ae7bdeba42..65facba4b739 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -43,7 +43,6 @@ #include <xelink.hxx> #include <xlcontent.hxx> -#include <unotools/fltrcfg.hxx> #include <editeng/adjustitem.hxx> #include <editeng/eeitem.hxx> #include <filter/msfilter/msoleexp.hxx> @@ -64,6 +63,7 @@ #include <com/sun/star/chart2/XChartDocument.hpp> #include <sax/fastattribs.hxx> +#include <officecfg/Office/Common.hxx> #include <oox/token/tokens.hxx> #include <oox/token/namespaces.hxx> #include <oox/token/relationship.hxx> @@ -1027,17 +1027,16 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm ) // set version to "old" version, because it must be // saved in MS notation. sal_uInt32 nFl = 0; - const SvtFilterOptions& rFltOpts = SvtFilterOptions::Get(); - if( rFltOpts.IsMath2MathType() ) + if( officecfg::Office::Common::Filter::Microsoft::Export::MathToMathType::get() ) nFl |= OLE_STARMATH_2_MATHTYPE; - if( rFltOpts.IsWriter2WinWord() ) + if( officecfg::Office::Common::Filter::Microsoft::Export::WriterToWinWord::get() ) nFl |= OLE_STARWRITER_2_WINWORD; - if( rFltOpts.IsCalc2Excel() ) + if( officecfg::Office::Common::Filter::Microsoft::Export::CalcToExcel::get() ) nFl |= OLE_STARCALC_2_EXCEL; - if( rFltOpts.IsImpress2PowerPoint() ) + if( officecfg::Office::Common::Filter::Microsoft::Export::ImpressToPowerPoint::get() ) nFl |= OLE_STARIMPRESS_2_POWERPOINT; SvxMSExportOLEObjects aOLEExpFilt( nFl );
