summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/drawingml/textbodycontext.cxx3
-rw-r--r--sw/qa/extras/ooxmlimport/data/dml-groupshape-sdt.docxbin0 -> 19727 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx7
3 files changed, 10 insertions, 0 deletions
diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx
index 77b5e7aef9bf..b9921e093a33 100644
--- a/oox/source/drawingml/textbodycontext.cxx
+++ b/oox/source/drawingml/textbodycontext.cxx
@@ -86,6 +86,9 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken
return new TextParagraphPropertiesContext( *this, rAttribs, mrParagraph.getProperties() );
case A_TOKEN( endParaRPr ):
return new TextCharacterPropertiesContext( *this, rAttribs, mrParagraph.getEndProperties() );
+ case OOX_TOKEN( doc, sdt ):
+ case OOX_TOKEN( doc, sdtContent ):
+ return this;
}
return 0;
diff --git a/sw/qa/extras/ooxmlimport/data/dml-groupshape-sdt.docx b/sw/qa/extras/ooxmlimport/data/dml-groupshape-sdt.docx
new file mode 100644
index 000000000000..7314d876a45c
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/dml-groupshape-sdt.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 4dabefed6acf..ab69ced00697 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1727,6 +1727,13 @@ DECLARE_OOXMLIMPORT_TEST(testFdo73389,"fdo73389.docx")
// 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"));
}
+
+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