diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-12-15 08:41:01 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-12-15 09:33:04 +0100 |
commit | c634f836945379ae17a3714938210bba7995dd25 (patch) | |
tree | 1744b38e18d6a3ea6171fe062594a8504f31cf65 /cui/source | |
parent | 453c5b6214654b440fe1d3e926cddfb695e17f10 (diff) |
sd theme: add UI to set/get the name of a color set
The two names make sense because the theme can have not only color sets
but also font names, etc -- but for now we just care about the theme
name and a named color set.
Change-Id: Ieafca36da005a9c74964e39216bee3c33f6427cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126850
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/inc/themepage.hxx | 1 | ||||
-rw-r--r-- | cui/source/tabpages/themepage.cxx | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/cui/source/inc/themepage.hxx b/cui/source/inc/themepage.hxx index 6596cd227244..613650c075b6 100644 --- a/cui/source/inc/themepage.hxx +++ b/cui/source/inc/themepage.hxx @@ -21,6 +21,7 @@ class SvxThemePage : public SfxTabPage static const WhichRangesContainer m_pRanges; std::unique_ptr<weld::Entry> m_xThemeName; + std::unique_ptr<weld::Entry> m_xColorSetName; public: SvxThemePage(weld::Container* pPage, weld::DialogController* pController, diff --git a/cui/source/tabpages/themepage.cxx b/cui/source/tabpages/themepage.cxx index 4c2cd18716b9..99abeed799fb 100644 --- a/cui/source/tabpages/themepage.cxx +++ b/cui/source/tabpages/themepage.cxx @@ -27,6 +27,7 @@ SvxThemePage::SvxThemePage(weld::Container* pPage, weld::DialogController* pCont const SfxItemSet& rInAttrs) : SfxTabPage(pPage, pController, "cui/ui/themetabpage.ui", "ThemePage", &rInAttrs) , m_xThemeName(m_xBuilder->weld_entry("themeName")) + , m_xColorSetName(m_xBuilder->weld_entry("colorSetName")) { } @@ -57,6 +58,14 @@ void SvxThemePage::Reset(const SfxItemSet* pAttrs) it->second >>= aName; m_xThemeName->set_text(aName); } + + it = aMap.find("ColorSchemeName"); + if (it != aMap.end()) + { + OUString aName; + it->second >>= aName; + m_xColorSetName->set_text(aName); + } } bool SvxThemePage::FillItemSet(SfxItemSet* pAttrs) @@ -76,6 +85,7 @@ bool SvxThemePage::FillItemSet(SfxItemSet* pAttrs) } aMap["Name"] <<= m_xThemeName->get_text(); + aMap["ColorSchemeName"] <<= m_xColorSetName->get_text(); beans::PropertyValues aTheme = aMap.getAsConstPropertyValueList(); aGrabBagItem.GetGrabBag()["Theme"] <<= aTheme; |