summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 ) );