diff options
author | Sarper Akdemir <sarper.akdemir@collabora.com> | 2021-09-13 09:47:11 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-11-18 17:17:43 +0100 |
commit | 6ce8066af743b172d36046a8dc8b17ebe010b6cf (patch) | |
tree | c27c1699e29f0a3a8340adbbf1c7704ebb54c866 /include | |
parent | f4d59ec73682f06fff9f718b3347726f1d53d263 (diff) |
import pptx color schemes as color sets
initial import work for color sets.
Themes (which we get the color schemes from) in MSO can
be different for each master - will need to support that too.
[ Miklos: actually added that per-master-page support. ]
(cherry picked from commit 3b21d166f585dcdf8d576d166aeff3cfd4694aab,
from the feature/themesupport2 branch)
Change-Id: Ia06d2645018e6bfa70817bbddba2374641ae13dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125477
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/oox/drawingml/theme.hxx | 5 | ||||
-rw-r--r-- | include/svx/svdpage.hxx | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/oox/drawingml/theme.hxx b/include/oox/drawingml/theme.hxx index 944e58b6e79c..6222a4264451 100644 --- a/include/oox/drawingml/theme.hxx +++ b/include/oox/drawingml/theme.hxx @@ -32,6 +32,7 @@ #include <sal/types.h> namespace com::sun::star { + namespace drawing { class XDrawPage; } namespace xml::dom { class XDocument; } } @@ -57,6 +58,7 @@ class OOX_DLLPUBLIC Theme { public: void setStyleName( const OUString& rStyleName ) { maStyleName = rStyleName; } + void setThemeName(const OUString& rThemeName) { maThemeName = rThemeName; } ClrScheme& getClrScheme() { return maClrScheme; } const ClrScheme& getClrScheme() const { return maClrScheme; } @@ -96,8 +98,11 @@ public: const css::uno::Reference<css::xml::dom::XDocument>& getFragment() const { return mxFragment; } void setFragment( const css::uno::Reference< css::xml::dom::XDocument>& xRef ) { mxFragment=xRef; } + void addTheme(const css::uno::Reference<css::drawing::XDrawPage>& xDrawPage) const; + private: OUString maStyleName; + OUString maThemeName; ClrScheme maClrScheme; FillStyleList maFillStyleList; FillStyleList maBgFillStyleList; diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx index eaadcde330c0..540002eb7d14 100644 --- a/include/svx/svdpage.hxx +++ b/include/svx/svdpage.hxx @@ -30,6 +30,7 @@ #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> #include <svx/svdobj.hxx> +#include <svx/ColorSets.hxx> #include <memory> #include <optional> #include <vector> @@ -312,6 +313,7 @@ private: // data SdrPage* mpSdrPage; SfxStyleSheet* mpStyleSheet; + std::unique_ptr<svx::Theme> mpTheme; SfxItemSet maProperties; // internal helpers @@ -339,6 +341,9 @@ public: // StyleSheet access void SetStyleSheet(SfxStyleSheet* pStyleSheet); SfxStyleSheet* GetStyleSheet() const { return mpStyleSheet;} + + void SetTheme(std::unique_ptr<svx::Theme> pTheme); + svx::Theme* GetTheme(); }; |