Kaydet (Commit) 9f1f7199 authored tarafından Miklos Vajna's avatar Miklos Vajna

fdo#53556 RTF import: fix handling of default shapeType

It was a customshape, but Word seems to handle the shape as a rectangle
when shapeType is missing. This makes the text in the textboxes of the
bugdoc wrap properly.

Change-Id: I56e044f42ead348bbb79addc36fa13c82a7ffc29
üst 03f0cbd3
......@@ -231,6 +231,13 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose)
oox::vml::FillModel aFillModel; // Gradient.
oox::vml::ShadowModel aShadowModel; // Shadow.
// The spec doesn't state what is the default for shapeType, Word seems to implement it as a rectangle.
if (std::find_if(rShape.aProperties.begin(),
rShape.aProperties.end(),
boost::bind(&OUString::equals, boost::bind(&std::pair<OUString, OUString>::first, _1), OUString("shapeType")))
== rShape.aProperties.end())
rShape.aProperties.insert(rShape.aProperties.begin(), std::pair<OUString, OUString>("shapeType", OUString::number(ESCHER_ShpInst_Rectangle)));
for (std::vector< std::pair<OUString, OUString> >::iterator i = rShape.aProperties.begin();
i != rShape.aProperties.end(); ++i)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment