[Libreoffice-commits] core.git: framework/inc framework/source
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Thu Oct 20 10:03:28 UTC 2016
framework/inc/classes/resource.hrc | 3 --
framework/source/classes/resource.src | 5 ---
framework/source/uielement/recentfilesmenucontroller.cxx | 20 +++------------
3 files changed, 5 insertions(+), 23 deletions(-)
New commits:
commit 4846c0fed99c4e6759b49cf9a02270d96e7c0863
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Thu Oct 20 11:53:08 2016 +0200
Open menu: Simplify inserting menu entries
Change-Id: Ia75f2fe349580003b16735fccf429392d0cf8363
Reviewed-on: https://gerrit.libreoffice.org/30082
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc
index f0fdc89..49c051c 100644
--- a/framework/inc/classes/resource.hrc
+++ b/framework/inc/classes/resource.hrc
@@ -50,8 +50,7 @@
#define STR_CLEAR_RECENT_FILES (RID_STR_START+23)
#define STR_CLEAR_RECENT_FILES_HELP (RID_STR_START+24)
#define STR_LANGSTATUS_HINT (RID_STR_START+25)
-#define STR_OPEN_REMOTE (RID_STR_START+26)
-#define STR_REMOTE_TITLE (RID_STR_START+27)
+#define STR_REMOTE_TITLE (RID_STR_START+26)
#define IMG_SAVEMODIFIED_SMALL (RID_IMAGE_START+0)
#define IMG_SAVEMODIFIED_LARGE (RID_IMAGE_START+1)
diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src
index 7412141..dd5d877 100644
--- a/framework/source/classes/resource.src
+++ b/framework/source/classes/resource.src
@@ -113,11 +113,6 @@ String STR_CLEAR_RECENT_FILES_HELP
Text [ en-US ] = "Clears the list with the most recently opened files. This action can not be undone.";
};
-String STR_OPEN_REMOTE
-{
- Text [ en-US ] = "Open Remote File";
-};
-
String STR_REMOTE_TITLE
{
Text [ en-US ] = " (Remote)";
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index c7a8611..5873b4a 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -243,28 +243,16 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
if ( m_bShowToolbarEntries )
{
pVCLPopupMenu->InsertSeparator();
- pVCLPopupMenu->InsertItem( sal_uInt16( nCount + 2 ),
- vcl::CommandInfoProvider::Instance().GetMenuLabelForCommand(
- CMD_OPEN_AS_TEMPLATE, m_xFrame) );
- pVCLPopupMenu->SetItemCommand( sal_uInt16( nCount + 2 ),
- CMD_OPEN_AS_TEMPLATE );
- pVCLPopupMenu->InsertItem( sal_uInt16( nCount + 3 ),
- FWK_RESSTR(STR_OPEN_REMOTE) );
- pVCLPopupMenu->SetItemCommand( sal_uInt16( nCount + 3 ),
- CMD_OPEN_REMOTE );
+ pVCLPopupMenu->InsertItem( CMD_OPEN_AS_TEMPLATE, m_xFrame );
+ pVCLPopupMenu->InsertItem( CMD_OPEN_REMOTE, m_xFrame );
}
}
else
{
if ( m_bShowToolbarEntries )
{
- // Open as template menu entry
- pVCLPopupMenu->InsertItem( 1, vcl::CommandInfoProvider::Instance().GetMenuLabelForCommand(
- CMD_OPEN_AS_TEMPLATE, m_xFrame) );
- pVCLPopupMenu->SetItemCommand( 1, CMD_OPEN_AS_TEMPLATE );
- // Open remote menu entry
- pVCLPopupMenu->InsertItem( 2, FWK_RESSTR(STR_OPEN_REMOTE) );
- pVCLPopupMenu->SetItemCommand( 2, CMD_OPEN_REMOTE );
+ pVCLPopupMenu->InsertItem( CMD_OPEN_AS_TEMPLATE, m_xFrame );
+ pVCLPopupMenu->InsertItem( CMD_OPEN_REMOTE, m_xFrame );
}
else
{
More information about the Libreoffice-commits
mailing list