diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-09 12:36:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-10 08:08:45 +0200 |
commit | cc96c1fdc1b62f8b61567f5df63e892953c87f10 (patch) | |
tree | 23592daf915f767caa8eed6f14930f5d1027bcb2 /unotools | |
parent | aef704d8077226b13a28e664db59d27017241afe (diff) |
convert EItem to scoped enum
and drop read-only enumerators:
enum EItem E_APEARCFG
enum EItem E_FLTRCFG
enum EItem E_FONTSUBSTCONFIG
enum EItem E_LANGUAGEOPTIONS
enum EItem E_SEARCHOPT
Change-Id: Ie3baaecec3d1c30404b4fb0d948e25d4bb2f3f93
Diffstat (limited to 'unotools')
20 files changed, 48 insertions, 56 deletions
diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx index 91b62a5dfd01..ff2f6445424c 100644 --- a/unotools/source/config/cmdoptions.cxx +++ b/unotools/source/config/cmdoptions.cxx @@ -305,7 +305,7 @@ SvtCommandOptions::SvtCommandOptions() { m_pImpl = std::make_shared<SvtCommandOptions_Impl>(); g_pCommandOptions = m_pImpl; - ItemHolder1::holdConfigItem(E_CMDOPTIONS); + ItemHolder1::holdConfigItem(EItem::CmdOptions); } } diff --git a/unotools/source/config/compatibility.cxx b/unotools/source/config/compatibility.cxx index f5767900c8f2..d96947c5eb42 100644 --- a/unotools/source/config/compatibility.cxx +++ b/unotools/source/config/compatibility.cxx @@ -321,7 +321,7 @@ SvtCompatibilityOptions::SvtCompatibilityOptions() { m_pImpl = std::make_shared<SvtCompatibilityOptions_Impl>(); theOptions = m_pImpl; - ItemHolder1::holdConfigItem( E_COMPATIBILITY ); + ItemHolder1::holdConfigItem( EItem::Compatibility ); } } diff --git a/unotools/source/config/defaultoptions.cxx b/unotools/source/config/defaultoptions.cxx index 160df5fa8ec6..47f1ce54e291 100644 --- a/unotools/source/config/defaultoptions.cxx +++ b/unotools/source/config/defaultoptions.cxx @@ -335,7 +335,7 @@ SvtDefaultOptions::SvtDefaultOptions() { pImpl = std::make_shared<SvtDefaultOptions_Impl>(); g_pOptions = pImpl; - ItemHolder1::holdConfigItem(E_DEFAULTOPTIONS); + ItemHolder1::holdConfigItem(EItem::DefaultOptions); } } diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx index fefc9202b979..f0337ad37cf6 100644 --- a/unotools/source/config/dynamicmenuoptions.cxx +++ b/unotools/source/config/dynamicmenuoptions.cxx @@ -581,7 +581,7 @@ SvtDynamicMenuOptions::SvtDynamicMenuOptions() { m_pImpl = std::make_shared<SvtDynamicMenuOptions_Impl>(); g_pDynamicMenuOptions = m_pImpl; - ItemHolder1::holdConfigItem(E_DYNAMICMENUOPTIONS); + ItemHolder1::holdConfigItem(EItem::DynamicMenuOptions); } } diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx index 0965269b44e6..138df08a62f2 100644 --- a/unotools/source/config/eventcfg.cxx +++ b/unotools/source/config/eventcfg.cxx @@ -328,7 +328,7 @@ GlobalEventConfig::GlobalEventConfig() if( m_pImpl == nullptr ) { m_pImpl = new GlobalEventConfig_Impl; - ItemHolder1::holdConfigItem(E_EVENTCFG); + ItemHolder1::holdConfigItem(EItem::EventConfig); } } diff --git a/unotools/source/config/extendedsecurityoptions.cxx b/unotools/source/config/extendedsecurityoptions.cxx index 1e3b8236a7b9..fccc785a2003 100644 --- a/unotools/source/config/extendedsecurityoptions.cxx +++ b/unotools/source/config/extendedsecurityoptions.cxx @@ -255,7 +255,7 @@ SvtExtendedSecurityOptions::SvtExtendedSecurityOptions() { m_pImpl = std::make_shared<SvtExtendedSecurityOptions_Impl>(); g_pExtendedSecurityOptions = m_pImpl; - ItemHolder1::holdConfigItem(E_EXTENDEDSECURITYOPTIONS); + ItemHolder1::holdConfigItem(EItem::ExtendedSecurityOptions); } } diff --git a/unotools/source/config/fontoptions.cxx b/unotools/source/config/fontoptions.cxx index fef4ddedb4f6..194dff8e4417 100644 --- a/unotools/source/config/fontoptions.cxx +++ b/unotools/source/config/fontoptions.cxx @@ -259,7 +259,7 @@ SvtFontOptions::SvtFontOptions() { m_pImpl = std::make_shared<SvtFontOptions_Impl>(); g_pFontOptions = m_pImpl; - ItemHolder1::holdConfigItem(E_FONTOPTIONS); + ItemHolder1::holdConfigItem(EItem::FontOptions); } } diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx index 759e7b414d0c..45cce2ab9f4a 100644 --- a/unotools/source/config/historyoptions.cxx +++ b/unotools/source/config/historyoptions.cxx @@ -527,7 +527,7 @@ SvtHistoryOptions::SvtHistoryOptions() { m_pImpl = std::make_shared<SvtHistoryOptions_Impl>(); g_pHistoryOptions = m_pImpl; - ItemHolder1::holdConfigItem(E_HISTORYOPTIONS); + ItemHolder1::holdConfigItem(EItem::HistoryOptions); } } diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx index 76e06437bf5e..d8c9af0d3dd3 100644 --- a/unotools/source/config/itemholder1.cxx +++ b/unotools/source/config/itemholder1.cxx @@ -133,99 +133,91 @@ void ItemHolder1::impl_newItem(TItemInfo& rItem) { switch(rItem.eItem) { - case E_CMDOPTIONS : + case EItem::CmdOptions : rItem.pItem = new SvtCommandOptions(); break; - case E_COMPATIBILITY : + case EItem::Compatibility : rItem.pItem = new SvtCompatibilityOptions(); break; - case E_DEFAULTOPTIONS : + case EItem::DefaultOptions : rItem.pItem = new SvtDefaultOptions(); break; - case E_DYNAMICMENUOPTIONS : + case EItem::DynamicMenuOptions : rItem.pItem = new SvtDynamicMenuOptions(); break; - case E_EVENTCFG : + case EItem::EventConfig : //rItem.pItem = new GlobalEventConfig(); break; - case E_EXTENDEDSECURITYOPTIONS : + case EItem::ExtendedSecurityOptions : rItem.pItem = new SvtExtendedSecurityOptions(); break; - case E_FLTRCFG : -// no ref count rItem.pItem = new SvtFilterOptions(); - break; - - case E_FONTOPTIONS : + case EItem::FontOptions : rItem.pItem = new SvtFontOptions(); break; - case E_HISTORYOPTIONS : + case EItem::HistoryOptions : rItem.pItem = new SvtHistoryOptions(); break; - case E_LINGUCFG : + case EItem::LinguConfig : rItem.pItem = new SvtLinguConfig(); break; - case E_MODULEOPTIONS : + case EItem::ModuleOptions : rItem.pItem = new SvtModuleOptions(); break; - case E_OPTIONSDLGOPTIONS : + case EItem::OptionsDialogOptions : rItem.pItem = new SvtOptionsDialogOptions(); break; - case E_PATHOPTIONS : + case EItem::PathOptions : rItem.pItem = new SvtPathOptions(); break; - case E_PRINTWARNINGOPTIONS : + case EItem::PrintWarningOptions : rItem.pItem = new SvtPrintWarningOptions(); break; - case E_MISCCFG : + case EItem::MiscConfig : rItem.pItem = new ::utl::MiscCfg(); break; - case E_SAVEOPTIONS : + case EItem::SaveOptions : rItem.pItem = new SvtSaveOptions(); break; - case E_SEARCHOPT : -// no ref count rItem.pItem = new SvtSearchOptions(); - break; - - case E_SECURITYOPTIONS : + case EItem::SecurityOptions : rItem.pItem = new SvtSecurityOptions(); break; - case E_VIEWOPTIONS_DIALOG : + case EItem::ViewOptionsDialog : rItem.pItem = new SvtViewOptions(E_DIALOG, OUString()); break; - case E_VIEWOPTIONS_TABDIALOG : + case EItem::ViewOptionsTabDialog : rItem.pItem = new SvtViewOptions(E_TABDIALOG, OUString()); break; - case E_VIEWOPTIONS_TABPAGE : + case EItem::ViewOptionsTabPage : rItem.pItem = new SvtViewOptions(E_TABPAGE, OUString()); break; - case E_VIEWOPTIONS_WINDOW : + case EItem::ViewOptionsWindow : rItem.pItem = new SvtViewOptions(E_WINDOW, OUString()); break; - case E_USEROPTIONS : + case EItem::UserOptions : rItem.pItem = new SvtUserOptions(); break; - case E_SYSLOCALEOPTIONS : + case EItem::SysLocaleOptions : rItem.pItem = new SvtSysLocaleOptions(); break; diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index f89ae28b26b9..95f64c1a922f 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -809,7 +809,7 @@ SvtLinguConfigItem & SvtLinguConfig::GetConfigItem() if (!pCfgItem) { pCfgItem = new SvtLinguConfigItem; - ItemHolder1::holdConfigItem(E_LINGUCFG); + ItemHolder1::holdConfigItem(EItem::LinguConfig); } return *pCfgItem; } diff --git a/unotools/source/config/misccfg.cxx b/unotools/source/config/misccfg.cxx index c36630c02349..b11b9c499d31 100644 --- a/unotools/source/config/misccfg.cxx +++ b/unotools/source/config/misccfg.cxx @@ -194,7 +194,7 @@ MiscCfg::MiscCfg( ) { m_pImpl = std::make_shared<SfxMiscCfg>(); g_pOptions = m_pImpl; - ItemHolder1::holdConfigItem(E_MISCCFG); + ItemHolder1::holdConfigItem(EItem::MiscConfig); } m_pImpl->AddListener(this); diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx index 525523ca7924..0c759de4accd 100644 --- a/unotools/source/config/moduleoptions.cxx +++ b/unotools/source/config/moduleoptions.cxx @@ -801,7 +801,7 @@ SvtModuleOptions::SvtModuleOptions() { m_pImpl = std::make_shared<SvtModuleOptions_Impl>(); g_pModuleOptions = m_pImpl; - ItemHolder1::holdConfigItem(E_MODULEOPTIONS); + ItemHolder1::holdConfigItem(EItem::ModuleOptions); } } diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx index 0b819111b0b6..7d1f1846b0bf 100644 --- a/unotools/source/config/optionsdlg.cxx +++ b/unotools/source/config/optionsdlg.cxx @@ -208,7 +208,7 @@ SvtOptionsDialogOptions::SvtOptionsDialogOptions() { pOptions = new SvtOptionsDlgOptions_Impl; - ItemHolder1::holdConfigItem( E_OPTIONSDLGOPTIONS ); + ItemHolder1::holdConfigItem( EItem::OptionsDialogOptions ); } m_pImp = pOptions; } diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx index 5accec7861a4..6bdf6e0606d5 100644 --- a/unotools/source/config/pathoptions.cxx +++ b/unotools/source/config/pathoptions.cxx @@ -459,7 +459,7 @@ SvtPathOptions::SvtPathOptions() { pImpl = std::make_shared<SvtPathOptions_Impl>(); g_pOptions = pImpl; - ItemHolder1::holdConfigItem(E_PATHOPTIONS); + ItemHolder1::holdConfigItem(EItem::PathOptions); } } diff --git a/unotools/source/config/printwarningoptions.cxx b/unotools/source/config/printwarningoptions.cxx index 49363aab3322..885e588e0bb8 100644 --- a/unotools/source/config/printwarningoptions.cxx +++ b/unotools/source/config/printwarningoptions.cxx @@ -233,7 +233,7 @@ SvtPrintWarningOptions::SvtPrintWarningOptions() { m_pImpl = std::make_shared<SvtPrintWarningOptions_Impl>(); g_pPrintWarningOptions = m_pImpl; - ItemHolder1::holdConfigItem(E_PRINTWARNINGOPTIONS); + ItemHolder1::holdConfigItem(EItem::PrintWarningOptions); } } diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx index 64db684a7ff1..1dff44cee452 100644 --- a/unotools/source/config/saveopt.cxx +++ b/unotools/source/config/saveopt.cxx @@ -806,7 +806,7 @@ SvtSaveOptions::SvtSaveOptions() pOptions->pSaveOpt = new SvtSaveOptions_Impl; pOptions->pLoadOpt = new SvtLoadOptions_Impl; - ItemHolder1::holdConfigItem(E_SAVEOPTIONS); + ItemHolder1::holdConfigItem(EItem::SaveOptions); } ++nRefCount; pImp = pOptions; diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx index f2b57ed701dd..7c51561d75eb 100644 --- a/unotools/source/config/securityoptions.cxx +++ b/unotools/source/config/securityoptions.cxx @@ -944,7 +944,7 @@ SvtSecurityOptions::SvtSecurityOptions() m_pImpl = std::make_shared<SvtSecurityOptions_Impl>(); g_pSecurityOptions = m_pImpl; - ItemHolder1::holdConfigItem(E_SECURITYOPTIONS); + ItemHolder1::holdConfigItem(EItem::SecurityOptions); } } diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index 08a1e7ba7aec..30ddad1c06fc 100644 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -513,7 +513,7 @@ SvtSysLocaleOptions::SvtSysLocaleOptions() pImpl = std::make_shared<SvtSysLocaleOptions_Impl>(); g_pSysLocaleOptions = pImpl; if (!utl::ConfigManager::IsAvoidConfig()) - ItemHolder1::holdConfigItem(E_SYSLOCALEOPTIONS); + ItemHolder1::holdConfigItem(EItem::SysLocaleOptions); } pImpl->AddListener(this); } diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx index 6459495157f7..e9c20cfd0abd 100644 --- a/unotools/source/config/useroptions.cxx +++ b/unotools/source/config/useroptions.cxx @@ -238,7 +238,7 @@ SvtUserOptions::SvtUserOptions () { xImpl.reset(new Impl); xSharedImpl = xImpl; - ItemHolder1::holdConfigItem(E_USEROPTIONS); + ItemHolder1::holdConfigItem(EItem::UserOptions); } xImpl = xSharedImpl.lock(); xImpl->AddListener(this); diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx index 2b1c845cc524..e37d98d97b9b 100644 --- a/unotools/source/config/viewoptions.cxx +++ b/unotools/source/config/viewoptions.cxx @@ -589,7 +589,7 @@ SvtViewOptions::SvtViewOptions( EViewType eType , { //m_pDataContainer_Dialogs = new SvtViewDialogOptions_Impl( LIST_DIALOGS ); m_pDataContainer_Dialogs = new SvtViewOptionsBase_Impl( LIST_DIALOGS ); - ItemHolder1::holdConfigItem(E_VIEWOPTIONS_DIALOG); + ItemHolder1::holdConfigItem(EItem::ViewOptionsDialog); } } break; @@ -600,7 +600,7 @@ SvtViewOptions::SvtViewOptions( EViewType eType , if( m_nRefCount_TabDialogs == 1 ) { m_pDataContainer_TabDialogs = new SvtViewOptionsBase_Impl( LIST_TABDIALOGS ); - ItemHolder1::holdConfigItem(E_VIEWOPTIONS_TABDIALOG); + ItemHolder1::holdConfigItem(EItem::ViewOptionsTabDialog); } } break; @@ -611,7 +611,7 @@ SvtViewOptions::SvtViewOptions( EViewType eType , if( m_nRefCount_TabPages == 1 ) { m_pDataContainer_TabPages = new SvtViewOptionsBase_Impl( LIST_TABPAGES ); - ItemHolder1::holdConfigItem(E_VIEWOPTIONS_TABPAGE); + ItemHolder1::holdConfigItem(EItem::ViewOptionsTabPage); } } break; @@ -622,7 +622,7 @@ SvtViewOptions::SvtViewOptions( EViewType eType , if( m_nRefCount_Windows == 1 ) { m_pDataContainer_Windows = new SvtViewOptionsBase_Impl( LIST_WINDOWS ); - ItemHolder1::holdConfigItem(E_VIEWOPTIONS_WINDOW); + ItemHolder1::holdConfigItem(EItem::ViewOptionsWindow); } } break; @@ -1005,22 +1005,22 @@ void SvtViewOptions::AcquireOptions() if( ++m_nRefCount_Dialogs == 1 ) { m_pDataContainer_Dialogs = new SvtViewOptionsBase_Impl( LIST_DIALOGS ); - ItemHolder1::holdConfigItem(E_VIEWOPTIONS_DIALOG); + ItemHolder1::holdConfigItem(EItem::ViewOptionsDialog); } if( ++m_nRefCount_TabDialogs == 1 ) { m_pDataContainer_TabDialogs = new SvtViewOptionsBase_Impl( LIST_TABDIALOGS ); - ItemHolder1::holdConfigItem(E_VIEWOPTIONS_TABDIALOG); + ItemHolder1::holdConfigItem(EItem::ViewOptionsTabDialog); } if( ++m_nRefCount_TabPages == 1 ) { m_pDataContainer_TabPages = new SvtViewOptionsBase_Impl( LIST_TABPAGES ); - ItemHolder1::holdConfigItem(E_VIEWOPTIONS_TABPAGE); + ItemHolder1::holdConfigItem(EItem::ViewOptionsTabPage); } if( ++m_nRefCount_Windows == 1 ) { m_pDataContainer_Windows = new SvtViewOptionsBase_Impl( LIST_WINDOWS ); - ItemHolder1::holdConfigItem(E_VIEWOPTIONS_WINDOW); + ItemHolder1::holdConfigItem(EItem::ViewOptionsWindow); } } |