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>
This commit is contained in:
Maxim Monastirsky
2017-10-06 00:28:08 +03:00
parent f1ad49892d
commit ecc3d43d2f
8 changed files with 9 additions and 91 deletions

View File

@@ -606,7 +606,6 @@ void OTableController::describeSupportedFeatures()
implDescribeSupportedFeature( ".uno:Redo", ID_BROWSER_REDO, CommandGroup::EDIT );
implDescribeSupportedFeature( ".uno:Save", ID_BROWSER_SAVEDOC, CommandGroup::EDIT );
implDescribeSupportedFeature( ".uno:Undo", ID_BROWSER_UNDO, CommandGroup::EDIT );
implDescribeSupportedFeature( ".uno:HelpMenu", SID_HELPMENU, CommandGroup::APPLICATION );
implDescribeSupportedFeature( ".uno:NewDoc", SID_NEWDOC, CommandGroup::DOCUMENT );
implDescribeSupportedFeature( ".uno:SaveAs", ID_BROWSER_SAVEASDOC, CommandGroup::DOCUMENT );
implDescribeSupportedFeature( ".uno:DBIndexDesign", SID_INDEXDESIGN, CommandGroup::APPLICATION );

View File

@@ -38,10 +38,6 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::beans;
// Please look at sfx2/inc/sfxsids.hrc the values are defined there. Due to build dependencies
// we cannot include the header file.
const sal_uInt16 SID_HELPMENU = (SID_SFX_START + 410);
namespace framework
{
@@ -101,13 +97,10 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame,
{
if ( pMergeMenuBar )
{
PopupMenu* pHelpMenu = pMergeMenuBar->GetPopupMenu( SID_HELPMENU );
if ( !pHelpMenu )
{
sal_uInt16 nId = FindMenuId(pMergeMenuBar, ".uno:HelpMenu");
if ( nId != USHRT_MAX )
pHelpMenu = pMergeMenuBar->GetPopupMenu( nId );
}
PopupMenu* pHelpMenu(nullptr);
sal_uInt16 nId = FindMenuId(pMergeMenuBar, ".uno:HelpMenu");
if ( nId != USHRT_MAX )
pHelpMenu = pMergeMenuBar->GetPopupMenu( nId );
if ( pHelpMenu )
{
@@ -118,7 +111,7 @@ void AddonMenuManager::MergeAddonHelpMenu( const Reference< XFrame >& rFrame,
AddonsOptions aOptions;
// try to detect the about menu item with the command URL
sal_uInt16 nId = FindMenuId(pHelpMenu, ".uno:About");
nId = FindMenuId(pHelpMenu, ".uno:About");
sal_uInt16 nInsPos = pHelpMenu->GetItemPos( nId );
const Sequence< Sequence< PropertyValue > >& rAddonHelpMenuEntries = aOptions.GetAddonsHelpMenu();

View File

@@ -81,7 +81,7 @@
#define SID_HELPTIPS (SID_SFX_START + 404)
#define SID_EMOJI_CONTROL (SID_SFX_START + 405)
#define SID_CHARMAP_CONTROL (SID_SFX_START + 406)
#define SID_HELPMENU (SID_SFX_START + 410)
// free (SID_SFX_START + 410)
#define SID_SEND_FEEDBACK (SID_SFX_START + 421)
#define SID_Q_AND_A (SID_SFX_START + 422)
#define SID_DOCUMENTATION (SID_SFX_START + 423)
@@ -119,7 +119,7 @@
#define SID_FILE_FILTEROPTIONS (SID_SFX_START + 527)
#define SID_RELOAD (SID_SFX_START + 508)
#define SID_PRINTDOCDIRECT (SID_SFX_START + 509)
#define SID_PICKLIST (SID_SFX_START + 510)
// free (SID_SFX_START + 510)
#define SID_DOC_SERVICE (SID_SFX_START + 511)
#define SID_PLUGIN_MODE (SID_SFX_START + 827)
#define SID_EXPORTDOC (SID_SFX_START + 829)
@@ -353,7 +353,7 @@
// default-ids for windows
#define SID_MDIWINDOWLIST (SID_SFX_START + 610)
// free (SID_SFX_START + 610)
#define SID_NEWWINDOW (SID_SFX_START + 620)
#define SID_CLOSEWIN (SID_SFX_START + 621)
#define SID_VIEWSHELL (SID_SFX_START + 623)

View File

@@ -1848,7 +1848,6 @@ void OReportController::describeSupportedFeatures()
implDescribeSupportedFeature( ".uno:GreatestHeight", SID_OBJECT_GREATESTHEIGHT, CommandGroup::FORMAT );
implDescribeSupportedFeature( ".uno:Distribution", SID_DISTRIBUTION, CommandGroup::FORMAT );
implDescribeSupportedFeature( ".uno:HelpMenu", SID_HELPMENU, CommandGroup::APPLICATION );
implDescribeSupportedFeature( ".uno:ExportTo", SID_EXPORTDOC, CommandGroup::APPLICATION );
implDescribeSupportedFeature( ".uno:ExportToPDF", SID_EXPORTDOCASPDF, CommandGroup::APPLICATION );
implDescribeSupportedFeature( ".uno:PrintPreview", SID_PRINTPREVIEW, CommandGroup::APPLICATION );

View File

@@ -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 ;

View File

@@ -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
()
[

View File

@@ -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;

View File

@@ -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();