diff options
author | Serge Krot <Serge.Krot@cib.de> | 2019-05-13 15:43:44 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-05-14 18:31:22 +0200 |
commit | 1b1caaf4bce6b60c4c1af7dfc6f90dbdf4c3f817 (patch) | |
tree | 2cbe93a0e4ea9faf242e2dcda06cd1cf88f984b8 /oox | |
parent | 04019e94680835e7acf475b2ddedb5002c4a5b94 (diff) |
tdf#124754 sw docx import: do not override text color with -1 (auto) color
Change-Id: Id821b0d8bef69a7124ee41558e822cf8b025df9d
Reviewed-on: https://gerrit.libreoffice.org/72232
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-on: https://gerrit.libreoffice.org/72293
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/shape/WpsContext.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index e196449ec7ed..2b2ad8b2b1b7 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -151,7 +151,13 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken if (ePropertyState == beans::PropertyState_DEFAULT_VALUE) { uno::Reference<beans::XPropertySet> xTextBoxPropertySet(xTextCursor, uno::UNO_QUERY); - xTextBoxPropertySet->setPropertyValue("CharColor", xPropertySet->getPropertyValue("CharColor")); + uno::Any xCharColor = xPropertySet->getPropertyValue("CharColor"); + Color aColor = COL_AUTO; + if (xCharColor >>= aColor) + { + if (aColor != COL_AUTO) + xTextBoxPropertySet->setPropertyValue("CharColor", xCharColor); + } } return this; } |