diff options
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 14 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 22 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 |
3 files changed, 20 insertions, 18 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx index d3701ac6e01e..70d39cdbcde8 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx @@ -419,13 +419,13 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf59274) // This was 3674: too wide last cell in first row assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[4]/w:tcPr/w:tcW", "w", "1695"); } -//FIXME: -//DECLARE_OOXMLEXPORT_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_THROW)->getString()); -//} + +DECLARE_OOXMLEXPORT_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_THROW)->getString()); +} DECLARE_OOXMLEXPORT_TEST(testDmlCharheightDefault, "dml-charheight-default.docx") { diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx index 30ac826f23e3..5fc907c4d938 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -91,17 +91,17 @@ DECLARE_OOXMLEXPORT_TEST(testBezier, "bezier.odt") // Check that no shape got lost: a bezier, a line and a text shape. CPPUNIT_ASSERT_EQUAL(3, getShapes()); } -// FIXME: -//DECLARE_OOXMLEXPORT_TEST(testGroupshapeTextbox, "groupshape-textbox.docx") -//{ -// uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY); -// uno::Reference<text::XTextRange> xShape(xGroup->getByIndex(0), uno::UNO_QUERY); -// // The VML export lost text on textboxes inside groupshapes. -// // The DML export does not, make sure it stays that way. -// CPPUNIT_ASSERT_EQUAL(OUString("first"), xShape->getString()); -// // This was 16, i.e. inheriting doc default char height didn't work. -// CPPUNIT_ASSERT_EQUAL(11.f, getProperty<float>(getParagraphOfText(1, xShape->getText()), "CharHeight")); -//} + +DECLARE_OOXMLEXPORT_TEST(testGroupshapeTextbox, "groupshape-textbox.docx") +{ + uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY); + uno::Reference<text::XTextRange> xShape(xGroup->getByIndex(0), uno::UNO_QUERY); + // The VML export lost text on textboxes inside groupshapes. + // The DML export does not, make sure it stays that way. + CPPUNIT_ASSERT_EQUAL(OUString("first"), xShape->getString()); + // This was 16, i.e. inheriting doc default char height didn't work. + CPPUNIT_ASSERT_EQUAL(11.f, getProperty<float>(getParagraphOfText(1, xShape->getText()), "CharHeight")); +} DECLARE_OOXMLEXPORT_TEST(testGroupshapePicture, "groupshape-picture.docx") { diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 952d225f52f7..548425914616 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -4507,6 +4507,8 @@ void DomainMapper_Impl::PopTextBoxContent() getTableManager().endLevel(); popTableManager(); } + RemoveLastParagraph(); + m_aTextAppendStack.pop(); m_bIsInTextBox = false; } |