diff options
-rw-r--r-- | include/vcl/rendercontext/DrawTextFlags.hxx | 3 | ||||
-rw-r--r-- | vcl/source/control/ctrl.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/mtfxmldump.cxx | 2 | ||||
-rw-r--r-- | vcl/source/outdev/text.cxx | 8 |
4 files changed, 3 insertions, 16 deletions
diff --git a/include/vcl/rendercontext/DrawTextFlags.hxx b/include/vcl/rendercontext/DrawTextFlags.hxx index e393bcd2ceaa..4eb4c45b60f9 100644 --- a/include/vcl/rendercontext/DrawTextFlags.hxx +++ b/include/vcl/rendercontext/DrawTextFlags.hxx @@ -41,11 +41,10 @@ enum class DrawTextFlags NewsEllipsis = 0x00004000, WordBreakHyphenation = 0x00008000 | WordBreak, CenterEllipsis = 0x00010000, - HideMnemonic = 0x00020000, }; namespace o3tl { -template <> struct typed_flags<DrawTextFlags> : is_typed_flags<DrawTextFlags, 0x3ffff> +template <> struct typed_flags<DrawTextFlags> : is_typed_flags<DrawTextFlags, 0x1ffff> { }; } diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 43b3a2ee659d..e87b587418ff 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -434,10 +434,7 @@ tools::Rectangle Control::DrawControlText( OutputDevice& _rTargetDevice, const t bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel; if (autoacc && !mbShowAccelerator) - { rPStr = removeMnemonicFromString( _rStr ); - nPStyle &= ~DrawTextFlags::HideMnemonic; - } if( !GetReferenceDevice() || ( GetReferenceDevice() == &_rTargetDevice ) ) { @@ -459,10 +456,7 @@ tools::Rectangle Control::GetControlTextRect( OutputDevice& _rTargetDevice, cons bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel; if (autoacc && !mbShowAccelerator) - { rPStr = removeMnemonicFromString( _rStr ); - nPStyle &= ~DrawTextFlags::HideMnemonic; - } if ( !GetReferenceDevice() || ( GetReferenceDevice() == &_rTargetDevice ) ) { diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx index 1b85e23fb584..8726316324de 100644 --- a/vcl/source/gdi/mtfxmldump.cxx +++ b/vcl/source/gdi/mtfxmldump.cxx @@ -114,8 +114,6 @@ OUString convertDrawTextFlagsToString(DrawTextFlags eDrawTextFlags) aStrings.emplace_back("WordBreakHyphenation"); if (eDrawTextFlags & DrawTextFlags::CenterEllipsis) aStrings.emplace_back("CenterEllipsis"); - if (eDrawTextFlags & DrawTextFlags::HideMnemonic) - aStrings.emplace_back("HideMnemonic"); OUString aString; diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 587f98e10010..2c5f9aae06aa 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -2240,8 +2240,6 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr, } } - bool autoacc = ImplGetSVData()->maNWFData.mbAutoAccel; - if ( nStyle & DrawTextFlags::Disable && ! pVector ) { Color aOldTextColor; @@ -2278,8 +2276,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr, SetTextColor( GetSettings().GetStyleSettings().GetDisableColor() ); DrawText( rPos, aStr, nIndex, nLen, pVector, pDisplayText ); - if (!(GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::NoMnemonics) - && (!autoacc || !(nStyle & DrawTextFlags::HideMnemonic)) ) + if (!(GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::NoMnemonics)) { if ( nMnemonicPos != -1 ) ImplDrawMnemonicLine( nMnemonicX, nMnemonicY, nMnemonicWidth ); @@ -2291,8 +2288,7 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr, else { DrawText( rPos, aStr, nIndex, nLen, pVector, pDisplayText, pGlyphs ); - if ( !(GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::NoMnemonics) && !pVector - && (!autoacc || !(nStyle & DrawTextFlags::HideMnemonic)) ) + if ( !(GetSettings().GetStyleSettings().GetOptions() & StyleSettingsOptions::NoMnemonics) && !pVector ) { if ( nMnemonicPos != -1 ) ImplDrawMnemonicLine( nMnemonicX, nMnemonicY, nMnemonicWidth ); |