Kaydet (Commit) 75a5dfec authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt

tdf#86886 Shortcut keys missing in undo and redo tooltips

Change-Id: I8df003bdad4430a174815ce51197b997717ef379
üst 2af4da0e
......@@ -56,7 +56,7 @@ public:
class SVX_DLLPUBLIC SvxUndoRedoControl : public SvxListBoxControl
{
std::vector< OUString > aUndoRedoList;
OUString aDefaultText;
OUString aDefaultTooltip;
public:
SFX_DECL_TOOLBOX_CONTROL();
......
......@@ -224,7 +224,7 @@ SvxUndoRedoControl::SvxUndoRedoControl( sal_uInt16 nSlotId, sal_uInt16 nId, Tool
{
rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
rTbx.Invalidate();
aDefaultText = MnemonicGenerator::EraseAllMnemonicChars( rTbx.GetItemText( nId ) );
aDefaultTooltip = rTbx.GetQuickHelpText( nId );
}
SvxUndoRedoControl::~SvxUndoRedoControl()
......@@ -239,13 +239,13 @@ void SvxUndoRedoControl::StateChanged(
if ( eState == SfxItemState::DISABLED )
{
ToolBox& rBox = GetToolBox();
rBox.SetQuickHelpText( GetId(), aDefaultText );
rBox.SetQuickHelpText( GetId(), aDefaultTooltip );
}
else if ( pState && dynamic_cast<const SfxStringItem*>( pState) != nullptr )
{
const SfxStringItem& rItem = *static_cast<const SfxStringItem *>(pState);
ToolBox& rBox = GetToolBox();
OUString aQuickHelpText = MnemonicGenerator::EraseAllMnemonicChars( rItem.GetValue() );
OUString aQuickHelpText = rItem.GetValue();
rBox.SetQuickHelpText( GetId(), aQuickHelpText );
}
SvxListBoxControl::StateChanged( nSID, eState, pState );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment