summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-28 17:04:46 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-01 11:41:04 +0100
commitb54046188c48b7031d0460ebab74125adc97f874 (patch)
tree699f9563f7c120350887749277d9c0294a1fa54a /vcl
parentc77e01d63b4bd4805c4a499e4e0cab917d0eb403 (diff)
weld ScStringInputDlg to native dialog
ScStringInputDlg and SwStringInputDlg do the same thing, but one uses the old name as the label and leaves the new name blank in the entry. The other puts the old name into the entry and autoselects it and uses a normal label. Both are used from the rename button of the shared autoformat dialog. Change-Id: I2ebf09a79f92c3f9020304e23e8907b67c06cd35 Reviewed-on: https://gerrit.libreoffice.org/50525 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/salvtables.cxx5
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx5
2 files changed, 10 insertions, 0 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index a2b5b13d15fc..8f8be139261a 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -757,6 +757,11 @@ public:
m_xEntry->SetWidthInChars(nChars);
}
+ virtual void select_region(int nStartPos, int nEndPos) override
+ {
+ m_xEntry->SetSelection(Selection(nStartPos, nEndPos < 0 ? SELECTION_MAX : nEndPos));
+ }
+
virtual ~SalInstanceEntry() override
{
m_xEntry->SetTextFilter(nullptr);
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index c36895fffce1..5165ef70fd6e 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1867,6 +1867,11 @@ public:
gtk_entry_set_width_chars(m_pEntry, nChars);
}
+ virtual void select_region(int nStartPos, int nEndPos) override
+ {
+ gtk_editable_select_region(GTK_EDITABLE(m_pEntry), nStartPos, nEndPos);
+ }
+
virtual ~GtkInstanceEntry() override
{
g_signal_handler_disconnect(m_pEntry, m_nInsertTextSignalId);