diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-04-07 10:25:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-04-07 18:36:58 +0100 |
commit | ff8b873936aa72b17309da4bfc2775573a5b1f55 (patch) | |
tree | 2441ef457c8750e64ac1f8d57eabc740ca56ba80 /dbaccess | |
parent | e5c6d5ad35faa160bbd3daa593aac0782cd9f1ba (diff) |
RID_SBA_GRID_ROWCTXMENU is strangely used to insert entries into another menu
Change-Id: I61fdb3141c345f1d8dd04ee73d9b1bc332cef754
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.cxx | 14 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.src | 34 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbu_resource.hrc | 8 |
3 files changed, 23 insertions, 33 deletions
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index bd8dbae2c479..8d621a054191 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -18,6 +18,7 @@ */ #include "sbagrid.hrc" +#include "dbaccess_helpid.hrc" #include "uiservices.hxx" #include <sot/exchange.hxx> @@ -748,24 +749,21 @@ void SbaGridControl::PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu) { FmGridControl::PreExecuteRowContextMenu(nRow, rMenu); - ScopedVclPtrInstance<PopupMenu> aNewItems(ModuleRes(RID_SBA_GRID_ROWCTXMENU)); sal_uInt16 nPos = 0; if (!IsReadOnlyDB()) { - rMenu.InsertItem(ID_BROWSER_TABLEATTR, aNewItems->GetItemText(ID_BROWSER_TABLEATTR), MenuItemBits::NONE, OString(), nPos++); - rMenu.SetHelpId(ID_BROWSER_TABLEATTR, aNewItems->GetHelpId(ID_BROWSER_TABLEATTR)); + rMenu.InsertItem(ID_BROWSER_TABLEATTR, ModuleRes(RID_STR_TABLE_FORMAT).toString(), MenuItemBits::NONE, OString(), nPos++); + rMenu.SetHelpId(ID_BROWSER_TABLEATTR, HID_BROWSER_TABLEFORMAT); - rMenu.InsertItem(ID_BROWSER_ROWHEIGHT, aNewItems->GetItemText(ID_BROWSER_ROWHEIGHT), MenuItemBits::NONE, OString(), nPos++); - rMenu.SetHelpId(ID_BROWSER_ROWHEIGHT, aNewItems->GetHelpId(ID_BROWSER_ROWHEIGHT)); + rMenu.InsertItem(ID_BROWSER_ROWHEIGHT, ModuleRes(RID_STR_ROW_HEIGHT).toString(), MenuItemBits::NONE, OString(), nPos++); + rMenu.SetHelpId(ID_BROWSER_ROWHEIGHT, HID_BROWSER_ROWHEIGHT); rMenu.InsertSeparator(OString(), nPos++); } if ( GetSelectRowCount() > 0 ) { - rMenu.InsertItem(ID_BROWSER_COPY, aNewItems->GetItemText(SID_COPY), MenuItemBits::NONE, OString(), nPos++); - rMenu.SetHelpId(ID_BROWSER_COPY, aNewItems->GetHelpId(SID_COPY)); - + rMenu.InsertItem(ID_BROWSER_COPY, ModuleRes(RID_STR_COPY).toString(), MenuItemBits::NONE, OString(), nPos++); rMenu.InsertSeparator(OString(), nPos++); } } diff --git a/dbaccess/source/ui/browser/sbagrid.src b/dbaccess/source/ui/browser/sbagrid.src index 375e58ba797a..39c4cb2fc4b6 100644 --- a/dbaccess/source/ui/browser/sbagrid.src +++ b/dbaccess/source/ui/browser/sbagrid.src @@ -46,29 +46,19 @@ Menu RID_SBA_GRID_COLCTXMENU }; }; -Menu RID_SBA_GRID_ROWCTXMENU +String RID_STR_TABLE_FORMAT { - ItemList = - { - MenuItem - { - Identifier = ID_BROWSER_TABLEATTR ; - HelpID = HID_BROWSER_TABLEFORMAT ; - Text [ en-US ] = "Table Format..." ; - }; - MenuItem - { - Identifier = ID_BROWSER_ROWHEIGHT ; - HelpID = HID_BROWSER_ROWHEIGHT ; - Text [ en-US ] = "Row Height..." ; - }; - MenuItem - { - Identifier = SID_COPY ; - Command = ".uno:Copy" ; - Text [ en-US ] = "~Copy" ; - }; - }; + Text [ en-US ] = "Table Format..."; +}; + +String RID_STR_ROW_HEIGHT +{ + Text [ en-US ] = "Row Height..."; +}; + +String RID_STR_COPY +{ + Text [ en-US ] = "~Copy"; }; String RID_STR_UNDO_MODIFY_RECORD diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc index 0f539d9e194a..a937ee8a069c 100644 --- a/dbaccess/source/ui/inc/dbu_resource.hrc +++ b/dbaccess/source/ui/inc/dbu_resource.hrc @@ -62,10 +62,10 @@ #define RID_STR_UNO_END RID_STR_UNO_START + 20 // 414 - 433 #define RID_STR_GEN_START RID_STR_UNO_END -#define RID_STR_GEN_END RID_STR_GEN_START + 65 // 434 - 493 +#define RID_STR_GEN_END RID_STR_GEN_START + 75 // 434 - 503 #define RID_STR_APP_START RID_STR_GEN_END -#define RID_STR_APP_END RID_STR_APP_START + 40 // 494 - 533 +#define RID_STR_APP_END RID_STR_APP_START + 50 // 504 - 543 #if RID_STR_GEN_END > RID_DBACCESS_END #error Resource-Id Ueberlauf in #file, #line @@ -124,7 +124,6 @@ // menus #define RID_SBA_GRID_COLCTXMENU RID_MENU_START + 2 -#define RID_SBA_GRID_ROWCTXMENU RID_MENU_START + 3 #define RID_QUERYCOLPOPUPMENU RID_MENU_START + 5 #define RID_QUERYFUNCTION_POPUPMENU RID_MENU_START + 6 #define RID_TABLEDESIGNROWPOPUPMENU RID_MENU_START + 7 @@ -195,6 +194,9 @@ #define STR_QUERY_CONNECTION_LOST RID_STR_GEN_START + 62 #define STR_QUERY_USERADMIN_DELETE_USER RID_STR_GEN_START + 63 #define STR_QUERY_SAVE_TABLE_EDIT_INDEXES RID_STR_GEN_START + 64 +#define RID_STR_TABLE_FORMAT RID_STR_GEN_START + 65 +#define RID_STR_ROW_HEIGHT RID_STR_GEN_START + 66 +#define RID_STR_COPY RID_STR_GEN_START + 67 // untyped resources |