diff options
author | Balazs Varga <balazs.varga.extern@allotropia.de> | 2022-07-25 18:03:49 +0200 |
---|---|---|
committer | Balazs Varga <balazs.varga.extern@allotropia.de> | 2022-07-29 08:53:49 +0200 |
commit | fe2d59a0730e60c0196baa46af12440afd343878 (patch) | |
tree | e627745273cc638e5f855b650067f485dcaddef7 /include/vcl | |
parent | 4f61276dae10fdaf2ed33ab23d98adbe311cb7ee (diff) |
tdf#150100 sc import and UI: fix double cell border dialog
Hide "Hairline (0.05pt)", "Very thin (0.5pt)" and "Thin (0.75pt)"
predefined border types for Double cell borders, because it has a
minimum thickness 1.1pt, which means, we cannot allow to select them.
Also setting the Medium (1.5pt) predefined thickness to the border
width for Double borders as the thinnest possible predefined value.
TODO: tdf#146466: Inconsistent choices of borders between toolbar and sidebar
Change-Id: I46ccb206835a34a6dfaa39e63e614bb01bc6b02e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137441
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Diffstat (limited to 'include/vcl')
-rw-r--r-- | include/vcl/weld.hxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 3d275fe75967..37d65d83cb4e 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -698,6 +698,7 @@ class VCL_DLLPUBLIC ComboBox : virtual public Widget { private: OUString m_sSavedValue; + std::vector<OUString> m_aSavedValues; public: // OUString is the id of the row, it may be null to measure the height of a generic line @@ -749,6 +750,10 @@ public: { insert(-1, rStr, &rId, nullptr, &rImage); } + void append(int pos, const OUString& rId, const OUString& rStr) + { + insert(pos, rStr, &rId, nullptr, nullptr); + } virtual void insert_separator(int pos, const OUString& rId) = 0; void append_separator(const OUString& rId) { insert_separator(-1, rId); } @@ -825,8 +830,23 @@ public: void connect_entry_activate(const Link<ComboBox&, bool>& rLink) { m_aEntryActivateHdl = rLink; } void save_value() { m_sSavedValue = get_active_text(); } + + void save_values_by_id(const OUString& rId) + { + m_aSavedValues.push_back(get_text(find_id(rId))); + } + OUString const& get_saved_value() const { return m_sSavedValue; } + OUString const& get_saved_values(int pos) const { return m_aSavedValues[pos]; } bool get_value_changed_from_saved() const { return m_sSavedValue != get_active_text(); } + bool get_values_changed_from_saved() const + { + return !m_aSavedValues.empty() + && std::find(m_aSavedValues.begin(), m_aSavedValues.end(), get_active_text()) + == m_aSavedValues.end(); + } + + void removeSavedValues() { m_aSavedValues.clear(); } // for custom rendering a row void connect_custom_get_size(const Link<vcl::RenderContext&, Size>& rLink) |