diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2022-12-06 17:33:44 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2023-01-01 23:35:17 +0000 |
commit | 312100003fc7cae358038aaec853584782c698f8 (patch) | |
tree | 50c9dbedad29c04539c44880bd238c9015f1dabe /oox/source/shape | |
parent | d5a71bc6a28f8a3d726b2ac4688c7cef9d77ddf0 (diff) |
sw: read theme from OOXML file and set it to the draw page
This change extends writerfilter to use oox::ThemeFragmentHandler
to read the theme properties, and sets that to the one and only
draw page of a Writer document.
This change also removes ThemeTable and replaces it with the
ThemeHandler, which takes theme font data from svx::Theme
instead.
In addition, a test has been writen, which loads a document with
a theme, and asserts the draw page has the theme and the theme
properties currently supported.
Change-Id: Iff0048cd21ea030ac55287707852acc463ec3cb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143699
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'oox/source/shape')
-rw-r--r-- | oox/source/shape/ShapeContextHandler.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index 662c3d4c0863..a0d10e12bbc9 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -285,6 +285,10 @@ void SAL_CALL ShapeContextHandler::startFastElement mxShapeFilterBase->setCurrentTheme(mpThemePtr); } } + else if (mpThemePtr && !mxShapeFilterBase->getCurrentTheme()) + { + mxShapeFilterBase->setCurrentTheme(mpThemePtr); + } createFastChildContext(Element, Attribs); } |