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
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index caa5896..147675e 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -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)
{