From 4bbbd15fb8e8269a8bdfd188d3ca2a2a84c00922 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 17 Dec 2021 09:19:20 +0100 Subject: sd theme: add a "theme" palette to the color picker This implements listing the current theme colors (which depend on what is the master page of the current slide) in the color picker and also allows picking those colors. The colors are picked as-is for now, not yet setting the color theme index in the document model. Change-Id: I2553725c29c2a9f9de80f86b38d22a06bf9c0364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126994 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- svx/source/styles/ColorSets.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'svx/source/styles') diff --git a/svx/source/styles/ColorSets.cxx b/svx/source/styles/ColorSets.cxx index 30a9dd423d78..c77e6ccf2d76 100644 --- a/svx/source/styles/ColorSets.cxx +++ b/svx/source/styles/ColorSets.cxx @@ -312,6 +312,21 @@ void Theme::UpdateSdrPage(SdrPage* pPage) } } +std::vector Theme::GetColors() const +{ + if (!mpColorSet) + { + return {}; + } + + std::vector aColors; + for (size_t i = 0; i < 12; ++i) + { + aColors.push_back(mpColorSet->getColor(i)); + } + return aColors; +} + } // end of namespace svx /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit