canvas/Library_canvasfactory.mk | 2 - canvas/source/factory/cf_service.cxx | 4 +- comphelper/source/misc/configuration.cxx | 27 +++++++++++++--- connectivity/source/drivers/dbase/DTable.cxx | 4 +- connectivity/source/drivers/file/FConnection.cxx | 4 +- drawinglayer/source/geometry/viewinformation2d.cxx | 5 +- editeng/source/editeng/eertfpar.cxx | 4 +- editeng/source/editeng/impedit2.cxx | 4 +- editeng/source/editeng/impedit3.cxx | 4 +- editeng/source/items/numitem.cxx | 4 +- editeng/source/items/textitem.cxx | 4 +- editeng/source/rtf/svxrtf.cxx | 4 +- embeddedobj/source/commonembedding/persistence.cxx | 4 +- emfio/source/reader/emfreader.cxx | 4 +- emfio/source/reader/mtftools.cxx | 10 ++--- filter/source/config/cache/filtercache.cxx | 2 - filter/source/graphicfilter/icgm/actimpr.cxx | 6 +-- filter/source/graphicfilter/icgm/bitmap.cxx | 4 +- filter/source/msfilter/msdffimp.cxx | 4 +- filter/source/pdf/pdfexport.cxx | 2 - framework/source/fwe/helper/titlehelper.cxx | 3 + framework/source/jobs/jobexecutor.cxx | 4 +- framework/source/services/desktop.cxx | 4 +- framework/source/services/modulemanager.cxx | 4 +- hwpfilter/source/hwpread.cxx | 4 +- hwpfilter/source/hwpreader.cxx | 6 +-- i18nutil/source/utility/paper.cxx | 2 - include/comphelper/configuration.hxx | 12 +++++++ include/unotools/configmgr.hxx | 10 ----- lotuswordpro/source/filter/lwpcelllayout.cxx | 4 +- lotuswordpro/source/filter/lwptablelayout.cxx | 4 +- sc/qa/unit/datacache.cxx | 4 +- sc/qa/unit/ucalc_range.cxx | 4 +- sc/source/core/data/documen2.cxx | 4 +- sc/source/core/data/documen4.cxx | 4 +- sc/source/core/data/documentimport.cxx | 6 +-- sc/source/core/data/global2.cxx | 4 +- sc/source/core/data/globalx.cxx | 4 +- sc/source/core/tool/calcconfig.cxx | 6 +-- sc/source/core/tool/compiler.cxx | 2 - sc/source/core/tool/optutil.cxx | 4 +- sc/source/filter/excel/impop.cxx | 4 +- sc/source/filter/excel/read.cxx | 4 +- sc/source/filter/excel/xicontent.cxx | 6 +-- sc/source/filter/excel/xiescher.cxx | 4 +- sc/source/filter/excel/xipage.cxx | 4 +- sc/source/filter/excel/xipivot.cxx | 4 +- sc/source/filter/excel/xlroot.cxx | 4 +- sc/source/filter/lotus/op.cxx | 4 +- sc/source/filter/qpro/qpro.cxx | 4 +- sc/source/filter/rtf/eeimpars.cxx | 2 - sc/source/filter/xml/xmlrowi.cxx | 4 +- sc/source/ui/docshell/docsh2.cxx | 6 +-- sc/source/ui/docshell/docsh3.cxx | 2 - sc/source/ui/docshell/externalrefmgr.cxx | 4 +- sc/source/ui/docshell/impex.cxx | 12 +++---- sc/source/ui/docshell/tablink.cxx | 4 +- sc/source/ui/view/drawvie3.cxx | 4 +- sd/source/core/TransitionPreset.cxx | 2 - sd/source/core/drawdoc.cxx | 6 +-- sd/source/core/drawdoc4.cxx | 4 +- sd/source/filter/ppt/pptin.cxx | 6 +-- sd/source/ui/app/sddll.cxx | 16 ++++----- sd/source/ui/docshell/docshell.cxx | 2 - sd/source/ui/view/sdview.cxx | 4 +- sfx2/source/appl/app.cxx | 4 +- sfx2/source/appl/appbas.cxx | 8 ++-- sfx2/source/appl/appinit.cxx | 3 + sfx2/source/appl/workwin.cxx | 3 + sfx2/source/control/shell.cxx | 2 - sfx2/source/doc/docfile.cxx | 2 - sfx2/source/doc/objstor.cxx | 12 +++---- sfx2/source/doc/objxtor.cxx | 5 +- sfx2/source/view/classificationhelper.cxx | 2 - starmath/source/cfgitem.cxx | 8 ++-- starmath/source/parse5.cxx | 4 +- svl/source/config/ctloptions.cxx | 2 - svl/source/numbers/zforlist.cxx | 2 - svtools/source/config/colorcfg.cxx | 6 +-- svtools/source/svrtf/svparser.cxx | 4 +- svx/source/customshapes/EnhancedCustomShape2d.cxx | 4 +- svx/source/customshapes/EnhancedCustomShape3d.cxx | 4 +- svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 4 +- svx/source/engine3d/obj3d.cxx | 6 +-- svx/source/form/fmshimp.cxx | 4 +- svx/source/gallery2/gallery1.cxx | 4 +- svx/source/sdr/contact/objectcontactofpageview.cxx | 6 +-- svx/source/svdraw/svddrgv.cxx | 2 - svx/source/svdraw/svdetc.cxx | 4 +- svx/source/svdraw/svdmodel.cxx | 6 +-- svx/source/svdraw/svdobj.cxx | 10 ++--- svx/source/svdraw/svdotext.cxx | 4 +- svx/source/svdraw/svdotxtr.cxx | 4 +- svx/source/table/svdotable.cxx | 4 +- svx/source/unodraw/unoshtxt.cxx | 4 +- svx/source/xoutdev/xtabcolr.cxx | 4 +- sw/source/core/bastyp/SwSmartTagMgr.cxx | 4 +- sw/source/core/bastyp/init.cxx | 6 +-- sw/source/core/crsr/pam.cxx | 2 - sw/source/core/doc/DocumentDrawModelManager.cxx | 4 +- sw/source/core/doc/DocumentSettingManager.cxx | 4 +- sw/source/core/doc/docdesc.cxx | 4 +- sw/source/core/doc/docfmt.cxx | 2 - sw/source/core/doc/docnew.cxx | 3 + sw/source/core/doc/number.cxx | 4 +- sw/source/core/doc/tblafmt.cxx | 6 +-- sw/source/core/draw/dview.cxx | 4 +- sw/source/core/edit/edws.cxx | 2 - sw/source/core/layout/paintfrm.cxx | 3 + sw/source/core/text/txtfrm.cxx | 4 +- sw/source/core/txtnode/OnlineAccessibilityCheck.cxx | 8 ++-- sw/source/core/view/printdata.cxx | 4 +- sw/source/core/view/viewsh.cxx | 2 - sw/source/filter/basflt/shellio.cxx | 3 - sw/source/filter/html/htmltab.cxx | 5 +- sw/source/filter/ww8/ww8par.cxx | 4 +- sw/source/filter/ww8/ww8toolbar.cxx | 4 +- sw/source/filter/xml/xmltbli.cxx | 6 +-- sw/source/uibase/app/docsh2.cxx | 2 - sw/source/uibase/app/docshdrw.cxx | 4 +- sw/source/uibase/app/docshini.cxx | 4 +- sw/source/uibase/app/swdll.cxx | 6 +-- sw/source/uibase/app/swmodule.cxx | 8 ++-- sw/source/uibase/config/fontcfg.cxx | 8 ++-- sw/source/uibase/config/usrpref.cxx | 4 +- sw/source/uibase/config/viewopt.cxx | 7 +--- sw/source/uibase/uiview/view.cxx | 4 +- sw/source/uibase/uiview/view0.cxx | 2 - sw/source/uibase/uno/unotxdoc.cxx | 3 - unotools/source/config/configitem.cxx | 5 +- unotools/source/config/configmgr.cxx | 15 -------- unotools/source/config/eventcfg.cxx | 3 + unotools/source/config/fontcfg.cxx | 7 ++-- unotools/source/config/securityoptions.cxx | 10 ++--- unotools/source/config/syslocaleoptions.cxx | 3 + unotools/source/config/viewoptions.cxx | 3 + unotools/source/misc/defaultencoding.cxx | 2 - unotools/source/misc/mediadescriptor.cxx | 2 - vcl/headless/CairoCommon.cxx | 6 +-- vcl/source/app/scheduler.cxx | 4 +- vcl/source/app/settings.cxx | 16 ++++----- vcl/source/app/svapp.cxx | 4 +- vcl/source/bitmap/dibtools.cxx | 4 +- vcl/source/filter/FilterConfigCache.cxx | 4 +- vcl/source/filter/graphicfilter.cxx | 4 +- vcl/source/filter/idxf/dxf2mtf.cxx | 6 +-- vcl/source/filter/ieps/ieps.cxx | 4 +- vcl/source/filter/itiff/itiff.cxx | 4 +- vcl/source/filter/jpeg/jpegc.cxx | 6 +-- vcl/source/filter/png/PngImageReader.cxx | 6 +-- vcl/source/filter/svm/SvmReader.cxx | 4 +- vcl/source/filter/webp/reader.cxx | 4 +- vcl/source/font/PhysicalFontCollection.cxx | 12 +++---- vcl/source/font/font.cxx | 4 +- vcl/source/font/fontmetric.cxx | 4 +- vcl/source/gdi/CommonSalLayout.cxx | 4 +- vcl/source/gdi/impglyphitem.cxx | 5 +- vcl/source/gdi/metaact.cxx | 6 +-- vcl/source/gdi/pdfwriter_impl.cxx | 2 - vcl/source/gdi/region.cxx | 6 +-- vcl/source/graphic/Manager.cxx | 2 - vcl/source/outdev/font.cxx | 8 ++-- vcl/source/outdev/hatch.cxx | 8 ++-- vcl/source/outdev/line.cxx | 6 +-- vcl/source/outdev/text.cxx | 4 +- vcl/source/outdev/textline.cxx | 6 +-- vcl/source/text/TextLayoutCache.cxx | 5 +- vcl/source/window/settings.cxx | 2 - vcl/source/window/window.cxx | 6 +-- vcl/unx/generic/fontmanager/fontconfig.cxx | 2 - vcl/workben/commonfuzzer.hxx | 4 +- vcl/workben/fftester.cxx | 4 +- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 5 +- xmloff/source/core/DocumentSettingsContext.cxx | 3 - xmloff/source/draw/ximpstyl.cxx | 4 +- 175 files changed, 425 insertions(+), 415 deletions(-)
New commits: commit 39d0ab03fd064ff0582d98d5c52a0d3747e73999 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Dec 29 21:30:44 2023 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sat Dec 30 12:45:55 2023 +0100 drop some IsFuzzing spam we don't need Change-Id: I1da86b0be73713b506044c969930912b58b4d514 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161435 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index a4425897983b..be3b4ddd2db9 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -22,7 +22,6 @@ #include <tools/date.hxx> #include <tools/time.hxx> #include <svl/fstathelper.hxx> -#include <unotools/configmgr.hxx> #include <unotools/moduleoptions.hxx> #include <sfx2/docfile.hxx> #include <sfx2/docfilt.hxx> @@ -85,7 +84,7 @@ void SwAsciiOptions::Reset() m_eCharSet = ::osl_getThreadTextEncoding(); m_nLanguage = LANGUAGE_SYSTEM; m_bIncludeBOM = true; - m_bIncludeHidden = !comphelper::IsFuzzing() && officecfg::Office::Writer::FilterFlags::ASCII::IncludeHiddenText::get(); + m_bIncludeHidden = officecfg::Office::Writer::FilterFlags::ASCII::IncludeHiddenText::get(); } ErrCodeMsg SwReader::Read( const Reader& rOptions ) diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index f5ee222a7ce7..3cf82bee15ab 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -35,7 +35,6 @@ #include <crstate.hxx> #include <authratr.hxx> #include <svtools/colorcfg.hxx> -#include <unotools/configmgr.hxx> #include <unotools/syslocale.hxx> #include <editeng/acorrcfg.hxx> @@ -285,7 +284,7 @@ SwViewOption::SwViewOption() : } m_nDivisionX = m_nDivisionY = 1; - m_bSelectionInReadonly = comphelper::IsFuzzing() || officecfg::Office::Common::Accessibility::IsSelectionInReadonly::get(); + m_bSelectionInReadonly = officecfg::Office::Common::Accessibility::IsSelectionInReadonly::get(); m_bIdle = true; diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 597294e3c7f9..c01d0e179507 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -69,7 +69,6 @@ #include <unostyle.hxx> #include <unodraw.hxx> #include <svl/eitem.hxx> -#include <unotools/configmgr.hxx> #include <unotools/datetime.hxx> #include <unocrsr.hxx> #include <unofieldcoll.hxx> @@ -2535,7 +2534,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( // #122919# Force field update before PDF export, but after layout init (tdf#121962) bool bStateChanged = false; // check configuration: shall update of printing information in DocInfo set the document to "modified"? - if (pRenderDocShell->IsEnableSetModified() && !comphelper::IsFuzzing() && !officecfg::Office::Common::Print::PrintingModifiesDocument::get()) + if (pRenderDocShell->IsEnableSetModified() && !officecfg::Office::Common::Print::PrintingModifiesDocument::get()) { pRenderDocShell->EnableSetModified( false ); bStateChanged = true; diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 2b4d3384f5e4..7d02be6dfd49 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -123,7 +123,6 @@ #include <comphelper/sequence.hxx> #include <comphelper/propertyvalue.hxx> #include <comphelper/propertysequence.hxx> -#include <unotools/configmgr.hxx> #include <unotools/mediadescriptor.hxx> #include <comphelper/diagnose_ex.hxx> #include <sal/log.hxx> @@ -335,7 +334,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_xTextDocument( xModel, uno::UNO_QUERY ), m_xTextFactory( xModel, uno::UNO_QUERY ), m_xComponentContext(std::move( xContext )), - m_bForceGenericFields(!comphelper::IsFuzzing() && officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get()), + m_bForceGenericFields(officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get()), m_bIsDecimalComma( false ), m_bSetUserFieldContent( false ), m_bSetCitation( false ), diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 615ed8fb7bf7..4e4dd330b09f 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -48,7 +48,6 @@ #include <sal/log.hxx> #include <osl/diagnose.h> #include <comphelper/diagnose_ex.hxx> -#include <unotools/configmgr.hxx> #include "xmlenums.hxx" using namespace com::sun::star; commit f0a8b5b81d6be08de6e0d504616a1f09830f7c38 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sat Dec 23 16:07:24 2023 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sat Dec 30 12:45:45 2023 +0100 move IsFuzzing to comphelper and try something a bit more generic Change-Id: I1d8256576cd02f0a589df350ba7b53059dd586a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161250 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/canvas/Library_canvasfactory.mk b/canvas/Library_canvasfactory.mk index 7f2567fde006..0b0a9d988e15 100644 --- a/canvas/Library_canvasfactory.mk +++ b/canvas/Library_canvasfactory.mk @@ -31,10 +31,10 @@ $(eval $(call gb_Library_use_external,canvasfactory,boost_headers)) $(eval $(call gb_Library_use_sdk_api,canvasfactory)) $(eval $(call gb_Library_use_libraries,canvasfactory,\ + comphelper \ cppu \ cppuhelper \ sal \ - utl \ vcl \ )) diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx index a56551832801..94f7069e267a 100644 --- a/canvas/source/factory/cf_service.cxx +++ b/canvas/source/factory/cf_service.cxx @@ -38,7 +38,7 @@ #include <o3tl/functional.hxx> #include <o3tl/string_view.hxx> #include <vcl/skia/SkiaHelper.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -113,7 +113,7 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) : m_bCacheHasUseAcceleratedEntry(), m_bCacheHasUseAAEntry() { - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { try { diff --git a/comphelper/source/misc/configuration.cxx b/comphelper/source/misc/configuration.cxx index 1ef359c7a9b6..00179ea010da 100644 --- a/comphelper/source/misc/configuration.cxx +++ b/comphelper/source/misc/configuration.cxx @@ -183,9 +183,10 @@ css::uno::Any comphelper::detail::ConfigurationWrapper::getPropertyValue(OUStrin std::scoped_lock aGuard(maMutex); if (mbDisposed) throw css::lang::DisposedException(); -#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) - return css::uno::Any(); -#else + + // should be short-circuited in ConfigurationProperty::get() + assert(!comphelper::IsFuzzing()); + // Cache the configuration access, since some of the keys are used in hot code. auto it = maPropertyCache.find(path); if( it != maPropertyCache.end()) @@ -201,7 +202,6 @@ css::uno::Any comphelper::detail::ConfigurationWrapper::getPropertyValue(OUStrin css::uno::Any property = access->getByName(childName); maPropertyCache.emplace(path, property); return property; -#endif } void comphelper::detail::ConfigurationWrapper::setPropertyValue( @@ -332,4 +332,23 @@ void SAL_CALL comphelper::ConfigurationListener::propertyChange( } } +namespace comphelper { + +static bool bIsFuzzing = false; + +#if !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) +bool IsFuzzing() +{ + return bIsFuzzing; +} +#endif + +void EnableFuzzing() +{ + bIsFuzzing = true; + LanguageTag::disable_lt_tag_parse(); +} + +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 3995ee8984fe..98d598d0478f 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -41,7 +41,7 @@ #include <comphelper/servicehelper.hxx> #include <o3tl/string_view.hxx> #include <comphelper/string.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/tempfile.hxx> #include <unotools/ucbhelper.hxx> #include <comphelper/types.hxx> @@ -1383,7 +1383,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo) bool ODbaseTable::HasMemoFields() const { - return m_aHeader.type > dBaseIV && !utl::ConfigManager::IsFuzzing(); + return m_aHeader.type > dBaseIV && !comphelper::IsFuzzing(); } // creates in principle dBase III file format diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index de93df897b23..38ce342cb5e2 100644 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx @@ -32,7 +32,7 @@ #include <com/sun/star/ucb/XContentIdentifier.hpp> #include <tools/urlobj.hxx> #include <file/FCatalog.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/pathoptions.hxx> #include <ucbhelper/content.hxx> #include <connectivity/dbcharset.hxx> @@ -132,7 +132,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& OUString aFileName = aDSN; INetURLObject aURL; aURL.SetSmartProtocol(INetProtocol::File); - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { SvtPathOptions aPathOptions; aFileName = aPathOptions.SubstituteVariable(aFileName); diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx b/drawinglayer/source/geometry/viewinformation2d.cxx index 03089e41e36f..67993d95544b 100644 --- a/drawinglayer/source/geometry/viewinformation2d.cxx +++ b/drawinglayer/source/geometry/viewinformation2d.cxx @@ -227,7 +227,7 @@ ViewInformation2D::ViewInformation2D() if (!bForwardsAreInitialized) { bForwardsAreInitialized = true; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { bForwardPixelSnapHairline = officecfg::Office::Common::Drawinglayer::SnapHorVerLinesToDiscrete::get(); @@ -356,8 +356,7 @@ void ViewInformation2D::setPixelSnapHairline(bool bNew) static std::atomic<bool>& globalAntiAliasing() { static std::atomic<bool> g_GlobalAntiAliasing - = utl::ConfigManager::IsFuzzing() - || officecfg::Office::Common::Drawinglayer::AntiAliasing::get(); + = comphelper::IsFuzzing() || officecfg::Office::Common::Drawinglayer::AntiAliasing::get(); return g_GlobalAntiAliasing; } diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx index 948216f33dbe..557081f8496f 100644 --- a/editeng/source/editeng/eertfpar.cxx +++ b/editeng/source/editeng/eertfpar.cxx @@ -31,7 +31,7 @@ #include <svtools/rtftoken.h> #include <svtools/htmltokn.h> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> using namespace com::sun::star; @@ -336,7 +336,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet ) { nEsc *= 10; //HalfPoints => Twips was embezzled in RTFITEM.CXX! SvxFont aFont; - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) { // ofz#24932 detecting RTL vs LTR is slow aFont = aStartPaM.GetNode()->GetCharAttribs().GetDefFont(); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 1f481259cafd..d3a62cb2b9de 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -66,7 +66,7 @@ #include <comphelper/flagguard.hxx> #include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unicode/ubidi.h> #include <algorithm> @@ -130,7 +130,7 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) : mbLastTryMerge(false), mbReplaceLeadingSingleQuotationMark(true), mbSkipOutsideFormat(false), - mbFuzzing(utl::ConfigManager::IsFuzzing()), + mbFuzzing(comphelper::IsFuzzing()), mbNbspRunNext(false) { maStatus.GetControlWord() = EEControlBits::USECHARATTRIBS | EEControlBits::DOIDLEFORMAT | diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 84332897736b..73a051e457fe 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -58,7 +58,7 @@ #include <editeng/hngpnctitem.hxx> #include <editeng/forbiddencharacterstable.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <math.h> #include <vcl/metric.hxx> @@ -4545,7 +4545,7 @@ const SvxLRSpaceItem& ImpEditEngine::GetLRSpaceItem( ContentNode* pNode ) // text numeral setting: LanguageType ImpEditEngine::ImplCalcDigitLang(LanguageType eCurLang) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return LANGUAGE_ENGLISH_US; // #114278# Also setting up digit language from Svt options diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 983eff2779e2..2a1e540c3cb7 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -46,7 +46,7 @@ #include <tools/stream.hxx> #include <tools/debug.hxx> #include <tools/GenericTypeSerializer.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <libxml/xmlwriter.h> #include <editeng/unonrule.hxx> #include <sal/log.hxx> @@ -107,7 +107,7 @@ SvxNumberType::~SvxNumberType() OUString SvxNumberType::GetNumStr( sal_Int32 nNo ) const { - LanguageTag aLang = utl::ConfigManager::IsFuzzing() ? + LanguageTag aLang = comphelper::IsFuzzing() ? LanguageTag("en-US") : Application::GetSettings().GetLanguageTag(); return GetNumStr( nNo, aLang.getLocale() ); diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 9fd6c651985e..cf4017e7911e 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -24,7 +24,7 @@ #include <sal/log.hxx> #include <o3tl/safeint.hxx> #include <osl/diagnose.h> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/fontdefs.hxx> #include <unotools/intlwrapper.hxx> #include <unotools/syslocale.hxx> @@ -764,7 +764,7 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) if (fPoint < 0. || fPoint > 10000.) return false; - static bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static bool bFuzzing = comphelper::IsFuzzing(); if (bFuzzing && fPoint > 120) { SAL_WARN("editeng.items", "SvxFontHeightItem ignoring font size of " << fPoint << " for performance"); diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 1ef6f30b4024..a8d4c976e212 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -27,7 +27,7 @@ #include <svl/itempool.hxx> #include <i18nlangtag/languagetag.hxx> #include <tools/debug.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <comphelper/string.hxx> @@ -629,7 +629,7 @@ SvxRTFItemStackType* SvxRTFParser::GetAttrSet_() aAttrStack.push_back( std::move(xNew) ); - if (aAttrStack.size() > 96 && utl::ConfigManager::IsFuzzing()) + if (aAttrStack.size() > 96 && comphelper::IsFuzzing()) throw std::range_error("ecStackOverflow"); bNewGroup = false; diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 0ce42dce7be7..97964aff7878 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -54,7 +54,7 @@ #include <comphelper/mimeconfighelper.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/propertyvalue.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/mediadescriptor.hxx> #include <unotools/securityoptions.hxx> @@ -485,7 +485,7 @@ OUString OCommonEmbeddedObject::GetFilterName( sal_Int32 nVersion ) const if ( aFilterName.isEmpty() ) { OUString sDocumentServiceName = GetDocumentServiceName(); - if (utl::ConfigManager::IsFuzzing() && nVersion == SOFFICE_FILEFORMAT_CURRENT && + if (comphelper::IsFuzzing() && nVersion == SOFFICE_FILEFORMAT_CURRENT && sDocumentServiceName == "com.sun.star.chart2.ChartDocument") { return "chart8"; diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx index 9c6ef8280330..a5bceb5532fe 100644 --- a/emfio/source/reader/emfreader.cxx +++ b/emfio/source/reader/emfreader.cxx @@ -26,7 +26,7 @@ #include <o3tl/sprintf.hxx> #include <tools/stream.hxx> #include <memory> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/graph.hxx> #include <vcl/pdfread.hxx> #include <rtl/bootstrap.hxx> @@ -386,7 +386,7 @@ bool ImplReadRegion( basegfx::B2DPolyPolygon& rPolyPoly, SvStream& rStream, sal_ rPolyPoly.append( basegfx::utils::createPolygonFromRect( ::basegfx::B2DRectangle( nLeft, nTop, nRight, nBottom ) ) ); SAL_INFO("emfio", " " << i << " Left: " << nLeft << ", top: " << nTop << ", right: " << nRight << ", bottom: " << nBottom); } - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { rPolyPoly = basegfx::utils::solveCrossovers(rPolyPoly); rPolyPoly = basegfx::utils::stripNeutralPolygons(rPolyPoly); diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index 6eee28002321..f5516648780a 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -35,7 +35,7 @@ #include <osl/diagnose.h> #include <vcl/virdev.hxx> #include <o3tl/safeint.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/defaultencoding.hxx> #include <unotools/wincodepage.hxx> @@ -1006,7 +1006,7 @@ namespace emfio void MtfTools::IntersectClipRect( const tools::Rectangle& rRect ) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; mbClipNeedsUpdate=true; if ((rRect.Left()-rRect.Right()==0) && (rRect.Top()-rRect.Bottom()==0)) @@ -1020,7 +1020,7 @@ namespace emfio void MtfTools::ExcludeClipRect( const tools::Rectangle& rRect ) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; mbClipNeedsUpdate=true; tools::Polygon aPoly( rRect ); @@ -1030,7 +1030,7 @@ namespace emfio void MtfTools::MoveClipRegion( const Size& rSize ) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; mbClipNeedsUpdate=true; maClipPath.moveClipRegion( ImplMap( rSize ) ); @@ -1038,7 +1038,7 @@ namespace emfio void MtfTools::SetClipPath( const tools::PolyPolygon& rPolyPolygon, RegionMode eClippingMode, bool bIsMapped ) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; mbClipNeedsUpdate = true; tools::PolyPolygon aPolyPolygon(rPolyPolygon); diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 8a6f88703823..70c18a841bb4 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -881,7 +881,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_createConfigAccess { css::uno::Reference< css::uno::XInterface > xCfg; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { try { diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index f01f53b53d9f..e726db7a137c 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -47,7 +47,7 @@ #include <comphelper/processfactory.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <tools/helpers.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include "bitmap.hxx" #include "elements.hxx" @@ -110,7 +110,7 @@ bool CGMImpressOutAct::ImplInitPage() bool CGMImpressOutAct::ImplCreateShape( const OUString& rType ) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return false; uno::Reference< uno::XInterface > xNewShape( maXMultiServiceFactory->createInstance( rType ) ); maXShape.set( xNewShape, uno::UNO_QUERY ); @@ -390,7 +390,7 @@ void CGMImpressOutAct::InsertPage() maXDrawPage = maXDrawPages->insertNewByIndex(0xffff); if ( !ImplInitPage() ) mpCGM->mbStatus = false; - if (mnCurrentPage > MAX_PAGES_FOR_FUZZING && utl::ConfigManager::IsFuzzing()) + if (mnCurrentPage > MAX_PAGES_FOR_FUZZING && comphelper::IsFuzzing()) { // ofz#21753 that's enough pages for fuzzing, we're not doing anything productive now mpCGM->mbStatus = false; diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx index f7fea35f3583..ed163206641a 100644 --- a/filter/source/graphicfilter/icgm/bitmap.cxx +++ b/filter/source/graphicfilter/icgm/bitmap.cxx @@ -19,7 +19,7 @@ #include <sal/log.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/BitmapTools.hxx> #include <memory> @@ -375,7 +375,7 @@ bool CGMBitmap::ImplGetDimensions( CGMBitmapDescriptor& rDesc ) void CGMBitmap::ImplInsert( CGMBitmapDescriptor const & rSource, CGMBitmapDescriptor& rDest ) { ++mpCGM->mnBitmapInserts; - static const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static const bool bFuzzing = comphelper::IsFuzzing(); if (bFuzzing) { if (rDest.mxBitmap.GetSizePixel().Height() + rSource.mnY > SAL_MAX_UINT16) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index e0e378f53430..0435acce0c07 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -35,7 +35,7 @@ #include <comphelper/classids.hxx> #include <toolkit/helper/vclunohelper.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/streamwrap.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> @@ -7196,7 +7196,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo xStorage->Commit(); xStorage.clear(); OUString aType = SfxFilter::GetTypeFromStorage( rSrcStg ); - if (aType.getLength() && !utl::ConfigManager::IsFuzzing()) + if (aType.getLength() && !comphelper::IsFuzzing()) { SfxFilterMatcher aMatch( sStarName ); pFilter = aMatch.GetFilter4EA( aType ); diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 1459590b2f23..9f7328c113f2 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -499,7 +499,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& } } - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { // getting the string for the producer OUString aProducerOverride = officecfg::Office::Common::Save::Document::GeneratorOverride::get(); diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index 5ab03ab10e8f..004cd59383af 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -29,6 +29,7 @@ #include <com/sun/star/frame/XModel3.hpp> #include <com/sun/star/document/XDocumentEventBroadcaster.hpp> +#include <comphelper/configuration.hxx> #include <unotools/configmgr.hxx> #include <unotools/bootstrap.hxx> #include <unotools/mediadescriptor.hxx> @@ -490,7 +491,7 @@ void TitleHelper::impl_updateTitleForFrame (const css::uno::Reference< css::fram impl_appendComponentTitle (sTitle, xComponent); #ifndef MACOSX - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { // fdo#70376: We want the window title to contain just the // document name (from the above "component title"). diff --git a/framework/source/jobs/jobexecutor.cxx b/framework/source/jobs/jobexecutor.cxx index 61806538585b..f1c450bd6530 100644 --- a/framework/source/jobs/jobexecutor.cxx +++ b/framework/source/jobs/jobexecutor.cxx @@ -33,7 +33,7 @@ #include <comphelper/compbase.hxx> #include <cppuhelper/supportsservice.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/configpaths.hxx> #include <rtl/ref.hxx> #include <sal/log.hxx> @@ -127,7 +127,7 @@ JobExecutor::JobExecutor( /*IN*/ const css::uno::Reference< css::uno::XComponent void JobExecutor::initListeners() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; // read the list of all currently registered events inside configuration. diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 12a45fa93117..6560af7f1eb3 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -58,7 +58,7 @@ #include <sal/log.hxx> #include <comphelper/errcode.hxx> #include <vcl/threadex.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> namespace framework{ @@ -673,7 +673,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL Desktop::queryDispatch( co if ( aURL.Protocol.equalsIgnoreAsciiCase(".uno:") ) aCommand = aURL.Path; - if (!m_xCommandOptions && !utl::ConfigManager::IsFuzzing()) + if (!m_xCommandOptions && !comphelper::IsFuzzing()) m_xCommandOptions.reset(new SvtCommandOptions); // Make std::unordered_map lookup if the current URL is in the disabled list diff --git a/framework/source/services/modulemanager.cxx b/framework/source/services/modulemanager.cxx index ce48cfd44123..f2e5758b90e1 100644 --- a/framework/source/services/modulemanager.cxx +++ b/framework/source/services/modulemanager.cxx @@ -36,7 +36,7 @@ #include <comphelper/sequenceashashmap.hxx> #include <comphelper/sequence.hxx> #include <comphelper/enumhelper.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <utility> namespace { @@ -128,7 +128,7 @@ private: ModuleManager::ModuleManager(css::uno::Reference< css::uno::XComponentContext > xContext) : m_xContext(std::move(xContext)) { - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { m_xCFG.set( comphelper::ConfigurationHelper::openConfig( m_xContext, "/org.openoffice.Setup/Office/Factories", diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx index 302879802a6b..98a8e56aa5e5 100644 --- a/hwpfilter/source/hwpread.cxx +++ b/hwpfilter/source/hwpread.cxx @@ -20,7 +20,7 @@ #include "precompile.h" #include <comphelper/newarray.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <sal/log.hxx> #include <tools/long.hxx> @@ -291,7 +291,7 @@ bool TxtBox::Read(HWPFile & hwpf) return hwpf.SetState(HWP_InvalidFileFormat); } - if (ncell > 4096 && utl::ConfigManager::IsFuzzing()) { + if (ncell > 4096 && comphelper::IsFuzzing()) { // cut off at an arbitrary size to speed up fuzzing return hwpf.SetState(HWP_InvalidFileFormat); } diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 90083bd724a7..0f248d8c9651 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -30,7 +30,7 @@ #include <tools/stream.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include "fontmap.hxx" #include "formula.h" @@ -958,7 +958,7 @@ void HwpReader::makeMasterStyles() PageSetting *pPrevSet = nullptr; PageSetting *pPage = nullptr; - if (nMax > 512 && utl::ConfigManager::IsFuzzing()) + if (nMax > 512 && comphelper::IsFuzzing()) { SAL_WARN("filter.hwp", "too many pages: " << nMax << " clip to " << 512); nMax = 512; @@ -1476,7 +1476,7 @@ void HwpReader::makePageStyle() HWPInfo& hwpinfo = hwpfile.GetHWPInfo(); int pmCount = hwpfile.getColumnCount(); - if (pmCount > 512 && utl::ConfigManager::IsFuzzing()) + if (pmCount > 512 && comphelper::IsFuzzing()) { SAL_WARN("filter.hwp", "too many pages: " << pmCount << " clip to " << 512); pmCount = 512; diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx index 399b3295ed27..c5150c384b60 100644 --- a/i18nutil/source/utility/paper.cxx +++ b/i18nutil/source/utility/paper.cxx @@ -229,7 +229,7 @@ tools::Long PaperInfo::sloppyFitPageDimension(tools::Long nDimension) PaperInfo PaperInfo::getSystemDefaultPaper() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return PaperInfo(PAPER_A4); OUString aLocaleStr = officecfg::Setup::L10N::ooSetupSystemLocale::get(); diff --git a/include/comphelper/configuration.hxx b/include/comphelper/configuration.hxx index 652e9afaa640..968fd88ac522 100644 --- a/include/comphelper/configuration.hxx +++ b/include/comphelper/configuration.hxx @@ -192,6 +192,16 @@ private: } +// Avoid using the config layer and rely on defaults which is only useful +// for special test tool targets (typically fuzzing) where start-up speed +// is of the essence +#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) +constexpr bool IsFuzzing() { return true; } +#else +COMPHELPER_DLLPUBLIC bool IsFuzzing(); +#endif +COMPHELPER_DLLPUBLIC void EnableFuzzing(); + /// A type-safe wrapper around a (non-localized) configuration property. /// /// Automatically generated headers for the various configuration properties @@ -211,6 +221,8 @@ template< typename T, typename U > struct ConfigurationProperty /// For nillable properties, U is of type std::optional<U'>. static U get() { + if (comphelper::IsFuzzing()) + return U(); // Folding this into one statement causes a bogus error at least with // Red Hat GCC 4.6.2-1: css::uno::Any a( diff --git a/include/unotools/configmgr.hxx b/include/unotools/configmgr.hxx index e8d42a28fd7e..d439a05d0362 100644 --- a/include/unotools/configmgr.hxx +++ b/include/unotools/configmgr.hxx @@ -77,16 +77,6 @@ public: SAL_DLLPRIVATE void registerConfigItem(utl::ConfigItem * item); - // Avoid using the config layer and rely on defaults which is only useful - // for special test tool targets (typically fuzzing) where start-up speed - // is of the essence -#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) - static constexpr bool IsFuzzing() { return true; } -#else - static bool IsFuzzing(); -#endif - static void EnableFuzzing(); - private: ConfigManager(const ConfigManager&) = delete; diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx b/lotuswordpro/source/filter/lwpcelllayout.cxx index cd5478e3f5cd..d2de666aad2c 100644 --- a/lotuswordpro/source/filter/lwpcelllayout.cxx +++ b/lotuswordpro/source/filter/lwpcelllayout.cxx @@ -67,7 +67,7 @@ #include <lwpglobalmgr.hxx> #include <sal/log.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <xfilter/xfstylemanager.hxx> #include <xfilter/xfcell.hxx> @@ -820,7 +820,7 @@ void LwpConnectedCellLayout::Read() cnumcols = static_cast<sal_uInt8>(numcols); m_nRealrowspan = cnumrows; - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) m_nRealrowspan = std::min<sal_uInt16>(m_nRealrowspan, 128); m_nRealcolspan = cnumcols; diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index c2760c6c6c4c..b65bcc178de6 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -81,7 +81,7 @@ #include <xfilter/xfparastyle.hxx> #include <o3tl/sorted_vector.hxx> #include <sal/log.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <algorithm> #include <memory> @@ -803,7 +803,7 @@ void LwpTableLayout::ParseTable() pTableHeading->GetStartEndRow(nStartHeadRow,nEndHeadRow); if (nStartHeadRow == 0) { - if (utl::ConfigManager::IsFuzzing() && nEndHeadRow - nStartHeadRow > 128) + if (comphelper::IsFuzzing() && nEndHeadRow - nStartHeadRow > 128) { SAL_WARN("lwp", "truncating HeadingRow for fuzzing performance"); nEndHeadRow = nStartHeadRow + 128; diff --git a/sc/qa/unit/datacache.cxx b/sc/qa/unit/datacache.cxx index e3ee2058f63b..95cf67ae5efb 100644 --- a/sc/qa/unit/datacache.cxx +++ b/sc/qa/unit/datacache.cxx @@ -8,7 +8,7 @@ */ #include <sal/config.h> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include "helper/qahelper.hxx" #include <global.hxx> @@ -33,7 +33,7 @@ public: public: ScCacheTest() { - utl::ConfigManager::EnableFuzzing(); + comphelper::EnableFuzzing(); ScDLL::Init(); ScGlobal::Init(); } diff --git a/sc/qa/unit/ucalc_range.cxx b/sc/qa/unit/ucalc_range.cxx index 8a48665035c5..387cf4b7bb87 100644 --- a/sc/qa/unit/ucalc_range.cxx +++ b/sc/qa/unit/ucalc_range.cxx @@ -9,7 +9,7 @@ #include <sal/config.h> #include "helper/qahelper.hxx" -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <document.hxx> #include <docsh.hxx> #include <global.hxx> @@ -70,7 +70,7 @@ public: virtual void setUp() override { - utl::ConfigManager::EnableFuzzing(); + comphelper::EnableFuzzing(); ScDLL::Init(); ScGlobal::Init(); } diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 026b2e1b9956..6e81648350c6 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -36,7 +36,7 @@ #include <comphelper/threadpool.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <scmod.hxx> #include <document.hxx> @@ -222,7 +222,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, ScDocShell* pDocShell ) : if ( eMode == SCDOCMODE_DOCUMENT || eMode == SCDOCMODE_FUNCTIONACCESS ) { mxPoolHelper = new ScPoolHelper( *this ); - if (!utl::ConfigManager::IsFuzzing()) //just too slow + if (!comphelper::IsFuzzing()) //just too slow pBASM.reset( new ScBroadcastAreaSlotMachine( this ) ); pChartListenerCollection.reset( new ScChartListenerCollection( *this ) ); pRefreshTimerControl.reset( new ScRefreshTimerControl ); diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index e62956771cb7..08dfb6aefc49 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -22,7 +22,7 @@ #include <svl/zformat.hxx> #include <formula/token.hxx> #include <sal/log.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <osl/diagnose.h> #include <o3tl/string_view.hxx> @@ -273,7 +273,7 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, SAL_WARN("sc", "ScDocument::InsertMatrixFormula: No table marked"); return; } - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) { // just too slow if (nCol2 - nCol1 > 64) diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx index a6c25a1bd5ec..b2e823c4a511 100644 --- a/sc/source/core/data/documentimport.cxx +++ b/sc/source/core/data/documentimport.cxx @@ -28,7 +28,7 @@ #include <o3tl/safeint.hxx> #include <svl/sharedstringpool.hxx> #include <svl/languageoptions.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unordered_map> namespace { @@ -61,7 +61,7 @@ struct ScDocumentImportImpl mrDoc(rDoc), maListenCxt(rDoc), mnDefaultScriptNumeric(SvtScriptType::UNKNOWN), - mbFuzzing(utl::ConfigManager::IsFuzzing()) + mbFuzzing(comphelper::IsFuzzing()) {} bool isValid( size_t nTab, size_t nCol ) @@ -411,7 +411,7 @@ void ScDocumentImport::setMatrixCells( if (!pBlockPos) return; - if (utl::ConfigManager::IsFuzzing()) //just too slow + if (comphelper::IsFuzzing()) //just too slow return; sc::CellStoreType& rCells = pTab->aCol[rBasePos.Col()].maCells; diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx index 6f8352fd1862..60c0f02dede2 100644 --- a/sc/source/core/data/global2.cxx +++ b/sc/source/core/data/global2.cxx @@ -19,7 +19,7 @@ #include <sfx2/docfile.hxx> #include <sfx2/objsh.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/pathoptions.hxx> #include <tools/urlobj.hxx> #include <svl/numformat.hxx> @@ -291,7 +291,7 @@ OUString ScGlobal::GetAbsDocName( const OUString& rFileName, if (!pShell || !pShell->HasName()) { // maybe relative to document path working directory INetURLObject aObj; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { aObj.SetSmartURL(SvtPathOptions().GetWorkPath()); aObj.setFinalSlash(); // it IS a path diff --git a/sc/source/core/data/globalx.cxx b/sc/source/core/data/globalx.cxx index 56d48e039bad..1fac6e9c11b4 100644 --- a/sc/source/core/data/globalx.cxx +++ b/sc/source/core/data/globalx.cxx @@ -32,7 +32,7 @@ #include <com/sun/star/i18n/OrdinalSuffix.hpp> #include <comphelper/processfactory.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/localedatawrapper.hxx> namespace com::sun::star::ucb { class XCommandEnvironment; } @@ -43,7 +43,7 @@ using namespace ::com::sun::star::ucb; void ScGlobal::InitAddIns() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; // multi paths separated by semicolons diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index 7eb36d73a97c..58dc1b7c747e 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -14,7 +14,7 @@ #include <formula/opcode.hxx> #include <rtl/ustring.hxx> #include <sal/log.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <calcconfig.hxx> @@ -68,7 +68,7 @@ ForceCalculationType ScCalcConfig::getForceCalculationType() bool ScCalcConfig::isOpenCLEnabled() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return false; static ForceCalculationType force = getForceCalculationType(); if( force != ForceCalculationNone ) @@ -79,7 +79,7 @@ bool ScCalcConfig::isOpenCLEnabled() bool ScCalcConfig::isThreadingEnabled() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return false; static ForceCalculationType force = getForceCalculationType(); if( force != ForceCalculationNone ) diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 63b1f0969225..f144b8bf29bb 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4450,7 +4450,7 @@ bool ScCompiler::NextNewToken( bool bInArray ) if ( cSymbol[0] < 128 ) { bMayBeFuncName = rtl::isAsciiAlpha( cSymbol[0] ); - if (!bMayBeFuncName && (cSymbol[0] == '_' && cSymbol[1] == '_') && !utl::ConfigManager::IsFuzzing()) + if (!bMayBeFuncName && (cSymbol[0] == '_' && cSymbol[1] == '_') && !comphelper::IsFuzzing()) { bMayBeFuncName = officecfg::Office::Common::Misc::ExperimentalMode::get(); } diff --git a/sc/source/core/tool/optutil.cxx b/sc/source/core/tool/optutil.cxx index 8f3e1fec9d93..e541d40ccf9f 100644 --- a/sc/source/core/tool/optutil.cxx +++ b/sc/source/core/tool/optutil.cxx @@ -19,12 +19,12 @@ #include <optutil.hxx> #include <global.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/localedatawrapper.hxx> bool ScOptionsUtil::IsMetricSystem() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return true; //TODO: which language should be used here - system language or installed office language? diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 3262586c14cb..163e10b66d55 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -28,7 +28,7 @@ #include <sfx2/docfile.hxx> #include <svx/svxids.hrc> #include <svl/numformat.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <sal/log.hxx> #include <sfx2/objsh.hxx> @@ -97,7 +97,7 @@ ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ): mnLastRecId(0), mbBiff2HasXfs(false), mbBiff2HasXfsValid(false), - mbFuzzing(utl::ConfigManager::IsFuzzing()) + mbFuzzing(comphelper::IsFuzzing()) { nBdshtTab = 0; diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx index ad580407295e..708aa7a34df1 100644 --- a/sc/source/filter/excel/read.cxx +++ b/sc/source/filter/excel/read.cxx @@ -42,7 +42,7 @@ #include <imp_op.hxx> #include <excimp8.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <memory> @@ -776,7 +776,7 @@ ErrCode ImportExcel::Read() pProgress.reset(); GetDocImport().finalize(); - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) AdjustRowHeight(); PostDocLoad(); diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 014ada4d9490..319cd8136aae 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -32,7 +32,7 @@ #include <editeng/flditem.hxx> #include <editeng/editobj.hxx> #include <unotools/charclass.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <stringutil.hxx> #include <cellform.hxx> #include <cellvalue.hxx> @@ -422,7 +422,7 @@ void XclImpHyperlink::InsertUrl( XclImpRoot& rRoot, const XclRange& rXclRange, c SCROW nScRow1, nScRow2; aScRange.GetVars( nScCol1, nScRow1, nScTab, nScCol2, nScRow2, nScTab ); - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) { SCROW nRows = nScRow2 - nScRow1; if (nRows > 1024) @@ -933,7 +933,7 @@ void XclImpValidationManager::ReadDV( XclImpStream& rStrm ) void XclImpValidationManager::Apply() { - const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + const bool bFuzzing = comphelper::IsFuzzing(); size_t nPatterns = 0; ScDocument& rDoc = GetRoot().GetDoc(); diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 62e35213a045..df2baef3468b 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -43,7 +43,7 @@ #include <sfx2/objsh.hxx> #include <unotools/moduleoptions.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/fltrcfg.hxx> #include <vcl/dibtools.hxx> #include <vcl/gdimtf.hxx> @@ -1511,7 +1511,7 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject& { if( maTextData.mxString->IsRich() ) { - if (maTextData.mxString->GetText().getLength() > 1024 && utl::ConfigManager::IsFuzzing()) + if (maTextData.mxString->GetText().getLength() > 1024 && comphelper::IsFuzzing()) { SAL_WARN("sc.filter", "truncating slow long rich text for fuzzing performance"); maTextData.mxString->SetText(maTextData.mxString->GetText().copy(0, 1024)); diff --git a/sc/source/filter/excel/xipage.cxx b/sc/source/filter/excel/xipage.cxx index c06308ba78c6..29f9db99c854 100644 --- a/sc/source/filter/excel/xipage.cxx +++ b/sc/source/filter/excel/xipage.cxx @@ -28,7 +28,7 @@ #include <editeng/lrspitem.hxx> #include <editeng/ulspitem.hxx> #include <editeng/brushitem.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <document.hxx> #include <stlsheet.hxx> #include <attrib.hxx> @@ -125,7 +125,7 @@ void XclImpPageSettings::ReadHeaderFooter( XclImpStream& rStrm ) default: OSL_FAIL( "XclImpPageSettings::ReadHeaderFooter - unknown record" ); } - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) { if (maData.maHeader.getLength() > 10) maData.maHeader = maData.maHeader.copy(0, 10); diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx index ac3ebaa96b7f..12b86f679604 100644 --- a/sc/source/filter/excel/xipivot.cxx +++ b/sc/source/filter/excel/xipivot.cxx @@ -30,7 +30,7 @@ #include <svl/numformat.hxx> #include <sal/log.hxx> #include <sot/storage.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <document.hxx> #include <formulacell.hxx> @@ -1411,7 +1411,7 @@ void XclImpPivotTable::Convert() if( !mxPCache || !mxPCache->IsValid() ) return; - if (utl::ConfigManager::IsFuzzing()) //just too slow + if (comphelper::IsFuzzing()) //just too slow return; ScDPSaveData aSaveData; diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index c26529e7fe2d..97e9cbffb385 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -59,7 +59,7 @@ #include <xlchart.hxx> #include <xltracer.hxx> #include <xltools.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/useroptions.hxx> #include <root.hxx> @@ -109,7 +109,7 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium, mnScTab( 0 ), mbExport( bExport ) { - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) maUserName = SvtUserOptions().GetLastName(); if (maUserName.isEmpty()) maUserName = "Calc"; diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx index c1f11736e8f3..f85b7ef5b639 100644 --- a/sc/source/filter/lotus/op.cxx +++ b/sc/source/filter/lotus/op.cxx @@ -29,7 +29,7 @@ #include <editeng/udlnitem.hxx> #include <editeng/wghtitem.hxx> #include <editeng/justifyitem.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <formulacell.hxx> #include <document.hxx> @@ -327,7 +327,7 @@ void OP_Window1(LotusContext& rContext, SvStream& r, sal_uInt16 n) nDefWidth = static_cast<sal_uInt16>( TWIPS_PER_CHAR * nDefWidth ); - const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + const bool bFuzzing = comphelper::IsFuzzing(); // instead of default, set all Cols in SC by hand for (SCCOL nCol = 0 ; nCol <= rContext.rDoc.MaxCol() ; nCol++) diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx index 5ee451af9aef..4097ad1ce57c 100644 --- a/sc/source/filter/qpro/qpro.cxx +++ b/sc/source/filter/qpro/qpro.cxx @@ -29,7 +29,7 @@ #include <document.hxx> #include <formulacell.hxx> #include <tools/stream.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <docoptio.hxx> #include <scdll.hxx> #include <memory> @@ -155,7 +155,7 @@ ScQProReader::ScQProReader(SvStream* pStream) , mnOffset(0) , mpStream(pStream) , mbEndOfFile(false) - , mnMaxTab(utl::ConfigManager::IsFuzzing() ? 128 : MAXTAB) + , mnMaxTab(comphelper::IsFuzzing() ? 128 : MAXTAB) { if( mpStream ) { diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index 446f6850f4da..a2eca4858c2b 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -138,7 +138,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu if (!pFormatter) pFormatter = mpDoc->GetFormatTable(); bool bNumbersEnglishUS = false; - if (pFormatter->GetLanguage() == LANGUAGE_SYSTEM && !utl::ConfigManager::IsFuzzing()) + if (pFormatter->GetLanguage() == LANGUAGE_SYSTEM && !comphelper::IsFuzzing()) { // Automatic language option selected. Check for the global 'use US English' option. bNumbersEnglishUS = officecfg::Office::Common::Filter::HTML::Import::NumbersEnglishUS::get(); diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx index 82f58d1f3c40..418142d79caa 100644 --- a/sc/source/filter/xml/xmlrowi.cxx +++ b/sc/source/filter/xml/xmlrowi.cxx @@ -30,7 +30,7 @@ #include <unonames.hxx> #include <comphelper/extract.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <xmloff/xmlnamespace.hxx> #include <xmloff/families.hxx> #include <xmloff/xmltoken.hxx> @@ -74,7 +74,7 @@ ScXMLTableRowContext::ScXMLTableRowContext( ScXMLImport& rImport, { nRepeatedRows = std::max( it.toInt32(), sal_Int32(1) ); nRepeatedRows = std::min( nRepeatedRows, rImport.GetDocument()->GetSheetLimits().GetMaxRowCount() ); - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) nRepeatedRows = std::min(nRepeatedRows, sal_Int32(1024)); } break; diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx index 5a8d161ff245..c414bb34badd 100644 --- a/sc/source/ui/docshell/docsh2.cxx +++ b/sc/source/ui/docshell/docsh2.cxx @@ -24,7 +24,7 @@ #include <editeng/forbiddencharacterstable.hxx> #include <orcusfilters.hxx> #include <config_folders.h> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <comphelper/processfactory.hxx> #include <o3tl/unit_conversion.hxx> @@ -111,13 +111,13 @@ void ScDocShell::InitItems() // Other modifications after creation of the DrawLayer pDrawLayer->SetNotifyUndoActionHdl( std::bind( &ScDocFunc::NotifyDrawUndo, m_pDocFunc.get(), std::placeholders::_1 ) ); } - else if (!utl::ConfigManager::IsFuzzing()) + else if (!comphelper::IsFuzzing()) { // always use global color table instead of local copy PutItem( SvxColorListItem( XColorList::GetStdColorList(), SID_COLOR_TABLE ) ); } - if (utl::ConfigManager::IsFuzzing() || + if (comphelper::IsFuzzing() || (m_pDocument->GetForbiddenCharacters() && m_pDocument->IsValidAsianCompression() && m_pDocument->IsValidAsianKerning())) return; diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 7cc56770c113..72cd7b001c0e 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -419,7 +419,7 @@ void ScDocShell::InitOptions(bool bForLoading) // called from InitNew and L ScViewOptions aViewOpt = pScMod->GetViewOptions(); aDocOpt.SetAutoSpell( bAutoSpell ); - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { // two-digit year entry from Tools->Options->General aDocOpt.SetYear2000(officecfg::Office::Common::DateFormat::TwoDigitYear::get()); diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 01476aababe0..799999050cdf 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -52,7 +52,7 @@ #include <sfx2/linkmgr.hxx> #include <tools/urlobj.hxx> #include <unotools/charclass.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/ucbhelper.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> @@ -2761,7 +2761,7 @@ void ScExternalRefManager::maybeCreateRealFileName(sal_uInt16 nFileId) OUString ScExternalRefManager::getOwnDocumentName() const { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return "file:///tmp/document"; ScDocShell* pShell = mrDoc.GetDocumentShell(); diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index bc87bdb4ba4e..32bb5b36b20d 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -58,7 +58,7 @@ #include <scresid.hxx> #include <o3tl/safeint.hxx> #include <tools/svlibrary.h> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> #include <editeng/editobj.hxx> @@ -102,7 +102,7 @@ enum class SylkVersion // Whole document without Undo ScImportExport::ScImportExport( ScDocument& r ) : pDocSh( r.GetDocumentShell() ), rDoc( r ), - nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K), + nSizeLimit( 0 ), nMaxImportRow(!comphelper::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K), cSep( ' ' ), cStr( '"' ), bFormulas( false ), bIncludeFiltered( true ), bAll( true ), bSingle( true ), bUndo( false ), @@ -117,7 +117,7 @@ ScImportExport::ScImportExport( ScDocument& r ) ScImportExport::ScImportExport( ScDocument& r, const ScAddress& rPt ) : pDocSh( r.GetDocumentShell() ), rDoc( r ), aRange( rPt ), - nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K), + nSizeLimit( 0 ), nMaxImportRow(!comphelper::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K), cSep( ' ' ), cStr( '"' ), bFormulas( false ), bIncludeFiltered( true ), bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ), @@ -133,7 +133,7 @@ ScImportExport::ScImportExport( ScDocument& r, const ScAddress& rPt ) ScImportExport::ScImportExport( ScDocument& r, const ScRange& rRange ) : pDocSh( r.GetDocumentShell() ), rDoc( r ), aRange( rRange ), - nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K), + nSizeLimit( 0 ), nMaxImportRow(!comphelper::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K), cSep( ' ' ), cStr( '"' ), bFormulas( false ), bIncludeFiltered( true ), bAll( false ), bSingle( false ), bUndo( pDocSh != nullptr ), @@ -150,7 +150,7 @@ ScImportExport::ScImportExport( ScDocument& r, const ScRange& rRange ) // If a View exists, the TabNo of the view will be used. ScImportExport::ScImportExport( ScDocument& r, const OUString& rPos ) : pDocSh( r.GetDocumentShell() ), rDoc( r ), - nSizeLimit( 0 ), nMaxImportRow(!utl::ConfigManager::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K), + nSizeLimit( 0 ), nMaxImportRow(!comphelper::IsFuzzing() ? rDoc.MaxRow() : SCROWS32K), cSep( ' ' ), cStr( '"' ), bFormulas( false ), bIncludeFiltered( true ), bAll( false ), bSingle( true ), bUndo( pDocSh != nullptr ), @@ -2304,7 +2304,7 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm ) sal_uInt32 nKey; sal_Int32 nCheckPos; - if (aCode.getLength() > 2048 && utl::ConfigManager::IsFuzzing()) + if (aCode.getLength() > 2048 && comphelper::IsFuzzing()) { // consider an excessive length as a failure when fuzzing nCheckPos = 1; diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index affcbb5c7fb8..5a20b1c94075 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -34,7 +34,7 @@ #include <vcl/weld.hxx> #include <tools/urlobj.hxx> #include <unotools/transliterationwrapper.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <comphelper/processfactory.hxx> #include <tablink.hxx> @@ -433,7 +433,7 @@ bool ScDocumentLoader::GetFilterName( const OUString& rFileName, std::shared_ptr<const SfxFilter> pSfxFilter; auto pMedium = std::make_unique<SfxMedium>( rFileName, StreamMode::STD_READ ); - if (pMedium->GetErrorIgnoreWarning() == ERRCODE_NONE && !utl::ConfigManager::IsFuzzing()) + if (pMedium->GetErrorIgnoreWarning() == ERRCODE_NONE && !comphelper::IsFuzzing()) { if ( bWithInteraction ) pMedium->UseInteractionHandler(true); // #i73992# no longer called from GuessFilter diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx index 5581a69e7961..ec1d431eeae9 100644 --- a/sc/source/ui/view/drawvie3.cxx +++ b/sc/source/ui/view/drawvie3.cxx @@ -53,10 +53,10 @@ ScDrawView::ScDrawView( { SetNegativeX(comphelper::LibreOfficeKit::isActive() && rDoc.IsLayoutRTL(nTab)); // #i73602# Use default from the configuration - SetBufferedOverlayAllowed(!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Drawinglayer::OverlayBuffer_Calc::get()); + SetBufferedOverlayAllowed(!comphelper::IsFuzzing() && officecfg::Office::Common::Drawinglayer::OverlayBuffer_Calc::get()); // #i74769#, #i75172# Use default from the configuration - SetBufferedOutputAllowed(!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Drawinglayer::PaintBuffer_Calc::get()); + SetBufferedOutputAllowed(!comphelper::IsFuzzing() && officecfg::Office::Common::Drawinglayer::PaintBuffer_Calc::get()); Construct(); } diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx index a650a9e46fc8..0fbec90cf108 100644 --- a/sd/source/core/TransitionPreset.cxx +++ b/sd/source/core/TransitionPreset.cxx @@ -312,7 +312,7 @@ bool TransitionPreset::importTransitionsFile( TransitionPresetList& rList, bool TransitionPreset::importTransitionPresetList( TransitionPresetList& rList ) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return false; bool bRet = false; diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 9f798689ba03..57dc8518a571 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -181,7 +181,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) SetCalcFieldValueHdl( &rOutliner ); // set linguistic options - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { const SvtLinguConfig aLinguConfig; SvtLinguOptions aOptions; @@ -1102,7 +1102,7 @@ sal_uInt16 SdDrawDocument::GetAnnotationAuthorIndex( const OUString& rAuthor ) void SdDrawDocument::InitLayoutVector() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; const Reference<css::uno::XComponentContext> xContext( @@ -1140,7 +1140,7 @@ void SdDrawDocument::InitLayoutVector() void SdDrawDocument::InitObjectVector() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; const Reference<css::uno::XComponentContext> xContext( diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 6fb432ee4f82..f8c8d7d7f600 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -38,7 +38,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/propertyvalue.hxx> #include <rtl/bootstrap.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/streamwrap.hxx> #include <tools/stream.hxx> #include <tools/UnitConversion.hxx> @@ -628,7 +628,7 @@ void SdDrawDocument::CreateLayoutTemplates() void SdDrawDocument::CreateDefaultCellStyles() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; Reference<css::uno::XComponentContext> xContext(comphelper::getProcessComponentContext()); diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx index 62a75a42f42f..dcb48c5697f1 100644 --- a/sd/source/filter/ppt/pptin.cxx +++ b/sd/source/filter/ppt/pptin.cxx @@ -19,7 +19,7 @@ #include <osl/file.hxx> #include <sal/log.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/ucbstreamhelper.hxx> #include <svl/urihelper.hxx> #include <svx/svxids.hrc> @@ -581,7 +581,7 @@ bool ImplSdPPTImport::Import() // create master pages: std::unique_ptr<SfxProgress> xStbMgr; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { xStbMgr.reset(new SfxProgress(pDocShell, SdResId( STR_POWERPOINT_IMPORT), @@ -1956,7 +1956,7 @@ OUString ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const if ( SeekToRec( rStCtrl, PPT_PST_SoundData, nStrLen, &aSoundDataRecHd ) ) { OUString aGalleryDir; - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) osl_getTempDirURL(&aGalleryDir.pData); else aGalleryDir = SvtPathOptions().GetGalleryPath(); diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx index b4734310a39b..aded023da375 100644 --- a/sd/source/ui/app/sddll.cxx +++ b/sd/source/ui/app/sddll.cxx @@ -21,7 +21,7 @@ #include <avmedia/mediaplayer.hxx> #include <avmedia/mediatoolbox.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/moduleoptions.hxx> #include <svx/fmobjfac.hxx> #include <svx/objfac3d.hxx> @@ -87,7 +87,7 @@ using namespace ::com::sun::star; // Register all Factories void SdDLL::RegisterFactorys() { - if (utl::ConfigManager::IsFuzzing() || SvtModuleOptions().IsImpress()) + if (comphelper::IsFuzzing() || SvtModuleOptions().IsImpress()) { ::sd::ImpressViewShellBase::RegisterFactory ( ::sd::IMPRESS_FACTORY_ID); @@ -110,7 +110,7 @@ void SdDLL::RegisterFactorys() ::sd::PRESENTATION_FACTORY_ID); } } - if (!utl::ConfigManager::IsFuzzing() && SvtModuleOptions().IsDraw()) + if (!comphelper::IsFuzzing() && SvtModuleOptions().IsDraw()) { ::sd::GraphicViewShellBase::RegisterFactory (::sd::DRAW_FACTORY_ID); } @@ -223,24 +223,24 @@ void SdDLL::Init() SfxObjectFactory* pDrawFact = nullptr; SfxObjectFactory* pImpressFact = nullptr; - if (utl::ConfigManager::IsFuzzing() || SvtModuleOptions().IsImpress()) + if (comphelper::IsFuzzing() || SvtModuleOptions().IsImpress()) pImpressFact = &::sd::DrawDocShell::Factory(); - if (!utl::ConfigManager::IsFuzzing() && SvtModuleOptions().IsDraw()) + if (!comphelper::IsFuzzing() && SvtModuleOptions().IsDraw()) pDrawFact = &::sd::GraphicDocShell::Factory(); auto pUniqueModule = std::make_unique<SdModule>(pImpressFact, pDrawFact); SdModule* pModule = pUniqueModule.get(); SfxApplication::SetModule(SfxToolsModule::Draw, std::move(pUniqueModule)); - if (!utl::ConfigManager::IsFuzzing() && SvtModuleOptions().IsImpress()) + if (!comphelper::IsFuzzing() && SvtModuleOptions().IsImpress()) { // Register the Impress shape types in order to make the shapes accessible. ::accessibility::RegisterImpressShapeTypes (); ::sd::DrawDocShell::Factory().SetDocumentServiceName( "com.sun.star.presentation.PresentationDocument" ); } - if (!utl::ConfigManager::IsFuzzing() && SvtModuleOptions().IsDraw()) + if (!comphelper::IsFuzzing() && SvtModuleOptions().IsDraw()) { ::sd::GraphicDocShell::Factory().SetDocumentServiceName( "com.sun.star.drawing.DrawingDocument" ); } @@ -262,7 +262,7 @@ void SdDLL::Init() // register your exotic remote controls here #ifdef ENABLE_SDREMOTE - if (!utl::ConfigManager::IsFuzzing() && !Application::IsHeadlessModeEnabled()) + if (!comphelper::IsFuzzing() && !Application::IsHeadlessModeEnabled()) RegisterRemotes(); #endif } diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index 5ac592f80be3..71a920fa4fb9 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -105,7 +105,7 @@ void DrawDocShell::Construct( bool bClipboard ) pUndoManager->SetDocShell(this); mpUndoManager = std::move(pUndoManager); - if (!utl::ConfigManager::IsFuzzing() + if (!comphelper::IsFuzzing() && officecfg::Office::Common::Undo::Steps::get() < 1) { mpUndoManager->EnableUndo(false); // tdf#108863 disable if 0 steps diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index c8ec68b4e16a..345ef782ea84 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -114,10 +114,10 @@ View::View( mpClipboard (new ViewClipboard (*this)) { // #i73602# Use default from the configuration - SetBufferedOverlayAllowed(!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Drawinglayer::OverlayBuffer_DrawImpress::get()); + SetBufferedOverlayAllowed(!comphelper::IsFuzzing() && officecfg::Office::Common::Drawinglayer::OverlayBuffer_DrawImpress::get()); // #i74769#, #i75172# Use default from the configuration - SetBufferedOutputAllowed(!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Drawinglayer::PaintBuffer_DrawImpress::get()); + SetBufferedOutputAllowed(!comphelper::IsFuzzing() && officecfg::Office::Common::Drawinglayer::PaintBuffer_DrawImpress::get()); EnableExtendedKeyInputDispatcher(false); EnableExtendedMouseEventDispatcher(false); diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index 9ad046a12106..488e622aa01e 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -114,11 +114,11 @@ SfxApplication* SfxApplication::GetOrCreate() #if HAVE_FEATURE_XMLHELP || defined(EMSCRIPTEN) bool bHelpTip = officecfg::Office::Common::Help::Tip::get(); bool bExtendedHelpTip = officecfg::Office::Common::Help::ExtendedTip::get(); - if (!utl::ConfigManager::IsFuzzing() && bHelpTip) + if (!comphelper::IsFuzzing() && bHelpTip) Help::EnableQuickHelp(); else Help::DisableQuickHelp(); - if (!utl::ConfigManager::IsFuzzing() && bHelpTip && bExtendedHelpTip) + if (!comphelper::IsFuzzing() && bHelpTip && bExtendedHelpTip) Help::EnableBalloonHelp(); else Help::DisableBalloonHelp(); diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx index 1cedcd978540..d26f9577ee27 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -65,7 +65,7 @@ BasicManager* SfxApplication::GetBasicManager() #if !HAVE_FEATURE_SCRIPTING return nullptr; #else - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return nullptr; return BasicManagerRepository::getApplicationBasicManager(); #endif @@ -76,7 +76,7 @@ XLibraryContainer * SfxApplication::GetDialogContainer() #if !HAVE_FEATURE_SCRIPTING return nullptr; #else - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return nullptr; if ( !pImpl->pBasicManager->isValid() ) GetBasicManager(); @@ -90,7 +90,7 @@ XLibraryContainer * SfxApplication::GetBasicContainer() #if !HAVE_FEATURE_SCRIPTING return nullptr; #else - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return nullptr; if ( !pImpl->pBasicManager->isValid() ) GetBasicManager(); @@ -103,7 +103,7 @@ StarBASIC* SfxApplication::GetBasic() #if !HAVE_FEATURE_SCRIPTING return nullptr; #else - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return nullptr; return GetBasicManager()->GetLib(0); #endif diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index 52afe118ecbb..78e938462833 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -27,6 +27,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <basic/sbdef.hxx> +#include <comphelper/configuration.hxx> #include <tools/svlibrary.h> #include <svtools/soerr.hxx> #include <unotools/configmgr.hxx> @@ -194,7 +195,7 @@ void SfxApplication::Initialize_Impl() RID_BASIC_START, ErrCodeArea::Sbx, ErrCodeArea::Sbx, BasResLocale()); #endif - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { SolarMutexGuard aGuard; //ensure instantiation of listener that manages the internal recently-used diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index 54efe2c95d2e..5414f69c34c3 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -19,6 +19,7 @@ #include <config_features.h> #include <config_feature_desktop.h> +#include <comphelper/configuration.hxx> #include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <osl/diagnose.h> @@ -1162,7 +1163,7 @@ css::uno::Reference< css::frame::XFrame > SfxWorkWindow::GetFrameInterface() void SfxWorkWindow::UpdateObjectBars_Impl2() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; // Lock SplitWindows (which means suppressing the Resize-Reaction of the diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 4b1457af50df..4d0ae2d66b85 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -214,7 +214,7 @@ void SfxShell::SetUndoManager( SfxUndoManager *pNewUndoMgr ) // a supported scenario (/me thinks it is not), then we would need to notify all such clients instances. pUndoMgr = pNewUndoMgr; - if (pUndoMgr && !utl::ConfigManager::IsFuzzing()) + if (pUndoMgr && !comphelper::IsFuzzing()) { pUndoMgr->SetMaxUndoActionCount( officecfg::Office::Common::Undo::Steps::get()); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 282354795520..b94d72307176 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -654,7 +654,7 @@ OUString SfxMedium::GetBaseURL( bool bForSaving ) return pBaseURLItem->GetValue(); OUString aBaseURL; - if (!utl::ConfigManager::IsFuzzing() && GetContent().is()) + if (!comphelper::IsFuzzing() && GetContent().is()) { try { diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index ea1063ea81c1..befe3f33c109 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -327,7 +327,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto } SvtSaveOptions::ODFSaneDefaultVersion nDefVersion = SvtSaveOptions::ODFSVER_013; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { nDefVersion = GetODFSaneDefaultVersion(); } @@ -506,7 +506,7 @@ bool SfxObjectShell::DoInitNew() pArgs[nLength].Name = "Title"; pArgs[nLength].Value <<= GetTitle( SFX_TITLE_DETECT ); xModel->attachResource( OUString(), aArgs ); - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) impl_addToModelCollection(xModel); } @@ -1001,7 +1001,7 @@ bool SfxObjectShell::DoSave() if (IsOwnStorageFormat(*GetMedium())) { SvtSaveOptions::ODFSaneDefaultVersion nDefVersion = SvtSaveOptions::ODFSVER_013; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { nDefVersion = GetODFSaneDefaultVersion(); } @@ -1187,7 +1187,7 @@ bool SfxObjectShell::SaveTo_Impl } SvtSaveOptions::ODFSaneDefaultVersion nVersion(SvtSaveOptions::ODFSVER_LATEST_EXTENDED); - if (bOwnTarget && !utl::ConfigManager::IsFuzzing()) + if (bOwnTarget && !comphelper::IsFuzzing()) { nVersion = GetODFSaneDefaultVersion(); } @@ -3379,7 +3379,7 @@ uno::Reference< embed::XStorage > const & SfxObjectShell::GetStorage() SetupStorage( pImpl->m_xDocStorage, SOFFICE_FILEFORMAT_CURRENT, false ); pImpl->m_bCreateTempStor = false; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) SfxGetpApp()->NotifyEvent( SfxEventHint( SfxEventHintId::StorageChanged, GlobalEventConfig::GetEventName(GlobalEventId::STORAGECHANGED), this ) ); } catch( uno::Exception& ) @@ -3894,7 +3894,7 @@ void SfxObjectShell::SetMacroCallsSeenWhileLoading() bool SfxObjectShell::GetMacroCallsSeenWhileLoading() const { - if (utl::ConfigManager::IsFuzzing() || officecfg::Office::Common::Security::Scripting::CheckDocumentEvents::get()) + if (comphelper::IsFuzzing() || officecfg::Office::Common::Security::Scripting::CheckDocumentEvents::get()) return pImpl->m_bMacroCallsSeenWhileLoading; return false; } diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 03a12f68ab8f..0d2f6b91af43 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -45,6 +45,7 @@ #include <sfx2/signaturestate.hxx> #include <sfx2/sfxmodelfactory.hxx> +#include <comphelper/configuration.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/servicehelper.hxx> @@ -733,7 +734,7 @@ Reference< XLibraryContainer > SfxObjectShell::GetDialogContainer() Reference< XLibraryContainer > SfxObjectShell::GetBasicContainer() { #if HAVE_FEATURE_SCRIPTING - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { try { @@ -1074,7 +1075,7 @@ SfxObjectShell* SfxObjectShell::GetParentShell(const css::uno::Reference<css::un void SfxObjectShell::SetInitialized_Impl( const bool i_fromInitNew ) { pImpl->bInitialized = true; - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; if ( i_fromInitNew ) { diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx index be22b263fb78..0cb067d13cb4 100644 --- a/sfx2/source/view/classificationhelper.cxx +++ b/sfx2/source/view/classificationhelper.cxx @@ -940,7 +940,7 @@ const OUString& SfxClassificationHelper::PROP_PREFIX_INTELLECTUALPROPERTY() SfxClassificationPolicyType SfxClassificationHelper::getPolicyType() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return SfxClassificationPolicyType::IntellectualProperty; sal_Int32 nPolicyTypeNumber = officecfg::Office::Common::Classification::Policy::get(); auto eType = static_cast<SfxClassificationPolicyType>(nPolicyTypeNumber); diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 62918828fd96..9aaa894d2fb5 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -21,7 +21,7 @@ #include <svl/intitem.hxx> #include <svl/eitem.hxx> #include <svl/languageoptions.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <utility> #include <vcl/outdev.hxx> #include <vcl/svapp.hxx> @@ -1257,7 +1257,7 @@ bool SmMathConfig::IsAutoCloseBrackets() const sal_Int16 SmMathConfig::GetDefaultSmSyntaxVersion() const { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return nDefaultSmSyntaxVersion; if (!pOther) const_cast<SmMathConfig*>(this)->LoadOther(); @@ -1309,7 +1309,7 @@ void SmMathConfig::SetDefaultSmSyntaxVersion( sal_Int16 nVal ) bool SmMathConfig::IsInlineEditEnable() const { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return false; if (!pOther) const_cast<SmMathConfig*>(this)->LoadOther(); @@ -1330,7 +1330,7 @@ void SmMathConfig::SetInlineEditEnable( bool bVal ) bool SmMathConfig::IsIgnoreSpacesRight() const { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return false; if (!pOther) const_cast<SmMathConfig*>(this)->LoadOther(); diff --git a/starmath/source/parse5.cxx b/starmath/source/parse5.cxx index eea7e7f05edf..c086d75623be 100644 --- a/starmath/source/parse5.cxx +++ b/starmath/source/parse5.cxx @@ -22,7 +22,7 @@ #include <com/sun/star/i18n/KParseType.hpp> #include <i18nlangtag/lang.h> #include <tools/lineend.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/syslocale.hxx> #include <osl/diagnose.h> #include <rtl/character.hxx> @@ -1594,7 +1594,7 @@ std::unique_ptr<SmBlankNode> SmParser5::DoBlank() // Ignore trailing spaces, if corresponding option is set if (m_aCurToken.eType == TNEWLINE - || (m_aCurToken.eType == TEND && !utl::ConfigManager::IsFuzzing() + || (m_aCurToken.eType == TEND && !comphelper::IsFuzzing() && SM_MOD()->GetConfig()->IsIgnoreSpacesRight())) { pBlankNode->Clear(); diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx index 07c9c67fd654..fdcd52d01cac 100644 --- a/svl/source/config/ctloptions.cxx +++ b/svl/source/config/ctloptions.cxx @@ -431,7 +431,7 @@ void SvtCTLOptions::SetCTLTextNumerals( SvtCTLOptions::TextNumerals _eNumerals ) SvtCTLOptions::TextNumerals SvtCTLOptions::GetCTLTextNumerals() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return SvtCTLOptions::NUMERALS_ARABIC; return static_cast<SvtCTLOptions::TextNumerals>(officecfg::Office::Common::I18N::CTL::CTLTextNumerals::get()); } diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 3b6c2bd7f1b5..91cacaa509cb 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -3640,7 +3640,7 @@ sal_uInt16 SvNumberFormatter::ExpandTwoDigitYear( sal_uInt16 nYear ) const // static sal_uInt16 SvNumberFormatter::GetYear2000Default() { - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) return officecfg::Office::Common::DateFormat::TwoDigitYear::get(); return 1930; } diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index 167dfa3337ad..7105c1690ba4 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -194,7 +194,7 @@ ColorConfig_Impl::ColorConfig_Impl() : uno::Sequence < OUString > aNames(1); EnableNotification( aNames ); - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) Load(OUString()); ::Application::AddEventListener( LINK(this, ColorConfig_Impl, DataChangedEventListener) ); @@ -356,7 +356,7 @@ IMPL_LINK( ColorConfig_Impl, DataChangedEventListener, VclSimpleEvent&, rEvent, ColorConfig::ColorConfig() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; std::unique_lock aGuard( ColorMutex_Impl() ); if ( !m_pImpl ) @@ -371,7 +371,7 @@ ColorConfig::ColorConfig() ColorConfig::~ColorConfig() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; std::unique_lock aGuard( ColorMutex_Impl() ); m_pImpl->RemoveListener(this); diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx index c003bcae21a9..a7c9c411caf2 100644 --- a/svtools/source/svrtf/svparser.cxx +++ b/svtools/source/svrtf/svparser.cxx @@ -26,7 +26,7 @@ #include <rtl/character.hxx> #include <sal/log.hxx> #include <unicode/ucsdet.h> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vector> @@ -83,7 +83,7 @@ SvParser<T>::SvParser( SvStream& rIn, sal_uInt8 nStackSize ) , m_nTokenIndex(0) , nTokenValue( 0 ) , bTokenHasValue( false ) - , bFuzzing(utl::ConfigManager::IsFuzzing()) + , bFuzzing(comphelper::IsFuzzing()) , eState( SvParserState::NotStarted ) , eSrcEnc( RTL_TEXTENCODING_DONTKNOW ) , nNextChPos(0) diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 082e22b96807..b72943050e8a 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -43,7 +43,7 @@ #include <svx/xbtmpit.hxx> #include <svx/xhatch.hxx> #include <svx/sdshitm.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <com/sun/star/awt/Size.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp> @@ -705,7 +705,7 @@ void EnhancedCustomShape2d::SetPathSize( sal_Int32 nIndex ) else m_fYRatio = 1.0; - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) { if (fabs(m_fXScale) > 100000) { diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index a401246277cc..2763c9e47e00 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -58,7 +58,7 @@ #include <svx/xlnwtit.hxx> #include <svx/xlntrit.hxx> #include <svx/xfltrit.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> using namespace com::sun::star; using namespace com::sun::star::uno; @@ -406,7 +406,7 @@ rtl::Reference<SdrObject> EnhancedCustomShape3d::Create3DObject( basegfx::B2DPolyPolygon aTotalPolyPoly; SdrObjListIter aIter( *pShape2d, SdrIterMode::DeepNoGroups ); const bool bMultipleSubObjects(aIter.Count() > 1); - const bool bFuzzing(utl::ConfigManager::IsFuzzing()); + const bool bFuzzing(comphelper::IsFuzzing()); while( aIter.IsMore() ) { diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index a5f377912c6f..fb01294fe5ff 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -51,7 +51,7 @@ #include <basegfx/polygon/b2dpolygontools.hxx> #include <sal/log.hxx> #include <rtl/math.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <comphelper/string.hxx> using namespace com::sun::star; @@ -1148,7 +1148,7 @@ rtl::Reference<SdrObject> EnhancedCustomShapeFontWork::CreateFontWork( rtl::Reference<SdrObject> pRet; // calculating scaling factor is too slow - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return pRet; tools::PolyPolygon aOutlines2d( GetOutlinesFromShape2d( pShape2d ) ); diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index 1acf0b2a93f7..31bd7acf9280 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -39,7 +39,7 @@ #include <com/sun/star/uno/Sequence.h> #include <svx/sdr/contact/viewcontactofe3dscene.hxx> #include <svx/e3dsceneupdater.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> using namespace com::sun::star; @@ -284,7 +284,7 @@ E3dScene* E3dObject::getRootE3dSceneFromE3dObject() const basegfx::B3DRange E3dObject::RecalcBoundVolume() const { basegfx::B3DRange aRetval; - if (utl::ConfigManager::IsFuzzing()) // skip slow path for fuzzing + if (comphelper::IsFuzzing()) // skip slow path for fuzzing return aRetval; const sdr::contact::ViewContactOfE3d* pVCOfE3D = dynamic_cast< const sdr::contact::ViewContactOfE3d* >(&GetViewContact()); @@ -549,7 +549,7 @@ SdrObjKind E3dCompoundObject::GetObjIdentifier() const void E3dCompoundObject::RecalcSnapRect() { - if (utl::ConfigManager::IsFuzzing()) // skip slow path for fuzzing + if (comphelper::IsFuzzing()) // skip slow path for fuzzing return; const uno::Sequence< beans::PropertyValue > aEmptyParameters; diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 890394856688..0b90875f4c5b 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -92,7 +92,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <tools/debug.hxx> #include <comphelper/diagnose_ex.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> @@ -3460,7 +3460,7 @@ void FmXFormShell::CreateExternalView_Lock() void FmXFormShell::implAdjustConfigCache_Lock() { - const bool bFuzzing(utl::ConfigManager::IsFuzzing()); + const bool bFuzzing(comphelper::IsFuzzing()); if (bFuzzing) return; diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 9d4885244fce..e5ef7dceeb0d 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -32,7 +32,7 @@ #include <ucbhelper/content.hxx> #include <com/sun/star/ucb/ContentCreationException.hpp> #include <o3tl/string_view.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/ucbstreamhelper.hxx> #include <unotools/pathoptions.hxx> #include <svx/dialmgr.hxx> @@ -243,7 +243,7 @@ Gallery* Gallery::GetGalleryInstance() { // note: this would deadlock if it used osl::Mutex::getGlobalMutex() static Gallery *const s_pGallery( - utl::ConfigManager::IsFuzzing() ? nullptr : + comphelper::IsFuzzing() ? nullptr : new Gallery(SvtPathOptions().GetGalleryPath())); return s_pGallery; diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx index 5379f50b8eec..aae51421da8d 100644 --- a/svx/source/sdr/contact/objectcontactofpageview.cxx +++ b/svx/source/sdr/contact/objectcontactofpageview.cxx @@ -36,7 +36,7 @@ #include <osl/diagnose.h> #include <officecfg/Office/Common.hxx> #include <svx/unoapi.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/canvastools.hxx> #include <vcl/pdfextoutdevdata.hxx> #include <comphelper/lok.hxx> @@ -361,7 +361,7 @@ namespace sdr::contact // check if text animation is allowed. bool ObjectContactOfPageView::IsTextAnimationAllowed() const { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return true; return officecfg::Office::Common::Accessibility::IsAllowAnimatedText::get(); } @@ -369,7 +369,7 @@ namespace sdr::contact // check if graphic animation is allowed. bool ObjectContactOfPageView::IsGraphicAnimationAllowed() const { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return true; // Related tdf#156630 respect system animation setting diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index c0cd0988d8ad..3f947bce2bf1 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -53,7 +53,7 @@ SdrDragView::SdrDragView(SdrModel& rSdrModel, OutputDevice* pOut) , mbDragLimit(false) , mbDragHdl(false) , mbDragStripes(false) - , mbSolidDragging(utl::ConfigManager::IsFuzzing() || officecfg::Office::Common::Drawinglayer::SolidDragCreate::get()) + , mbSolidDragging(comphelper::IsFuzzing() || officecfg::Office::Common::Drawinglayer::SolidDragCreate::get()) , mbResizeAtCenter(false) , mbCrookAtCenter(false) , mbDragWithCopy(false) diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index e5f99a8f8f01..cc7e61ea3fb1 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -60,7 +60,7 @@ using namespace ::com::sun::star; // Global data of the DrawingEngine SdrGlobalData::SdrGlobalData() { - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { svx::ExtrusionBar::RegisterInterface(); svx::FontworkBar::RegisterInterface(); @@ -84,7 +84,7 @@ SdrGlobalData & GetSdrGlobalData() { OLEObjCache::OLEObjCache() { - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { // This limit is only useful on 32-bit windows, where we can run out of virtual memory (see tdf#95579) // For everything else, we are better off keeping it in main memory rather than using our hacky page-out thing diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 90fc769e20b7..ab882b77ed6c 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -153,7 +153,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, comphelper::IEmbeddedHelper* pEmbeddedHel , mbAddExtLeading(false) , mbInDestruction(false) { - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { mnCharCompressType = static_cast<CharCompressType>( officecfg::Office::Common::AsianLayout::CompressCharacterDistance::get()); @@ -195,7 +195,7 @@ SdrModel::SdrModel(SfxItemPool* pPool, comphelper::IEmbeddedHelper* pEmbeddedHel m_pChainingOutliner = SdrMakeOutliner( OutlinerMode::TextObject, *this ); ImpSetOutlinerDefaults(m_pChainingOutliner.get(), true); - ImpCreateTables(bDisablePropertyFiles || utl::ConfigManager::IsFuzzing()); + ImpCreateTables(bDisablePropertyFiles || comphelper::IsFuzzing()); mpImpl->initTheme(); } @@ -627,7 +627,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_Int32 nDefTextHgt ) SvxFontItem aSvxFontItemCJK(EE_CHAR_FONTINFO_CJK); SvxFontItem aSvxFontItemCTL(EE_CHAR_FONTINFO_CTL); LanguageType nLanguage; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) nLanguage = Application::GetSettings().GetLanguageTag().getLanguageType(); else nLanguage = LANGUAGE_ENGLISH_US; diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 652d965e4c3e..287313f97956 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -46,7 +46,7 @@ #include <tools/bigint.hxx> #include <comphelper/diagnose_ex.hxx> #include <tools/helpers.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/canvastools.hxx> #include <vcl/ptrstyle.hxx> #include <vector> @@ -548,7 +548,7 @@ SdrItemPool& SdrObject::GetGlobalDrawObjectItemPool() mpGlobalItemPool->SetSecondaryPool(pGlobalOutlPool.get()); mpGlobalItemPool->SetDefaultMetric(SdrEngineDefaults::GetMapUnit()); mpGlobalItemPool->FreezeIdRanges(); - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) mpGlobalItemPool->acquire(); else { @@ -975,7 +975,7 @@ const tools::Rectangle& SdrObject::GetLastBoundRect() const void SdrObject::RecalcBoundRect() { // #i101680# suppress BoundRect calculations on import(s) - if ((getSdrModelFromSdrObject().isLocked()) || utl::ConfigManager::IsFuzzing()) + if ((getSdrModelFromSdrObject().isLocked()) || comphelper::IsFuzzing()) return; auto const& rRectangle = getOutRectangle(); @@ -1010,7 +1010,7 @@ void SdrObject::RecalcBoundRect() void SdrObject::BroadcastObjectChange() const { - if ((getSdrModelFromSdrObject().isLocked()) || utl::ConfigManager::IsFuzzing()) + if ((getSdrModelFromSdrObject().isLocked()) || comphelper::IsFuzzing()) return; bool bPlusDataBroadcast(m_pPlusData && m_pPlusData->pBroadcast); @@ -2419,7 +2419,7 @@ rtl::Reference<SdrObject> SdrObject::ImpConvertToContourObj(bool bForceLineDash) } // check for fill rsults - if (!aExtractedLineFills.empty() && !utl::ConfigManager::IsFuzzing()) + if (!aExtractedLineFills.empty() && !comphelper::IsFuzzing()) { // merge to a single tools::PolyPolygon (OR) aMergedLineFillPolyPolygon = basegfx::utils::mergeToSinglePolyPolygon(std::move(aExtractedLineFills)); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index e88e127e4fa0..0b3e40d16f9b 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -54,7 +54,7 @@ #include <sal/log.hxx> #include <o3tl/unit_conversion.hxx> #include <o3tl/temporary.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <editeng/eeitem.hxx> #include <editeng/fhgtitem.hxx> @@ -1428,7 +1428,7 @@ namespace bool IsAutoGrow(const SdrTextObj& rObj) { bool bAutoGrow = rObj.IsAutoGrowHeight() || rObj.IsAutoGrowWidth(); - return bAutoGrow && !utl::ConfigManager::IsFuzzing(); + return bAutoGrow && !comphelper::IsFuzzing(); } } diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index fbe6b0b3579b..cde62097f490 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -36,7 +36,7 @@ #include <svx/xlnclit.hxx> #include <svx/xlnwtit.hxx> #include <svx/sdshitm.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> using namespace com::sun::star; @@ -419,7 +419,7 @@ rtl::Reference<SdrObject> SdrTextObj::DoConvertToPolyObj(bool bBezier, bool bAdd bool SdrTextObj::ImpCanConvTextToCurve() const { - return !IsOutlText() && !utl::ConfigManager::IsFuzzing(); + return !IsOutlText() && !comphelper::IsFuzzing(); } rtl::Reference<SdrPathObj> SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPolygon, bool bClosed, bool bBezier) const diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 9398a2c98460..63eeeae7d037 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -22,7 +22,7 @@ #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XIndexAccess.hpp> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/canvastools.hxx> #include <vcl/ptrstyle.hxx> #include <com/sun/star/style/XStyle.hpp> @@ -755,7 +755,7 @@ sal_Int32 SdrTableObjImpl::getRowCount() const void SdrTableObjImpl::LayoutTable( tools::Rectangle& rArea, bool bFitWidth, bool bFitHeight ) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; if(!mpLayouter) return; diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index d3837e187b5d..e6b958ce4dc0 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -47,7 +47,7 @@ #include <comphelper/processfactory.hxx> #include <svx/svdotable.hxx> #include <cell.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> // SvxTextEditSourceImpl @@ -508,7 +508,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder() const_cast<EditEngine*>(&(mpOutliner->GetEditEngine()))->EnableUndo( false ); } - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { if ( !m_xLinguServiceManager.is() ) { diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx index e952d6f8a44f..b4f5769cad99 100644 --- a/svx/source/xoutdev/xtabcolr.cxx +++ b/svx/source/xoutdev/xtabcolr.cxx @@ -19,7 +19,7 @@ #include <memory> #include <XPropertyTable.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/pathoptions.hxx> #include <svx/strings.hrc> @@ -32,7 +32,7 @@ XColorListRef XColorList::CreateStdColorList() { return XPropertyList::AsColorList( XPropertyList::CreatePropertyList( - XPropertyListType::Color, !utl::ConfigManager::IsFuzzing() ? + XPropertyListType::Color, !comphelper::IsFuzzing() ? SvtPathOptions().GetPalettePath() : "", "")); } diff --git a/sw/source/core/bastyp/SwSmartTagMgr.cxx b/sw/source/core/bastyp/SwSmartTagMgr.cxx index 3a28af822de9..7eb3f9fa58ed 100644 --- a/sw/source/core/bastyp/SwSmartTagMgr.cxx +++ b/sw/source/core/bastyp/SwSmartTagMgr.cxx @@ -21,7 +21,7 @@ #include <docsh.hxx> #include <swmodule.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/svapp.hxx> using namespace com::sun::star; @@ -34,7 +34,7 @@ SwSmartTagMgr& SwSmartTagMgr::Get() if (!spTheSwSmartTagMgr) { OUString sModuleName - = !utl::ConfigManager::IsFuzzing() ? SwDocShell::Factory().GetModuleName() : "Writer"; + = !comphelper::IsFuzzing() ? SwDocShell::Factory().GetModuleName() : "Writer"; spTheSwSmartTagMgr = new SwSmartTagMgr(sModuleName); spTheSwSmartTagMgr->Init(u"Writer"); } diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index ce14c81e4d1d..146b99fbf4f5 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -129,7 +129,7 @@ #include <tools/globname.hxx> #include <tox.hxx> #include <unotools/charclass.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/collatorwrapper.hxx> #include <unotools/transliterationwrapper.hxx> #include <vcl/mapmod.hxx> @@ -672,7 +672,7 @@ void InitCore() pGlobalOLEExcludeList = new std::vector<SvGlobalName>; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { const SvxSwAutoFormatFlags& rAFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags(); SwDoc::s_pAutoCompleteWords = new SwAutoCompleteWord( rAFlags.nAutoCmpltListLen, @@ -743,7 +743,7 @@ void SwCalendarWrapper::LoadDefaultCalendar( LanguageType eLang ) LanguageType GetAppLanguage() { - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) return Application::GetSettings().GetLanguageTag().getLanguageType(); return LANGUAGE_ENGLISH_US; } -e ... etc. - the rest is truncated