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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Oct 18 09:25:44 UTC 2018


 svtools/source/control/ctrlbox.cxx |    1 +
 vcl/source/control/edit.cxx        |    8 ++++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 9b0e098a785165cd9ec28c60505b60e62c3e59dc
Author:     Nickson <nicksonthanda10 at msn.com>
AuthorDate: Wed Sep 19 23:13:56 2018 +0100
Commit:     Heiko Tietze <tietze.heiko at gmail.com>
CommitDate: Thu Oct 18 11:24:38 2018 +0200

    tdf#119847 - Can now autoselect font size on first click
    
    Change-Id: Id49f4d039f0eb7c4efccecda91bd656c1c31d497
    Reviewed-on: https://gerrit.libreoffice.org/60784
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <tietze.heiko at gmail.com>

diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 4044ad61da84..bad8ecee665d 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1242,6 +1242,7 @@ void SvtFontStyleBox::Fill( const OUString& rName, const FontList* pList )
 FontSizeBox::FontSizeBox( vcl::Window* pParent, WinBits nWinSize ) :
     MetricBox( pParent, nWinSize )
 {
+    EnableSelectAll();
     ImplInit();
 }
 
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 3688f9c3374d..895d35cef5e7 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1310,7 +1310,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
     if ( rMEvt.GetClicks() < 4 )
     {
         mbClickedInSelection = false;
-        if ( rMEvt.GetClicks() == 3 || mbSelectAllSingleClick )
+        if ( rMEvt.GetClicks() == 3 )
         {
             ImplSetSelection( Selection( 0, EDIT_NOLIMIT) );
             ImplCopyToSelectionClipboard();
@@ -1835,7 +1835,11 @@ void Edit::GetFocus()
     else if ( !mbActivePopup )
     {
         maUndoText = maText.toString();
-
+        if(mbSelectAllSingleClick)
+        {
+            maSelection.Min() = 0;
+            maSelection.Max() = maText.getLength();
+        }
         SelectionOptions nSelOptions = GetSettings().GetStyleSettings().GetSelectionOptions();
         if ( !( GetStyle() & (WB_NOHIDESELECTION|WB_READONLY) )
                 && ( GetGetFocusFlags() & (GetFocusFlags::Init|GetFocusFlags::Tab|GetFocusFlags::CURSOR|GetFocusFlags::Mnemonic) ) )


More information about the Libreoffice-commits mailing list