From ef53d4aec2a3d690de2c7cdaf73ca95bbe29a433 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 1 Jul 2013 13:59:47 +0200 Subject: [PATCH] fdo#46361 oox: handle w:color for groupshape textboxes Change-Id: Ifcbf622a04a4b3f06d95c079d5e13ec3f505268f --- oox/source/vml/vmltextbox.cxx | 6 ++++++ oox/source/vml/vmltextboxcontext.cxx | 3 +++ 2 files changed, 9 insertions(+) diff --git a/oox/source/vml/vmltextbox.cxx b/oox/source/vml/vmltextbox.cxx index 3b81caf5908a..e3d07b8099ff 100644 --- a/oox/source/vml/vmltextbox.cxx +++ b/oox/source/vml/vmltextbox.cxx @@ -103,6 +103,12 @@ void TextBox::convert(uno::Reference xShape) const aPropertyValue.Value = uno::makeAny(eAdjust); aPropVec.push_back(aPropertyValue); } + if (rFont.moColor.has()) + { + aPropertyValue.Name = "CharColor"; + aPropertyValue.Value = uno::makeAny(rFont.moColor.get().toUInt32(16)); + aPropVec.push_back(aPropertyValue); + } uno::Sequence aPropSeq(aPropVec.size()); beans::PropertyValue* pValues = aPropSeq.getArray(); for (std::vector::iterator i = aPropVec.begin(); i != aPropVec.end(); ++i) diff --git a/oox/source/vml/vmltextboxcontext.cxx b/oox/source/vml/vmltextboxcontext.cxx index 9fbf26cfeffe..d91c66ade821 100644 --- a/oox/source/vml/vmltextboxcontext.cxx +++ b/oox/source/vml/vmltextboxcontext.cxx @@ -129,6 +129,9 @@ void TextPortionContext::onStartElement(const AttributeList& rAttribs) case OOX_TOKEN(doc, br): mrTextBox.appendPortion( maParagraph, maFont, "\n" ); break; + case OOX_TOKEN(doc, color): + maFont.moColor = rAttribs.getString( OOX_TOKEN(doc, val) ); + break; } }