basctl/source/basicide/basobj2.cxx                   |    2 
 basctl/source/basicide/basobj3.cxx                   |    2 
 cui/source/dialogs/hlmailtp.cxx                      |    3 -
 cui/source/options/optcolor.cxx                      |   10 ++--
 cui/source/options/optfltr.cxx                       |   10 ++--
 cui/source/options/optpath.cxx                       |    2 
 cui/source/options/optsave.cxx                       |   10 ++--
 cui/source/options/treeopt.cxx                       |   18 ++++----
 dbaccess/source/ui/app/AppController.cxx             |    7 +--
 desktop/source/app/app.cxx                           |   34 +++++++--------
 desktop/source/app/officeipcthread.cxx               |    8 +--
 extensions/source/propctrlr/formcomponenthandler.cxx |    6 +-
 include/unotools/moduleoptions.hxx                   |   16 +++----
 sc/source/filter/excel/xiescher.cxx                  |    2 
 sc/source/ui/drawfunc/fuins2.cxx                     |    6 +-
 sc/source/ui/unoobj/TablePivotCharts.cxx             |    2 
 sc/source/ui/unoobj/chartuno.cxx                     |    2 
 sc/source/ui/view/cellsh2.cxx                        |    2 
 sc/source/ui/view/tabvwsh2.cxx                       |    2 
 sc/source/ui/view/tabvwshb.cxx                       |    6 +-
 sd/source/ui/app/sddll.cxx                           |   18 +++++---
 sd/source/ui/app/sdmod1.cxx                          |    2 
 sd/source/ui/view/drviews7.cxx                       |    6 +-
 sd/source/ui/view/viewshe2.cxx                       |    6 +-
 sfx2/source/appl/appserv.cxx                         |    9 +---
 sfx2/source/appl/sfxhelp.cxx                         |   16 +++----
 sfx2/source/dialog/backingwindow.cxx                 |   24 +++++-----
 sfx2/source/doc/objserv.cxx                          |    4 -
 sfx2/source/doc/templatedlg.cxx                      |    8 +--
 sfx2/source/view/viewfrm.cxx                         |    2 
 svx/source/form/fmshell.cxx                          |    4 -
 svx/source/form/fmvwimp.cxx                          |    2 
 sw/source/filter/basflt/iodetect.cxx                 |    2 
 sw/source/filter/basflt/shellio.cxx                  |    3 -
 sw/source/uibase/app/docsh.cxx                       |    7 ---
 sw/source/uibase/app/swdll.cxx                       |    8 +--
 sw/source/uibase/app/swmodule.cxx                    |    5 +-
 sw/source/uibase/shells/tabsh.cxx                    |    2 
 sw/source/uibase/shells/textsh.cxx                   |    8 +--
 sw/source/uibase/uiview/view0.cxx                    |    2 
 sw/source/uibase/uiview/viewstat.cxx                 |    2 
 unotools/source/config/moduleoptions.cxx             |   42 -------------------
 42 files changed, 143 insertions(+), 189 deletions(-)

New commits:
commit fec1501374860983d837d482cd175d80f4635b6f
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu Nov 14 14:20:52 2024 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat Nov 23 09:45:38 2024 +0100

    Use specific SvtModuleOptions::Is*Installed for clarity
    
    Change-Id: Ibe64b9fcccf33471d96bb0fb1aa896cb456657f0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177069
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/basctl/source/basicide/basobj2.cxx 
b/basctl/source/basicide/basobj2.cxx
index 48c09c039388..c0b54a51885e 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -238,7 +238,7 @@ OUString ChooseMacro(weld::Window* pParent,
     SbMethod* pMethod = nullptr;
 
     MacroChooser aChooser(pParent, xDocFrame);
-    if ( bChooseOnly || !SvtModuleOptions::IsBasicIDE() )
+    if (bChooseOnly || !SvtModuleOptions::IsBasicIDEInstalled())
         aChooser.SetMode(MacroChooser::ChooseOnly);
 
     if ( !bChooseOnly && rxLimitToDocument.is() )
diff --git a/basctl/source/basicide/basobj3.cxx 
b/basctl/source/basicide/basobj3.cxx
index f8af9e037b60..8e1eaf40c79f 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -375,7 +375,7 @@ tools::Long HandleBasicError( StarBASIC const * pBasic )
 
     tools::Long nRet = 0;
     Shell* pShell = nullptr;
-    if ( SvtModuleOptions::IsBasicIDE() )
+    if (SvtModuleOptions::IsBasicIDEInstalled())
     {
         BasicManager* pBasMgr = FindBasicManager( pBasic );
         if ( pBasMgr )
diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx
index 73904ed34258..3f27aaa70f4c 100644
--- a/cui/source/dialogs/hlmailtp.cxx
+++ b/cui/source/dialogs/hlmailtp.cxx
@@ -51,8 +51,7 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp(weld::Container* 
pParent, SvxHpLinkDlg* p
     m_xBtAdrBook->connect_clicked( LINK ( this, SvxHyperlinkMailTp, 
ClickAdrBookHdl_Impl ) );
     m_xCbbReceiver->connect_changed( LINK ( this, SvxHyperlinkMailTp, 
ModifiedReceiverHdl_Impl) );
 
-    if ( !SvtModuleOptions().IsModuleInstalled( 
SvtModuleOptions::EModule::DATABASE ) ||
-         comphelper::LibreOfficeKit::isActive() )
+    if (!SvtModuleOptions().IsDataBaseInstalled() || 
comphelper::LibreOfficeKit::isActive())
         m_xBtAdrBook->hide();
 }
 
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 67cb2462b0d2..8e008e2c8069 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -676,15 +676,15 @@ bool ColorConfigWindow_Impl::IsGroupVisible (Group 
eGroup) const
     {
         case Group_Writer:
         case Group_Html:
-            return 
aModuleOptions.IsModuleInstalled(SvtModuleOptions::EModule::WRITER);
+            return aModuleOptions.IsWriterInstalled();
         case Group_Calc:
-            return 
aModuleOptions.IsModuleInstalled(SvtModuleOptions::EModule::CALC);
+            return aModuleOptions.IsCalcInstalled();
         case Group_Draw:
             return
-                
aModuleOptions.IsModuleInstalled(SvtModuleOptions::EModule::DRAW) ||
-                
aModuleOptions.IsModuleInstalled(SvtModuleOptions::EModule::IMPRESS);
+                aModuleOptions.IsDrawInstalled() ||
+                aModuleOptions.IsImpressInstalled();
         case Group_Sql:
-            return 
aModuleOptions.IsModuleInstalled(SvtModuleOptions::EModule::DATABASE);
+            return aModuleOptions.IsDataBaseInstalled();
         default:
             return true;
     }
diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx
index efda65e1ad26..14bb0c9463f0 100644
--- a/cui/source/options/optfltr.cxx
+++ b/cui/source/options/optfltr.cxx
@@ -331,16 +331,16 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet* )
     SvtModuleOptions aModuleOpt;
 
     // int the same sequence as the enums of MSFltrPg2_CheckBoxEntries
-    if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::MATH ) )
+    if (aModuleOpt.IsMathInstalled())
         InsertEntry( sChgToFromMath, MSFltrPg2_CheckBoxEntries::Math );
-    if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::WRITER ) )
+    if (aModuleOpt.IsWriterInstalled())
         InsertEntry( sChgToFromWriter, MSFltrPg2_CheckBoxEntries::Writer );
-    if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::CALC ) )
+    if (aModuleOpt.IsCalcInstalled())
         InsertEntry( sChgToFromCalc, MSFltrPg2_CheckBoxEntries::Calc );
-    if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::IMPRESS ) )
+    if (aModuleOpt.IsImpressInstalled())
         InsertEntry( sChgToFromImpress, MSFltrPg2_CheckBoxEntries::Impress );
     InsertEntry( sChgToFromSmartArt, MSFltrPg2_CheckBoxEntries::SmartArt, 
false );
-    if (aModuleOpt.IsModuleInstalled(SvtModuleOptions::EModule::DRAW))
+    if (aModuleOpt.IsDrawInstalled())
     {
         InsertEntry(sChgToFromVisio, MSFltrPg2_CheckBoxEntries::Visio, false);
         InsertEntry(sChgToFromPDF, MSFltrPg2_CheckBoxEntries::PDF, false);
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index d11aab9e7eaf..97f9c5535cb8 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -247,7 +247,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* )
     {
         // only writer uses autotext
         if ( static_cast<SvtPathOptions::Paths>(i) == 
SvtPathOptions::Paths::AutoText
-            && !SvtModuleOptions().IsModuleInstalled( 
SvtModuleOptions::EModule::WRITER ) )
+            && !SvtModuleOptions().IsWriterInstalled())
             continue;
 
         TranslateId pId;
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 907ece3e51bd..effa144bd761 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -140,7 +140,7 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, 
weld::DialogController* p
     m_xBackupCB->connect_toggled(LINK(this, SvxSaveTabPage, 
BackupClickHdl_Impl));
 
     SvtModuleOptions aModuleOpt;
-    if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::MATH ) )
+    if (!aModuleOpt.IsMathInstalled())
     {
         m_xSaveAsLB->remove_id(OUString::number(APP_MATH));
         m_xDocTypeLB->remove_id(OUString::number(APP_MATH));
@@ -151,7 +151,7 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, 
weld::DialogController* p
         pImpl->aDefaultReadonlyArr[APP_MATH] = 
aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::EFactory::MATH);
     }
 
-    if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::DRAW ) )
+    if (!aModuleOpt.IsDrawInstalled())
     {
         m_xSaveAsLB->remove_id(OUString::number(APP_DRAW));
         m_xDocTypeLB->remove_id(OUString::number(APP_DRAW));
@@ -162,7 +162,7 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, 
weld::DialogController* p
         pImpl->aDefaultReadonlyArr[APP_DRAW] = 
aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::EFactory::DRAW);
     }
 
-    if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::IMPRESS ) )
+    if (!aModuleOpt.IsImpressInstalled())
     {
         m_xSaveAsLB->remove_id(OUString::number(APP_IMPRESS));
         m_xDocTypeLB->remove_id(OUString::number(APP_IMPRESS));
@@ -173,7 +173,7 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, 
weld::DialogController* p
         pImpl->aDefaultReadonlyArr[APP_IMPRESS] = 
aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::EFactory::IMPRESS);
     }
 
-    if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::CALC ) )
+    if (!aModuleOpt.IsCalcInstalled())
     {
         m_xSaveAsLB->remove_id(OUString::number(APP_CALC));
         m_xDocTypeLB->remove_id(OUString::number(APP_CALC));
@@ -184,7 +184,7 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, 
weld::DialogController* p
         pImpl->aDefaultReadonlyArr[APP_CALC] = 
aModuleOpt.IsDefaultFilterReadonly(SvtModuleOptions::EFactory::CALC);
     }
 
-    if ( !aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::WRITER ) )
+    if (!aModuleOpt.IsWriterInstalled())
     {
         m_xSaveAsLB->remove_id(OUString::number(APP_WRITER));
         m_xSaveAsLB->remove_id(OUString::number(APP_WRITER_WEB));
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index ea1d8010d138..f5d6a9eaf040 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1806,7 +1806,7 @@ void OfaTreeOptionsDialog::languageOptions(const 
std::vector<sal_uInt16>& vPageI
 
 void OfaTreeOptionsDialog::writerOptions(const std::vector<sal_uInt16>& 
vPageId)
 {
-    if 
(SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::WRITER))
+    if (SvtModuleOptions().IsWriterInstalled())
     {
         // text document
         OUString aFactory = getCurrentFactory_Impl(m_xFrame);
@@ -1861,7 +1861,7 @@ void OfaTreeOptionsDialog::writerOptions(const 
std::vector<sal_uInt16>& vPageId)
 
 void OfaTreeOptionsDialog::writerWebOptions(const std::vector<sal_uInt16>& 
vPageId)
 {
-    if 
(SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::WRITER))
+    if (SvtModuleOptions().IsWriterInstalled())
     {
         // text document
         OUString aFactory = getCurrentFactory_Impl(m_xFrame);
@@ -1910,7 +1910,7 @@ void OfaTreeOptionsDialog::writerWebOptions(const 
std::vector<sal_uInt16>& vPage
 void OfaTreeOptionsDialog::calcOptions(const std::vector<sal_uInt16>& vPageId)
 {
     // Calc options
-    if (SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::CALC))
+    if (SvtModuleOptions().IsCalcInstalled())
     {
         OUString aFactory = getCurrentFactory_Impl(m_xFrame);
         DBG_ASSERT(GetModuleIdentifier(m_xFrame) == aFactory, "This should not 
happen");
@@ -1944,7 +1944,7 @@ void OfaTreeOptionsDialog::calcOptions(const 
std::vector<sal_uInt16>& vPageId)
 void OfaTreeOptionsDialog::impressOptions(const std::vector<sal_uInt16>& 
vPageId)
 {
     // Impress options
-    if 
(SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::IMPRESS))
+    if (SvtModuleOptions().IsImpressInstalled())
     {
         OUString aFactory = getCurrentFactory_Impl(m_xFrame);
         DBG_ASSERT(GetModuleIdentifier(m_xFrame) == aFactory, "This should not 
happen");
@@ -1978,7 +1978,7 @@ void OfaTreeOptionsDialog::impressOptions(const 
std::vector<sal_uInt16>& vPageId
 void OfaTreeOptionsDialog::drawOptions(const std::vector<sal_uInt16>& vPageId)
 {
     // Draw options
-    if (SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::DRAW))
+    if (SvtModuleOptions().IsDrawInstalled())
     {
         OUString aFactory = getCurrentFactory_Impl(m_xFrame);
         DBG_ASSERT(GetModuleIdentifier(m_xFrame) == aFactory, "This should not 
happen");
@@ -2013,7 +2013,7 @@ void OfaTreeOptionsDialog::drawOptions(const 
std::vector<sal_uInt16>& vPageId)
 void OfaTreeOptionsDialog::mathOptions(const std::vector<sal_uInt16>& vPageId)
 {
     // Math options
-    if (SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::MATH))
+    if (SvtModuleOptions().IsMathInstalled())
     {
         OUString aFactory = getCurrentFactory_Impl(m_xFrame);
         DBG_ASSERT(GetModuleIdentifier(m_xFrame) == aFactory, "This should not 
happen");
@@ -2052,9 +2052,9 @@ void OfaTreeOptionsDialog::databaseOptions(const 
std::vector<sal_uInt16>& vPageI
 
     // Database - needed only if there is an application which integrates with 
databases
     if ( !lcl_isOptionHidden( SID_SB_STARBASEOPTIONS, aOptionsDlgOpt ) &&
-        (   aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::DATABASE )
-        ||  aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::WRITER )
-        ||  aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::CALC )
+        (   aModuleOpt.IsDataBaseInstalled()
+        ||  aModuleOpt.IsWriterInstalled()
+        ||  aModuleOpt.IsCalcInstalled()
         ) )
     {
         setGroupName( u"Base", CuiResId(SID_SB_STARBASEOPTIONS_RES[0].first) );
diff --git a/dbaccess/source/ui/app/AppController.cxx 
b/dbaccess/source/ui/app/AppController.cxx
index ed10f38e660b..741dc7afeeb8 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -598,11 +598,10 @@ FeatureState OApplicationController::GetState(sal_uInt16 
_nId) const
             case SID_NEWDOC:
             case SID_APP_NEW_FORM:
             case ID_DOCUMENT_CREATE_REPWIZ:
-                aReturn.bEnabled = !isDataSourceReadOnly() && 
SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::WRITER);
+                aReturn.bEnabled = !isDataSourceReadOnly() && 
SvtModuleOptions().IsWriterInstalled();
                 break;
             case SID_APP_NEW_REPORT:
-                aReturn.bEnabled = !isDataSourceReadOnly()
-                                    && 
SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::WRITER);
+                aReturn.bEnabled = !isDataSourceReadOnly() && 
SvtModuleOptions().IsWriterInstalled();
                 if ( aReturn.bEnabled )
                 {
                     Reference< XContentEnumerationAccess > 
xEnumAccess(m_xContext->getServiceManager(), UNO_QUERY);
@@ -670,7 +669,7 @@ FeatureState OApplicationController::GetState(sal_uInt16 
_nId) const
             case SID_REPORT_CREATE_REPWIZ_PRE_SEL:
             case SID_APP_NEW_REPORT_PRE_SEL:
                 aReturn.bEnabled = !isDataSourceReadOnly()
-                                    && 
SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::WRITER)
+                                    && SvtModuleOptions().IsWriterInstalled()
                                     && getContainer()->isALeafSelected();
                 if ( aReturn.bEnabled )
                 {
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index ec7d7f30a0c8..cb4a4de7db9e 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -2177,13 +2177,13 @@ void Desktop::OpenClients()
             SvtModuleOptions    aOpt;
 
             // Support command line parameters to start a module (as 
preselection)
-            if ( rArgs.IsWriter() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::WRITER ) )
+            if (rArgs.IsWriter() && aOpt.IsWriterInstalled())
                 aRequest.aModule = aOpt.GetFactoryName( 
SvtModuleOptions::EFactory::WRITER );
-            else if ( rArgs.IsCalc() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::CALC ) )
+            else if (rArgs.IsCalc() && aOpt.IsCalcInstalled())
                 aRequest.aModule = aOpt.GetFactoryName( 
SvtModuleOptions::EFactory::CALC );
-            else if ( rArgs.IsImpress() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::IMPRESS ) )
+            else if (rArgs.IsImpress() && aOpt.IsImpressInstalled())
                 aRequest.aModule= aOpt.GetFactoryName( 
SvtModuleOptions::EFactory::IMPRESS );
-            else if ( rArgs.IsDraw() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::DRAW ) )
+            else if (rArgs.IsDraw() && aOpt.IsDrawInstalled())
                 aRequest.aModule= aOpt.GetFactoryName( 
SvtModuleOptions::EFactory::DRAW );
         }
 
@@ -2230,21 +2230,21 @@ void Desktop::OpenDefault()
     if ( rArgs.HasModuleParam() )
     {
         // Support new command line parameters to start a module
-        if ( rArgs.IsWriter() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::WRITER ) )
+        if (rArgs.IsWriter() && aOpt.IsWriterInstalled())
             aName = aOpt.GetFactoryEmptyDocumentURL( 
SvtModuleOptions::EFactory::WRITER );
-        else if ( rArgs.IsCalc() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::CALC ) )
+        else if (rArgs.IsCalc() && aOpt.IsCalcInstalled())
             aName = aOpt.GetFactoryEmptyDocumentURL( 
SvtModuleOptions::EFactory::CALC );
-        else if ( rArgs.IsImpress() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::IMPRESS ) )
+        else if (rArgs.IsImpress() && aOpt.IsImpressInstalled())
             aName = aOpt.GetFactoryEmptyDocumentURL( 
SvtModuleOptions::EFactory::IMPRESS );
-        else if ( rArgs.IsBase() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::DATABASE ) )
+        else if (rArgs.IsBase() && aOpt.IsDataBaseInstalled())
             aName = aOpt.GetFactoryEmptyDocumentURL( 
SvtModuleOptions::EFactory::DATABASE );
-        else if ( rArgs.IsDraw() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::DRAW ) )
+        else if (rArgs.IsDraw() && aOpt.IsDrawInstalled())
             aName = aOpt.GetFactoryEmptyDocumentURL( 
SvtModuleOptions::EFactory::DRAW );
-        else if ( rArgs.IsMath() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::MATH ) )
+        else if (rArgs.IsMath() && aOpt.IsMathInstalled())
             aName = aOpt.GetFactoryEmptyDocumentURL( 
SvtModuleOptions::EFactory::MATH );
-        else if ( rArgs.IsGlobal() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::WRITER ) )
+        else if (rArgs.IsGlobal() && 
aOpt.IsModuleInstalled(SvtModuleOptions::EModule::GLOBAL))
             aName = aOpt.GetFactoryEmptyDocumentURL( 
SvtModuleOptions::EFactory::WRITERGLOBAL );
-        else if ( rArgs.IsWeb() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::WRITER ) )
+        else if (rArgs.IsWeb() && 
aOpt.IsModuleInstalled(SvtModuleOptions::EModule::WEB))
             aName = aOpt.GetFactoryEmptyDocumentURL( 
SvtModuleOptions::EFactory::WRITERWEB );
     }
 
@@ -2257,15 +2257,15 @@ void Desktop::OpenDefault()
         }
 
         // Old way to create a default document
-        if ( aOpt.IsModuleInstalled( SvtModuleOptions::EModule::WRITER ) )
+        if (aOpt.IsWriterInstalled())
             aName = aOpt.GetFactoryEmptyDocumentURL( 
SvtModuleOptions::EFactory::WRITER );
-        else if ( aOpt.IsModuleInstalled( SvtModuleOptions::EModule::CALC ) )
+        else if (aOpt.IsCalcInstalled())
             aName = aOpt.GetFactoryEmptyDocumentURL( 
SvtModuleOptions::EFactory::CALC );
-        else if ( aOpt.IsModuleInstalled( SvtModuleOptions::EModule::IMPRESS ) 
)
+        else if (aOpt.IsImpressInstalled())
             aName = aOpt.GetFactoryEmptyDocumentURL( 
SvtModuleOptions::EFactory::IMPRESS );
-        else if ( aOpt.IsModuleInstalled( SvtModuleOptions::EModule::DATABASE 
) )
+        else if (aOpt.IsDataBaseInstalled())
             aName = aOpt.GetFactoryEmptyDocumentURL( 
SvtModuleOptions::EFactory::DATABASE );
-        else if ( aOpt.IsModuleInstalled( SvtModuleOptions::EModule::DRAW ) )
+        else if (aOpt.IsDrawInstalled())
             aName = aOpt.GetFactoryEmptyDocumentURL( 
SvtModuleOptions::EFactory::DRAW );
         else
             return;
diff --git a/desktop/source/app/officeipcthread.cxx 
b/desktop/source/app/officeipcthread.cxx
index 274a822fcc30..4029546fd666 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -1089,13 +1089,13 @@ bool IpcThread::process(OString const & arguments, bool 
* waitProcessed) {
                 SvtModuleOptions    aOpt;
 
                 // Support command line parameters to start a module (as 
preselection)
-                if ( aCmdLineArgs->IsWriter() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::WRITER ) )
+                if (aCmdLineArgs->IsWriter() && aOpt.IsWriterInstalled())
                     pRequest->aModule = aOpt.GetFactoryName( 
SvtModuleOptions::EFactory::WRITER );
-                else if ( aCmdLineArgs->IsCalc() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::CALC ) )
+                else if (aCmdLineArgs->IsCalc() && aOpt.IsCalcInstalled())
                     pRequest->aModule = aOpt.GetFactoryName( 
SvtModuleOptions::EFactory::CALC );
-                else if ( aCmdLineArgs->IsImpress() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::IMPRESS ) )
+                else if (aCmdLineArgs->IsImpress() && 
aOpt.IsImpressInstalled())
                     pRequest->aModule= aOpt.GetFactoryName( 
SvtModuleOptions::EFactory::IMPRESS );
-                else if ( aCmdLineArgs->IsDraw() && aOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::DRAW ) )
+                else if (aCmdLineArgs->IsDraw() && aOpt.IsDrawInstalled())
                     pRequest->aModule= aOpt.GetFactoryName( 
SvtModuleOptions::EFactory::DRAW );
             }
 
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx 
b/extensions/source/propctrlr/formcomponenthandler.cxx
index 0f97ef6ec418..aa224fd18981 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -853,13 +853,13 @@ namespace pcr
 
             case PROPERTY_ID_LISTSOURCE:
                 // no cursor source if no Base is installed.
-                if ( SvtModuleOptions().IsModuleInstalled( 
SvtModuleOptions::EModule::DATABASE ) )
+                if (SvtModuleOptions().IsDataBaseInstalled())
                     const_cast< FormComponentPropertyHandler* >( this 
)->m_bHaveListSource = true;
                 break;
 
             case PROPERTY_ID_COMMAND:
                 // no cursor source if no Base is installed.
-                if ( SvtModuleOptions().IsModuleInstalled( 
SvtModuleOptions::EModule::DATABASE ) )
+                if (SvtModuleOptions().IsDataBaseInstalled())
                     const_cast< FormComponentPropertyHandler* >( this 
)->m_bHaveCommand = true;
                 break;
             }   // switch ( nPropId )
@@ -2283,7 +2283,7 @@ namespace pcr
 
         // no data properties if no Base is installed.
         if ( ( nPropertyUIFlags & PROP_FLAG_DATA_PROPERTY ) != 0 )
-            if ( !SvtModuleOptions().IsModuleInstalled( 
SvtModuleOptions::EModule::DATABASE ) )
+            if (!SvtModuleOptions().IsDataBaseInstalled())
                 return true;
 
         if ((nPropertyUIFlags & PROP_FLAG_REPORT_INVISIBLE) != 0 && 
isReportModel())
diff --git a/include/unotools/moduleoptions.hxx 
b/include/unotools/moduleoptions.hxx
index 8aa9860ceb1a..1599473faa02 100644
--- a/include/unotools/moduleoptions.hxx
+++ b/include/unotools/moduleoptions.hxx
@@ -155,14 +155,14 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtModuleOptions 
final : public utl::de
 
         OUString GetDefaultModuleName() const;
 
-        bool   IsMath     () const;
-        bool   IsChart    () const;
-        bool   IsCalc     () const;
-        bool   IsDraw     () const;
-        bool   IsWriter   () const;
-        bool   IsImpress  () const;
-        static bool   IsBasicIDE () { return true; }
-        bool   IsDataBase () const;
+        bool IsMathInstalled() const { return 
IsModuleInstalled(EModule::MATH); }
+        bool IsChartInstalled() const { return 
IsModuleInstalled(EModule::CHART); }
+        bool IsCalcInstalled() const { return 
IsModuleInstalled(EModule::CALC); }
+        bool IsDrawInstalled() const { return 
IsModuleInstalled(EModule::DRAW); }
+        bool IsWriterInstalled() const { return 
IsModuleInstalled(EModule::WRITER); }
+        bool IsImpressInstalled() const { return 
IsModuleInstalled(EModule::IMPRESS); }
+        static bool IsBasicIDEInstalled() { return true; }
+        bool IsDataBaseInstalled() const { return 
IsModuleInstalled(EModule::DATABASE); }
 
         css::uno::Sequence < OUString > GetAllServiceNames();
 
diff --git a/sc/source/filter/excel/xiescher.cxx 
b/sc/source/filter/excel/xiescher.cxx
index 2f1ceadc0735..81edde0ac3cb 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1760,7 +1760,7 @@ rtl::Reference<SdrObject> XclImpChartObj::DoCreateSdrObj( 
XclImpDffConverter& rD
 {
     rtl::Reference<SdrObject> xSdrObj;
     ScDocShell* pDocShell = GetDocShell();
-    if( rDffConv.SupportsOleObjects() && SvtModuleOptions().IsChart() && 
pDocShell && mxChart && !mxChart->IsPivotChart() )
+    if( rDffConv.SupportsOleObjects() && SvtModuleOptions().IsChartInstalled() 
&& pDocShell && mxChart && !mxChart->IsPivotChart() )
     {
         // create embedded chart object
         OUString aEmbObjName;
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index a5fb251b7ef0..9705a405b641 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -243,7 +243,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell& rViewSh, 
vcl::Window* pWin, ScDrawView*
     }
     else if ( nSlot == SID_INSERT_SMATH )
     {
-        if ( SvtModuleOptions().IsMath() )
+        if ( SvtModuleOptions().IsMathInstalled() )
         {
             xObj = 
rViewShell.GetViewFrame().GetObjectShell()->GetEmbeddedObjectContainer().CreateEmbeddedObject(
 SvGlobalName( SO3_SM_CLASSID_60 ).GetByteSequence(), aName );
             rReq.AppendItem( SfxGlobalNameItem( SID_INSERT_OBJECT, 
SvGlobalName( SO3_SM_CLASSID_60 ) ) );
@@ -345,7 +345,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell& rViewSh, 
vcl::Window* pWin, ScDrawView*
             }
 
             //  initialize chart ?
-            if ( SvtModuleOptions().IsChart() && SotExchange::IsChart( 
SvGlobalName( xObj->getClassID() ) ) )
+            if ( SvtModuleOptions().IsChartInstalled() && 
SotExchange::IsChart( SvGlobalName( xObj->getClassID() ) ) )
                 lcl_ChartInit(xObj, &rViewSh.GetViewData(), OUString(), false);
 
             ScViewData& rData = rViewSh.GetViewData();
@@ -419,7 +419,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, 
vcl::Window* pWin, ScDrawV
     if( ! rReq.IsAPI() )
         rReq.Done();
 
-    if (!SvtModuleOptions().IsChart())
+    if (!SvtModuleOptions().IsChartInstalled())
         return;
 
     // BM/IHA --
diff --git a/sc/source/ui/unoobj/TablePivotCharts.cxx 
b/sc/source/ui/unoobj/TablePivotCharts.cxx
index 2142a006e8e1..c08c5aa78bc4 100644
--- a/sc/source/ui/unoobj/TablePivotCharts.cxx
+++ b/sc/source/ui/unoobj/TablePivotCharts.cxx
@@ -94,7 +94,7 @@ void SAL_CALL TablePivotCharts::addNewByName(OUString const & 
rName,
 
     uno::Reference<embed::XEmbeddedObject> xObject;
 
-    if (SvtModuleOptions().IsChart())
+    if (SvtModuleOptions().IsChartInstalled())
         xObject = 
m_pDocShell->GetEmbeddedObjectContainer().CreateEmbeddedObject(SvGlobalName(SO3_SCH_CLASSID).GetByteSequence(),
 aName);
 
     if (!xObject.is())
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index ab5bcb19a12c..c0d88b031789 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -172,7 +172,7 @@ void SAL_CALL ScChartsObj::addNewByName( const OUString& 
rName,
     ScRangeListRef xNewRanges( pList );
 
     uno::Reference < embed::XEmbeddedObject > xObj;
-    if ( SvtModuleOptions().IsChart() )
+    if ( SvtModuleOptions().IsChartInstalled() )
         xObj = pDocShell->GetEmbeddedObjectContainer().CreateEmbeddedObject( 
SvGlobalName( SO3_SCH_CLASSID ).GetByteSequence(), aName );
     if ( !xObj.is() )
             return;
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 1a3aa891ffde..f6577c7f16b5 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -1175,7 +1175,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
 
             case SID_VIEW_DATA_SOURCE_BROWSER:
                 {
-                    if 
(!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::DATABASE))
+                    if (!SvtModuleOptions().IsDataBaseInstalled())
                         rSet.Put(SfxVisibilityItem(nWhich, false));
                     else
                         //  get state (BoolItem) from SfxViewFrame
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 8ff41cc374bd..d0bff87ee629 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -399,7 +399,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
             case SID_DRAW_CHART:
                 {
                     bool bOle = GetViewFrame().GetFrame().IsInPlace();
-                    if ( bOle || !SvtModuleOptions().IsChart() )
+                    if ( bOle || !SvtModuleOptions().IsChartInstalled() )
                         rSet.DisableItem( nWhich );
                 }
                 break;
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 3b1bf47dc238..ae82a7b74a9f 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -231,7 +231,7 @@ void ScTabViewShell::ActivateObject(SdrOle2Obj* pObj, 
sal_Int32 nVerb)
             // attach listener to selection changes in chart that affect cell
             // ranges, so those can be highlighted
             // note: do that after DoVerb, so that the chart controller exists
-            if ( SvtModuleOptions().IsChart() )
+            if ( SvtModuleOptions().IsChartInstalled() )
             {
                 SvGlobalName aObjClsId ( xObj->getClassID() );
                 if (SotExchange::IsChart( aObjClsId ))
@@ -603,12 +603,12 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet)
         switch ( nWhich )
         {
             case SID_INSERT_DIAGRAM:
-                if ( bOle || bTabProt || !SvtModuleOptions().IsChart() || 
bShared )
+                if ( bOle || bTabProt || 
!SvtModuleOptions().IsChartInstalled() || bShared )
                     rSet.DisableItem( nWhich );
                 break;
 
             case SID_INSERT_SMATH:
-                if ( bOle || bTabProt || !SvtModuleOptions().IsMath() || 
bShared )
+                if ( bOle || bTabProt || !SvtModuleOptions().IsMathInstalled() 
|| bShared )
                     rSet.DisableItem( nWhich );
                 break;
 
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index d65bee2ad2c1..78646f8c049e 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -87,7 +87,10 @@ using namespace ::com::sun::star;
 // Register all Factories
 void SdDLL::RegisterFactorys()
 {
-    if (comphelper::IsFuzzing() || SvtModuleOptions().IsImpress())
+    std::optional<SvtModuleOptions> oOpts;
+    if (!comphelper::IsFuzzing())
+        oOpts.emplace();
+    if (!oOpts || oOpts->IsImpressInstalled())
     {
         ::sd::ImpressViewShellBase::RegisterFactory (
             ::sd::IMPRESS_FACTORY_ID);
@@ -110,7 +113,7 @@ void SdDLL::RegisterFactorys()
                 ::sd::PRESENTATION_FACTORY_ID);
         }
     }
-    if (!comphelper::IsFuzzing() && SvtModuleOptions().IsDraw())
+    if (oOpts && oOpts->IsDrawInstalled())
     {
         ::sd::GraphicViewShellBase::RegisterFactory (::sd::DRAW_FACTORY_ID);
     }
@@ -224,24 +227,27 @@ void SdDLL::Init()
     SfxObjectFactory* pDrawFact = nullptr;
     SfxObjectFactory* pImpressFact = nullptr;
 
-    if (comphelper::IsFuzzing() || SvtModuleOptions().IsImpress())
+    std::optional<SvtModuleOptions> oOptions;
+    if (!comphelper::IsFuzzing())
+        oOptions.emplace();
+    if (!oOptions || oOptions->IsImpressInstalled())
         pImpressFact = &::sd::DrawDocShell::Factory();
 
-    if (!comphelper::IsFuzzing() && SvtModuleOptions().IsDraw())
+    if (oOptions && oOptions->IsDrawInstalled())
         pDrawFact = &::sd::GraphicDocShell::Factory();
 
     auto pUniqueModule = std::make_unique<SdModule>(pImpressFact, pDrawFact);
     SdModule* pModule = pUniqueModule.get();
     SfxApplication::SetModule(SfxToolsModule::Draw, std::move(pUniqueModule));
 
-    if (!comphelper::IsFuzzing() && SvtModuleOptions().IsImpress())
+    if (oOptions && oOptions->IsImpressInstalled())
     {
         // Register the Impress shape types in order to make the shapes 
accessible.
         ::accessibility::RegisterImpressShapeTypes ();
         ::sd::DrawDocShell::Factory().SetDocumentServiceName( 
u"com.sun.star.presentation.PresentationDocument"_ustr );
     }
 
-    if (!comphelper::IsFuzzing() && SvtModuleOptions().IsDraw())
+    if (oOptions && oOptions->IsDrawInstalled())
     {
         ::sd::GraphicDocShell::Factory().SetDocumentServiceName( 
u"com.sun.star.drawing.DrawingDocument"_ustr );
     }
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index ea2b09e3f285..44d075df36d0 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -479,7 +479,7 @@ SfxFrame* SdModule::CreateFromTemplate(const OUString& 
rTemplatePath, const Refe
 SfxFrame* SdModule::ExecuteNewDocument( SfxRequest const & rReq )
 {
     SfxFrame* pFrame = nullptr;
-    if ( SvtModuleOptions().IsImpress() )
+    if (SvtModuleOptions().IsImpressInstalled())
     {
         Reference< XFrame > xTargetFrame;
         const SfxUnoFrameItem* pFrmItem = 
rReq.GetArg<SfxUnoFrameItem>(SID_FILLFRAME);
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 3e8ad0a7c922..753c34b01e4e 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1287,16 +1287,16 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
 
     // are the modules available?
 
-    if (!SvtModuleOptions().IsCalc())
+    if (!SvtModuleOptions().IsCalcInstalled())
     {
         // remove menu entry if module is not available
         rSet.Put( SfxVisibilityItem( SID_ATTR_TABLE, false ) );
     }
-    if (!SvtModuleOptions().IsChart())
+    if (!SvtModuleOptions().IsChartInstalled())
     {
         rSet.DisableItem( SID_INSERT_DIAGRAM );
     }
-    if (!SvtModuleOptions().IsMath())
+    if (!SvtModuleOptions().IsMathInstalled())
     {
         rSet.DisableItem( SID_INSERT_MATH );
     }
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 0e0b52c5dd0b..3c2e70b37184 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -707,7 +707,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, sal_Int32 
nVerb)
 
         if( aName == "StarChart"  || aName == "StarOrg" )
         {
-            if( SvtModuleOptions().IsChart() )
+            if( SvtModuleOptions().IsChartInstalled() )
             {
                 aClass = SvGlobalName( SO3_SCH_CLASSID );
                 bChangeDefaultsForChart = true;
@@ -715,12 +715,12 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, 
sal_Int32 nVerb)
         }
         else if( aName == "StarCalc" )
         {
-            if( SvtModuleOptions().IsCalc() )
+            if( SvtModuleOptions().IsCalcInstalled() )
                 aClass = SvGlobalName( SO3_SC_CLASSID );
         }
         else if( aName == "StarMath" )
         {
-            if( SvtModuleOptions().IsMath() )
+            if( SvtModuleOptions().IsMathInstalled() )
                 aClass = SvGlobalName( SO3_SM_CLASSID );
         }
 
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index ef91f54e70e0..cc65220c8fb5 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -1319,7 +1319,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
             switch(nWhich)
             {
                 case SID_TEMPLATE_ADDRESSBOOKSOURCE:
-                    if ( 
!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::DATABASE) )
+                    if (!SvtModuleOptions().IsDataBaseInstalled())
                         rSet.Put(SfxVisibilityItem(nWhich, false));
                     break;
                 case SID_QUITAPP:
@@ -1930,8 +1930,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
 
         case SID_NEWSD :
         {
-            SvtModuleOptions aModuleOpt;
-            if ( !aModuleOpt.IsImpress() )
+            if (!SvtModuleOptions().IsImpressInstalled())
             {
                 std::unique_ptr<weld::MessageDialog> 
xBox(Application::CreateMessageDialog(rReq.GetFrameWeld(),
                                                                          
VclMessageType::Warning, VclButtonsType::Ok,
@@ -1999,9 +1998,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
 
 void SfxApplication::OfaState_Impl(SfxItemSet &rSet)
 {
-    SvtModuleOptions aModuleOpt;
-
-    if( !aModuleOpt.IsWriter())
+    if (!SvtModuleOptions().IsWriterInstalled())
     {
         rSet.DisableItem( FN_LABEL );
         rSet.DisableItem( FN_BUSINESS_CARD );
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index f64023d2e18c..13793dd6e9df 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -358,21 +358,21 @@ static OUString getDefaultModule_Impl()
 {
     OUString sDefaultModule;
     SvtModuleOptions aModOpt;
-    if ( aModOpt.IsModuleInstalled( SvtModuleOptions::EModule::WRITER ) )
+    if (aModOpt.IsWriterInstalled())
         sDefaultModule = "swriter";
-    else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::EModule::CALC ) )
+    else if (aModOpt.IsCalcInstalled())
         sDefaultModule = "scalc";
-    else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::EModule::IMPRESS ) )
+    else if (aModOpt.IsImpressInstalled())
         sDefaultModule = "simpress";
-    else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::EModule::DRAW ) )
+    else if (aModOpt.IsDrawInstalled())
         sDefaultModule = "sdraw";
-    else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::EModule::MATH ) )
+    else if (aModOpt.IsMathInstalled())
         sDefaultModule = "smath";
-    else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::EModule::CHART ) )
+    else if (aModOpt.IsChartInstalled())
         sDefaultModule = "schart";
-    else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::EModule::BASIC ) )
+    else if (SvtModuleOptions::IsBasicIDEInstalled())
         sDefaultModule = "sbasic";
-    else if ( aModOpt.IsModuleInstalled( SvtModuleOptions::EModule::DATABASE ) 
)
+    else if (aModOpt.IsDataBaseInstalled())
         sDefaultModule = "sdatabase";
     else
     {
diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index b16a0abce44a..41783bea9950 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -291,22 +291,22 @@ void BackingWindow::initControls()
     // collect the URLs of the entries in the File/New menu
     SvtModuleOptions    aModuleOptions;
 
-    if (aModuleOptions.IsModuleInstalled(SvtModuleOptions::EModule::WRITER))
+    if (aModuleOptions.IsWriterInstalled())
         mxAllRecentThumbnails->mnFileTypes |= 
sfx2::ApplicationType::TYPE_WRITER;
 
-    if (aModuleOptions.IsModuleInstalled(SvtModuleOptions::EModule::CALC))
+    if (aModuleOptions.IsCalcInstalled())
         mxAllRecentThumbnails->mnFileTypes |= sfx2::ApplicationType::TYPE_CALC;
 
-    if (aModuleOptions.IsModuleInstalled(SvtModuleOptions::EModule::IMPRESS))
+    if (aModuleOptions.IsImpressInstalled())
         mxAllRecentThumbnails->mnFileTypes |= 
sfx2::ApplicationType::TYPE_IMPRESS;
 
-    if (aModuleOptions.IsModuleInstalled(SvtModuleOptions::EModule::DRAW))
+    if (aModuleOptions.IsDrawInstalled())
         mxAllRecentThumbnails->mnFileTypes |= sfx2::ApplicationType::TYPE_DRAW;
 
-    if (aModuleOptions.IsModuleInstalled(SvtModuleOptions::EModule::DATABASE))
+    if (aModuleOptions.IsDataBaseInstalled())
         mxAllRecentThumbnails->mnFileTypes |= 
sfx2::ApplicationType::TYPE_DATABASE;
 
-    if (aModuleOptions.IsModuleInstalled(SvtModuleOptions::EModule::MATH))
+    if (aModuleOptions.IsMathInstalled())
         mxAllRecentThumbnails->mnFileTypes |= sfx2::ApplicationType::TYPE_MATH;
 
     mxAllRecentThumbnails->mnFileTypes |= sfx2::ApplicationType::TYPE_OTHER;
@@ -433,12 +433,12 @@ void BackingWindow::checkInstalledModules()
 {
     SvtModuleOptions aModuleOpt;
 
-    mxWriterAllButton->set_sensitive( aModuleOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::WRITER ));
-    mxCalcAllButton->set_sensitive( aModuleOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::CALC ) );
-    mxImpressAllButton->set_sensitive( aModuleOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::IMPRESS ) );
-    mxDrawAllButton->set_sensitive( aModuleOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::DRAW ) );
-    mxMathAllButton->set_sensitive(aModuleOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::MATH ));
-    mxDBAllButton->set_sensitive(aModuleOpt.IsModuleInstalled( 
SvtModuleOptions::EModule::DATABASE ));
+    mxWriterAllButton->set_sensitive(aModuleOpt.IsWriterInstalled());
+    mxCalcAllButton->set_sensitive(aModuleOpt.IsCalcInstalled());
+    mxImpressAllButton->set_sensitive(aModuleOpt.IsImpressInstalled());
+    mxDrawAllButton->set_sensitive(aModuleOpt.IsDrawInstalled());
+    mxMathAllButton->set_sensitive(aModuleOpt.IsMathInstalled());
+    mxDBAllButton->set_sensitive(aModuleOpt.IsDataBaseInstalled());
 }
 
 bool BackingWindow::PreNotify(NotifyEvent& rNEvt)
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 42a27a66106d..25a541691921 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -817,7 +817,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
         case SID_AUTOREDACTDOC:
         {
             // Actual redaction takes place on a newly generated Draw document
-            if 
(!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::DRAW))
+            if (!SvtModuleOptions().IsDrawInstalled())
             {
                 std::unique_ptr<weld::MessageDialog> 
xBox(Application::CreateMessageDialog(
                     pDialogParent, VclMessageType::Warning, VclButtonsType::Ok,
@@ -853,7 +853,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
             uno::Reference< lang::XComponent > xSourceDoc( xModel );
 
             // Actual redaction takes place on a newly generated Draw document
-            if 
(!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::DRAW))
+            if (!SvtModuleOptions().IsDrawInstalled())
             {
                 std::unique_ptr<weld::MessageDialog> 
xBox(Application::CreateMessageDialog(
                     pDialogParent, VclMessageType::Warning, VclButtonsType::Ok,
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 57493759b16c..e65dfa88f2db 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -911,10 +911,10 @@ void 
SfxTemplateManagerDlg::OnTemplateImportCategory(std::u16string_view sCatego
 
     // add filters of modules which are installed
     SvtModuleOptions aModuleOpt;
-    if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::WRITER ) )
+    if (aModuleOpt.IsWriterInstalled())
         sFilterExt += "*.ott;*.stw;*.oth;*.dotx;*.dot";
 
-    if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::CALC ) )
+    if (aModuleOpt.IsCalcInstalled())
     {
         if ( !sFilterExt.isEmpty() )
             sFilterExt += ";";
@@ -922,7 +922,7 @@ void 
SfxTemplateManagerDlg::OnTemplateImportCategory(std::u16string_view sCatego
         sFilterExt += "*.ots;*.stc;*.xltx;*.xlt";
     }
 
-    if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::IMPRESS ) )
+    if (aModuleOpt.IsImpressInstalled())
     {
         if ( !sFilterExt.isEmpty() )
             sFilterExt += ";";
@@ -930,7 +930,7 @@ void 
SfxTemplateManagerDlg::OnTemplateImportCategory(std::u16string_view sCatego
         sFilterExt += "*.otp;*.sti;*.pot;*.potx";
     }
 
-    if ( aModuleOpt.IsModuleInstalled( SvtModuleOptions::EModule::DRAW ) )
+    if (aModuleOpt.IsDrawInstalled())
     {
         if ( !sFilterExt.isEmpty() )
             sFilterExt += ";";
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 99826bb65af9..8df6931536de 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -3513,7 +3513,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
     const SfxBoolItem* pShowItem = rReq.GetArg<SfxBoolItem>(nSID);
     if ( nSID == SID_VIEW_DATA_SOURCE_BROWSER )
     {
-        if 
(!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::DATABASE))
+        if (!SvtModuleOptions().IsDataBaseInstalled())
             return;
         Reference < XFrame > xFrame = GetFrame().GetFrameInterface();
         Reference < XFrame > xBeamer( xFrame->findFrame( u"_beamer"_ustr, 
FrameSearchFlag::CHILDREN ) );
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 2cedf38ba9b1..d88eb91fb3ec 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -797,7 +797,7 @@ void FmFormShell::GetState(SfxItemSet &rSet)
                 break;
 
             case SID_FM_USE_WIZARDS:
-                if  ( !SvtModuleOptions().IsModuleInstalled( 
SvtModuleOptions::EModule::DATABASE ) )
+                if (!SvtModuleOptions().IsDataBaseInstalled())
                     rSet.Put( SfxVisibilityItem( nWhich, false ) );
                 else if (!GetFormModel())
                     rSet.DisableItem( nWhich );
@@ -819,7 +819,7 @@ void FmFormShell::GetState(SfxItemSet &rSet)
 
             case SID_FM_NAVIGATIONBAR:
             case SID_FM_DBGRID:
-                if ( !SvtModuleOptions().IsModuleInstalled( 
SvtModuleOptions::EModule::DATABASE ) )
+                if (!SvtModuleOptions().IsDataBaseInstalled())
                 {
                     rSet.Put( SfxVisibilityItem( nWhich, false ) );
                     break;
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 204bc81fef44..9f639657f385 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -992,7 +992,7 @@ void FmXFormView::onCreatedFormObject( FmFormObj const & 
_rFormObject )
 
     // #i46898# no wizards if there is no Base installed - currently, all 
wizards are
     // database related
-    if ( !SvtModuleOptions().IsModuleInstalled( 
SvtModuleOptions::EModule::DATABASE ) )
+    if (!SvtModuleOptions().IsDataBaseInstalled())
         return;
 
     if ( m_nControlWizardEvent )
diff --git a/sw/source/filter/basflt/iodetect.cxx 
b/sw/source/filter/basflt/iodetect.cxx
index 9afe8ddca42e..ac857a806b55 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -34,7 +34,7 @@ using namespace ::com::sun::star;
 
 static bool IsDocShellRegistered()
 {
-    return SvtModuleOptions().IsWriter();
+    return SvtModuleOptions().IsWriterInstalled();
 }
 
 SwIoDetect aFilterDetect[] =
diff --git a/sw/source/filter/basflt/shellio.cxx 
b/sw/source/filter/basflt/shellio.cxx
index 85e5a8dd9525..88cef06127e7 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -497,8 +497,7 @@ SwDoc* Reader::GetTemplateDoc(SwDoc& rDoc)
             // we cannot create a SwDocShell. We could create a
             // SwWebDocShell however, because this exists always
             // for the help.
-            SvtModuleOptions aModuleOptions;
-            if (aModuleOptions.IsWriter())
+            if (SvtModuleOptions().IsWriterInstalled())
             {
                 rtl::Reference<SwDocShell> pDocSh = new 
SwDocShell(SfxObjectCreateMode::INTERNAL);
                 SfxObjectShellLock xDocSh = pDocSh.get();
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 63a2c8f08a9e..0e4545a83027 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1040,11 +1040,8 @@ void SwDocShell::GetState(SfxItemSet& rSet)
 
         case FN_ABSTRACT_STARIMPRESS:
         case FN_OUTLINE_TO_IMPRESS:
-            {
-                SvtModuleOptions aMOpt;
-                if (!aMOpt.IsImpress() || GetObjectShell()->isExportLocked())
-                    rSet.DisableItem( nWhich );
-            }
+            if (!SvtModuleOptions().IsImpressInstalled() || 
GetObjectShell()->isExportLocked())
+                rSet.DisableItem(nWhich);
             [[fallthrough]];
         case FN_ABSTRACT_NEWDOC:
         case FN_OUTLINE_TO_CLIPBOARD:
diff --git a/sw/source/uibase/app/swdll.cxx b/sw/source/uibase/app/swdll.cxx
index ec258cac6dd6..89f7b0b6cd71 100644
--- a/sw/source/uibase/app/swdll.cxx
+++ b/sw/source/uibase/app/swdll.cxx
@@ -86,12 +86,12 @@ SwDLL::SwDLL()
     if ( SfxApplication::GetModule(SfxToolsModule::Writer) )    // Module 
already active
         return;
 
-    std::unique_ptr<SvtModuleOptions> xOpt;
+    std::optional<SvtModuleOptions> oOpt;
     if (!comphelper::IsFuzzing())
-        xOpt.reset(new SvtModuleOptions);
+        oOpt.emplace();
     SfxObjectFactory* pDocFact = nullptr;
     SfxObjectFactory* pGlobDocFact = nullptr;
-    if (!xOpt || xOpt->IsWriter())
+    if (!oOpt || oOpt->IsWriterInstalled())
     {
         pDocFact = &SwDocShell::Factory();
         pGlobDocFact = &SwGlobalDocShell::Factory();
@@ -105,7 +105,7 @@ SwDLL::SwDLL()
 
     pWDocFact->SetDocumentServiceName(u"com.sun.star.text.WebDocument"_ustr);
 
-    if (!xOpt || xOpt->IsWriter())
+    if (!oOpt || oOpt->IsWriterInstalled())
     {
         
pGlobDocFact->SetDocumentServiceName(u"com.sun.star.text.GlobalDocument"_ustr);
         
pDocFact->SetDocumentServiceName(u"com.sun.star.text.TextDocument"_ustr);
diff --git a/sw/source/uibase/app/swmodule.cxx 
b/sw/source/uibase/app/swmodule.cxx
index 001f9fe25fe8..737fe747a112 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -212,13 +212,14 @@ void SwDLL::RegisterFactories()
 {
     // These Id's must not be changed. Through these Id's the View (resume 
Documentview)
     // is created by Sfx.
-    if (comphelper::IsFuzzing() || SvtModuleOptions().IsWriter())
+    SvtModuleOptions aOptions;
+    if (comphelper::IsFuzzing() || aOptions.IsWriterInstalled())
         SwView::RegisterFactory         ( SFX_INTERFACE_SFXDOCSH );
 
 #if HAVE_FEATURE_DESKTOP
     SwWebView::RegisterFactory        ( SFX_INTERFACE_SFXMODULE );
 
-    if (comphelper::IsFuzzing() || SvtModuleOptions().IsWriter())
+    if (comphelper::IsFuzzing() || aOptions.IsWriterInstalled())
     {
         SwSrcView::RegisterFactory      ( SfxInterfaceId(6) );
         SwPagePreview::RegisterFactory  ( SfxInterfaceId(7) );
diff --git a/sw/source/uibase/shells/tabsh.cxx 
b/sw/source/uibase/shells/tabsh.cxx
index 97589cd2c7b6..581e494cb3c7 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -1466,7 +1466,7 @@ void SwTableShell::GetState(SfxItemSet &rSet)
             case SID_INSERT_DIAGRAM:
                 {
                     SvtModuleOptions aMOpt;
-                    if ( !aMOpt.IsMath() || rSh.IsTableComplexForChart() )
+                    if ( !aMOpt.IsMathInstalled() || 
rSh.IsTableComplexForChart() )
                         rSet.DisableItem(nSlot);
                 }
                 break;
diff --git a/sw/source/uibase/shells/textsh.cxx 
b/sw/source/uibase/shells/textsh.cxx
index 4696335884aa..dfd5591b6e46 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -373,8 +373,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
     break;
     case SID_INSERT_DIAGRAM:
         {
-            SvtModuleOptions aMOpt;
-            if ( !aMOpt.IsChart() )
+            if (!SvtModuleOptions().IsChartInstalled())
                 break;
             if(!rReq.IsAPI())
             {
@@ -621,7 +620,6 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
     SfxWhichIter aIter( rSet );
     SwWrtShell &rSh = GetShell();
     sal_uInt16 nWhich = aIter.FirstWhich();
-    SvtModuleOptions aMOpt;
     SfxObjectCreateMode eCreateMode =
                         GetView().GetDocShell()->GetCreateMode();
     const bool bCursorInHidden = rSh.IsInHiddenRange(/*bSelect=*/false);
@@ -641,7 +639,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
             break;
 
         case SID_INSERT_DIAGRAM:
-            if( !aMOpt.IsChart()
+            if (!SvtModuleOptions().IsChartInstalled()
                 || GetShell().CursorInsideInputField()
                 || eCreateMode == SfxObjectCreateMode::EMBEDDED
                 || bCursorInHidden )
@@ -651,7 +649,7 @@ void SwTextShell::StateInsert( SfxItemSet &rSet )
             break;
 
             case FN_INSERT_SMA:
-                if( !aMOpt.IsMath()
+                if (!SvtModuleOptions().IsMathInstalled()
                     || eCreateMode == SfxObjectCreateMode::EMBEDDED
                     || bCursorInHidden
                     || rSh.CursorInsideInputField() )
diff --git a/sw/source/uibase/uiview/view0.cxx 
b/sw/source/uibase/uiview/view0.cxx
index fcf35ac29f4d..0a0e21a28e68 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 (comphelper::IsFuzzing() || SvtModuleOptions().IsWriter())
+    if (comphelper::IsFuzzing() || SvtModuleOptions().IsWriterInstalled())
     {
         SFX_VIEW_REGISTRATION(SwDocShell);
         SFX_VIEW_REGISTRATION(SwGlobalDocShell);
diff --git a/sw/source/uibase/uiview/viewstat.cxx 
b/sw/source/uibase/uiview/viewstat.cxx
index 45267fc42651..d1e3f102f967 100644
--- a/sw/source/uibase/uiview/viewstat.cxx
+++ b/sw/source/uibase/uiview/viewstat.cxx
@@ -513,7 +513,7 @@ void SwView::GetState(SfxItemSet &rSet)
                     rSet.DisableItem(nWhich);
             break;
             case  SID_VIEW_DATA_SOURCE_BROWSER:
-                if ( !SvtModuleOptions().IsModuleInstalled( 
SvtModuleOptions::EModule::DATABASE ) )
+                if (!SvtModuleOptions().IsDataBaseInstalled())
                     rSet.Put( SfxVisibilityItem( nWhich, false ) );
                 else
                     rSet.Put( SfxBoolItem( nWhich, 
GetViewFrame().HasChildWindow( SID_BROWSER ) ) );
diff --git a/unotools/source/config/moduleoptions.cxx 
b/unotools/source/config/moduleoptions.cxx
index 4ffb97839100..ed1ef95e8dbd 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -875,48 +875,6 @@ void SvtModuleOptions::SetFactoryDefaultFilter(       
EFactory         eFactory,
     m_pImpl->SetFactoryDefaultFilter( eFactory, sFilter );
 }
 
-bool SvtModuleOptions::IsMath() const
-{
-    // doesn't need mutex, never modified
-    return m_pImpl->IsModuleInstalled( EModule::MATH );
-}
-
-bool SvtModuleOptions::IsChart() const
-{
-    // doesn't need mutex, never modified
-    return m_pImpl->IsModuleInstalled( EModule::CHART );
-}
-
-bool SvtModuleOptions::IsCalc() const
-{
-    // doesn't need mutex, never modified
-    return m_pImpl->IsModuleInstalled( EModule::CALC );
-}
-
-bool SvtModuleOptions::IsDraw() const
-{
-    // doesn't need mutex, never modified
-    return m_pImpl->IsModuleInstalled( EModule::DRAW );
-}
-
-bool SvtModuleOptions::IsWriter() const
-{
-    std::unique_lock aGuard( impl_GetOwnStaticMutex() );
-    return m_pImpl->IsModuleInstalled( EModule::WRITER );
-}
-
-bool SvtModuleOptions::IsImpress() const
-{
-    // doesn't need mutex, never modified
-    return m_pImpl->IsModuleInstalled( EModule::IMPRESS );
-}
-
-bool SvtModuleOptions::IsDataBase() const
-{
-    // doesn't need mutex, never modified
-    return m_pImpl->IsModuleInstalled( EModule::DATABASE );
-}
-
 OUString SvtModuleOptions::GetModuleName( EModule eModule ) const
 {
     switch( eModule )

Reply via email to