summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-13 13:28:47 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-13 20:55:46 +0100
commit3b8c42a94b5448364d47daa103b3452f54990524 (patch)
tree36c281fdcd34355a2c080d4a4aa2f84cdc802fad /vcl/source
parent8eab16d46f0c70cf9f7afb307ab4a56c49919ac4 (diff)
weld FindTextFieldControl
Change-Id: Ib5861855d37c72d2be2b11b77173a141db90444e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88614 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/salvtables.cxx21
-rw-r--r--vcl/source/control/combobox.cxx2
2 files changed, 23 insertions, 0 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 5b1c40cc44da..4eca514388d3 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3507,6 +3507,11 @@ public:
weld::Entry::connect_cursor_position(rLink);
}
+ virtual void set_placeholder_text(const OUString& rText) override
+ {
+ m_xEntry->SetPlaceholderText(rText);
+ }
+
Edit& getEntry()
{
return *m_xEntry;
@@ -6217,6 +6222,11 @@ public:
assert(false);
}
+ virtual void set_entry_placeholder_text(const OUString&) override
+ {
+ assert(false);
+ }
+
virtual ~SalInstanceComboBoxWithoutEdit() override
{
m_xComboBox->SetSelectHdl(Link<ListBox&, void>());
@@ -6323,6 +6333,11 @@ public:
m_xComboBox->EnableAutocomplete(bEnable, bCaseSensitive);
}
+ virtual void set_entry_placeholder_text(const OUString& rText) override
+ {
+ m_xComboBox->SetPlaceholderText(rText);
+ }
+
virtual void select_entry_region(int nStartPos, int nEndPos) override
{
m_xComboBox->SetSelection(Selection(nStartPos, nEndPos < 0 ? SELECTION_MAX : nEndPos));
@@ -6405,6 +6420,12 @@ public:
rEntry.SetAutocompleteHdl(Link<Edit&, void>());
}
+ virtual void set_entry_placeholder_text(const OUString& rText) override
+ {
+ Edit& rEntry = m_pEntry->getEntry();
+ rEntry.SetPlaceholderText(rText);
+ }
+
virtual void grab_focus() override { m_xEntry->grab_focus(); }
virtual void connect_focus_in(const Link<Widget&, void>& rLink) override
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 03b44f36e880..6bc591f3cf2a 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -1549,6 +1549,8 @@ bool ComboBox::set_property(const OString &rKey, const OUString &rValue)
nBits |= WB_TABSTOP;
SetStyle(nBits);
}
+ else if (rKey == "placeholder-text")
+ SetPlaceholderText(rValue);
else
return Control::set_property(rKey, rValue);
return true;