diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-09-20 19:27:09 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-12-25 02:06:58 +0000 |
commit | df9f3f3fd81d4f81ee2ff984d1e19999abea2963 (patch) | |
tree | 7c9d1b22c85f8a20f7a7a2deaa53fb4b5ae96671 /xmloff/source | |
parent | 376152fbd110cdc0a2cde1fa9758f36c016d9352 (diff) |
sw: support for reading back theme color from OOXML
OOXML supports theme colors and tint/shade value that additionally
changed the theme color. Read back which theme color + tint/shade
value was applied in the resulting color and add this attributes
as properties to be used by writer.
In sidebar theme panel the changing the theme colors now doesn't
takes this into account and changes the colors correctly.
Change-Id: I3a2d49d485fd37a1611483ee0bb5e6034ac5f88e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143697
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/draw/sdpropls.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/text/txtprhdl.cxx | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index e7223409b6f0..6c8731942782 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -60,6 +60,7 @@ #include <XMLIsPercentagePropertyHandler.hxx> #include <XMLPercentOrMeasurePropertyHandler.hxx> #include <XMLTextColumnsPropertyHandler.hxx> +#include <XMLThemeColorHandler.hxx> #include <animations.hxx> #include <sax/tools/converter.hxx> #include <xmlsdtypes.hxx> @@ -1308,7 +1309,7 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy pHdl = new XMLTextColumnsPropertyHandler; break; case XML_TYPE_THEME_COLOR: - pHdl = new XMLConstantsPropertyHandler(pXML_ThemeColor_Enum, XML_TOKEN_INVALID); + pHdl = new XMLThemeColorHandler; break; } diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx index 22fbe4174dd6..a4450ce230f4 100644 --- a/xmloff/source/text/txtprhdl.cxx +++ b/xmloff/source/text/txtprhdl.cxx @@ -56,6 +56,7 @@ #include <XMLFillBitmapSizePropertyHandler.hxx> #include <XMLBitmapLogicalSizePropertyHandler.hxx> #include <XMLBitmapRepeatOffsetPropertyHandler.hxx> +#include <XMLThemeColorHandler.hxx> #include <vcl/graph.hxx> using namespace ::com::sun::star; @@ -249,8 +250,9 @@ SvXMLEnumMapEntry<drawing::TextVerticalAdjust> const pXML_VerticalAlign_Enum[] = { XML_TOKEN_INVALID, drawing::TextVerticalAdjust(0) } }; -SvXMLEnumMapEntry<sal_uInt16> const pXML_ThemeColor_Enum[] = +SvXMLEnumMapEntry<sal_Int16> const pXML_ThemeColor_Enum[] = { + { XML_NONE, -1 }, { XML_DK1, 0 }, { XML_LT1, 1 }, { XML_DK2, 2 }, @@ -1430,7 +1432,7 @@ static const XMLPropertyHandler *GetPropertyHandler pHdl = new XMLGraphicPropertyHandler; break; case XML_TYPE_THEME_COLOR: - pHdl = new XMLConstantsPropertyHandler(pXML_ThemeColor_Enum, XML_TOKEN_INVALID); + pHdl = new XMLThemeColorHandler; break; default: { |