summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2022-12-01 16:15:42 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-12-16 08:00:22 +0000
commitd3459346a6f4cf7650a03685bcc89c83716d98b1 (patch)
tree89a71b5dd97db86119dc88ae6a2f8bbb855b3a81 /oox
parent137ffafbf43a07446835539a4e17b199d06e3aa7 (diff)
tdf#152310 DOCX shape import: fix lost text color regression
Don't apply COL_AUTO as color of the run. Regression from commit 49a40e3ed200e7c6d728f36d0b4be22dd85c51be "tdf#135923 DOCX shape import: set text color". Change-Id: I9c2088b4c531f09c80715bffdae225ac0987be79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143533 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit fd831c28bfc29d9d5fe2b3074324d4cbc4a70689) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144179 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/shape/WpsContext.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index 9a7458ac6a85..99656195075b 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -220,7 +220,10 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
{
uno::Reference<beans::XPropertySet> xRunPropSet(
xRun, uno::UNO_QUERY);
- xRunPropSet->setPropertyValue("CharColor", xCharColor);
+ Color aRunColor = COL_AUTO;
+ xRunPropSet->getPropertyValue("CharColor") >>= aRunColor;
+ if (aRunColor == COL_AUTO)
+ xRunPropSet->setPropertyValue("CharColor", xCharColor);
}
}
}