[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sw/qa writerfilter/source
Justin Luth (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 19 12:54:14 UTC 2021
sw/qa/extras/ooxmlexport/data/tdf134569_nestedTable.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport10.cxx | 6 ++++++
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 6 ++++++
3 files changed, 12 insertions(+)
New commits:
commit 390d696395212721db5b050c03086fab9d667f12
Author: Justin Luth <justin_luth at sil.org>
AuthorDate: Sat Aug 14 21:28:50 2021 +0200
Commit: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Thu Aug 19 14:53:40 2021 +0200
tdf#134569 writerfilter: move tableParaProps on table endLevel
The end-level of a table only comes at the ::finishParagraph
of the FOLLOWING paragraph. So for table-in-table, it is
necessary to move the paragraph properties captured
during the paragraph to the correct table level's collection.
This fixes 7.0 regression from
commit 81ce88aa80f8e7cde4fdc5b211e9500a3599643c
and depends on prior commit
related tdf#134569 writerfilter: negative means table end
Change-Id: I83183f38e1cf68b7db09813ca1b4a2491e7b54e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120526
Tested-by: Jenkins
Tested-by: László Németh <nemeth at numbertext.org>
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit 28a7fec1f6465f8bfee417d447eb2e684ffe040b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120587
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf134569_nestedTable.docx b/sw/qa/extras/ooxmlexport/data/tdf134569_nestedTable.docx
new file mode 100755
index 000000000000..7fb07eb32a19
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf134569_nestedTable.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index b2d81e45f9ae..15a44ccfdfed 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -397,6 +397,12 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf133735, "fdo73389.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:tbl/w:tr[1]/w:tc[3]/w:p/w:pPr/w:spacing", "after", "0");
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf134569_nestedTable, "tdf134569_nestedTable.docx")
+{
+ // non-overridden w:after spacing in the table was pushing the document to the second page.
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf59274, "tdf59274.docx")
{
// Table with "auto" table width and incomplete grid: 11 columns, but only 4 gridCol elements.
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index e0f0ae18a160..6689a36091ad 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -511,7 +511,13 @@ void DomainMapperTableManager::endLevel( )
m_aTablePositions.pop_back();
m_aTableStyleNames.pop_back();
m_aMoved.pop_back( );
+
+ std::optional<TableParagraph> oParagraph;
+ if (getTableDepthDifference() < 0 && !m_aParagraphsToEndTable.top()->empty())
+ oParagraph = m_aParagraphsToEndTable.top()->back();
m_aParagraphsToEndTable.pop();
+ if (oParagraph && m_aParagraphsToEndTable.size())
+ m_aParagraphsToEndTable.top()->push_back(*oParagraph);
}
void DomainMapperTableManager::endOfCellAction()
More information about the Libreoffice-commits
mailing list