summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2022-01-18 12:57:16 +0300
committerMert Tumer <mert.tumer@collabora.com>2022-01-18 13:31:24 +0100
commita9db5edbccf001eec46a76c48c36812930e535a5 (patch)
treeffa11a40208fdd21c4a7281f651eea0dae2b536c
parentSVG export: fix missing custom bullets (diff)
downloadcore-a9db5edbccf001eec46a76c48c36812930e535a5.tar.gz
core-a9db5edbccf001eec46a76c48c36812930e535a5.zip
set active element to -1 when no selection for fontnamebox
FontNameBox sets the currentVal to emptystring when there's a mixed font-name selection on the text but does not update the active_element which is incorrect whereas other comboboxes such as FontSize does it correctly. Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: Iff86bba64c2ab564ff5c5fa979eb846af9651a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128551 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r--include/svtools/ctrlbox.hxx1
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx5
2 files changed, 5 insertions, 1 deletions
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 9cea6647f461..69b5aefac7dd 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -366,6 +366,7 @@ public:
int get_active() const { return m_xComboBox->get_active(); }
OUString get_active_text() const { return m_xComboBox->get_active_text(); }
void set_active_or_entry_text(const OUString& rText);
+ void set_active(int nPos) { m_xComboBox->set_active(nPos); }
int get_count() const { return m_xComboBox->get_count(); }
OUString get_text(int nIndex) const { return m_xComboBox->get_text(nIndex); }
void set_sensitive(bool bSensitive) { m_xComboBox->set_sensitive(bSensitive); }
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 8f8055352695..5e9727ddfe3d 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3032,8 +3032,11 @@ void SvxFontNameBox_Base::statusChanged_Impl( const css::frame::FeatureStateEven
css::awt::FontDescriptor aFontDesc;
if ( rEvent.State >>= aFontDesc )
Update(&aFontDesc);
- else
+ else {
+ // no active element; delete value in the display
+ m_xWidget->set_active(-1);
set_active_or_entry_text("");
+ }
m_xWidget->save_value();
}
}