diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-31 10:30:35 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-01 06:48:13 +0000 |
commit | fa135fd0e05fc4ba784b4349d65f2e5ed26c0f55 (patch) | |
tree | dfe79dd3f61f872b9e6b788444631285774e17ac /sfx2/source/appl | |
parent | 79aaa464134970b15f6858f98cb9f8e37aced23c (diff) |
remove unused SID constants and associated code
found with a python script that looks like:
process = subprocess.Popen(
"git ls-files *.hrc | xargs grep -hE '#define +SID_' | cut -d ' ' -f 2 | sort -u",
shell=True, stdout=subprocess.PIPE)
for line in iter(process.stdout.readline, b''):
line = line.strip()
if line.startswith("//"): continue
if line.startswith("sfx"): continue
if len(line) < 10: continue
i = subprocess.check_output("git grep -nP \"#define +" + line + " \"",
shell=True)
if i.count("#define") < 2: continue
print line + "
" + i
Change-Id: I40eac2569c2b5b129d9459cb723a9d6f26d09264
Reviewed-on: https://gerrit.libreoffice.org/25715
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/appl/appuno.cxx | 4 |
3 files changed, 1 insertions, 17 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index bd221e8a6b92..c8134ba58b3f 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -615,16 +615,6 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet ) aHelpOptions.SetWelcomeScreen( static_cast<const SfxBoolItem *>(pItem)->GetValue() ); } - // WelcomeScreen - if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_WELCOMESCREEN_RESET ), true, &pItem)) - { - DBG_ASSERT(dynamic_cast< const SfxBoolItem *>( pItem ) != nullptr, "BoolItem expected"); - bool bReset = static_cast<const SfxBoolItem *>(pItem)->GetValue(); - if ( bReset ) - { - OSL_FAIL( "Not implemented, may be EOL!" ); - } } - if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_HELP_STYLESHEET ), true, &pItem)) { DBG_ASSERT(dynamic_cast< const SfxStringItem *>( pItem ) != nullptr, "StringItem expected"); diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 4f03e86cea32..88d74d5459c6 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -273,7 +273,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) } case SID_QUITAPP: - case SID_EXITANDRETURN: case SID_LOGOUT: { // protect against reentrant calls @@ -380,7 +379,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) } case SID_CLOSEDOCS: - case SID_CLOSEWINS: { Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() ); @@ -705,7 +703,6 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) if ( !SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::DATABASE) ) rSet.Put(SfxVisibilityItem(nWhich, false)); break; - case SID_EXITANDRETURN: case SID_QUITAPP: { if ( pAppData_Impl->nDocModalMode ) @@ -751,7 +748,6 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) break; case SID_CLOSEDOCS: - case SID_CLOSEWINS: { Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() ); Reference< XIndexAccess > xTasks( xDesktop->getFrames(), UNO_QUERY ); diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 7c3089beaabb..6e7158a9d4c6 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -182,8 +182,6 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert if ( nSlotId == SID_OPENURL ) nSlotId = SID_OPENDOC; - if ( nSlotId == SID_SAVEASURL ) - nSlotId = SID_SAVEASDOC; sal_Int32 nCount = rArgs.getLength(); if ( !nCount ) @@ -922,7 +920,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b if ( nSlotId == SID_OPENURL ) nSlotId = SID_OPENDOC; - if ( nSlotId == SID_SAVEASURL || nSlotId == SID_SAVEASREMOTE ) + if ( nSlotId == SID_SAVEASREMOTE ) nSlotId = SID_SAVEASDOC; // find number of properties to avoid permanent reallocations in the sequence |