22 : GenericDialogController(pParent,
"svx/ui/themedialog.ui",
"ThemeDialog")
26 , mxValueSetThemeColorsWindow(
27 new
weld::CustomWeld(*m_xBuilder,
"valueset_theme_colors", *mxValueSetThemeColors))
28 , mxAdd(m_xBuilder->weld_button(
"button_add"))
74 sal_uInt32 nItemId = mxValueSetThemeColors->GetSelectedItemId();
78 sal_uInt32
nIndex = nItemId - 1;
80 if (
nIndex >= maColorSets.size())
83 moCurrentColorSet = std::ref(maColorSets[
nIndex]);
92 auto aColorSet = pDialog->getColorSet();
93 if (!aColorSet.getName().isEmpty())
95 ColorSets::get().insert(aColorSet, ColorSets::IdenticalNameAction::AutoRename);
97 mxValueSetThemeColors->Clear();
101 mxValueSetThemeColors->SelectItem(maColorSets.size() - 1);
102 moCurrentColorSet = std::ref(maColorSets[maColorSets.size() - 1]);
109 if (moCurrentColorSet && mxAdd.get() == &rButton)
111 runThemeColorEditDialog();
Reference< XExecutableDialog > m_xDialog
static const AllSettings & GetSettings()
std::shared_ptr< model::ColorSet > const & getColorSet() const
const std::vector< model::ColorSet > & getColorSetVector() const
static bool runAsync(const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
#define LINK(Instance, Class, Member)
IMPL_LINK(HangulHanjaConversionDialog, ClickByCharacterHdl, weld::Toggleable &, rBox, void)
IMPL_LINK_NOARG(SuggestionDisplay, SelectSuggestionValueSetHdl, ValueSet *, void)
VclPtr< vcl::Window > mpWindow