diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-12-23 16:07:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-12-30 12:45:45 +0100 |
commit | f0a8b5b81d6be08de6e0d504616a1f09830f7c38 (patch) | |
tree | c13bfc5e50c8e1852bf50531d6fcdff6e59e718c | |
parent | 2c8e9ed3cbe3aed5520ce8f5888dd083f8ee50c3 (diff) |
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.mcnamara@collabora.com>
175 files changed, 425 insertions, 410 deletions
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", "\t\t" << 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( '\t' ), 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( '\t' ), 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( '\t' ), 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( '\t' ), 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; } diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 25bf8d0ef68e..aba72cb08795 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -875,7 +875,7 @@ bool SwPaM::HasReadonlySel(bool bFormView, bool const isReplace) const const bool bAtStartA = (pA != nullptr) && (pA->GetMarkStart() == *GetPoint()); const bool bAtStartB = (pB != nullptr) && (pB->GetMarkStart() == *GetMark()); - if (!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get()) + if (officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get()) { ; // allow editing all fields in generic mode } diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx index 7f3098ef6672..a72bc5951438 100644 --- a/sw/source/core/doc/DocumentDrawModelManager.cxx +++ b/sw/source/core/doc/DocumentDrawModelManager.cxx @@ -43,7 +43,7 @@ #include <svx/svdotext.hxx> #include <svx/svdview.hxx> #include <svl/srchitem.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> @@ -109,7 +109,7 @@ void DocumentDrawModelManager::InitDrawModel() mpDrawModel->InsertPage( pMasterPage.get() ); SAL_INFO( "sw.doc", "after create DrawDocument" ); SdrOutliner& rOutliner = mpDrawModel->GetDrawOutliner(); - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { SAL_INFO( "sw.doc", "before create Spellchecker/Hyphenator" ); css::uno::Reference< css::linguistic2::XSpellChecker1 > xSpell = ::GetSpellChecker(); diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx index ebe116c68276..355b704a3a05 100644 --- a/sw/source/core/doc/DocumentSettingManager.cxx +++ b/sw/source/core/doc/DocumentSettingManager.cxx @@ -31,7 +31,7 @@ #include <svx/svdmodel.hxx> #include <svl/asiancfg.hxx> #include <unotools/compatibility.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <drawdoc.hxx> #include <swmodule.hxx> #include <linkenum.hxx> @@ -116,7 +116,7 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc) // Note: Any non-hidden compatibility flag should obtain its default // by asking SvtCompatibilityOptions, see below. - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { const SvtCompatibilityOptions aOptions; mbParaSpaceMax = aOptions.GetDefault( SvtCompatibilityEntry::Index::AddSpacing ); diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 57e561e1f444..fc9a104d8c9d 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -54,7 +54,7 @@ #include <SwUndoPageDesc.hxx> #include <pagedeschint.hxx> #include <tgrditem.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/syslocale.hxx> #include <svx/swframetypes.hxx> #include <o3tl/unit_conversion.hxx> @@ -93,7 +93,7 @@ static void lcl_DefaultPageFormat( sal_uInt16 nPoolFormatId, nMinRight = nMinTop = nMinBottom = o3tl::toTwips(1, o3tl::Length::cm); nMinLeft = o3tl::toTwips(2, o3tl::Length::cm); } - else if (!utl::ConfigManager::IsFuzzing() && MeasurementSystem::Metric == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum() ) + else if (!comphelper::IsFuzzing() && MeasurementSystem::Metric == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum() ) { nMinTop = nMinBottom = nMinLeft = nMinRight = o3tl::toTwips(2, o3tl::Length::cm); } diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 57c42c529eb1..21a4da06dc6b 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1769,7 +1769,7 @@ void SwDoc::EnsureNumberFormatter() LanguageType eLang = LANGUAGE_SYSTEM; mpNumberFormatter = new SvNumberFormatter(comphelper::getProcessComponentContext(), eLang); mpNumberFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_FORMAT_INTL ); - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) mpNumberFormatter->SetYear2000( officecfg::Office::Common::DateFormat::TwoDigitYear::get()); }; diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index d6e885e8219a..729213bd67d1 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -33,6 +33,7 @@ #include <com/sun/star/linguistic2/XProofreadingIterator.hpp> #include <com/sun/star/i18n/ScriptType.hpp> +#include <comphelper/configuration.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/random.hxx> #include <sfx2/viewfrm.hxx> @@ -370,7 +371,7 @@ SwDoc::SwDoc() } mnRsidRoot = mnRsid; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { // Make sure that in case the document language is not set, then we don't return // LANGUAGE_DONTKNOW, but the UI locale. diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 9cef97ddc2fe..93265bca2fa2 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -33,7 +33,7 @@ #include <SwStyleNameMapper.hxx> // Needed to load default bullet list configuration -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/configitem.hxx> #include <numrule.hxx> @@ -1623,7 +1623,7 @@ namespace numfunc SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return SvxNumberFormat::LABEL_ALIGNMENT; SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode; diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 65bff647eb08..c348688e954e 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -23,7 +23,7 @@ #include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/pathoptions.hxx> #include <swtable.hxx> #include <swtblfmt.hxx> @@ -1042,7 +1042,7 @@ SwTableAutoFormatTable::SwTableAutoFormatTable() void SwTableAutoFormatTable::Load() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; OUString sNm(AUTOTABLE_FORMAT_NAME); SvtPathOptions aOpt; @@ -1055,7 +1055,7 @@ void SwTableAutoFormatTable::Load() bool SwTableAutoFormatTable::Save() const { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return false; SvtPathOptions aPathOpt; const OUString sNm( aPathOpt.GetUserConfigPath() + "/" + AUTOTABLE_FORMAT_NAME ); diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 7948106f9419..f7ab7cda9fbd 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -122,10 +122,10 @@ SwDrawView::SwDrawView( SetPrintPreview( rI.GetShell()->IsPreview() ); // #i73602# Use default from the configuration - SetBufferedOverlayAllowed(!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Drawinglayer::OverlayBuffer_Writer::get()); + SetBufferedOverlayAllowed(!comphelper::IsFuzzing() && officecfg::Office::Common::Drawinglayer::OverlayBuffer_Writer::get()); // #i74769#, #i75172# Use default from the configuration - SetBufferedOutputAllowed(!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Drawinglayer::OverlayBuffer_DrawImpress::get()); + SetBufferedOutputAllowed(!comphelper::IsFuzzing() && officecfg::Office::Common::Drawinglayer::OverlayBuffer_DrawImpress::get()); } // #i99665# diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx index 4e46ae2daf5a..667254e4b97e 100644 --- a/sw/source/core/edit/edws.cxx +++ b/sw/source/core/edit/edws.cxx @@ -49,7 +49,7 @@ SwEditShell::SwEditShell( SwDoc& rDoc, vcl::Window *pWindow, const SwViewOption , m_bNbspRunNext(false) , m_bDoParagraphSignatureValidation(true) { - if (!utl::ConfigManager::IsFuzzing() && 0 < officecfg::Office::Common::Undo::Steps::get()) + if (!comphelper::IsFuzzing() && 0 < officecfg::Office::Common::Undo::Steps::get()) { GetDoc()->GetIDocumentUndoRedo().DoUndo(true); } diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 13599eda28a0..e36c11cad17e 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -117,6 +117,7 @@ #include <o3tl/typed_flags_set.hxx> #include <vcl/BitmapTools.hxx> +#include <comphelper/configuration.hxx> #include <comphelper/lok.hxx> #include <svtools/optionsdrawinglayer.hxx> #include <vcl/GraphicLoader.hxx> @@ -1755,7 +1756,7 @@ bool DrawFillAttributes( // This must probably be removed again when we will be able to get all Writer visualization // as primitives and Writer prepares all it's stuff in high precision coordinates (also // needs to avoid moving boundaries around to better show overlapping stuff...) - if (utl::ConfigManager::IsFuzzing() || SvtOptionsDrawinglayer::IsAntiAliasing()) + if (comphelper::IsFuzzing() || SvtOptionsDrawinglayer::IsAntiAliasing()) { // if AAed in principle expand by 0.5 in all directions. Since painting edges of // AAed regions does not add to no transparence (0.5 opacity covered by 0.5 opacity diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 18eb78db8348..fcd5ea0d22ab 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -26,7 +26,7 @@ #include <editeng/lrspitem.hxx> #include <editeng/brushitem.hxx> #include <editeng/pgrditem.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <swmodule.hxx> #include <SwSmartTagMgr.hxx> #include <doc.hxx> @@ -725,7 +725,7 @@ SwDigitModeModifier::SwDigitModeModifier( const OutputDevice& rOutp, LanguageTyp rOut( rOutp ), nOldLanguageType( rOutp.GetDigitLanguage() ) { LanguageType eLang = eCurLang; - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) eLang = LANGUAGE_ENGLISH_US; else { diff --git a/sw/source/core/txtnode/OnlineAccessibilityCheck.cxx b/sw/source/core/txtnode/OnlineAccessibilityCheck.cxx index d85379ffb1ee..251efbd61b08 100644 --- a/sw/source/core/txtnode/OnlineAccessibilityCheck.cxx +++ b/sw/source/core/txtnode/OnlineAccessibilityCheck.cxx @@ -73,7 +73,7 @@ OnlineAccessibilityCheck::OnlineAccessibilityCheck(SwDoc& rDocument) , m_nAccessibilityIssues(0) , m_bInitialCheck(false) , m_bOnlineCheckStatus( - !utl::ConfigManager::IsFuzzing() + !comphelper::IsFuzzing() ? officecfg::Office::Common::Accessibility::OnlineAccessibilityCheck::get() : false) { @@ -181,7 +181,7 @@ void OnlineAccessibilityCheck::initialCheck() void OnlineAccessibilityCheck::updateCheckerActivity() { bool bOnlineCheckStatus - = !utl::ConfigManager::IsFuzzing() + = !comphelper::IsFuzzing() && officecfg::Office::Common::Accessibility::OnlineAccessibilityCheck::get(); if (bOnlineCheckStatus != m_bOnlineCheckStatus) @@ -296,7 +296,7 @@ void OnlineAccessibilityCheck::clearAccessibilityIssuesFromAllNodes() void OnlineAccessibilityCheck::resetAndQueue(SwNode* pNode, bool bIssueObjectNameChanged) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; bool bOnlineCheckStatus @@ -316,7 +316,7 @@ void OnlineAccessibilityCheck::resetAndQueue(SwNode* pNode, bool bIssueObjectNam void OnlineAccessibilityCheck::resetAndQueueDocumentLevel() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; bool bOnlineCheckStatus diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index fffc90243adf..8dada09d693e 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -30,7 +30,7 @@ #include <svl/cjkoptions.hxx> #include <svl/ctloptions.hxx> #include <toolkit/awt/vclxdevice.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/moduleoptions.hxx> #include <vcl/outdev.hxx> #include <osl/diagnose.h> @@ -160,7 +160,7 @@ SwPrintUIOptions::SwPrintUIOptions( { // printing HTML sources does not have any valid UI options. // It's just the source code that gets printed... - if (bSwSrcView || utl::ConfigManager::IsFuzzing()) + if (bSwSrcView || comphelper::IsFuzzing()) { m_aUIProperties.clear(); return; diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index ac32a6187ee2..9ad7015e236f 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -2641,7 +2641,7 @@ SwAccessibleMap* SwViewShell::GetAccessibleMap() void SwViewShell::ApplyAccessibilityOptions() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; if (mpOpt->IsPagePreview() && !officecfg::Office::Common::Accessibility::IsForPagePreviews::get()) { diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 888213aa9d5e..a4425897983b 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -85,7 +85,7 @@ void SwAsciiOptions::Reset() m_eCharSet = ::osl_getThreadTextEncoding(); m_nLanguage = LANGUAGE_SYSTEM; m_bIncludeBOM = true; - m_bIncludeHidden = !utl::ConfigManager::IsFuzzing() && officecfg::Office::Writer::FilterFlags::ASCII::IncludeHiddenText::get(); + m_bIncludeHidden = !comphelper::IsFuzzing() && officecfg::Office::Writer::FilterFlags::ASCII::IncludeHiddenText::get(); } ErrCodeMsg SwReader::Read( const Reader& rOptions ) diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 424644378bc5..cb566fb4289e 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -19,6 +19,7 @@ #include <memory> #include <hintids.hxx> +#include <comphelper/configuration.hxx> #include <comphelper/flagguard.hxx> #include <utility> #include <vcl/svapp.hxx> @@ -2312,7 +2313,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, // Step 1: needed layout structures are created (including tables in tables) CreateLayoutInfo(); - if (!utl::ConfigManager::IsFuzzing()) // skip slow path for fuzzing + if (!comphelper::IsFuzzing()) // skip slow path for fuzzing { // Step 2: the minimal and maximal column width is calculated // (including tables in tables). Since we don't have boxes yet, @@ -2934,7 +2935,7 @@ CellSaveStruct::CellSaveStruct( SwHTMLParser& rParser, HTMLTable const *pCurTabl break; case HtmlOptionId::ROWSPAN: m_nRowSpan = o3tl::narrowing<sal_uInt16>(rOption.GetNumber()); - if (m_nRowSpan > 8192 || (m_nRowSpan > 256 && utl::ConfigManager::IsFuzzing())) + if (m_nRowSpan > 8192 || (m_nRowSpan > 256 && comphelper::IsFuzzing())) { SAL_INFO("sw.html", "ignoring huge ROWSPAN " << m_nRowSpan); m_nRowSpan = 1; diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 9418fa06466b..a792a3c57927 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -30,7 +30,7 @@ #include <i18nlangtag/languagetag.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/ucbstreamhelper.hxx> #include <unotools/streamwrap.hxx> #include <rtl/random.h> @@ -4342,7 +4342,7 @@ SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SotStorage* pStorage, , m_bCareFirstParaEndInToc(false) , m_bCareLastParaEndInToc(false) , m_bNotifyMacroEventRead(false) - , m_bFuzzing(utl::ConfigManager::IsFuzzing()) + , m_bFuzzing(comphelper::IsFuzzing()) { m_pStrm->SetEndian( SvStreamEndian::LITTLE ); m_aApos.push_back(false); diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx index 7281f0af0fc6..9ef5cdf0ca10 100644 --- a/sw/source/filter/ww8/ww8toolbar.cxx +++ b/sw/source/filter/ww8/ww8toolbar.cxx @@ -23,7 +23,7 @@ #include <o3tl/safeint.hxx> #include <sfx2/objsh.hxx> #include <comphelper/diagnose_ex.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <rtl/ref.hxx> #include <map> #include <sal/log.hxx> @@ -191,7 +191,7 @@ bool SwCTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh ) try { css::uno::Reference<css::ui::XUIConfigurationManager> xCfgMgr; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext(); uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( ui::theModuleUIConfigurationManagerSupplier::get(xContext) ); diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index bd80223ce906..b426ec88bc85 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -32,7 +32,7 @@ #include <svl/numformat.hxx> #include <svl/zformat.hxx> #include <sax/tools/converter.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <utility> #include <xmloff/xmlnamespace.hxx> #include <xmloff/namespacemap.hxx> @@ -407,7 +407,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl( break; case XML_ELEMENT(TABLE, XML_NUMBER_ROWS_SPANNED): m_nRowSpan = static_cast<sal_uInt32>(std::max<sal_Int32>(1, aIter.toInt32())); - if (m_nRowSpan > 8192 || (m_nRowSpan > 256 && utl::ConfigManager::IsFuzzing())) + if (m_nRowSpan > 8192 || (m_nRowSpan > 256 && comphelper::IsFuzzing())) { SAL_INFO("sw.xml", "ignoring huge table:number-rows-spanned " << m_nRowSpan); m_nRowSpan = 1; @@ -808,7 +808,7 @@ SwXMLTableRowContext_Impl::SwXMLTableRowContext_Impl( SwXMLImport& rImport, case XML_ELEMENT(STYLE, XML_NUMBER_ROWS_REPEATED): { m_nRowRepeat = static_cast<sal_uInt32>(std::max<sal_Int32>(1, aIter.toInt32())); - if (m_nRowRepeat > 8192 || (m_nRowRepeat > 256 && utl::ConfigManager::IsFuzzing())) + if (m_nRowRepeat > 8192 || (m_nRowRepeat > 256 && comphelper::IsFuzzing())) { SAL_INFO("sw.xml", "ignoring huge table:number-rows-repeated " << m_nRowRepeat); m_nRowRepeat = 1; diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 47c8a3ec651a..b6ff29b695c4 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1438,7 +1438,7 @@ void SwDocShell::FillClass( SvGlobalName * pClassName, void SwDocShell::SetModified( bool bSet ) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; SfxObjectShell::SetModified( bSet ); if( !IsEnableSetModified()) diff --git a/sw/source/uibase/app/docshdrw.cxx b/sw/source/uibase/app/docshdrw.cxx index f767191fbd10..7d4353805ec9 100644 --- a/sw/source/uibase/app/docshdrw.cxx +++ b/sw/source/uibase/app/docshdrw.cxx @@ -21,7 +21,7 @@ #include <svx/drawitem.hxx> #include <svx/svdoutl.hxx> #include <svx/xtable.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <docsh.hxx> #include <drawdoc.hxx> #include <swtypes.hxx> @@ -64,7 +64,7 @@ void InitDrawModelAndDocShell(SwDocShell* pSwDocShell, SwDrawModel* pSwDrawDocum { pSwDocShell->PutItem(SvxColorListItem(xColorList, SID_COLOR_TABLE)); } - else if (!utl::ConfigManager::IsFuzzing()) + else if (!comphelper::IsFuzzing()) { // there wasn't one, get the standard and set to the // docshell and then to the drawdocument diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx index 5acee759dba2..757be8006dbc 100644 --- a/sw/source/uibase/app/docshini.cxx +++ b/sw/source/uibase/app/docshini.cxx @@ -106,7 +106,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) SwTransferable::InitOle( this ); // set forbidden characters if necessary - const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + const bool bFuzzing = comphelper::IsFuzzing(); if (!bFuzzing) { SvxAsianConfig aAsian; @@ -649,7 +649,7 @@ void SwDocShell::SubInitNew() //! get lingu options without loading lingu DLL SvtLinguOptions aLinguOpt; - const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + const bool bFuzzing = comphelper::IsFuzzing(); if (!bFuzzing) SvtLinguConfig().GetOptions(aLinguOpt); diff --git a/sw/source/uibase/app/swdll.cxx b/sw/source/uibase/app/swdll.cxx index c4564a4741f3..10b16d6c1052 100644 --- a/sw/source/uibase/app/swdll.cxx +++ b/sw/source/uibase/app/swdll.cxx @@ -30,7 +30,7 @@ #include <dobjfac.hxx> #include <com/sun/star/frame/Desktop.hpp> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/moduleoptions.hxx> #include <comphelper/unique_disposing_ptr.hxx> #include <comphelper/processfactory.hxx> @@ -87,7 +87,7 @@ SwDLL::SwDLL() return; std::unique_ptr<SvtModuleOptions> xOpt; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) xOpt.reset(new SvtModuleOptions); SfxObjectFactory* pDocFact = nullptr; SfxObjectFactory* pGlobDocFact = nullptr; @@ -137,7 +137,7 @@ SwDLL::SwDLL() // register your controllers here RegisterControls(); - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { // replace SvxAutocorrect with SwAutocorrect SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get(); diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index e7a97f4b8c25..e8bb17f37f79 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -98,7 +98,7 @@ #include <svx/rubydialog.hxx> #include <svtools/colorcfg.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/moduleoptions.hxx> #include <avmedia/mediaplayer.hxx> @@ -155,7 +155,7 @@ SwModule::SwModule( SfxObjectFactory* pWebFact, StartListening( *SfxGetpApp() ); } - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { // init color configuration // member <pColorConfig> is created and the color configuration is applied @@ -211,13 +211,13 @@ void SwDLL::RegisterFactories() { // These Id's must not be changed. Through these Id's the View (resume Documentview) // is created by Sfx. - if (utl::ConfigManager::IsFuzzing() || SvtModuleOptions().IsWriter()) + if (comphelper::IsFuzzing() || SvtModuleOptions().IsWriter()) SwView::RegisterFactory ( SFX_INTERFACE_SFXDOCSH ); #if HAVE_FEATURE_DESKTOP SwWebView::RegisterFactory ( SFX_INTERFACE_SFXMODULE ); - if (utl::ConfigManager::IsFuzzing() || SvtModuleOptions().IsWriter()) + if (comphelper::IsFuzzing() || SvtModuleOptions().IsWriter()) { SwSrcView::RegisterFactory ( SfxInterfaceId(6) ); SwPagePreview::RegisterFactory ( SfxInterfaceId(7) ); diff --git a/sw/source/uibase/config/fontcfg.cxx b/sw/source/uibase/config/fontcfg.cxx index 264d50bc8a02..52d7bbdb7349 100644 --- a/sw/source/uibase/config/fontcfg.cxx +++ b/sw/source/uibase/config/fontcfg.cxx @@ -22,7 +22,7 @@ #include <osl/diagnose.h> #include <tools/UnitConversion.hxx> #include <vcl/outdev.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/lingucfg.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/i18n/ScriptType.hpp> @@ -79,7 +79,7 @@ SwStdFontConfig::SwStdFontConfig() : { SvtLinguOptions aLinguOpt; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) SvtLinguConfig().GetOptions( aLinguOpt ); LanguageType eWestern = MsLangId::resolveSystemLanguageByScriptType(aLinguOpt.nDefaultLanguage, css::i18n::ScriptType::LATIN), @@ -159,7 +159,7 @@ bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const bool bSame = false; SvtLinguOptions aLinguOpt; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) SvtLinguConfig().GetOptions(aLinguOpt); LanguageType eWestern = MsLangId::resolveSystemLanguageByScriptType(aLinguOpt.nDefaultLanguage, css::i18n::ScriptType::LATIN), @@ -278,7 +278,7 @@ void SwStdFontConfig::ChangeInt( sal_uInt16 nFontType, sal_Int32 nHeight ) return; SvtLinguOptions aLinguOpt; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) SvtLinguConfig().GetOptions( aLinguOpt ); LanguageType eWestern = MsLangId::resolveSystemLanguageByScriptType(aLinguOpt.nDefaultLanguage, css::i18n::ScriptType::LATIN), diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx index c04d775c3ac3..8928e8e5470f 100644 --- a/sw/source/uibase/config/usrpref.cxx +++ b/sw/source/uibase/config/usrpref.cxx @@ -22,7 +22,7 @@ #include <osl/diagnose.h> #include <o3tl/any.hxx> #include <tools/UnitConversion.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/syslocale.hxx> #include <usrpref.hxx> @@ -54,7 +54,7 @@ SwMasterUsrPref::SwMasterUsrPref(bool bWeb) : m_pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : nullptr), m_bApplyCharUnit(false) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) { m_eHScrollMetric = m_eVScrollMetric = m_eUserMetric = FieldUnit::CM; // match defaults diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index 2b6a5c500e6f..f5ee222a7ce7 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -272,7 +272,7 @@ SwViewOption::SwViewOption() : ViewOptFlags2::ResolvedPostits | ViewOptFlags2::AnyRuler; - if (!utl::ConfigManager::IsFuzzing() && MeasurementSystem::Metric != SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()) + if (!comphelper::IsFuzzing() && MeasurementSystem::Metric != SvtSysLocale().GetLocaleData().getMeasurementSystemEnum()) { m_aSnapSize.setWidth(720); // 1/2" m_aSnapSize.setHeight(720); // 1/2" @@ -285,7 +285,7 @@ SwViewOption::SwViewOption() : } m_nDivisionX = m_nDivisionY = 1; - m_bSelectionInReadonly = utl::ConfigManager::IsFuzzing() || officecfg::Office::Common::Accessibility::IsSelectionInReadonly::get(); + m_bSelectionInReadonly = comphelper::IsFuzzing() || officecfg::Office::Common::Accessibility::IsSelectionInReadonly::get(); m_bIdle = true; @@ -607,7 +607,7 @@ rtl::Reference<comphelper::ConfigurationListener> const & getWCOptionListener() bool SwViewOption::IsIgnoreProtectedArea() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return false; static comphelper::ConfigurationListenerProperty<bool> gIgnoreProtectedArea(getWCOptionListener(), "IgnoreProtectedArea"); return gIgnoreProtectedArea.get(); diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index ab8da1cc2d44..c7cf01d4d8df 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -487,7 +487,7 @@ void SwView::SelectShell() } // Show Mail Merge toolbar initially for documents with Database fields - if (!m_bInitOnceCompleted && GetWrtShell().IsAnyDatabaseFieldInDoc() && !utl::ConfigManager::IsFuzzing()) + if (!m_bInitOnceCompleted && GetWrtShell().IsAnyDatabaseFieldInDoc() && !comphelper::IsFuzzing()) ShowUIElement("private:resource/toolbar/mailmerge"); // Activate the toolbar to the new selection which also was active last time. @@ -823,7 +823,7 @@ SwView::SwView(SfxViewFrame& _rFrame, SfxViewShell* pOldSh) bDocSzUpdated = true; - static bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static bool bFuzzing = comphelper::IsFuzzing(); if (!bFuzzing) { diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 66d8c66597ae..e7147830b04f 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -72,7 +72,7 @@ using namespace ::com::sun::star; SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default") { - if (utl::ConfigManager::IsFuzzing() || SvtModuleOptions().IsWriter()) + if (comphelper::IsFuzzing() || SvtModuleOptions().IsWriter()) { SFX_VIEW_REGISTRATION(SwDocShell); SFX_VIEW_REGISTRATION(SwGlobalDocShell); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index fab67cbd6e83..597294e3c7f9 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -2535,7 +2535,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() && !utl::ConfigManager::IsFuzzing() && !officecfg::Office::Common::Print::PrintingModifiesDocument::get()) + if (pRenderDocShell->IsEnableSetModified() && !comphelper::IsFuzzing() && !officecfg::Office::Common::Print::PrintingModifiesDocument::get()) { pRenderDocShell->EnableSetModified( false ); bStateChanged = true; diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx index d0b6a04a697d..80a644b400f6 100644 --- a/unotools/source/config/configitem.cxx +++ b/unotools/source/config/configitem.cxx @@ -36,6 +36,7 @@ #include <com/sun/star/util/XChangesBatch.hpp> #include <o3tl/deleter.hxx> #include <osl/diagnose.h> +#include <comphelper/configuration.hxx> #include <comphelper/sequence.hxx> #include <comphelper/solarmutex.hxx> #include <comphelper/diagnose_ex.hxx> @@ -144,7 +145,7 @@ ConfigItem::ConfigItem(OUString aSubTree, ConfigItemMode nSetMode ) : m_bEnableInternalNotification(false), m_nInValueChange(0) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; if (nSetMode & ConfigItemMode::ReleaseTree) @@ -1172,7 +1173,7 @@ void ConfigItem::ClearModified() Reference< XHierarchicalNameAccess> ConfigItem::GetTree() { Reference< XHierarchicalNameAccess> xRet; - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return xRet; if(!m_xHierarchyAccess.is()) xRet = ConfigManager::acquireTree(*this); diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx index e19c7c694a6a..52c48b02adf9 100644 --- a/unotools/source/config/configmgr.cxx +++ b/unotools/source/config/configmgr.cxx @@ -175,19 +175,4 @@ void utl::ConfigManager::doStoreConfigItems() { } } -static bool bIsFuzzing = false; - -#if !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) -bool utl::ConfigManager::IsFuzzing() -{ - return bIsFuzzing; -} -#endif - -void utl::ConfigManager::EnableFuzzing() -{ - bIsFuzzing = true; - LanguageTag::disable_lt_tag_parse(); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx index 62f854c003c5..b4e879265b14 100644 --- a/unotools/source/config/eventcfg.cxx +++ b/unotools/source/config/eventcfg.cxx @@ -19,6 +19,7 @@ #include <sal/config.h> +#include <comphelper/configuration.hxx> #include <comphelper/propertyvalue.hxx> #include <unotools/eventcfg.hxx> #include <unotools/configmgr.hxx> @@ -371,7 +372,7 @@ sal_Bool SAL_CALL GlobalEventConfig::hasElements( ) OUString GlobalEventConfig::GetEventName( GlobalEventId nIndex ) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return OUString(); static rtl::Reference<GlobalEventConfig> createImpl(new GlobalEventConfig); return GlobalEventConfig::m_pImpl->GetEventName( nIndex ); diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index 26ceda82d5fa..aad44c9ef0c9 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -23,12 +23,13 @@ #include <unotools/configmgr.hxx> #include <unotools/fontcfg.hxx> #include <unotools/fontdefs.hxx> +#include <comphelper/configuration.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/propertysequence.hxx> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/container/XNameAccess.hpp> -#include <comphelper/propertysequence.hxx> #include <unotools/syslocale.hxx> #include <rtl/ustrbuf.hxx> #include <osl/diagnose.h> @@ -89,7 +90,7 @@ DefaultFontConfiguration& DefaultFontConfiguration::get() DefaultFontConfiguration::DefaultFontConfiguration() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; // create configuration hierarchical access name try @@ -301,7 +302,7 @@ FontSubstConfiguration::FontSubstConfiguration() : maSubstHash( 300 ), maLanguageTag("en") { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; try { diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx index 1c2070ab95fc..5c1c3dbe0a56 100644 --- a/unotools/source/config/securityoptions.cxx +++ b/unotools/source/config/securityoptions.cxx @@ -111,7 +111,7 @@ bool IsReadOnly( EOption eOption ) std::vector< OUString > GetSecureURLs() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return {}; std::vector<OUString> aRet = comphelper::sequenceToContainer<std::vector<OUString>>( officecfg::Office::Common::Security::Scripting::SecureURL::get()); @@ -182,12 +182,12 @@ bool isTrustedLocationUriForUpdatingLinks(OUString const & uri) sal_Int32 GetMacroSecurityLevel() { - return utl::ConfigManager::IsFuzzing() ? 3 : officecfg::Office::Common::Security::Scripting::MacroSecurityLevel::get(); + return comphelper::IsFuzzing() ? 3 : officecfg::Office::Common::Security::Scripting::MacroSecurityLevel::get(); } void SetMacroSecurityLevel( sal_Int32 _nLevel ) { - if (utl::ConfigManager::IsFuzzing() || officecfg::Office::Common::Security::Scripting::MacroSecurityLevel::isReadOnly()) + if (comphelper::IsFuzzing() || officecfg::Office::Common::Security::Scripting::MacroSecurityLevel::isReadOnly()) return; if( _nLevel > 3 || _nLevel < 0 ) @@ -200,7 +200,7 @@ void SetMacroSecurityLevel( sal_Int32 _nLevel ) bool IsMacroDisabled() { - return utl::ConfigManager::IsFuzzing() || officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get(); + return comphelper::IsFuzzing() || officecfg::Office::Common::Security::Scripting::DisableMacrosExecution::get(); } std::vector< SvtSecurityOptions::Certificate > GetTrustedAuthors() @@ -293,7 +293,7 @@ void SetTrustedAuthors( const std::vector< Certificate >& rAuthors ) bool IsOptionSet( EOption eOption ) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return false; bool bSet = false; switch(eOption) diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index 70177c5c0593..52760b87c673 100644 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -18,6 +18,7 @@ */ #include <com/sun/star/uno/Sequence.hxx> +#include <comphelper/configuration.hxx> #include <sal/log.hxx> #include <i18nlangtag/mslangid.hxx> #include <i18nlangtag/languagetag.hxx> @@ -550,7 +551,7 @@ SvtSysLocaleOptions::SvtSysLocaleOptions() { pImpl = std::make_shared<SvtSysLocaleOptions_Impl>(); g_pSysLocaleOptions = pImpl; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) ItemHolder1::holdConfigItem(EItem::SysLocaleOptions); } pImpl->AddListener(this); diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx index 382af97b2c8b..a17d3c48df2d 100644 --- a/unotools/source/config/viewoptions.cxx +++ b/unotools/source/config/viewoptions.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <comphelper/configurationhelper.hxx> #include <comphelper/processfactory.hxx> #include <utility> @@ -51,7 +52,7 @@ SvtViewOptions::SvtViewOptions( EViewType eType, OUString sViewName ) case EViewType::Window: m_sListName = "Windows"; break; default: assert(false); } - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; try diff --git a/unotools/source/misc/defaultencoding.cxx b/unotools/source/misc/defaultencoding.cxx index 552f3b8c40d7..b5a7ce2316a1 100644 --- a/unotools/source/misc/defaultencoding.cxx +++ b/unotools/source/misc/defaultencoding.cxx @@ -17,7 +17,7 @@ OUString utl_getLocaleForGlobalDefaultEncoding() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return "en-US"; // First try document default language OUString result(officecfg::Office::Linguistic::General::DefaultLocale::get()); diff --git a/unotools/source/misc/mediadescriptor.cxx b/unotools/source/misc/mediadescriptor.cxx index f797728f7b3f..c846a365ec31 100644 --- a/unotools/source/misc/mediadescriptor.cxx +++ b/unotools/source/misc/mediadescriptor.cxx @@ -223,7 +223,7 @@ bool MediaDescriptor::addInputStream() /*-----------------------------------------------*/ bool MediaDescriptor::addInputStreamOwnLock() { - const bool bLock = !utl::ConfigManager::IsFuzzing() + const bool bLock = !comphelper::IsFuzzing() && officecfg::Office::Common::Misc::UseDocumentSystemFileLocking::get(); return impl_addInputStream(bLock); } diff --git a/vcl/headless/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx index 2af8e0d892e2..1a364bb53787 100644 --- a/vcl/headless/CairoCommon.cxx +++ b/vcl/headless/CairoCommon.cxx @@ -29,7 +29,7 @@ #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/range/b2irange.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <sal/log.hxx> #include <osl/module.h> @@ -334,7 +334,7 @@ SystemDependentData_CairoPath::SystemDependentData_CairoPath(size_t nSizeMeasure , mbNoJoin(bNoJoin) , mbAntiAlias(bAntiAlias) { - static const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static const bool bFuzzing = comphelper::IsFuzzing(); // tdf#129845 only create a copy of the path when nSizeMeasure is // bigger than some decent threshold @@ -992,7 +992,7 @@ bool CairoCommon::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDevice, return true; } - static const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static const bool bFuzzing = comphelper::IsFuzzing(); if (bFuzzing) { const basegfx::B2DRange aRange(basegfx::utils::getRange(rPolyLine)); diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx index e6893055f633..2756fa246af0 100644 --- a/vcl/source/app/scheduler.cxx +++ b/vcl/source/app/scheduler.cxx @@ -31,7 +31,7 @@ #include <tools/time.hxx> #include <tools/debug.hxx> #include <comphelper/diagnose_ex.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/TaskStopwatch.hxx> #include <vcl/scheduler.hxx> #include <vcl/idle.hxx> @@ -661,7 +661,7 @@ Task::~Task() COVERITY_NOEXCEPT_FALSE mpSchedulerData->mpTask = nullptr; } else - assert(nullptr == mpSchedulerData || utl::ConfigManager::IsFuzzing()); + assert(nullptr == mpSchedulerData || comphelper::IsFuzzing()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index a1138de24c4d..8d04d9065ea6 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -636,7 +636,7 @@ void ImplStyleData::SetStandardStyles() vcl::Font aStdFont( FAMILY_SWISS, Size( 0, 8 ) ); aStdFont.SetCharSet( osl_getThreadTextEncoding() ); aStdFont.SetWeight( WEIGHT_NORMAL ); - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) aStdFont.SetFamilyName(utl::DefaultFontConfiguration::get().getUserInterfaceFont(LanguageTag("en"))); else aStdFont.SetFamilyName("Liberation Sans"); @@ -2814,7 +2814,7 @@ bool MiscSettings::GetUseDarkMode() int MiscSettings::GetAppColorMode() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return 0; return officecfg::Office::Common::Misc::ApplicationAppearance::get(); } @@ -2887,7 +2887,7 @@ ImplAllSettingsData::ImplAllSettingsData() maLocale( LANGUAGE_SYSTEM ), maUILocale( LANGUAGE_SYSTEM ) { - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) maMiscSettings.SetEnableLocalizedDecimalSep( maSysLocale.GetOptions().IsDecimalSeparatorAsLocale() ); } @@ -3079,21 +3079,21 @@ namespace bool AllSettings::GetLayoutRTL() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return false; return GetConfigLayoutRTL(false); } bool AllSettings::GetMathLayoutRTL() { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return false; return GetConfigLayoutRTL(true); } const LanguageTag& AllSettings::GetLanguageTag() const { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) { static LanguageTag aRet("en-US"); return aRet; @@ -3111,7 +3111,7 @@ const LanguageTag& AllSettings::GetLanguageTag() const const LanguageTag& AllSettings::GetUILanguageTag() const { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) { static LanguageTag aRet("en-US"); return aRet; @@ -3237,7 +3237,7 @@ StyleSettings::DetermineIconTheme() const OUString sTheme(mxData->mIconTheme); if (sTheme.isEmpty()) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) sTheme = "colibre"; else { diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index e1e12dbc3e8a..e0055833bc45 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -32,7 +32,7 @@ #include <tools/stream.hxx> #include <tools/json_writer.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/resmgr.hxx> #include <unotools/syslocale.hxx> #include <unotools/syslocaleoptions.hxx> @@ -691,7 +691,7 @@ void InitSettings(ImplSVData* pSVData) assert(!pSVData->maAppData.mxSettings && "initialization should not happen twice!"); pSVData->maAppData.mxSettings.emplace(); - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { pSVData->maAppData.mpCfgListener = new LocaleConfigurationListener; pSVData->maAppData.mxSettings->GetSysLocale().GetOptions().AddListener( pSVData->maAppData.mpCfgListener ); diff --git a/vcl/source/bitmap/dibtools.cxx b/vcl/source/bitmap/dibtools.cxx index 4eb15ac2844c..483da0d89e2c 100644 --- a/vcl/source/bitmap/dibtools.cxx +++ b/vcl/source/bitmap/dibtools.cxx @@ -30,7 +30,7 @@ #include <tools/fract.hxx> #include <tools/helpers.hxx> #include <tools/GenericTypeSerializer.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/bitmapex.hxx> #include <vcl/outdev.hxx> #include <vcl/BitmapWriteAccess.hxx> @@ -535,7 +535,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r const tools::Long nWidth(rHeader.nWidth); const tools::Long nHeight(rHeader.nHeight); tools::Long nResult = 0; - if (utl::ConfigManager::IsFuzzing() && (o3tl::checked_multiply(nWidth, nHeight, nResult) || nResult > 4000000)) + if (comphelper::IsFuzzing() && (o3tl::checked_multiply(nWidth, nHeight, nResult) || nResult > 4000000)) return false; if (bRLE) diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx index fd3ce0cea8a7..5b49f30f678b 100644 --- a/vcl/source/filter/FilterConfigCache.cxx +++ b/vcl/source/filter/FilterConfigCache.cxx @@ -21,7 +21,7 @@ #include <o3tl/safeint.hxx> #include <vcl/graphicfilter.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <tools/svlibrary.h> #include <com/sun/star/uno/Any.h> #include <comphelper/processfactory.hxx> @@ -263,7 +263,7 @@ void FilterConfigCache::ImplInitSmart() FilterConfigCache::FilterConfigCache(bool bConfig) { if (bConfig) - bConfig = !utl::ConfigManager::IsFuzzing(); + bConfig = !comphelper::IsFuzzing(); if (bConfig) ImplInit(); else diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 25bcdd201ccd..11612378fb8e 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -25,7 +25,7 @@ #include <comphelper/threadpool.hxx> #include <cppuhelper/implbase.hxx> #include <tools/fract.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <tools/stream.hxx> #include <tools/urlobj.hxx> #include <tools/zcodec.hxx> @@ -1228,7 +1228,7 @@ ErrCode GraphicFilter::readPSD(SvStream & rStream, Graphic & rGraphic) ErrCode GraphicFilter::readPCD(SvStream & rStream, Graphic & rGraphic) { std::unique_ptr<FilterConfigItem> pFilterConfigItem; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { OUString aFilterConfigPath( "Office.Common/Filter/Graphic/Import/PCD" ); pFilterConfigItem = std::make_unique<FilterConfigItem>(aFilterConfigPath); diff --git a/vcl/source/filter/idxf/dxf2mtf.cxx b/vcl/source/filter/idxf/dxf2mtf.cxx index 2b26abffd38e..103458e9d019 100644 --- a/vcl/source/filter/idxf/dxf2mtf.cxx +++ b/vcl/source/filter/idxf/dxf2mtf.cxx @@ -18,7 +18,7 @@ */ -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/gdimtf.hxx> #include <vcl/metaact.hxx> #include <vcl/virdev.hxx> @@ -300,7 +300,7 @@ void DXF2GDIMetaFile::DrawCircleEntity(const DXFCircleEntity & rE, const DXFTran void DXF2GDIMetaFile::DrawLine(const Point& rA, const Point& rB) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; GDIMetaFile* pMetaFile = pVirDev->GetConnectMetaFile(); assert(pMetaFile); @@ -820,7 +820,7 @@ bool DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF } pVirDev->EnableOutput(false); - if (!utl::ConfigManager::IsFuzzing()) // for fuzzing don't bother recording the drawing + if (!comphelper::IsFuzzing()) // for fuzzing don't bother recording the drawing rMTF.Record(pVirDev); aActLineColor = pVirDev->GetLineColor(); diff --git a/vcl/source/filter/ieps/ieps.cxx b/vcl/source/filter/ieps/ieps.cxx index bb4ea06b2a7a..0a0b576924ac 100644 --- a/vcl/source/filter/ieps/ieps.cxx +++ b/vcl/source/filter/ieps/ieps.cxx @@ -26,7 +26,7 @@ #include <vcl/virdev.hxx> #include <vcl/cvtgrf.hxx> #include <vcl/BitmapTools.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/tempfile.hxx> #include <osl/process.h> #include <osl/file.hxx> @@ -781,7 +781,7 @@ bool ImportEpsGraphic( SvStream & rStream, Graphic & rGraphic) GDIMetaFile aMtf; // if there is no preview -> try with gs to make one - if (!bHasPreview && !utl::ConfigManager::IsFuzzing()) + if (!bHasPreview && !comphelper::IsFuzzing()) { bHasPreview = RenderAsEMF(aBuf.getData(), nBytesRead, aGraphic); if (!bHasPreview) diff --git a/vcl/source/filter/itiff/itiff.cxx b/vcl/source/filter/itiff/itiff.cxx index 741be4c5c1d1..9bfa4472a817 100644 --- a/vcl/source/filter/itiff/itiff.cxx +++ b/vcl/source/filter/itiff/itiff.cxx @@ -27,7 +27,7 @@ #include <vcl/BitmapWriteAccess.hxx> #include <tools/fract.hxx> #include <tools/stream.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <tiffio.h> @@ -129,7 +129,7 @@ bool ImportTiffGraphicImport(SvStream& rTIFF, Graphic& rGraphic) Animation aAnimation; - const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + const bool bFuzzing = comphelper::IsFuzzing(); uint64_t nTotalPixelsRequired = 0; do diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx index 16c98003832f..d225d135d5c7 100644 --- a/vcl/source/filter/jpeg/jpegc.cxx +++ b/vcl/source/filter/jpeg/jpegc.cxx @@ -37,7 +37,7 @@ extern "C" { #include "JpegReader.hxx" #include "JpegWriter.hxx" #include <memory> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/graphicfilter.hxx> #ifdef _MSC_VER @@ -91,7 +91,7 @@ static void emitMessage (j_common_ptr cinfo, int msg_level) // limit (initially using ImageMagick's current limit of 1000), then // bail. constexpr int WarningLimit = 1000; - static bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static bool bFuzzing = comphelper::IsFuzzing(); // ofz#50452 due to Timeouts, just abandon fuzzing on any // JWRN_NOT_SEQUENTIAL if (bFuzzing && cinfo->err->msg_code == JWRN_NOT_SEQUENTIAL) @@ -211,7 +211,7 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputS tools::Long nWidth = rContext.cinfo.output_width; tools::Long nHeight = rContext.cinfo.output_height; - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) { tools::Long nResult = 0; if (o3tl::checked_multiply(nWidth, nHeight, nResult) || nResult > 4000000) diff --git a/vcl/source/filter/png/PngImageReader.cxx b/vcl/source/filter/png/PngImageReader.cxx index d6a5a219c5e2..2af433f9d555 100644 --- a/vcl/source/filter/png/PngImageReader.cxx +++ b/vcl/source/filter/png/PngImageReader.cxx @@ -15,7 +15,7 @@ #include <vcl/bitmap.hxx> #include <vcl/alpha.hxx> #include <vcl/BitmapTools.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <comphelper/scopeguard.hxx> #include <osl/endian.h> #include <vcl/BitmapWriteAccess.hxx> @@ -357,7 +357,7 @@ bool reader(SvStream& rStream, Graphic& rGraphic, Size prefSize; BitmapScopedWriteAccess pWriteAccessInstance; BitmapScopedWriteAccess pWriteAccessAlphaInstance; - const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + const bool bFuzzing = comphelper::IsFuzzing(); const bool bSupportsBitmap32 = bFuzzing || ImplGetSVData()->mpDefInst->supportsBitmap32(); const bool bOnlyCreateBitmap = static_cast<bool>(nImportFlags & GraphicFilterImportFlags::OnlyCreateBitmap); @@ -772,7 +772,7 @@ BinaryDataContainer getMsGifChunk(SvStream& rStream) // try to get it using libpng. // https://en.wikipedia.org/wiki/Portable_Network_Graphics#File_format // Each chunk is: 4 bytes length, 4 bytes type, <length> bytes, 4 bytes crc - bool ignoreCrc = utl::ConfigManager::IsFuzzing(); + bool ignoreCrc = comphelper::IsFuzzing(); for (;;) { sal_uInt32 length(0), type(0), crc(0); diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx index 56f2d933bbe9..429dfadacf04 100644 --- a/vcl/source/filter/svm/SvmReader.cxx +++ b/vcl/source/filter/svm/SvmReader.cxx @@ -21,7 +21,7 @@ #include <osl/thread.h> #include <tools/stream.hxx> #include <tools/vcompat.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/filter/SvmReader.hxx> #include <vcl/rendercontext/DrawTextFlags.hxx> @@ -791,7 +791,7 @@ rtl::Reference<MetaAction> SvmReader::TextRectHandler(const ImplMetaReadData* pD pAction->SetRect(aRect); DrawTextFlags nFlags(static_cast<DrawTextFlags>(nTmp)); - const static bool bFuzzing = utl::ConfigManager::IsFuzzing(); + const static bool bFuzzing = comphelper::IsFuzzing(); if (bFuzzing) nFlags = nFlags & ~DrawTextFlags::MultiLine; diff --git a/vcl/source/filter/webp/reader.cxx b/vcl/source/filter/webp/reader.cxx index 1d75ff79e8d1..0236d027f6ec 100644 --- a/vcl/source/filter/webp/reader.cxx +++ b/vcl/source/filter/webp/reader.cxx @@ -24,7 +24,7 @@ #include <vcl/BitmapWriteAccess.hxx> #include <salinst.hxx> #include <sal/log.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <svdata.hxx> #include <comphelper/scopeguard.hxx> @@ -72,7 +72,7 @@ static bool readWebp(SvStream& stream, Graphic& graphic) if (width > SAL_MAX_INT32 / 8 || height > SAL_MAX_INT32 / 8) return false; // avoid overflows later - const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + const bool bFuzzing = comphelper::IsFuzzing(); const bool bSupportsBitmap32 = bFuzzing || ImplGetSVData()->mpDefInst->supportsBitmap32(); Bitmap bitmap; diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx index 04b031ad6bd1..c38fabb71ee6 100644 --- a/vcl/source/font/PhysicalFontCollection.cxx +++ b/vcl/source/font/PhysicalFontCollection.cxx @@ -23,7 +23,7 @@ #include <i18nlangtag/languagetag.hxx> #include <i18nlangtag/mslangid.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/fontdefs.hxx> #include <o3tl/sorted_vector.hxx> @@ -394,7 +394,7 @@ void PhysicalFontCollection::ImplInitMatchData() const return; mbMatchData = true; - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; // calculate MatchData for all entries @@ -845,7 +845,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindFontFamilyOfDefaultFont() co // try to find one of the default fonts of the // UNICODE, SANSSERIF, SERIF or FIXED default font lists PhysicalFontFamily* pFoundData = nullptr; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { const utl::DefaultFontConfiguration& rDefaults = utl::DefaultFontConfiguration::get(); LanguageTag aLanguageTag("en"); @@ -1136,7 +1136,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily(FontSelectPattern& rF // use font fallback const utl::FontNameAttr* pFontAttr = nullptr; - if (!aSearchName.isEmpty() && !utl::ConfigManager::IsFuzzing()) + if (!aSearchName.isEmpty() && !comphelper::IsFuzzing()) { // get fallback info using FontSubstConfiguration and // the target name, it's shortened name and family name in that order @@ -1160,7 +1160,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily(FontSelectPattern& rF if( rFSD.IsMicrosoftSymbolEncoded() ) { LanguageTag aDefaultLanguageTag("en"); - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) aSearchName = "OpenSymbol"; else aSearchName = utl::DefaultFontConfiguration::get().getDefaultFont( aDefaultLanguageTag, DefaultFontType::SYMBOL ); @@ -1195,7 +1195,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily(FontSelectPattern& rF } const utl::FontNameAttr* pTempFontAttr = nullptr; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { // use a font name from font fallback list to determine font attributes // get fallback info using FontSubstConfiguration and diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx index 6dfee423a998..f112b7848879 100644 --- a/vcl/source/font/font.cxx +++ b/vcl/source/font/font.cxx @@ -20,7 +20,7 @@ #include <tools/stream.hxx> #include <tools/vcompat.hxx> #include <tools/gen.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/fontcfg.hxx> #include <unotools/fontdefs.hxx> #include <o3tl/hash_combine.hxx> @@ -477,7 +477,7 @@ SvStream& ReadImplFont( SvStream& rIStm, ImplFont& rImplFont, tools::Long& rnNor TypeSerializer aSerializer(rIStm); aSerializer.readSize(rImplFont.maAverageFontSize); - static const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static const bool bFuzzing = comphelper::IsFuzzing(); if (bFuzzing) { if (rImplFont.maAverageFontSize.Width() > 8192) diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx index 115b3da6fb46..3c6e5be96f8a 100644 --- a/vcl/source/font/fontmetric.cxx +++ b/vcl/source/font/fontmetric.cxx @@ -178,7 +178,7 @@ FontMetricData::FontMetricData( const vcl::font::FontSelectPattern& rFontSelData bool FontMetricData::ShouldNotUseUnderlineMetrics() const { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return false; css::uno::Sequence<OUString> rNoUnderlineMetricsList( @@ -396,7 +396,7 @@ bool FontMetricData::ShouldUseWinMetrics(int nAscent, int nDescent, int nTypoAsc int nTypoDescent, int nWinAscent, int nWinDescent) const { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return false; OUString aFontIdentifier( diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index bcf6f54639e8..61f2734f322e 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -20,7 +20,7 @@ #include <sal/config.h> #include <sal/log.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <o3tl/temporary.hxx> #include <vcl/unohelp.hxx> @@ -47,7 +47,7 @@ GenericSalLayout::GenericSalLayout(LogicalFontInstance &rFont) : m_GlyphItems(rFont) , mpVertGlyphs(nullptr) - , mbFuzzing(utl::ConfigManager::IsFuzzing()) + , mbFuzzing(comphelper::IsFuzzing()) { } diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx index ca8016a1925d..afe2100d8e01 100644 --- a/vcl/source/gdi/impglyphitem.cxx +++ b/vcl/source/gdi/impglyphitem.cxx @@ -235,9 +235,8 @@ void SalLayoutGlyphsCache::clear() { mCachedGlyphs.clear(); } SalLayoutGlyphsCache* SalLayoutGlyphsCache::self() { static vcl::DeleteOnDeinit<SalLayoutGlyphsCache> cache( - !utl::ConfigManager::IsFuzzing() - ? officecfg::Office::Common::Cache::Font::GlyphsCacheSize::get() - : 20000); + !comphelper::IsFuzzing() ? officecfg::Office::Common::Cache::Font::GlyphsCacheSize::get() + : 20000); return cache.get(); } diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 2e1f3e4d8459..c1d7e5327dd7 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -31,7 +31,7 @@ #include <vcl/outdev.hxx> #include <vcl/metaact.hxx> #include <vcl/graphictools.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <unotools/fontdefs.hxx> #include <vcl/TypeSerializer.hxx> @@ -465,7 +465,7 @@ MetaPolyLineAction::MetaPolyLineAction( tools::Polygon aPoly, LineInfo aLineInfo static bool AllowDim(tools::Long nDim) { - static bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static bool bFuzzing = comphelper::IsFuzzing(); if (bFuzzing) { if (nDim > 0x20000000 || nDim < -0x20000000) @@ -891,7 +891,7 @@ MetaBmpScaleAction::MetaBmpScaleAction( const Point& rPt, const Size& rSz, static bool AllowScale(const Size& rSource, const Size& rDest) { - static bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static bool bFuzzing = comphelper::IsFuzzing(); if (bFuzzing) { constexpr int nMaxScaleWhenFuzzing = 128; diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index c7ef07ff49cb..6591debb5910 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1230,7 +1230,7 @@ PDFWriterImpl::PDFWriterImpl( const PDFWriter::PDFWriterContext& rContext, m_nCurrentStructElement( 0 ), m_bEmitStructure( true ), m_nNextFID( 1 ), - m_aPDFBmpCache(utl::ConfigManager::IsFuzzing() ? 15 : + m_aPDFBmpCache(comphelper::IsFuzzing() ? 15 : officecfg::Office::Common::VCL::PDFExportImageCacheSize::get()), m_nCurrentPage( -1 ), m_nCatalogObject(0), diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index 6665b5c48d80..6298e3052bee 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -33,7 +33,7 @@ #include <basegfx/range/b2drange.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <tools/poly.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> namespace { @@ -987,7 +987,7 @@ void vcl::Region::Intersect( const vcl::Region& rRegion ) return; } - static size_t gPointLimit = !utl::ConfigManager::IsFuzzing() ? SAL_MAX_SIZE : 8192; + static size_t gPointLimit = !comphelper::IsFuzzing() ? SAL_MAX_SIZE : 8192; size_t nPointLimit(gPointLimit); const basegfx::B2DPolyPolygon aClip( basegfx::utils::clipPolyPolygonOnPolyPolygon( @@ -1579,7 +1579,7 @@ SvStream& ReadRegion(SvStream& rIStrm, vcl::Region& rRegion) if (nPolygons > 128) { SAL_WARN("vcl.gdi", "suspiciously high no of polygons in clip:" << nPolygons); - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) aNewPoly.Clear(); } rRegion.mpPolyPolygon = aNewPoly; diff --git a/vcl/source/graphic/Manager.cxx b/vcl/source/graphic/Manager.cxx index f77e3e3c4041..4bb4ce79534b 100644 --- a/vcl/source/graphic/Manager.cxx +++ b/vcl/source/graphic/Manager.cxx @@ -33,7 +33,7 @@ namespace void setupConfigurationValuesIfPossible(sal_Int64& rMemoryLimit, std::chrono::seconds& rAllowedIdleTime, bool& bSwapEnabled) { - if (utl::ConfigManager::IsFuzzing()) + if (comphelper::IsFuzzing()) return; try diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index bec0016b1648..b66b827222dc 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -24,7 +24,7 @@ #include <tools/debug.hxx> #include <i18nlangtag/mslangid.hxx> #include <i18nlangtag/lang.h> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/event.hxx> #include <vcl/fontcharmap.hxx> @@ -417,7 +417,7 @@ void OutputDevice::RemoveFontsSubstitute() vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice* pOutDev ) { - static bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static bool bFuzzing = comphelper::IsFuzzing(); static bool bAbortOnFontSubstitute = [] { const char* pEnv = getenv("SAL_NON_APPLICATION_FONT_USE"); return pEnv && strcmp(pEnv, "abort") == 0; @@ -544,7 +544,7 @@ vcl::Font OutputDevice::GetDefaultFont( DefaultFontType nType, LanguageType eLan { if( !pOutDev ) { - SAL_WARN_IF(!utl::ConfigManager::IsFuzzing(), "vcl.gdi", "No default window has been set for the application - we really shouldn't be able to get here"); + SAL_WARN_IF(!comphelper::IsFuzzing(), "vcl.gdi", "No default window has been set for the application - we really shouldn't be able to get here"); aFont.SetFamilyName( aSearch.getToken( 0, ';' ) ); } else @@ -716,7 +716,7 @@ bool OutputDevice::ImplNewFont() const // decide if antialiasing is appropriate bool bNonAntialiased(GetAntialiasing() & AntialiasingFlags::DisableText); - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); bNonAntialiased |= bool(rStyleSettings.GetDisplayOptions() & DisplayOptions::AADisable); diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx index 0fc755864a5d..d154420b6b4d 100644 --- a/vcl/source/outdev/hatch.cxx +++ b/vcl/source/outdev/hatch.cxx @@ -20,7 +20,7 @@ #include <osl/diagnose.h> #include <tools/line.hxx> #include <tools/helpers.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/hatch.hxx> #include <vcl/metaact.hxx> @@ -184,7 +184,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& // Single hatch aRect.AdjustLeft( -nLogPixelWidth ); aRect.AdjustTop( -nLogPixelWidth ); aRect.AdjustRight(nLogPixelWidth ); aRect.AdjustBottom(nLogPixelWidth ); CalcHatchValues( aRect, nWidth, rHatch.GetAngle(), aPt1, aPt2, aInc, aEndPt1 ); - if (utl::ConfigManager::IsFuzzing() && !HasSaneNSteps(aPt1, aEndPt1, aInc)) + if (comphelper::IsFuzzing() && !HasSaneNSteps(aPt1, aEndPt1, aInc)) return; if (aInc.Width() <= 0 && aInc.Height() <= 0) @@ -204,7 +204,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& { // Double hatch CalcHatchValues( aRect, nWidth, rHatch.GetAngle() + 900_deg10, aPt1, aPt2, aInc, aEndPt1 ); - if (utl::ConfigManager::IsFuzzing() && !HasSaneNSteps(aPt1, aEndPt1, aInc)) + if (comphelper::IsFuzzing() && !HasSaneNSteps(aPt1, aEndPt1, aInc)) return; do @@ -219,7 +219,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& { // Triple hatch CalcHatchValues( aRect, nWidth, rHatch.GetAngle() + 450_deg10, aPt1, aPt2, aInc, aEndPt1 ); - if (utl::ConfigManager::IsFuzzing() && !HasSaneNSteps(aPt1, aEndPt1, aInc)) + if (comphelper::IsFuzzing() && !HasSaneNSteps(aPt1, aEndPt1, aInc)) return; do diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx index 6bf59455da73..6bb3f1ad9976 100644 --- a/vcl/source/outdev/line.cxx +++ b/vcl/source/outdev/line.cxx @@ -22,7 +22,7 @@ #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/polygon/b2dlinegeometry.hxx> #include <tools/debug.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/lineinfo.hxx> #include <vcl/metaact.hxx> @@ -222,7 +222,7 @@ void OutputDevice::DrawLine( const Point& rStartPt, const Point& rEndPt ) void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const LineInfo& rInfo ) { - static const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static const bool bFuzzing = comphelper::IsFuzzing(); const bool bTryB2d(RasterOp::OverPaint == GetRasterOp() && IsLineColor()); basegfx::B2DPolyPolygon aFillPolyPolygon; const bool bDashUsed(LineStyle::Dash == rInfo.GetStyle()); @@ -262,7 +262,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin // but one that is at least as good as ImplSubdivideBezier was. // There, Polygon::AdaptiveSubdivide was used with default parameter // 1.0 as quality index. - static int nRecurseLimit = utl::ConfigManager::IsFuzzing() ? 10 : 30; + static int nRecurseLimit = comphelper::IsFuzzing() ? 10 : 30; aLinePolyPolygon = basegfx::utils::adaptiveSubdivideByDistance(aLinePolyPolygon, 1.0, nRecurseLimit); } diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 1b40a1b2de28..2b4ada08e8cd 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -23,7 +23,7 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <tools/lineend.hxx> #include <tools/debug.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/ctrl.hxx> #include <vcl/metaact.hxx> @@ -1339,7 +1339,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const tools::Recta { if (nStyle & DrawTextFlags::Clip) return; - static bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static bool bFuzzing = comphelper::IsFuzzing(); SAL_WARN_IF(bFuzzing, "vcl", "skipping negative rectangle of: " << nWidth << " x " << nHeight); if (bFuzzing) return; diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index 84965e87b5d6..0dfd98d602f1 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -23,7 +23,7 @@ #include <tools/helpers.hxx> #include <o3tl/hash_combine.hxx> #include <o3tl/lru_map.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/lazydelete.hxx> #include <vcl/metaact.hxx> #include <vcl/settings.hxx> @@ -276,7 +276,7 @@ void OutputDevice::ImplDrawWaveTextLine( tools::Long nBaseX, tools::Long nBaseY, Color aColor, bool bIsAbove ) { - static bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static bool bFuzzing = comphelper::IsFuzzing(); if (bFuzzing && nWidth > 10000) { SAL_WARN("vcl.gdi", "drawLine, skipping suspicious WaveTextLine of length: " @@ -352,7 +352,7 @@ void OutputDevice::ImplDrawStraightTextLine( tools::Long nBaseX, tools::Long nBa Color aColor, bool bIsAbove ) { - static bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static bool bFuzzing = comphelper::IsFuzzing(); if (bFuzzing && nWidth > 100000) { SAL_WARN("vcl.gdi", "drawLine, skipping suspicious TextLine of length: " diff --git a/vcl/source/text/TextLayoutCache.cxx b/vcl/source/text/TextLayoutCache.cxx index 1d3e8e5045a6..414ab29f895a 100644 --- a/vcl/source/text/TextLayoutCache.cxx +++ b/vcl/source/text/TextLayoutCache.cxx @@ -56,9 +56,8 @@ std::shared_ptr<const TextLayoutCache> TextLayoutCache::Create(OUString const& r FastStringCompareEqual, TextLayoutCacheCost> Cache; static vcl::DeleteOnDeinit<Cache> cache( - !utl::ConfigManager::IsFuzzing() - ? officecfg::Office::Common::Cache::Font::TextRunsCacheSize::get() - : 100); + !comphelper::IsFuzzing() ? officecfg::Office::Common::Cache::Font::TextRunsCacheSize::get() + : 100); if (Cache* map = cache.get()) { auto it = map->find(rString); diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx index 329b63038f7a..901881a606c2 100644 --- a/vcl/source/window/settings.cxx +++ b/vcl/source/window/settings.cxx @@ -226,7 +226,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl ) c aFont.SetFontHeight( defFontheight ); aStyleSettings.SetGroupFont( aFont ); - static const bool bFuzzing = utl::ConfigManager::IsFuzzing(); + static const bool bFuzzing = comphelper::IsFuzzing(); if (!bFuzzing) { static const char* pEnvHC = getenv( "SAL_FORCE_HC" ); diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index c3fa7fb3d74a..85454316acdf 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -69,9 +69,9 @@ #include <com/sun/star/datatransfer/dnd/XDropTarget.hpp> #include <com/sun/star/rendering/CanvasFactory.hpp> #include <com/sun/star/rendering/XSpriteCanvas.hpp> +#include <comphelper/configuration.hxx> #include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> -#include <unotools/configmgr.hxx> #include <osl/diagnose.h> #include <tools/debug.hxx> #include <tools/json_writer.hxx> @@ -1137,7 +1137,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p mpWindowImpl->meAlwaysInputMode = pParent->mpWindowImpl->meAlwaysInputMode; } - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { // we don't want to call the WindowOutputDevice override of this because // it calls back into us. @@ -1152,7 +1152,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p mpWindowImpl->mxOutDev->mnDPIX = mpWindowImpl->mpFrameData->mnDPIX; mpWindowImpl->mxOutDev->mnDPIY = mpWindowImpl->mpFrameData->mnDPIY; - if (!utl::ConfigManager::IsFuzzing()) + if (!comphelper::IsFuzzing()) { const StyleSettings& rStyleSettings = mpWindowImpl->mxOutDev->moSettings->GetStyleSettings(); mpWindowImpl->mxOutDev->maFont = rStyleSettings.GetAppFont(); diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index f1bcd3cbc193..0d6872d3b9e2 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -588,7 +588,7 @@ void PrintFontManager::countFontconfigFonts() FontCfgWrapper& rWrapper = FontCfgWrapper::get(); FcFontSet* pFSet = rWrapper.getFontSet(); - const bool bMinimalFontset = utl::ConfigManager::IsFuzzing(); + const bool bMinimalFontset = comphelper::IsFuzzing(); if( pFSet ) { SAL_INFO("vcl.fonts", "found " << pFSet->nfont << " entries in fontconfig fontset"); diff --git a/vcl/workben/commonfuzzer.hxx b/vcl/workben/commonfuzzer.hxx index c9afd65552fe..8df1d7200eb9 100644 --- a/vcl/workben/commonfuzzer.hxx +++ b/vcl/workben/commonfuzzer.hxx @@ -11,11 +11,11 @@ #include <tools/extendapplicationenvironment.hxx> #include <cppuhelper/bootstrap.hxx> +#include <comphelper/configuration.hxx> #include <comphelper/processfactory.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -#include <unotools/configmgr.hxx> #include <rtl/bootstrap.hxx> #include <rtl/strbuf.hxx> #include <osl/file.hxx> @@ -120,7 +120,7 @@ void CommonInitialize(int *argc, char ***argv) if( !xServiceManager.is() ) Application::Abort( "Failed to bootstrap" ); comphelper::setProcessServiceFactory( xServiceManager ); - utl::ConfigManager::EnableFuzzing(); + comphelper::EnableFuzzing(); Application::EnableHeadlessMode(false); InitVCL(); diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx index 44fb5338f808..753c59e2653c 100644 --- a/vcl/workben/fftester.cxx +++ b/vcl/workben/fftester.cxx @@ -41,7 +41,7 @@ #include <com/sun/star/ucb/XContentProvider.hpp> #include <com/sun/star/ucb/XUniversalContentBroker.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <vcl/dibtools.hxx> #include <vcl/event.hxx> #include <vcl/graphicfilter.hxx> @@ -127,7 +127,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) if( !xServiceManager.is() ) Application::Abort( "Failed to bootstrap" ); comphelper::setProcessServiceFactory( xServiceManager ); - utl::ConfigManager::EnableFuzzing(); + comphelper::EnableFuzzing(); // initialise unconfigured UCB: css::uno::Reference<css::ucb::XUniversalContentBroker> xUcb(comphelper::getProcessServiceFactory()-> diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 4f65f1b1cefd..2b4d3384f5e4 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -335,7 +335,7 @@ DomainMapper_Impl::DomainMapper_Impl( m_xTextDocument( xModel, uno::UNO_QUERY ), m_xTextFactory( xModel, uno::UNO_QUERY ), m_xComponentContext(std::move( xContext )), - m_bForceGenericFields(!utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get()), + m_bForceGenericFields(!comphelper::IsFuzzing() && officecfg::Office::Common::Filter::Microsoft::Import::ForceImportWWFieldsAsGenericFields::get()), m_bIsDecimalComma( false ), m_bSetUserFieldContent( false ), m_bSetCitation( false ), @@ -439,7 +439,7 @@ DomainMapper_Impl::DomainMapper_Impl( getTableManager( ).setHandler(m_pTableHandler); getTableManager( ).startLevel(); - m_bUsingEnhancedFields = !utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Filter::Microsoft::Import::ImportWWFieldsAsEnhancedFields::get(); + m_bUsingEnhancedFields = !comphelper::IsFuzzing() && officecfg::Office::Common::Filter::Microsoft::Import::ImportWWFieldsAsEnhancedFields::get(); m_pSdtHelper = new SdtHelper(*this, m_xComponentContext); diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 9886ac935eb1..615ed8fb7bf7 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -313,7 +313,7 @@ void XMLDocumentSettingsContext::endFastElement(sal_Int32 ) uno::Sequence<beans::PropertyValue> aSeqConfigProps; if ( maConfigProps >>= aSeqConfigProps ) { - if (!utl::ConfigManager::IsFuzzing() && !officecfg::Office::Common::Save::Document::LoadPrinter::get()) + if (!comphelper::IsFuzzing() && !officecfg::Office::Common::Save::Document::LoadPrinter::get()) { auto aSeqConfigPropsRange = asNonConstRange(aSeqConfigProps); sal_Int32 i = aSeqConfigProps.getLength() - 1; diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 8e685447641e..a0281f2fcd6f 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -53,7 +53,7 @@ #include <xmloff/XMLGraphicsDefaultStyle.hxx> #include <XMLNumberStylesImport.hxx> #include <XMLThemeContext.hxx> -#include <unotools/configmgr.hxx> +#include <comphelper/configuration.hxx> #include <xmloff/xmlerror.hxx> #include <xmloff/table/XMLTableImport.hxx> #include <comphelper/sequenceashashmap.hxx> @@ -1339,7 +1339,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLMasterStylesConte if (nNewMasterPageCount + 1 > nMasterPageCount) { // arbitrary limit to master pages when fuzzing to avoid deadend timeouts - if (nMasterPageCount >= 64 && utl::ConfigManager::IsFuzzing()) + if (nMasterPageCount >= 64 && comphelper::IsFuzzing()) return nullptr; // new page, create and insert |