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 /sd | |
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>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/TransitionPreset.cxx | 2 | ||||
-rw-r--r-- | sd/source/core/drawdoc.cxx | 6 | ||||
-rw-r--r-- | sd/source/core/drawdoc4.cxx | 4 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptin.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/app/sddll.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshell.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview.cxx | 4 |
7 files changed, 20 insertions, 20 deletions
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); |