summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
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 )