summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-06-06 11:49:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-06-06 17:35:26 +0200
commit41c248e066f454355dcceaa233ccf90f2adaee52 (patch)
treee2924de8d165bea1512353eb16b1a38349a896f6 /unotools
parentd7d8c688d7c20ecb49ff5b3577bee3d55b806d3c (diff)
SvtCommandOptions only supports CMDOPTION_DISABLED
CMDOPTION_NONE is just ignored, so remove this parameter Change-Id: If9de22a6b0522620a267cbc92b118f79e200d999 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152671 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/cmdoptions.cxx33
1 files changed, 10 insertions, 23 deletions
diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx
index 397e07718bef..ec4e826b8c8a 100644
--- a/unotools/source/config/cmdoptions.cxx
+++ b/unotools/source/config/cmdoptions.cxx
@@ -119,8 +119,8 @@ class SvtCommandOptions_Impl : public ConfigItem
=> The code exist only for one time and isn't duplicated for every instance!
*//*-*****************************************************************************************************/
- bool HasEntries ( SvtCommandOptions::CmdOption eOption ) const;
- bool Lookup ( SvtCommandOptions::CmdOption eCmdOption, const OUString& ) const;
+ bool HasEntriesDisabled() const;
+ bool LookupDisabled( const OUString& ) const;
void EstablishFrameCallback(const css::uno::Reference< css::frame::XFrame >& xFrame);
private:
@@ -239,29 +239,16 @@ void SvtCommandOptions_Impl::ImplCommit()
// public method
-bool SvtCommandOptions_Impl::HasEntries( SvtCommandOptions::CmdOption eOption ) const
+bool SvtCommandOptions_Impl::HasEntriesDisabled() const
{
- if ( eOption == SvtCommandOptions::CMDOPTION_DISABLED )
- return m_aDisabledCommands.HasEntries();
- else
- return false;
+ return m_aDisabledCommands.HasEntries();
}
// public method
-bool SvtCommandOptions_Impl::Lookup( SvtCommandOptions::CmdOption eCmdOption, const OUString& aCommand ) const
+bool SvtCommandOptions_Impl::LookupDisabled( const OUString& aCommand ) const
{
- switch( eCmdOption )
- {
- case SvtCommandOptions::CMDOPTION_DISABLED:
- {
- return m_aDisabledCommands.Lookup( aCommand );
- }
- default:
- SAL_WARN( "unotools.config", "SvtCommandOptions_Impl::Lookup() Unknown option type given!" );
- }
-
- return false;
+ return m_aDisabledCommands.Lookup( aCommand );
}
// public method
@@ -323,18 +310,18 @@ SvtCommandOptions::~SvtCommandOptions()
// public method
-bool SvtCommandOptions::HasEntries( CmdOption eOption ) const
+bool SvtCommandOptions::HasEntriesDisabled() const
{
std::unique_lock aGuard( GetOwnStaticMutex() );
- return m_pImpl->HasEntries( eOption );
+ return m_pImpl->HasEntriesDisabled();
}
// public method
-bool SvtCommandOptions::Lookup( CmdOption eCmdOption, const OUString& aCommandURL ) const
+bool SvtCommandOptions::LookupDisabled( const OUString& aCommandURL ) const
{
std::unique_lock aGuard( GetOwnStaticMutex() );
- return m_pImpl->Lookup( eCmdOption, aCommandURL );
+ return m_pImpl->LookupDisabled( aCommandURL );
}
// public method