summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2019-05-13 15:43:44 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-05-14 11:03:57 +0200
commite24707d64d2d4c59c2aedf0235f5b1a694ec5f65 (patch)
treee923ea8755ff5ebb50a591048d976237832e8aa7 /oox
parent430c352139b96c7f26b95d730dc19123869520ee (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>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/shape/WpsContext.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index 0f39a850b0ee..0692ea43777d 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -140,8 +140,13 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
{
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;
}