summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-05-30 11:35:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-05-30 15:47:20 +0100
commitdd2a2abadd32423bb46f6163eb3525e448edbda0 (patch)
treed046aa48bd3bb24da38744bd5e8eaece32e4ec11
parent33a49289dfdba94c92dfd466635c4c663e916848 (diff)
replace ImplConvertMenuString now
Change-Id: Ib68b711fb98a917c2d40d0a659353e3983a3766e
-rw-r--r--include/vcl/toolbox.hxx1
-rw-r--r--vcl/source/window/toolbox2.cxx15
2 files changed, 5 insertions, 11 deletions
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 0ce31f36f1e5..c7b6a8dae884 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -180,7 +180,6 @@ private:
using Window::ImplInvalidate;
SAL_DLLPRIVATE void ImplInvalidate( bool bNewCalc = false, bool bFullPaint = false );
SAL_DLLPRIVATE void ImplUpdateItem( sal_uInt16 nIndex = 0xFFFF );
- SAL_DLLPRIVATE const OUString ImplConvertMenuString( const OUString& rStr );
SAL_DLLPRIVATE bool ImplHandleMouseMove( const MouseEvent& rMEvt, bool bRepeat = false );
SAL_DLLPRIVATE bool ImplHandleMouseButtonUp( const MouseEvent& rMEvt, bool bCancel = false );
SAL_DLLPRIVATE void ImplChangeHighlight( ImplToolItem* pItem, bool bNoGrabFocus = false );
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 3b0cd6101ae2..0bbd7c4c09e4 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -335,11 +335,6 @@ bool ImplToolItem::IsItemHidden() const
return ( meType == ToolBoxItemType::BUTTON && !mbVisible );
}
-const OUString ToolBox::ImplConvertMenuString( const OUString& rStr )
-{
- return MnemonicGenerator::EraseAllMnemonicChars(rStr);
-}
-
void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint )
{
ImplUpdateInputEnable();
@@ -473,7 +468,7 @@ void ToolBox::InsertItem( const ResId& rResId )
if ( nObjMask & RSC_TOOLBOXITEM_TEXT )
{
aItem.maText = ReadStringRes();
- aItem.maText = ImplConvertMenuString( aItem.maText );
+ aItem.maText = MnemonicGenerator::EraseAllMnemonicChars(aItem.maText);
}
if ( nObjMask & RSC_TOOLBOXITEM_HELPTEXT )
aItem.maHelpText = ReadStringRes();
@@ -566,7 +561,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, const OUStrin
// create item and add to list
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(),
- ImplToolItem( nItemId, rImage, ImplConvertMenuString( rText ), nBits ) );
+ ImplToolItem( nItemId, rImage, MnemonicGenerator::EraseAllMnemonicChars(rText), nBits ) );
SetItemImage(nItemId, rImage);
mpData->ImplClearLayoutData();
@@ -585,7 +580,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const OUString& rText, ToolBoxItem
// create item and add to list
mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(),
- ImplToolItem( nItemId, ImplConvertMenuString( rText ), nBits ) );
+ ImplToolItem( nItemId, MnemonicGenerator::EraseAllMnemonicChars(rText), nBits ) );
mpData->ImplClearLayoutData();
ImplInvalidate( true );
@@ -1266,7 +1261,7 @@ void ToolBox::SetItemText( sal_uInt16 nItemId, const OUString& rText )
((meButtonType != ButtonType::SYMBOLONLY) || !pItem->maImage) )
{
long nOldWidth = GetCtrlTextWidth( pItem->maText );
- pItem->maText = ImplConvertMenuString( rText );
+ pItem->maText = MnemonicGenerator::EraseAllMnemonicChars(rText);
mpData->ImplClearLayoutData();
if ( nOldWidth != GetCtrlTextWidth( pItem->maText ) )
ImplInvalidate( true );
@@ -1274,7 +1269,7 @@ void ToolBox::SetItemText( sal_uInt16 nItemId, const OUString& rText )
ImplUpdateItem( nPos );
}
else
- pItem->maText = ImplConvertMenuString( rText );
+ pItem->maText = MnemonicGenerator::EraseAllMnemonicChars(rText);
// Notify button changed event to prepare accessibility bridge
CallEventListeners( VCLEVENT_TOOLBOX_BUTTONSTATECHANGED, reinterpret_cast< void* >( nPos ) );