diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-03-09 10:26:54 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-03-09 13:25:56 +0100 |
commit | 633b2f4dffedaf4a162a5fa92eeaeb509efab173 (patch) | |
tree | 56b0ee015b834444da703fb7779d4b171c22c5a1 /svtools | |
parent | ad85d0503bdce3f4a7f8be3dc571343f5b7afdc6 (diff) |
save/restore the entry text of the fontsize widget
instead of its value, because the min value is 2, but we set
empty text to indicate multiple values are selected in the underlying
text.
Change-Id: If4232b500cd177a264aa5e6ca0537021483db95f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90208
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 04b586a82253..4ad49c2fc976 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -868,6 +868,11 @@ FontSizeBox::FontSizeBox(std::unique_ptr<weld::ComboBox> p) m_xComboBox->connect_changed(LINK(this, FontSizeBox, ModifyHdl)); } +void FontSizeBox::set_entry_text(const OUString& rText) +{ + m_xComboBox->set_entry_text(rText); +} + IMPL_LINK(FontSizeBox, ReformatHdl, weld::Widget&, rWidget, void) { FontSizeNames aFontSizeNames(Application::GetSettings().GetUILanguageTag().getLanguageType()); @@ -1157,8 +1162,7 @@ void FontSizeBox::SetValue(int nNewValue, FieldUnit eInUnit) const int nFound = m_xComboBox->find_text(aResult); if (nFound != -1) m_xComboBox->set_active(nFound); - else - m_xComboBox->set_entry_text(aResult); + m_xComboBox->set_entry_text(aResult); } void FontSizeBox::set_value(int nNewValue) |