[Libreoffice-commits] core.git: include/vcl vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Aug 7 08:06:07 UTC 2020


 include/vcl/treelistbox.hxx         |   15 ---------------
 vcl/source/treelist/svlbitm.cxx     |    2 --
 vcl/source/treelist/treelistbox.cxx |   24 ------------------------
 3 files changed, 41 deletions(-)

New commits:
commit 045847237d5a40b2679d53533db4937aa1c9ac3e
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Aug 6 16:49:43 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Aug 7 10:05:19 2020 +0200

    nothing calls EnableEntryMnemonics anymore
    
    Change-Id: I8ef10b4d2f350b4025e46a153766d60510d1b7d0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100262
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/treelistbox.hxx b/include/vcl/treelistbox.hxx
index 16f2227f5d4c..b3d4ffb05dac 100644
--- a/include/vcl/treelistbox.hxx
+++ b/include/vcl/treelistbox.hxx
@@ -396,21 +396,6 @@ public:
 
     void            Clear();
 
-    /** Enables or disables mnemonic characters in the entry texts.
-
-        If mnemonics are enabled, then entries are selected and made current when
-        there mnemonic character is pressed. If there are multiple entries with the
-        same mnemonic, the selection cycles between them.
-
-        Entries with a collapsed ancestor are not included in the calculation of
-        mnemonics. That is, if you press the accelerator key of an invisible
-        entry, then this entry is *not* selected.
-
-        Be aware that enabling mnemonics gets more expensive as you add to the list.
-    */
-    void            EnableEntryMnemonics();
-    bool            IsEntryMnemonicsEnabled() const;
-
     bool            TextCenterAndClipEnabled() const { return mbCenterAndClipText; }
 
     /** Handles the given key event.
diff --git a/vcl/source/treelist/svlbitm.cxx b/vcl/source/treelist/svlbitm.cxx
index 6467efcbf8ff..3d456710fbb9 100644
--- a/vcl/source/treelist/svlbitm.cxx
+++ b/vcl/source/treelist/svlbitm.cxx
@@ -226,8 +226,6 @@ void SvLBoxString::Paint(
     }
 
     Size aSize;
-    if (rDev.IsEntryMnemonicsEnabled())
-        nStyle |= DrawTextFlags::Mnemonic;
     if (rDev.TextCenterAndClipEnabled())
     {
         nStyle |= DrawTextFlags::PathEllipsis | DrawTextFlags::Center;
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 4776f6b3634b..af55a6ff1133 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -379,20 +379,15 @@ int SvLBoxItem::CalcWidth(const SvTreeListBox* /*pView*/) const
 
 struct SvTreeListBoxImpl
 {
-    bool m_bEntryMnemonicsEnabled:1;
     bool m_bDoingQuickSelection:1;
 
-    vcl::MnemonicEngine m_aMnemonicEngine;
     vcl::QuickSelectionEngine m_aQuickSelectionEngine;
 
     explicit SvTreeListBoxImpl(SvTreeListBox& _rBox) :
-        m_bEntryMnemonicsEnabled(false),
         m_bDoingQuickSelection(false),
-        m_aMnemonicEngine(_rBox),
         m_aQuickSelectionEngine(_rBox) {}
 };
 
-
 SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) :
     Control(pParent, nWinStyle | WB_CLIPCHILDREN),
     DropTargetHelper(this),
@@ -430,20 +425,6 @@ void SvTreeListBox::Clear()
         pModel->Clear();  // Model calls SvTreeListBox::ModelHasCleared()
 }
 
-void SvTreeListBox::EnableEntryMnemonics()
-{
-    if ( IsEntryMnemonicsEnabled() )
-        return;
-
-    mpImpl->m_bEntryMnemonicsEnabled = true;
-    Invalidate();
-}
-
-bool SvTreeListBox::IsEntryMnemonicsEnabled() const
-{
-    return mpImpl->m_bEntryMnemonicsEnabled;
-}
-
 IMPL_LINK( SvTreeListBox, CloneHdl_Impl, SvTreeListEntry*, pEntry, SvTreeListEntry* )
 {
     return CloneEntry(pEntry);
@@ -1042,11 +1023,6 @@ bool SvTreeListBox::HandleKeyInput( const KeyEvent& _rKEvt )
     if ( _rKEvt.GetKeyCode().IsMod1() )
         return false;
 
-    if  (   IsEntryMnemonicsEnabled()
-        &&  mpImpl->m_aMnemonicEngine.HandleKeyEvent( _rKEvt )
-        )
-        return true;
-
     if (mbQuickSearch)
     {
         mpImpl->m_bDoingQuickSelection = true;


More information about the Libreoffice-commits mailing list