Kaydet (Commit) ba697931 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

drawingML import: parse shape text run inside w:sdt and s:sdtContent

Change-Id: I6dc5939ae66967785cdc5dab318024b8cb17d1cd
üst 98083068
...@@ -86,6 +86,9 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken ...@@ -86,6 +86,9 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken
return new TextParagraphPropertiesContext( *this, rAttribs, mrParagraph.getProperties() ); return new TextParagraphPropertiesContext( *this, rAttribs, mrParagraph.getProperties() );
case A_TOKEN( endParaRPr ): case A_TOKEN( endParaRPr ):
return new TextCharacterPropertiesContext( *this, rAttribs, mrParagraph.getEndProperties() ); return new TextCharacterPropertiesContext( *this, rAttribs, mrParagraph.getEndProperties() );
case OOX_TOKEN( doc, sdt ):
case OOX_TOKEN( doc, sdtContent ):
return this;
} }
return 0; return 0;
......
...@@ -1727,6 +1727,13 @@ DECLARE_OOXMLIMPORT_TEST(testFdo73389,"fdo73389.docx") ...@@ -1727,6 +1727,13 @@ DECLARE_OOXMLIMPORT_TEST(testFdo73389,"fdo73389.docx")
// This was 9340, i.e. the width of the inner table was too large. // This was 9340, i.e. the width of the inner table was too large.
CPPUNIT_ASSERT_EQUAL(sal_Int32(2842), getProperty<sal_Int32>(xTables->getByIndex(0), "Width")); CPPUNIT_ASSERT_EQUAL(sal_Int32(2842), getProperty<sal_Int32>(xTables->getByIndex(0), "Width"));
} }
DECLARE_OOXMLIMPORT_TEST(testDMLGroupshapeSdt, "dml-groupshape-sdt.docx")
{
uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);
// The text in the groupshape was missing due to the w:sdt and w:sdtContent wrapper around it.
CPPUNIT_ASSERT_EQUAL(OUString("sdt and sdtContent inside groupshape"), uno::Reference<text::XTextRange>(xGroupShape->getByIndex(1), uno::UNO_QUERY)->getString());
}
#endif #endif
......
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