summaryrefslogtreecommitdiff
path: root/oox/inc
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-02-23 23:38:08 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-03-01 12:57:29 +0000
commit6e8c67580974484c790f52991de26298ce8e7e1c (patch)
tree0dc731c89810fa9c8d40de9c1b8cedc99a6dcf9c /oox/inc
parent855f7c08d1feab7669670bfbc4ed2b3b3225db16 (diff)
oox: import directly into docmodel's Theme and ColorSet
This changes the import to directly fill values of a model::Theme and model::ColorSet, without filling the oox structs first. The goal is to get rid of the oox in the long run, but for now it is necessary to keep reading into both, which is a duplication. The next step is to also fill the FontScheme and FormatScheme structures. Change-Id: I488ec096cbc184bc70d24510ac9091a488540422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147571 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'oox/inc')
-rw-r--r--oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx16
-rw-r--r--oox/inc/drawingml/clrschemecontext.hxx8
-rw-r--r--oox/inc/drawingml/themeelementscontext.hxx7
3 files changed, 18 insertions, 13 deletions
diff --git a/oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx b/oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx
index 1582ea819d95..a51c66c3eea0 100644
--- a/oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx
+++ b/oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx
@@ -11,24 +11,24 @@
#define INCLUDED_OOX_DRAWINGML_THEMEOVERRICEFRAGMENTHANDLER_HXX
#include <oox/core/fragmenthandler2.hxx>
+#include <oox/drawingml/theme.hxx>
-namespace oox::drawingml {
+namespace oox::drawingml
+{
class Theme;
class ThemeOverrideFragmentHandler final : public ::oox::core::FragmentHandler2
{
public:
- explicit ThemeOverrideFragmentHandler(
- ::oox::core::XmlFilterBase& rFilter,
- const OUString& rFragmentPath,
- Theme& rTheme );
- virtual ~ThemeOverrideFragmentHandler() override;
+ explicit ThemeOverrideFragmentHandler(::oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, Theme& rOoxTheme, model::Theme& rTheme);
+ virtual ~ThemeOverrideFragmentHandler() override;
- virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
+ virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList& rAttribs) override;
private:
- Theme& mrTheme;
+ Theme& mrOoxTheme;
+ model::Theme& mrTheme;
};
} // namespace oox::drawingml
diff --git a/oox/inc/drawingml/clrschemecontext.hxx b/oox/inc/drawingml/clrschemecontext.hxx
index 5e7cddfb8d03..b50c8e0c93d9 100644
--- a/oox/inc/drawingml/clrschemecontext.hxx
+++ b/oox/inc/drawingml/clrschemecontext.hxx
@@ -37,22 +37,24 @@ public:
class clrSchemeColorContext final : private Color, public ColorContext
{
public:
- clrSchemeColorContext( ::oox::core::ContextHandler2Helper const & rParent, ClrScheme& rClrScheme, sal_Int32 nColorToken );
+ clrSchemeColorContext(::oox::core::ContextHandler2Helper const & rParent, ClrScheme& rClrScheme, model::ColorSet& mrColorSet, sal_Int32 nColorToken);
virtual ~clrSchemeColorContext() override;
private:
ClrScheme& mrClrScheme;
+ model::ColorSet& mrColorSet;
sal_Int32 mnColorToken;
};
class clrSchemeContext final : public oox::core::ContextHandler2
{
public:
- clrSchemeContext( ::oox::core::ContextHandler2Helper const & rParent, ClrScheme& rClrScheme );
+ clrSchemeContext(::oox::core::ContextHandler2Helper const & rParent, ClrScheme& rClrScheme, model::ColorSet& rColorSet);
virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
private:
- ClrScheme& mrClrScheme;
+ ClrScheme& mrClrScheme;
+ model::ColorSet& mrColorSet;
};
}
diff --git a/oox/inc/drawingml/themeelementscontext.hxx b/oox/inc/drawingml/themeelementscontext.hxx
index 4c113762e10c..1dba96e6c0e2 100644
--- a/oox/inc/drawingml/themeelementscontext.hxx
+++ b/oox/inc/drawingml/themeelementscontext.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_OOX_DRAWINGML_THEMEELEMENTSCONTEXT_HXX
#include <oox/core/contexthandler2.hxx>
+#include <docmodel/theme/Theme.hxx>
namespace oox::drawingml
{
@@ -29,12 +30,14 @@ class Theme;
class ThemeElementsContext final : public oox::core::ContextHandler2
{
public:
- ThemeElementsContext(::oox::core::ContextHandler2Helper const& rParent, Theme& rTheme);
+ ThemeElementsContext(::oox::core::ContextHandler2Helper const& rParent, Theme& rOoxTheme,
+ model::Theme& rTheme);
virtual ::oox::core::ContextHandlerRef
onCreateContext(sal_Int32 nElement, const ::oox::AttributeList& rAttribs) override;
private:
- Theme& mrTheme;
+ Theme& mrOoxTheme;
+ model::Theme& mrTheme;
};
} // namespace oox::drawingml