sw/qa/extras/ooxmlexport/ooxmlexport10.cxx        |   14 +++++++-------
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx         |   22 +++++++++++-----------
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    2 ++
 3 files changed, 20 insertions(+), 18 deletions(-)

New commits:
commit e1dc4a5815a56eef27d2c83f7971e0eb1ac09b45
Author:     Attila Bakos (NISZ) <bakos.attilakar...@nisz.hu>
AuthorDate: Thu Jan 6 14:23:35 2022 +0100
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Mon Jan 31 17:16:25 2022 +0100

    Related tdf#66039 DOCX WPG import: Do not put extra paragraph at the end
    
    Regression from 121cbc250b36290f0f8c7265fea57256dad69553
    tdf#66039 DOCX: import textboxes (with tables, images etc.) in group shapes
    
    Change-Id: I16195d1d3b0955d5686fe225bbba6def2c28ef93
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128043
    Tested-by: Jenkins
    Tested-by: László Németh <nem...@numbertext.org>
    Reviewed-by: Attila Bakos <bakos.attilakar...@nisz.hu>
    Reviewed-by: László Németh <nem...@numbertext.org>

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;
     }

Reply via email to