diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2017-10-06 00:28:08 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2017-10-06 12:08:33 +0200 |
commit | ecc3d43d2feb4ec09a3f797a4eb6d2eb25e5ee7f (patch) | |
tree | 02d0f1c87fdb38717595bc23dd4de4d62835de56 /sfx2 | |
parent | f1ad49892d983e67244b9d65033dcecda6c28e19 (diff) |
Related: tdf#107569 Remove useless slots
With the current implementation of MenuBarManager, there is
no need to have sdi slots for menu items with submenus, and
moreover they have no effect at all.
Note that SID_PICKLIST was also (mis)used as an argument
to avoid adding a document to the recent list (which isn't
related to its mapping to .uno:PickList). But there seem to
be only read attempts, nothing actually sets it, so I think
this usage can be removed too. (For information, at least in
OOo 1.0.3 sources, there were 2 places where it was used as
an argument for SID_SAVEASDOC, although it was not present
there in the SID_SAVEASDOC def. in sfx.sdi.)
Change-Id: I18b0afe106f858406e13188bbc004ac99a3a0246
Reviewed-on: https://gerrit.libreoffice.org/43184
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/sdi/appslots.sdi | 9 | ||||
-rw-r--r-- | sfx2/sdi/sfx.sdi | 54 | ||||
-rw-r--r-- | sfx2/source/appl/sfxpicklist.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 6 |
4 files changed, 1 insertions, 74 deletions
diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi index 5f228a2ff137..da6d084403fe 100644 --- a/sfx2/sdi/appslots.sdi +++ b/sfx2/sdi/appslots.sdi @@ -21,15 +21,6 @@ interface Application SID_AUTOPILOTMENU // ole(no) api(final/play/rec) [ ] - SID_HELPMENU // ole(no) api(no) - [ - ] - SID_PICKLIST // ole(no) api(no) - [ - ] - SID_MDIWINDOWLIST // ole(no) api(no) - [ - ] SID_ABOUT // ole(no) api(final/play/rec) [ ExecMethod = MiscExec_Impl ; diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index bb32b9745c71..26265ed57bbf 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -1834,24 +1834,6 @@ SfxVoidItem HelpIndex SID_HELPINDEX ] -SfxVoidItem HelpMenu SID_HELPMENU -() -[ - AutoUpdate = FALSE, - FastCall = FALSE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - - AccelConfig = FALSE, - MenuConfig = TRUE, - ToolBoxConfig = FALSE, - GroupId = SfxGroupId::Application; -] - - SfxBoolItem HelpTip SID_HELPTIPS [ @@ -3127,24 +3109,6 @@ SfxStringItem DocPath SID_DOCPATH ] -SfxVoidItem PickList SID_PICKLIST -() -[ - AutoUpdate = FALSE, - FastCall = FALSE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = TRUE, - RecordAbsolute = FALSE, - RecordPerSet; - - AccelConfig = FALSE, - MenuConfig = FALSE, - ToolBoxConfig = FALSE, - GroupId = SfxGroupId::Application; -] - - SfxVoidItem Print SID_PRINTDOC (SfxStringItem PrinterName SID_PRINTER_NAME,SfxStringItem FileName SID_FILE_NAME,SfxInt16Item Copies SID_PRINT_COPIES,SfxStringItem RangeText SID_PRINT_PAGES,SfxBoolItem Selection SID_SELECTION,SfxBoolItem Asynchron SID_ASYNCHRON,SfxBoolItem Collate SID_PRINT_COLLATE,SfxBoolItem Silent SID_SILENT) [ @@ -4617,24 +4581,6 @@ SfxBoolItem ViewDataSourceBrowser SID_VIEW_DATA_SOURCE_BROWSER GroupId = SfxGroupId::View; ] -SfxVoidItem WindowList SID_MDIWINDOWLIST -() -[ - AutoUpdate = FALSE, - FastCall = FALSE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = TRUE, - RecordAbsolute = FALSE, - RecordPerSet; - - AccelConfig = FALSE, - MenuConfig = FALSE, - ToolBoxConfig = FALSE, - GroupId = SfxGroupId::View; -] - - SfxVoidItem ZoomMinus SID_ZOOM_IN () [ diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx index 4509e7299c91..ab41cf07ffda 100644 --- a/sfx2/source/appl/sfxpicklist.cxx +++ b/sfx2/source/appl/sfxpicklist.cxx @@ -117,14 +117,10 @@ void SfxPickListImpl::AddDocumentToPickList( SfxObjectShell* pDocSh ) if ( aURL.GetProtocol() == INetProtocol::VndSunStarHelp ) return; + // add no document that forbids this if ( !pMed->IsUpdatePickList() ) return; - // add no document that forbids this (for example Message-Body) - const SfxBoolItem* pPicklistItem = SfxItemSet::GetItem<SfxBoolItem>(pMed->GetItemSet(), SID_PICKLIST, false); - if ( pPicklistItem && !pPicklistItem->GetValue() ) - return; - // ignore hidden documents if ( !SfxViewFrame::GetFirst( pDocSh ) ) return; diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 18ec45205a50..2a757e4b4512 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -817,12 +817,6 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // Prevent entry in the Pick-lists if ( rReq.IsAPI() ) GetMedium()->SetUpdatePickList( false ); - else if ( rReq.GetArgs() ) - { - const SfxBoolItem* pPicklistItem = rReq.GetArgs()->GetItem<SfxBoolItem>(SID_PICKLIST, false); - if ( pPicklistItem ) - GetMedium()->SetUpdatePickList( pPicklistItem->GetValue() ); - } // Ignore()-branches have already returned rReq.Done(); |