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 mpCurrentColorSet = std::make_shared<model::ColorSet>(maColorSets[
nIndex]);
89 std::shared_ptr<DialogController> xKeepAlive(shared_from_this());
93 mxAdd->set_sensitive(
true);
96 auto aColorSet = pDialog->getColorSet();
97 if (!aColorSet.getName().isEmpty())
99 ColorSets::get().insert(aColorSet, ColorSets::IdenticalNameAction::AutoRename);
101 mxValueSetThemeColors->Clear();
105 mxValueSetThemeColors->SelectItem(maColorSets.size() - 1);
107 = std::make_shared<model::ColorSet>(maColorSets[maColorSets.size() - 1]);
109 mxAdd->set_sensitive(
true);
115 if (mpCurrentColorSet && mxAdd.get() == &rButton)
117 runThemeColorEditDialog();
118 mxAdd->set_sensitive(
false);
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