summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNickson Thanda <nicksonthanda10@msn.com>2018-07-03 13:54:40 +0100
committerMuhammet Kara <muhammet.kara@pardus.org.tr>2018-07-19 13:03:33 +0200
commit11b60b16739bfd88cc6f9f16834870a296921883 (patch)
tree2a88e6fa2c9aad772c1c770a595aa43caac8f25a /vcl
parent9f01dca60e6539f48cd529180f0d64c2131e0ea1 (diff)
tdf#108012 - Clicking in the font field should select the contents
Change-Id: I1276976e031b419ca5cc3cc8e848f2af58ce4cfb Reviewed-on: https://gerrit.libreoffice.org/56865 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/combobox.cxx5
-rw-r--r--vcl/source/control/edit.cxx12
2 files changed, 15 insertions, 2 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 4508d34022fc..92ae580010f6 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -507,7 +507,10 @@ void ComboBox::EnableAutoSize( bool bAuto )
}
}
}
-
+void ComboBox::EnableSelectAll()
+{
+ m_pImpl->m_pSubEdit->SetSelectAllSingleClick(true);
+}
void ComboBox::EnableDDAutoWidth( bool b )
{
if (m_pImpl->m_pFloatWin)
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 1283b28d710b..108ce15a984f 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -272,6 +272,7 @@ void Edit::ImplInitEditData()
mbModified = false;
mbInternModified = false;
mbReadOnly = false;
+ mbSelectAllSingleClick = false;
mbInsertMode = true;
mbClickedInSelection = false;
mbActivePopup = false;
@@ -1318,7 +1319,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.GetClicks() < 4 )
{
mbClickedInSelection = false;
- if ( rMEvt.GetClicks() == 3 )
+ if ( rMEvt.GetClicks() == 3 || mbSelectAllSingleClick )
{
ImplSetSelection( Selection( 0, EDIT_NOLIMIT) );
ImplCopyToSelectionClipboard();
@@ -2413,6 +2414,15 @@ void Edit::SetReadOnly( bool bReadOnly )
}
}
+void Edit::SetSelectAllSingleClick( bool bSelectAllSingleClick )
+{
+ if ( mbSelectAllSingleClick != bSelectAllSingleClick )
+ {
+ mbSelectAllSingleClick = bSelectAllSingleClick;
+ if ( mpSubEdit )
+ mpSubEdit->SetSelectAllSingleClick( bSelectAllSingleClick );
+ }
+}
void Edit::SetInsertMode( bool bInsert )
{
if ( bInsert != mbInsertMode )