sw/qa/extras/ww8export/data/tdf108072.doc |binary sw/qa/extras/ww8export/ww8export2.cxx | 14 ++++++++++++++ sw/source/filter/ww8/sprmids.hxx | 4 ++-- sw/source/filter/ww8/ww8par6.cxx | 8 ++++---- sw/source/filter/ww8/ww8scan.cxx | 4 ++-- 5 files changed, 22 insertions(+), 8 deletions(-)
New commits: commit 062a31fb26e0262e29f31850664479e5df20cc67 Author: Aron Budea <aron.bu...@collabora.com> Date: Sun May 28 23:16:24 2017 +0200 tdf#108072: match sprmTFCantSplit with its correct id The behavior was adjusted with 72ef0d88e916b320de85fe2ebf08cb7aea28ca08 , but the ids for sprmTFCantSplit90 and sprmTFCantSplit remained mixed up. Change-Id: Ic97224a3af39e5df707a6dba59b785580c17b739 Reviewed-on: https://gerrit.libreoffice.org/38117 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk> Reviewed-on: https://gerrit.libreoffice.org/38278 Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> diff --git a/sw/qa/extras/ww8export/data/tdf108072.doc b/sw/qa/extras/ww8export/data/tdf108072.doc new file mode 100644 index 000000000000..03e8b2a532dc Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf108072.doc differ diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx index d7512db6f994..1f9082fd1ff6 100644 --- a/sw/qa/extras/ww8export/ww8export2.cxx +++ b/sw/qa/extras/ww8export/ww8export2.cxx @@ -11,7 +11,9 @@ #include <com/sun/star/graphic/XGraphic.hpp> #include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/text/XTextFramesSupplier.hpp> +#include <com/sun/star/text/XTextTable.hpp> #include <com/sun/star/text/XTextTablesSupplier.hpp> #include <pagedesc.hxx> @@ -87,6 +89,18 @@ DECLARE_WW8EXPORT_TEST(testTdf104334, "tdf104334.doc") CPPUNIT_ASSERT_EQUAL(OUString("1"), getRun(getParagraph(2), 3)->getString()); } +DECLARE_WW8EXPORT_TEST(testTdf108072, "tdf108072.doc") +{ + // The property IsSplitAllowed was imported from an obsolete property, sprmTFCantSplit90 + // instead of sprmTFCantSplit. sprmTFCantSplit90 is set to true for merged rows, so + // for merged rows incorrect settings were imported, which prevented them from breaking over pages. + uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY); + uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTableRows(xTable->getRows(), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTableRows->getByIndex(0), "IsSplitAllowed")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/ww8/sprmids.hxx b/sw/source/filter/ww8/sprmids.hxx index 3d58ab545115..ed83649de242 100644 --- a/sw/source/filter/ww8/sprmids.hxx +++ b/sw/source/filter/ww8/sprmids.hxx @@ -27,7 +27,7 @@ namespace NS_sprm const sal_uInt16 LN_PContextualSpacing = 0x246d; const sal_uInt16 LN_PIstdPermute = 0xc601; const sal_uInt16 LN_PTabProps = 0x646b; -const sal_uInt16 LN_TFCantSplit90 = 0x3466; +const sal_uInt16 LN_TFCantSplit90 = 0x3403; const sal_uInt16 LN_TCantSplit = 0x3644; const sal_uInt16 LN_PIncLvl = 0x2602; const sal_uInt16 LN_PJcExtra = 0x2461; @@ -245,7 +245,7 @@ const sal_uInt16 LN_TJc = 0x548A; const sal_uInt16 LN_TJc90 = 0x5400; const sal_uInt16 LN_TDxaLeft = 0x9601; const sal_uInt16 LN_TDxaGapHalf = 0x9602; -const sal_uInt16 LN_TFCantSplit = 0x3403; +const sal_uInt16 LN_TFCantSplit = 0x3466; const sal_uInt16 LN_TTableHeader = 0x3404; const sal_uInt16 LN_TTableBorders80 = 0xd605; const sal_uInt16 LN_TDefTable10 = 0xd606; diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 5bb3eb8eb507..5cd9e4ba74fd 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -6139,12 +6139,12 @@ const wwSprmDispatcher *GetWW8SprmDispatcher() {0x9602, nullptr}, //"sprmTDxaGapHalf" //tap.dxaGapHalf, //tap.rgdxaCenter; dxa; word; - {0x3403, nullptr}, //"sprmTFCantSplit" - //tap.fCantSplit;1 or 0;byte; + {0x3403, nullptr}, //"sprmTFCantSplit90" + //tap.fCantSplit90;1 or 0;byte; {0x3404, nullptr}, //"sprmTTableHeader" //tap.fTableHeader;1 or 0;byte; - {0x3466, nullptr}, //"sprmTFCantSplit90" - //tap.fCantSplit90;1 or 0;byte; + {0x3466, nullptr}, //"sprmTFCantSplit" + //tap.fCantSplit;1 or 0;byte; {0xD605, nullptr}, //"sprmTTableBorders80" //tap.rgbrcTable;complex; //24 bytes; diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index 439acd15ecd0..a435d7ecbc5a 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -708,9 +708,9 @@ const wwSprmSearcher *wwSprmParser::GetWW8SprmSearcher() {0x9601, { 2, L_FIX} }, // "sprmTDxaLeft" tap.rgdxaCenter {0x9602, { 2, L_FIX} }, // "sprmTDxaGapHalf" tap.dxaGapHalf, // tap.rgdxaCenter - {0x3403, { 1, L_FIX} }, // "sprmTFCantSplit" tap.fCantSplit;1 or 0;byte; + {0x3403, { 1, L_FIX} }, // "sprmTFCantSplit90" tap.fCantSplit90;1 or 0;byte; {0x3404, { 1, L_FIX} }, // "sprmTTableHeader" tap.fTableHeader;1 or 0;byte; - {0x3466, { 1, L_FIX} }, // "sprmTFCantSplit90" tap.fCantSplit90;1 or 0;byte; + {0x3466, { 1, L_FIX} }, // "sprmTFCantSplit" tap.fCantSplit;1 or 0;byte; {0xD605, { 0, L_VAR} }, // "sprmTTableBorders80" tap.rgbrcTable;complex {0xD606, { 0, L_VAR} }, // "sprmTDefTable10" tap.rgdxaCenter, // tap.rgtc;complex _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits