diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-09-14 14:43:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-09-17 10:02:23 +0200 |
commit | 2419fa71d8b2223a50f596d5db7721f6213d4f87 (patch) | |
tree | 5e85620bd2b8087d60649e6cb6da269e737f5fcf /include | |
parent | cppcheck: knownConditionTrueFalse in chart2 (diff) | |
download | core-2419fa71d8b2223a50f596d5db7721f6213d4f87.tar.gz core-2419fa71d8b2223a50f596d5db7721f6213d4f87.zip |
add image support to weld::ComboBoxText
Change-Id: Ie7f00ed4aef5318a525a526d0377bb7952bdd5a0
Reviewed-on: https://gerrit.libreoffice.org/60499
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/langbox.hxx | 1 | ||||
-rw-r--r-- | include/vcl/weld.hxx | 23 |
2 files changed, 16 insertions, 8 deletions
diff --git a/include/svx/langbox.hxx b/include/svx/langbox.hxx index 723957c54e35..3ce7a3e43554 100644 --- a/include/svx/langbox.hxx +++ b/include/svx/langbox.hxx @@ -161,6 +161,7 @@ private: std::unique_ptr<weld::ComboBoxText> m_xControl; Link<weld::ComboBoxText&, void> m_aChangeHdl; OUString m_aAllString; + std::unique_ptr<css::uno::Sequence<sal_Int16>> m_xSpellUsedLang; LanguageType m_eSavedLanguage; EditedAndValid m_eEditedAndValid; bool m_bHasLangNone; diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index b74df5232c4f..b5fac32ca461 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -257,8 +257,13 @@ protected: public: virtual void insert_text(int pos, const OUString& rStr) = 0; void append_text(const OUString& rStr) { insert_text(-1, rStr); } - virtual void insert(int pos, const OUString& rId, const OUString& rStr) = 0; - void append(const OUString& rId, const OUString& rStr) { insert(-1, rId, rStr); } + virtual void insert(int pos, const OUString& rId, const OUString& rStr, const OUString* pImage) + = 0; + void append(const OUString& rId, const OUString& rStr) { insert(-1, rId, rStr, nullptr); } + void append(const OUString& rId, const OUString& rStr, const OUString& rImage) + { + insert(-1, rId, rStr, &rImage); + } virtual int get_count() const = 0; virtual void make_sorted() = 0; @@ -315,12 +320,13 @@ protected: public: virtual void insert_text(const OUString& rText, int pos) = 0; - virtual void append_text(const OUString& rText) { insert_text(rText, -1); } - virtual void insert(int pos, const OUString& rId, const OUString& rStr, const OUString& rImage) + virtual void insert(int pos, const OUString& rId, const OUString& rStr, const OUString* pImage) = 0; - virtual void append(const OUString& rId, const OUString& rStr, const OUString& rImage) + void append_text(const OUString& rText) { insert_text(rText, -1); } + void append(const OUString& rId, const OUString& rStr) { insert(-1, rId, rStr, nullptr); } + void append(const OUString& rId, const OUString& rStr, const OUString& rImage) { - insert(-1, rId, rStr, rImage); + insert(-1, rId, rStr, &rImage); } virtual int n_children() const = 0; @@ -611,9 +617,10 @@ public: { m_xTreeView->insert_text(rStr, pos); } - virtual void insert(int pos, const OUString& rId, const OUString& rStr) override + virtual void insert(int pos, const OUString& rId, const OUString& rStr, + const OUString* pImage) override { - m_xTreeView->insert(pos, rId, rStr, OUString()); + m_xTreeView->insert(pos, rId, rStr, pImage); } virtual int get_count() const override { return m_xTreeView->n_children(); } |