summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-02-23 23:38:08 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-04-25 18:49:54 +0900
commit479a21adc6dca28b856e0c9fbea78e08c5da8897 (patch)
tree71c394092b4f41194b9ca34e0eb240e3afa9e452 /writerfilter
parent09755649009fe221599af6a435b7e6022a890907 (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> (cherry picked from commit 6e8c67580974484c790f52991de26298ce8e7e1c)
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandlerTheme.cxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandlerTheme.hxx4
2 files changed, 4 insertions, 2 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandlerTheme.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandlerTheme.cxx
index a976453ba911..09432d1d4381 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandlerTheme.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandlerTheme.cxx
@@ -46,7 +46,7 @@ void OOXMLFastContextHandlerTheme::lcl_startFastElement(
getDocument()->setTheme(pThemePtr);
}
mpThemeFragmentHandler = new oox::drawingml::ThemeFragmentHandler(
- *xThemeFilterBase, aThemeFragmentPath, *pThemePtr);
+ *xThemeFilterBase, aThemeFragmentPath, *pThemePtr, maTheme);
}
if (mpThemeFragmentHandler.is())
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandlerTheme.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandlerTheme.hxx
index 2de6b75590f0..c0b11bcae084 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandlerTheme.hxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandlerTheme.hxx
@@ -9,7 +9,7 @@
#pragma once
-#include <set>
+#include <docmodel/theme/Theme.hxx>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/xml/sax/XFastContextHandler.hpp>
@@ -24,7 +24,9 @@ namespace writerfilter::ooxml
{
class OOXMLFastContextHandlerTheme : public OOXMLFastContextHandler
{
+private:
rtl::Reference<oox::drawingml::ThemeFragmentHandler> mpThemeFragmentHandler;
+ model::Theme maTheme;
public:
explicit OOXMLFastContextHandlerTheme(OOXMLFastContextHandler* pContext);