summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-11-14 14:20:52 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-11-23 09:45:38 +0100
commitfec1501374860983d837d482cd175d80f4635b6f (patch)
tree3a5d4650212d290cab358674591970403b422e35 /desktop/source
parente777bda2398e2507bca7e13582f23cad0d2d8689 (diff)
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.kaganski@collabora.com>
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/app/app.cxx34
-rw-r--r--desktop/source/app/officeipcthread.cxx8
2 files changed, 21 insertions, 21 deletions
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 );
}