summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2019-05-13 15:43:44 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-05-14 18:31:22 +0200
commit1b1caaf4bce6b60c4c1af7dfc6f90dbdf4c3f817 (patch)
tree2cbe93a0e4ea9faf242e2dcda06cd1cf88f984b8 /oox
parent04019e94680835e7acf475b2ddedb5002c4a5b94 (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.cxx8
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;
}