Kaydet (Commit) 75934fc1 authored tarafından Miklos Vajna's avatar Miklos Vajna

VML import: handle shape with text inside groupshape as TextShape

This matches the behavior of the WW8 import and gives us the required
text wrapping when the shape text doesn't fit in a single line.

Change-Id: I32a13516503620344d313593834be29a3dc9f726
üst ce8010b4
......@@ -459,6 +459,8 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 nElement, const Attri
dynamic_cast<SimpleShape&>( mrShape ).setService(
"com.sun.star.text.TextFrame");
}
else
dynamic_cast<SimpleShape&>(mrShape).setService("com.sun.star.drawing.TextShape");
return new TextBoxContext( *this, mrShapeModel.createTextBox(mrShape.getTypeModel()), rAttribs,
mrShape.getDrawing().getFilter().getGraphicHelper());
case VMLX_TOKEN( ClientData ):
......
......@@ -975,6 +975,10 @@ DECLARE_OOXMLIMPORT_TEST(testGroupshapeChildRotation, "groupshape-child-rotation
xShape.set(xGroupShape->getByIndex(4), uno::UNO_QUERY);
// This was 887, i.e. border distances were included in the height.
CPPUNIT_ASSERT_EQUAL(sal_Int32(686), xShape->getSize().Height);
uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xGroupShape->getByIndex(5), uno::UNO_QUERY);
// This was com.sun.star.drawing.RectangleShape, all shape text in a single line.
CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.TextShape"), xShapeDescriptor->getShapeType());
}
DECLARE_OOXMLIMPORT_TEST(testN793262, "n793262.docx")
......
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