fdo#46361 oox: handle w:color for groupshape textboxes

Change-Id: Ifcbf622a04a4b3f06d95c079d5e13ec3f505268f
This commit is contained in:
Miklos Vajna
2013-07-01 13:59:47 +02:00
parent 5a737fca37
commit ef53d4aec2
2 changed files with 9 additions and 0 deletions

View File

@@ -103,6 +103,12 @@ void TextBox::convert(uno::Reference<drawing::XShape> 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<beans::PropertyValue> aPropSeq(aPropVec.size());
beans::PropertyValue* pValues = aPropSeq.getArray();
for (std::vector<beans::PropertyValue>::iterator i = aPropVec.begin(); i != aPropVec.end(); ++i)

View File

@@ -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;
}
}