summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-04-06 20:14:52 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-04-07 08:15:48 +0200
commitf5db3b12ae1cd3bfe6ee5d260aec9532cc65f2dc (patch)
tree60ca122103456e4b3f27eedb4c48f3fbc556f648 /sd/source/ui
parent6240902d996c31c1200fa523f89a419a934cde58 (diff)
sd theme: add UI (sidebar) for shape fill color
This requires extending .uno:FillColor with a new parameter, and then merging that parameter into the fill color item in sd/. The sidebar's color picker already generated these parameters. Change-Id: I83e3c4fc37b8d7bd34f0ef9c0cb96e164f7f0b99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132646 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/view/drviews2.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index bef73c1726d3..2141cc9b1a3c 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -594,6 +594,19 @@ public:
pArgs->Put(aItem);
}
}
+
+ if (nSlot == SID_ATTR_FILL_COLOR)
+ {
+ // Merge the color parameters to the color itself.
+ XFillColorItem aColorItem(
+ *static_cast<const XFillColorItem*>(pArgs->GetItem(SID_ATTR_FILL_COLOR)));
+ if (pArgs->GetItemState(SID_ATTR_COLOR_THEME_INDEX, false, &pItem) == SfxItemState::SET)
+ {
+ auto pIntItem = static_cast<const SfxInt16Item*>(pItem);
+ aColorItem.GetThemeColor().SetThemeIndex(pIntItem->GetValue());
+ }
+ pArgs->Put(aColorItem);
+ }
}
}