[Libreoffice-commits] core.git: dbaccess/source framework/source include/sfx2 reportdesign/source sfx2/sdi sfx2/source
Maxim Monastirsky
momonasmon at gmail.com
Fri Oct 6 10:08:59 UTC 2017
dbaccess/source/ui/tabledesign/TableController.cxx | 1
framework/source/fwe/classes/addonmenu.cxx | 17 +-----
include/sfx2/sfxsids.hrc | 6 +-
reportdesign/source/ui/report/ReportController.cxx | 1
sfx2/sdi/appslots.sdi | 9 ---
sfx2/sdi/sfx.sdi | 54 ---------------------
sfx2/source/appl/sfxpicklist.cxx | 6 --
sfx2/source/doc/objserv.cxx | 6 --
8 files changed, 9 insertions(+), 91 deletions(-)
New commits:
commit ecc3d43d2feb4ec09a3f797a4eb6d2eb25e5ee7f
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Fri Oct 6 00:28:08 2017 +0300
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 at libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index bfb16297c65c..c0d9ccbc4187 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -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 );
diff --git a/framework/source/fwe/classes/addonmenu.cxx b/framework/source/fwe/classes/addonmenu.cxx
index 90914fe2a44c..a044870378a8 100644
--- a/framework/source/fwe/classes/addonmenu.cxx
+++ b/framework/source/fwe/classes/addonmenu.cxx
@@ -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();
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 91baa6c56606..aa63549deaca 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -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)
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index e102bcd00160..26d6b738249b 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -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 );
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();
More information about the Libreoffice-commits
mailing list