diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-01-07 12:04:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-01-07 16:17:52 +0000 |
commit | 6773db03a657413a24b87e9ef3a6c68020936e0e (patch) | |
tree | 9944195abaf8ce6b344a172edae69d14bf1b0ffb /svx/source | |
parent | b2a106249f1624a61a9453bf50f1a17d75ea1825 (diff) |
allow menu items to be referred to by a name
Change-Id: I8bb1c082e3948f919232b81e0f1f869b88fcd852
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/fmcomp/fmgridcl.cxx | 3 | ||||
-rw-r--r-- | svx/source/form/fmshimp.cxx | 3 | ||||
-rw-r--r-- | svx/source/mnuctrls/SmartTagCtl.cxx | 10 |
3 files changed, 9 insertions, 7 deletions
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 26eacd9cb132..dda5a52e74c5 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -742,7 +742,8 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe if (nHiddenCols < 16) { // (only the first 16 items to keep the menu rather small) aName = xCurCol->getPropertyValue(FM_PROP_LABEL); - pShowColsMenu->InsertItem(nHiddenCols + 1, ::comphelper::getString(aName), 0, nHiddenCols); + pShowColsMenu->InsertItem(nHiddenCols + 1, ::comphelper::getString(aName), + 0, OString(), nHiddenCols); // the ID is arbitrary, but should be unique within the whole menu } ++nHiddenCols; diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index eebc0f3227f7..31304ac7aa00 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -4156,7 +4156,8 @@ void ControlConversionMenuController::StateChanged(sal_uInt16 nSID, SfxItemState if (MENU_ITEM_NOTFOUND == nPrevInConversion) // none of the items which precede the nSID-slot in the source menu are present in our conversion menu nPrevInConversion = sal::static_int_cast< sal_uInt16 >(-1); // put the item at the first position - m_pConversionMenu->InsertItem(nSID, pSource->GetItemText(nSID), pSource->GetItemBits(nSID), ++nPrevInConversion); + m_pConversionMenu->InsertItem(nSID, pSource->GetItemText(nSID), + pSource->GetItemBits(nSID), OString(), ++nPrevInConversion); m_pConversionMenu->SetItemImage(nSID, pSource->GetItemImage(nSID)); m_pConversionMenu->SetHelpId(nSID, pSource->GetHelpId(nSID)); diff --git a/svx/source/mnuctrls/SmartTagCtl.cxx b/svx/source/mnuctrls/SmartTagCtl.cxx index 1f9d52d75a84..36d43cc01581 100644 --- a/svx/source/mnuctrls/SmartTagCtl.cxx +++ b/svx/source/mnuctrls/SmartTagCtl.cxx @@ -98,17 +98,17 @@ void SvxSmartTagsControl::FillMenu() PopupMenu* pSbMenu = mpMenu; if ( 1 < rActionComponentsSequence.getLength() ) { - mpMenu->InsertItem( nMenuId, aSmartTagCaption, 0, nMenuPos++); + mpMenu->InsertItem(nMenuId, aSmartTagCaption, 0, OString(), nMenuPos++); pSbMenu = new PopupMenu; mpMenu->SetPopupMenu( nMenuId++, pSbMenu ); } pSbMenu->SetSelectHdl( LINK( this, SvxSmartTagsControl, MenuSelect ) ); // sub-menu starts with smart tag caption and separator - const rtl::OUString aSmartTagCaption2 = aSmartTagCaption + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(": ")) + aRangeText; + const rtl::OUString aSmartTagCaption2 = aSmartTagCaption + OUString(": ") + aRangeText; nSubMenuPos = 0; - pSbMenu->InsertItem( nMenuId++, aSmartTagCaption2, MIB_NOSELECT, nSubMenuPos++ ); - pSbMenu->InsertSeparator( nSubMenuPos++ ); + pSbMenu->InsertItem(nMenuId++, aSmartTagCaption2, MIB_NOSELECT, OString(), nSubMenuPos++); + pSbMenu->InsertSeparator(OString(), nSubMenuPos++); // Add subitem for every action reference for the current smart tag type: for ( sal_uInt16 i = 0; i < rActionComponents.getLength(); ++i ) @@ -127,7 +127,7 @@ void SvxSmartTagsControl::FillMenu() xController, xTextRange ); - pSbMenu->InsertItem( nSubMenuId++, aActionCaption, 0, nSubMenuPos++ ); + pSbMenu->InsertItem( nSubMenuId++, aActionCaption, 0, OString(), nSubMenuPos++ ); InvokeAction aEntry( xAction, xSmartTagProperties, nActionID ); maInvokeActions.push_back( aEntry ); } |