sw/qa/extras/ww8import/data/tdf95321.doc |binary sw/qa/extras/ww8import/ww8import.cxx | 10 ++++++++++ sw/source/filter/ww8/ww8par.cxx | 2 +- tools/source/generic/gen.cxx | 8 -------- 4 files changed, 11 insertions(+), 9 deletions(-)
New commits: commit 6128c10f550924c2b75f18b6c6220cc1770adba4 Author: Caolán McNamara <[email protected]> Date: Wed Nov 11 12:34:01 2015 +0000 Resolves: tdf#95321 tables in headers/footers with wrong content Change-Id: I937ed893dfd9919bf48b8fd38a1b83c524200532 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 600ca41..7e9307b 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 124cd50..00c39fa 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3540,7 +3540,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 commit 2b4d7be9484d360d8361dd71d767afbcc67fdcb2 Author: Caolán McNamara <[email protected]> Date: Wed Nov 11 12:09:23 2015 +0000 stream version doesn't matter here Change-Id: I5871028b6c32194257d3a5f8bdf838cd0c277349 diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx index 8306ef8..499ab10 100644 --- a/tools/source/generic/gen.cxx +++ b/tools/source/generic/gen.cxx @@ -27,8 +27,6 @@ SvStream& ReadPair( SvStream& rIStream, Pair& rPair ) { - SAL_WARN_IF( !rIStream.GetVersion(), "tools", "Pair::>> - Solar-Version not set on rIStream" ); - sal_Int32 nTmpA(0), nTmpB(0); rIStream.ReadInt32( nTmpA ).ReadInt32( nTmpB ); rPair.nA = nTmpA; @@ -39,8 +37,6 @@ SvStream& ReadPair( SvStream& rIStream, Pair& rPair ) SvStream& WritePair( SvStream& rOStream, const Pair& rPair ) { - SAL_WARN_IF( !rOStream.GetVersion(), "tools", "Pair::<< - Solar-Version not set on rOStream" ); - rOStream.WriteInt32( rPair.nA ).WriteInt32( rPair.nB ); return rOStream; @@ -172,8 +168,6 @@ bool Rectangle::IsOver( const Rectangle& rRect ) const SvStream& ReadRectangle( SvStream& rIStream, Rectangle& rRect ) { - SAL_WARN_IF( !rIStream.GetVersion(), "tools", "Rectangle::>> - Solar-Version not set on rIStream" ); - sal_Int32 nTmpL(0), nTmpT(0), nTmpR(0), nTmpB(0); rIStream.ReadInt32( nTmpL ).ReadInt32( nTmpT ).ReadInt32( nTmpR ).ReadInt32( nTmpB ); @@ -188,8 +182,6 @@ SvStream& ReadRectangle( SvStream& rIStream, Rectangle& rRect ) SvStream& WriteRectangle( SvStream& rOStream, const Rectangle& rRect ) { - SAL_WARN_IF( !rOStream.GetVersion(), "tools", "Rectangle::<< - Solar-Version not set on rOStream" ); - rOStream.WriteInt32( rRect.nLeft ) .WriteInt32( rRect.nTop ) .WriteInt32( rRect.nRight )
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
