Kaydet (Commit) 9cb29621 authored tarafından Caolán McNamara's avatar Caolán McNamara

rename AvoidConfig to Fuzzing

cause that's what its really used for and a couple of cases
are not specifically about avoiding config but avoiding uninteresting
disk acccess and what not

Change-Id: I4c6454f98388579fcd0bf9798321d30408ab65ee
Reviewed-on: https://gerrit.libreoffice.org/44491Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst f5765d9f
......@@ -125,7 +125,7 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
m_bCacheHasUseAcceleratedEntry(),
m_bCacheHasUseAAEntry()
{
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
{
try
{
......
......@@ -4336,7 +4336,7 @@ const SvxLRSpaceItem& ImpEditEngine::GetLRSpaceItem( ContentNode* pNode )
// text numeral setting:
LanguageType ImpEditEngine::ImplCalcDigitLang(LanguageType eCurLang) const
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return LANGUAGE_ENGLISH_US;
// #114278# Also setting up digit language from Svt options
......
......@@ -100,7 +100,7 @@ SvxNumberType::~SvxNumberType()
OUString SvxNumberType::GetNumStr( sal_Int32 nNo ) const
{
LanguageTag aLang = utl::ConfigManager::IsAvoidConfig() ?
LanguageTag aLang = utl::ConfigManager::IsFuzzing() ?
LanguageTag("en-US") :
Application::GetSettings().GetLanguageTag();
return GetNumStr( nNo, aLang.getLocale() );
......
......@@ -170,7 +170,7 @@ namespace emfio
OUString getLODefaultLanguage()
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return OUString("en-US");
OUString result(officecfg::Office::Linguistic::General::DefaultLocale::get());
if (result.isEmpty())
......
......@@ -892,7 +892,7 @@ css::uno::Reference< css::uno::XInterface > FilterCache::impl_createConfigAccess
css::uno::Reference< css::uno::XInterface > xCfg;
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
{
try
{
......
......@@ -139,7 +139,7 @@ namespace {
OUString getLODefaultLanguage()
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return OUString("en-US");
OUString result(officecfg::Office::Linguistic::General::DefaultLocale::get());
......
......@@ -771,7 +771,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
GDIMetaFile aMtf;
// if there is no preview -> try with gs to make one
if (!bHasPreview && !utl::ConfigManager::IsAvoidConfig())
if (!bHasPreview && !utl::ConfigManager::IsFuzzing())
{
bHasPreview = RenderAsEMF(pBuf.get(), nBytesRead, aGraphic);
if (!bHasPreview)
......
......@@ -6978,7 +6978,7 @@ css::uno::Reference < css::embed::XEmbeddedObject > SvxMSDffManager::CheckForCo
xStorage->Commit();
xStorage.clear();
OUString aType = SfxFilter::GetTypeFromStorage( rSrcStg );
if (aType.getLength() && !utl::ConfigManager::IsAvoidConfig())
if (aType.getLength() && !utl::ConfigManager::IsFuzzing())
pFilter = aMatch.GetFilter4EA( aType );
}
......
......@@ -134,7 +134,7 @@ JobExecutor::JobExecutor( /*IN*/ const css::uno::Reference< css::uno::XComponent
void JobExecutor::initListeners()
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return;
// read the list of all currently registered events inside configuration.
......
......@@ -698,7 +698,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::IsAvoidConfig())
if (!m_xCommandOptions && !utl::ConfigManager::IsFuzzing())
m_xCommandOptions.reset(new SvtCommandOptions);
// Make std::unordered_map lookup if the current URL is in the disabled list
......
......@@ -207,7 +207,7 @@ long PaperInfo::sloppyFitPageDimension(long nDimension)
PaperInfo PaperInfo::getSystemDefaultPaper()
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return PaperInfo(PAPER_A4);
OUString aLocaleStr = officecfg::Setup::L10N::ooSetupSystemLocale::get();
......
......@@ -71,11 +71,11 @@ 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
// where start-up speed is of the essence
static bool IsAvoidConfig();
static void EnableAvoidConfig();
// 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
static bool IsFuzzing();
static void EnableFuzzing();
private:
......
......@@ -34,7 +34,7 @@ public:
public:
virtual void setUp() override
{
utl::ConfigManager::EnableAvoidConfig();
utl::ConfigManager::EnableFuzzing();
ScDLL::Init();
ScGlobal::Init();
}
......
......@@ -108,7 +108,7 @@ public:
virtual void setUp() override
{
utl::ConfigManager::EnableAvoidConfig();
utl::ConfigManager::EnableFuzzing();
ScDLL::Init();
ScGlobal::Init();
}
......
......@@ -313,7 +313,7 @@ OUString ScGlobal::GetAbsDocName( const OUString& rFileName,
if (!pShell || !pShell->HasName())
{ // maybe relative to document path working directory
INetURLObject aObj;
aObj.SetSmartURL(!utl::ConfigManager::IsAvoidConfig() ? SvtPathOptions().GetWorkPath() : OUString("file:///tmp"));
aObj.SetSmartURL(!utl::ConfigManager::IsFuzzing() ? SvtPathOptions().GetWorkPath() : OUString("file:///tmp"));
aObj.setFinalSlash(); // it IS a path
bool bWasAbs = true;
aAbsName = aObj.smartRel2Abs( rFileName, bWasAbs ).GetMainURL(INetURLObject::DecodeMechanism::NONE);
......
......@@ -43,7 +43,7 @@ using namespace ::com::sun::star::ucb;
void ScGlobal::InitAddIns()
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return;
// multi paths separated by semicolons
......
......@@ -35,7 +35,7 @@ static rtl::Reference<ConfigurationListener> const & getMiscListener()
bool ScCalcConfig::isOpenCLEnabled()
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return false;
static comphelper::ConfigurationListenerProperty<bool> gOpenCLEnabled(getMiscListener(), "UseOpenCL");
return gOpenCLEnabled.get();
......@@ -43,7 +43,7 @@ bool ScCalcConfig::isOpenCLEnabled()
bool ScCalcConfig::isSwInterpreterEnabled()
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return false;
static comphelper::ConfigurationListenerProperty<bool> gSwInterpreterEnabled(getMiscListener(), "UseSwInterpreter");
return gSwInterpreterEnabled.get();
......
......@@ -4148,7 +4148,7 @@ bool ScCompiler::NextNewToken( bool bInArray )
if ( cSymbol[0] < 128 )
{
bMayBeFuncName = rtl::isAsciiAlpha( cSymbol[0] );
if (!bMayBeFuncName && (cSymbol[0] == '_' && cSymbol[1] == '_') && !utl::ConfigManager::IsAvoidConfig())
if (!bMayBeFuncName && (cSymbol[0] == '_' && cSymbol[1] == '_') && !utl::ConfigManager::IsFuzzing())
{
SvtMiscOptions aOpt;
bMayBeFuncName = aOpt.IsExperimentalMode();
......
......@@ -26,7 +26,7 @@
bool ScOptionsUtil::IsMetricSystem()
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return true;
//TODO: which language should be used here - system language or installed office language?
......
......@@ -43,7 +43,7 @@ ErrCode ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocume
ImportLotus aLotusImport(aContext, *pStream, pDocument, eSrc);
const bool bWithWK3 = utl::ConfigManager::IsAvoidConfig() || ScFilterOptions().GetWK3Flag();
const bool bWithWK3 = utl::ConfigManager::IsFuzzing() || ScFilterOptions().GetWK3Flag();
ErrCode eRet;
if (bWithWK3)
eRet = aLotusImport.Read();
......
......@@ -110,13 +110,13 @@ void ScDocShell::InitItems()
// Other modifications after creation of the DrawLayer
pDrawLayer->SetNotifyUndoActionHdl( LINK( pDocFunc, ScDocFunc, NotifyDrawUndo ) );
}
else if (!utl::ConfigManager::IsAvoidConfig())
else if (!utl::ConfigManager::IsFuzzing())
{
// always use global color table instead of local copy
PutItem( SvxColorListItem( XColorList::GetStdColorList(), SID_COLOR_TABLE ) );
}
if (!utl::ConfigManager::IsAvoidConfig() &&
if (!utl::ConfigManager::IsFuzzing() &&
(!aDocument.GetForbiddenCharacters() || !aDocument.IsValidAsianCompression() || !aDocument.IsValidAsianKerning()))
{
// get settings from SvxAsianConfig
......
......@@ -2109,7 +2109,7 @@ bool ScExternalRefManager::isValidRangeName(sal_uInt16 nFileId, const OUString&
// Range name is cached.
return true;
pSrcDoc = utl::ConfigManager::IsAvoidConfig() ? nullptr : getSrcDocument(nFileId);
pSrcDoc = utl::ConfigManager::IsFuzzing() ? nullptr : getSrcDocument(nFileId);
if (!pSrcDoc)
// failed to load document from disk.
return false;
......
......@@ -455,7 +455,7 @@ bool ScDocumentLoader::GetFilterName( const OUString& rFileName,
std::shared_ptr<const SfxFilter> pSfxFilter;
auto pMedium = o3tl::make_unique<SfxMedium>( rFileName, StreamMode::STD_READ );
if (pMedium->GetError() == ERRCODE_NONE && !utl::ConfigManager::IsAvoidConfig())
if (pMedium->GetError() == ERRCODE_NONE && !utl::ConfigManager::IsFuzzing())
{
if ( bWithInteraction )
pMedium->UseInteractionHandler(true); // #i73992# no longer called from GuessFilter
......
......@@ -189,7 +189,7 @@ bool TransitionPreset::importTransitionsFile( TransitionPresetList& rList,
bool TransitionPreset::importTransitionPresetList( TransitionPresetList& rList )
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return false;
bool bRet = false;
......
......@@ -148,7 +148,7 @@ PresentationSettings::PresentationSettings( const PresentationSettings& r )
}
SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
: FmFormModel( !utl::ConfigManager::IsAvoidConfig() ? SvtPathOptions().GetPalettePath() : OUString(), nullptr, pDrDocSh )
: FmFormModel( !utl::ConfigManager::IsFuzzing() ? SvtPathOptions().GetPalettePath() : OUString(), nullptr, pDrDocSh )
, mpOutliner(nullptr)
, mpInternalOutliner(nullptr)
, mpWorkStartupTimer(nullptr)
......@@ -215,7 +215,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
SetCalcFieldValueHdl( &rOutliner );
// set linguistic options
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
{
const SvtLinguConfig aLinguConfig;
SvtLinguOptions aOptions;
......@@ -996,7 +996,7 @@ sal_uInt16 SdDrawDocument::GetAnnotationAuthorIndex( const OUString& rAuthor )
void SdDrawDocument::InitLayoutVector()
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return;
const Reference<css::uno::XComponentContext> xContext(
......@@ -1035,7 +1035,7 @@ void SdDrawDocument::InitLayoutVector()
void SdDrawDocument::InitObjectVector()
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return;
const Reference<css::uno::XComponentContext> xContext(
......
......@@ -564,7 +564,7 @@ bool ImplSdPPTImport::Import()
// create master pages:
std::unique_ptr<SfxProgress> xStbMgr;
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
{
xStbMgr.reset(new SfxProgress(pDocShell,
SdResId( STR_POWERPOINT_IMPORT),
......@@ -1945,7 +1945,7 @@ OUString ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
if ( SeekToRec( rStCtrl, PPT_PST_SoundData, nStrLen, &aSoundDataRecHd ) )
{
OUString aGalleryDir;
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
osl_getTempDirURL(&aGalleryDir.pData);
else
aGalleryDir = SvtPathOptions().GetGalleryPath();
......
......@@ -102,7 +102,7 @@ using namespace ::com::sun::star;
// Register all Factories
void SdDLL::RegisterFactorys()
{
if (utl::ConfigManager::IsAvoidConfig() || SvtModuleOptions().IsImpress())
if (utl::ConfigManager::IsFuzzing() || SvtModuleOptions().IsImpress())
{
::sd::ImpressViewShellBase::RegisterFactory (
::sd::IMPRESS_FACTORY_ID);
......@@ -113,7 +113,7 @@ void SdDLL::RegisterFactorys()
::sd::PresentationViewShellBase::RegisterFactory (
::sd::PRESENTATION_FACTORY_ID);
}
if (!utl::ConfigManager::IsAvoidConfig() && SvtModuleOptions().IsDraw())
if (!utl::ConfigManager::IsFuzzing() && SvtModuleOptions().IsDraw())
{
::sd::GraphicViewShellBase::RegisterFactory (::sd::DRAW_FACTORY_ID);
}
......@@ -245,24 +245,24 @@ void SdDLL::Init()
SfxObjectFactory* pDrawFact = nullptr;
SfxObjectFactory* pImpressFact = nullptr;
if (utl::ConfigManager::IsAvoidConfig() || SvtModuleOptions().IsImpress())
if (utl::ConfigManager::IsFuzzing() || SvtModuleOptions().IsImpress())
pImpressFact = &::sd::DrawDocShell::Factory();
if (!utl::ConfigManager::IsAvoidConfig() && SvtModuleOptions().IsDraw())
if (!utl::ConfigManager::IsFuzzing() && SvtModuleOptions().IsDraw())
pDrawFact = &::sd::GraphicDocShell::Factory();
auto pUniqueModule = o3tl::make_unique<SdModule>(pImpressFact, pDrawFact);
SdModule* pModule = pUniqueModule.get();
SfxApplication::SetModule(SfxToolsModule::Draw, std::move(pUniqueModule));
if (!utl::ConfigManager::IsAvoidConfig() && SvtModuleOptions().IsImpress())
if (!utl::ConfigManager::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::IsAvoidConfig() && SvtModuleOptions().IsDraw())
if (!utl::ConfigManager::IsFuzzing() && SvtModuleOptions().IsDraw())
{
::sd::GraphicDocShell::Factory().SetDocumentServiceName( "com.sun.star.drawing.DrawingDocument" );
}
......@@ -284,7 +284,7 @@ void SdDLL::Init()
// register your exotic remote controls here
#ifdef ENABLE_SDREMOTE
if (!utl::ConfigManager::IsAvoidConfig() && !Application::IsHeadlessModeEnabled())
if (!utl::ConfigManager::IsFuzzing() && !Application::IsHeadlessModeEnabled())
RegisterRemotes();
#endif
}
......
......@@ -117,7 +117,7 @@ void DrawDocShell::Construct( bool bClipboard )
SetBaseModel( new SdXImpressDocument( this, bClipboard ) );
SetPool( &mpDoc->GetItemPool() );
mpUndoManager = new sd::UndoManager;
if (!utl::ConfigManager::IsAvoidConfig()
if (!utl::ConfigManager::IsFuzzing()
&& officecfg::Office::Common::Undo::Steps::get() < 1)
{
mpUndoManager->EnableUndo(false); // tdf#108863 disable if 0 steps
......
......@@ -156,11 +156,11 @@ SfxApplication* SfxApplication::GetOrCreate()
::framework::SetIsDockingWindowVisible( IsDockingWindowVisible );
#if HAVE_FEATURE_DESKTOP
Application::SetHelp( pSfxHelp );
if (!utl::ConfigManager::IsAvoidConfig() && SvtHelpOptions().IsHelpTips())
if (!utl::ConfigManager::IsFuzzing() && SvtHelpOptions().IsHelpTips())
Help::EnableQuickHelp();
else
Help::DisableQuickHelp();
if (!utl::ConfigManager::IsAvoidConfig() && SvtHelpOptions().IsHelpTips() && SvtHelpOptions().IsExtendedHelp())
if (!utl::ConfigManager::IsFuzzing() && SvtHelpOptions().IsHelpTips() && SvtHelpOptions().IsExtendedHelp())
Help::EnableBalloonHelp();
else
Help::DisableBalloonHelp();
......@@ -173,7 +173,7 @@ SfxApplication::SfxApplication()
: pImpl( new SfxAppData_Impl )
{
SetName( "StarOffice" );
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
SvtViewOptions::AcquireOptions();
pImpl->m_xImeStatusWindow->init();
......@@ -222,7 +222,7 @@ SfxApplication::~SfxApplication()
#endif
// delete global options
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
SvtViewOptions::ReleaseOptions();
if ( !pImpl->bDowning )
......
......@@ -96,7 +96,7 @@ BasicManager* SfxApplication::GetBasicManager()
#if !HAVE_FEATURE_SCRIPTING
return 0;
#else
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return nullptr;
return BasicManagerRepository::getApplicationBasicManager();
#endif
......@@ -107,7 +107,7 @@ XLibraryContainer * SfxApplication::GetDialogContainer()
#if !HAVE_FEATURE_SCRIPTING
return NULL;
#else
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return nullptr;
if ( !pImpl->pBasicManager->isValid() )
GetBasicManager();
......@@ -121,7 +121,7 @@ XLibraryContainer * SfxApplication::GetBasicContainer()
#if !HAVE_FEATURE_SCRIPTING
return NULL;
#else
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return nullptr;
if ( !pImpl->pBasicManager->isValid() )
GetBasicManager();
......@@ -134,7 +134,7 @@ StarBASIC* SfxApplication::GetBasic()
#if !HAVE_FEATURE_SCRIPTING
return 0;
#else
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return nullptr;
return GetBasicManager()->GetLib(0);
#endif
......
......@@ -216,7 +216,7 @@ void SfxApplication::Initialize_Impl()
getRID_BASIC_START(), ErrCodeArea::Sbx, ErrCodeArea::Sbx, BasResLocale());
#endif
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
{
//ensure instantiation of listener that manages the internal recently-used
//list
......
......@@ -215,7 +215,7 @@ void SfxShell::SetUndoManager( ::svl::IUndoManager *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::IsAvoidConfig())
if (pUndoMgr && !utl::ConfigManager::IsFuzzing())
{
pUndoMgr->SetMaxUndoActionCount(
officecfg::Office::Common::Undo::Steps::get());
......
......@@ -441,7 +441,7 @@ OUString SfxMedium::GetBaseURL( bool bForSaving )
const SfxStringItem* pBaseURLItem = GetItemSet()->GetItem<SfxStringItem>(SID_DOC_BASEURL);
if ( pBaseURLItem )
aBaseURL = pBaseURLItem->GetValue();
else if (!utl::ConfigManager::IsAvoidConfig() && GetContent().is())
else if (!utl::ConfigManager::IsFuzzing() && GetContent().is())
{
try
{
......
......@@ -363,7 +363,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
bool bUseSHA1InODF12 = false;
bool bUseBlowfishInODF12 = false;
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
{
SvtSaveOptions aSaveOpt;
nDefVersion = aSaveOpt.GetODFDefaultVersion();
......@@ -531,7 +531,7 @@ bool SfxObjectShell::DoInitNew( SfxMedium* pMed )
aArgs[nLength].Name = "Title";
aArgs[nLength].Value <<= GetTitle( SFX_TITLE_DETECT );
xModel->attachResource( OUString(), aArgs );
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
impl_addToModelCollection(xModel);
}
......@@ -3020,7 +3020,7 @@ uno::Reference< embed::XStorage > SfxObjectShell::GetStorage()
SetupStorage( pImpl->m_xDocStorage, SOFFICE_FILEFORMAT_CURRENT, false );
pImpl->m_bCreateTempStor = false;
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
SfxGetpApp()->NotifyEvent( SfxEventHint( SfxEventHintId::StorageChanged, GlobalEventConfig::GetEventName(GlobalEventId::STORAGECHANGED), this ) );
}
catch( uno::Exception& )
......
......@@ -740,7 +740,7 @@ Reference< XLibraryContainer > SfxObjectShell::GetDialogContainer()
Reference< XLibraryContainer > SfxObjectShell::GetBasicContainer()
{
#if HAVE_FEATURE_SCRIPTING
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
{
try
{
......@@ -1087,7 +1087,7 @@ SfxObjectShell* SfxObjectShell::GetShellFromComponent( const Reference<lang::XCo
void SfxObjectShell::SetInitialized_Impl( const bool i_fromInitNew )
{
pImpl->bInitialized = true;
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return;
if ( i_fromInitNew )
{
......
......@@ -3250,7 +3250,7 @@ sal_uInt16 SvNumberFormatter::ExpandTwoDigitYear( sal_uInt16 nYear ) const
// static
sal_uInt16 SvNumberFormatter::GetYear2000Default()
{
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
return (sal_uInt16) ::utl::MiscCfg().GetYear2000();
return 1930;
}
......
......@@ -357,7 +357,7 @@ void SvtAccessibilityOptions_Impl::SetVCLSettings()
SvtAccessibilityOptions::SvtAccessibilityOptions()
{
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
{
::osl::MutexGuard aGuard( SingletonMutex::get() );
if(!sm_pSingleImplConfig)
......
......@@ -189,7 +189,7 @@ ColorConfig_Impl::ColorConfig_Impl() :
uno::Sequence < OUString > aNames(1);
EnableNotification( aNames );
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
Load(OUString());
ImplUpdateApplicationSettings();
......@@ -369,7 +369,7 @@ void ColorConfig_Impl::ImplUpdateApplicationSettings()
ColorConfig::ColorConfig()
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return;
::osl::MutexGuard aGuard( ColorMutex_Impl::get() );
if ( !m_pImpl )
......@@ -383,7 +383,7 @@ ColorConfig::ColorConfig()
ColorConfig::~ColorConfig()
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return;
::osl::MutexGuard aGuard( ColorMutex_Impl::get() );
m_pImpl->RemoveListener(this);
......
......@@ -155,7 +155,7 @@ void GraphicObject::ImplEnsureGraphicManager()
sal_uLong nCacheSize = 20000;
sal_uLong nMaxObjCacheSize = 20000;
sal_uLong nTimeoutSeconds = 20000;
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
{
try
{
......@@ -378,7 +378,7 @@ void GraphicObject::SetUserData( const OUString& rUserData )
static sal_uInt32 GetCacheTimeInMs()
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return 20000;
const sal_uInt32 nSeconds =
......
......@@ -272,7 +272,7 @@ Gallery* Gallery::GetGalleryInstance()
if (!s_pGallery)
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
if (!s_pGallery && !utl::ConfigManager::IsAvoidConfig())
if (!s_pGallery && !utl::ConfigManager::IsFuzzing())
{
s_pGallery = new Gallery( SvtPathOptions().GetGalleryPath() );
}
......
......@@ -403,7 +403,7 @@ namespace sdr
// check if text animation is allowed.
bool ObjectContactOfPageView::IsTextAnimationAllowed() const
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return true;
SdrView& rView = GetPageWindow().GetPageView().GetView();
const SvtAccessibilityOptions& rOpt = rView.getAccessibilityOptions();
......@@ -413,7 +413,7 @@ namespace sdr
// check if graphic animation is allowed.
bool ObjectContactOfPageView::IsGraphicAnimationAllowed() const
{
if (utl::ConfigManager::IsAvoidConfig())
if (utl::ConfigManager::IsFuzzing())
return true;
SdrView& rView = GetPageWindow().GetPageView().GetView();
const SvtAccessibilityOptions& rOpt = rView.getAccessibilityOptions();
......
......@@ -72,7 +72,7 @@ SdrGlobalData::SdrGlobalData()
: pSysLocale(nullptr)
, pLocaleData(nullptr)
{
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
{
svx::ExtrusionBar::RegisterInterface();
svx::FontworkBar::RegisterInterface();
......@@ -104,7 +104,7 @@ SdrGlobalData & GetSdrGlobalData() {
OLEObjCache::OLEObjCache()
{
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
nSize = officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::get();
else
nSize = 100;
......
......@@ -161,7 +161,7 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
mbDisableTextEditUsesCommonUndoManager = false;
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
mnCharCompressType = (CharCompressType)
officecfg::Office::Common::AsianLayout::CompressCharacterDistance::
get();
......@@ -699,7 +699,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt
SvxFontItem aSvxFontItemCJK(EE_CHAR_FONTINFO_CJK);
SvxFontItem aSvxFontItemCTL(EE_CHAR_FONTINFO_CTL);
LanguageType nLanguage;
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
nLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
else
nLanguage = LANGUAGE_ENGLISH_US;
......
......@@ -35,7 +35,7 @@ XColorListRef XColorList::CreateStdColorList()
{
return XPropertyList::AsColorList(
XPropertyList::CreatePropertyList(
XPropertyListType::Color, !utl::ConfigManager::IsAvoidConfig() ?
XPropertyListType::Color, !utl::ConfigManager::IsFuzzing() ?
SvtPathOptions().GetPalettePath() :
"", ""));
}
......
......@@ -652,7 +652,7 @@ void InitCore()
pGlobalOLEExcludeList = new std::vector<SvGlobalName*>;
if (!utl::ConfigManager::IsAvoidConfig())
if (!utl::ConfigManager::IsFuzzing())
{
const SvxSwAutoFormatFlags& rAFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags();
SwDoc::mpACmpltWords = new SwAutoCompleteWord( rAFlags.nAutoCmpltListLen,
......@@ -762,7 +762,7 @@ void SwCalendarWrapper::LoadDefaultCalendar( LanguageType eLang )
LanguageType GetAppLanguage()