[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sw/qa sw/source
Caolán McNamara
caolanm at redhat.com
Fri Nov 13 13:26:52 PST 2015
sw/qa/extras/ww8import/data/tdf95321.doc |binary
sw/qa/extras/ww8import/ww8import.cxx | 10 ++++++++++
sw/source/filter/ww8/ww8par.cxx | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 82c0f2eb67f8fda9981fe83ebab3d658b6ec85fd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 11 12:34:01 2015 +0000
Resolves: tdf#95321 tables in headers/footers with wrong content
Change-Id: I937ed893dfd9919bf48b8fd38a1b83c524200532
(cherry picked from commit 6128c10f550924c2b75f18b6c6220cc1770adba4)
Reviewed-on: https://gerrit.libreoffice.org/19911
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sw/qa/extras/ww8import/data/tdf95321.doc b/sw/qa/extras/ww8import/data/tdf95321.doc
new file mode 100644
index 0000000..8b85472
Binary files /dev/null and b/sw/qa/extras/ww8import/data/tdf95321.doc differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 87fde37..3a0860d 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -419,6 +419,16 @@ DECLARE_WW8IMPORT_TEST(testBnc863018, "bnc863018.doc")
CPPUNIT_ASSERT_EQUAL(sal_Int32(5002), getProperty<sal_Int32>(xTable, "TopMargin"));
}
+DECLARE_WW8IMPORT_TEST(testTdf95321, "tdf95321.doc")
+{
+ // The problem was that there should be content in the second cell
+ // but there wasn't.
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Second Column"), uno::Reference<text::XTextRange>(xTable->getCellByName("B1"), uno::UNO_QUERY)->getString());
+}
+
DECLARE_WW8IMPORT_TEST(testBnc875715, "bnc875715.doc")
{
uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 1fecce8..f431305 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3544,7 +3544,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
//
//So the 0x7 should be right at the end of the previous
//range to be a real cell-end.
- if (pPap->nOrigStartPos == nCpOfs+nPosCp+1 ||
+ if (pPap->nOrigStartPos == nPosCp+1 ||
pPap->nOrigStartPos == WW8_CP_MAX)
{
TabCellEnd(); // Table cell/row end
More information about the Libreoffice-commits
mailing list