summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2018-08-23 17:07:17 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-08-24 09:18:15 +0200
commitdb6f17dc09b49ecbe89cbb99de71c069c029e052 (patch)
treecff9786cf8223c91a9f21387e4ecf8fcb470284d
parentfcb8ee70824acace8fbe2357eaeba52ad9b7332f (diff)
tdf#119303 Preselect text in input field dialog
The text was no longer preselected since the dialog was welded in commit c8780642a5e8dc0bdcc97940ee7d9cacdc64c928 . Change-Id: I282336cf68ad4b363d5148f0f48f5f426826ed66 Reviewed-on: https://gerrit.libreoffice.org/59521 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/ui/fldui/inpdlg.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/ui/fldui/inpdlg.cxx b/sw/source/ui/fldui/inpdlg.cxx
index affd29d224c2..f0bbfbd22bda 100644
--- a/sw/source/ui/fldui/inpdlg.cxx
+++ b/sw/source/ui/fldui/inpdlg.cxx
@@ -103,6 +103,10 @@ SwFieldInputDlg::SwFieldInputDlg(weld::Window *pParent, SwWrtShell &rS,
if( !aStr.isEmpty() )
m_xEditED->set_text(convertLineEnd(aStr, GetSystemLineEnd()));
m_xEditED->grab_focus();
+
+ // preselect all text to allow quickly changing the content
+ if (bEnable)
+ m_xEditED->select_region(0, m_xEditED->get_text().getLength());
}
SwFieldInputDlg::~SwFieldInputDlg()