diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-05-28 21:59:27 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-05-29 09:04:10 +0200 |
commit | b7ae863efeb082816cc4fe660527a9650d90e186 (patch) | |
tree | 3759e4b016daeb237a060dbc02a0aca72ce01720 /sw | |
parent | 535f31419ab61c33212b1dd2693e34968902d3ad (diff) |
tdf#117503 DOCX import: fix out of sync first/later top margin
Improve the synchronization between the first page and follow page
style, so that when the DOC export invokes
sw::util::IsPlausableSingleWordSection(), it recognizes that originally
these were the same Word section.
If they don't match up, then the exporter will insert an explicit
section break, meaning we get one more page in the export result
compared to the original.
Change-Id: I336cf347698187cdede47be2659cec51e4381e85
Reviewed-on: https://gerrit.libreoffice.org/54965
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--[-rwxr-xr-x] | sw/CppunitTest_sw_ooxmllinks.mk | 0 | ||||
-rw-r--r-- | sw/CppunitTest_sw_ww8export2.mk | 34 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport6.cxx | 4 | ||||
-rw-r--r-- | sw/qa/extras/ww8export/data/tdf117503.docx | bin | 0 -> 23567 bytes | |||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export2.cxx | 7 |
5 files changed, 10 insertions, 35 deletions
diff --git a/sw/CppunitTest_sw_ooxmllinks.mk b/sw/CppunitTest_sw_ooxmllinks.mk index 78b81d4a14b4..78b81d4a14b4 100755..100644 --- a/sw/CppunitTest_sw_ooxmllinks.mk +++ b/sw/CppunitTest_sw_ooxmllinks.mk diff --git a/sw/CppunitTest_sw_ww8export2.mk b/sw/CppunitTest_sw_ww8export2.mk index 5ece5d90a0a3..616347d52904 100644 --- a/sw/CppunitTest_sw_ww8export2.mk +++ b/sw/CppunitTest_sw_ww8export2.mk @@ -47,39 +47,7 @@ $(eval $(call gb_CppunitTest_use_sdk_api,sw_ww8export2)) $(eval $(call gb_CppunitTest_use_ure,sw_ww8export2)) $(eval $(call gb_CppunitTest_use_vcl,sw_ww8export2)) -$(eval $(call gb_CppunitTest_use_components,sw_ww8export2,\ - basic/util/sb \ - comphelper/util/comphelp \ - configmgr/source/configmgr \ - dbaccess/util/dba \ - embeddedobj/util/embobj \ - emfio/emfio \ - filter/source/config/cache/filterconfig1 \ - filter/source/storagefilterdetect/storagefd \ - forms/util/frm \ - framework/util/fwk \ - i18npool/util/i18npool \ - linguistic/source/lng \ - package/source/xstor/xstor \ - package/util/package2 \ - sax/source/expatwrap/expwrap \ - sw/util/msword \ - sw/util/sw \ - sw/util/swd \ - sfx2/util/sfx \ - svl/source/fsstor/fsstorage \ - svtools/util/svt \ - toolkit/util/tk \ - ucb/source/core/ucb1 \ - ucb/source/ucp/file/ucpfile1 \ - unotools/util/utl \ - unoxml/source/service/unoxml \ - unoxml/source/rdf/unordf \ - uui/util/uui \ - $(if $(filter DESKTOP,$(BUILD_TYPE)),xmlhelp/util/ucpchelp1) \ - vcl/vcl.common \ - xmloff/util/xo \ -)) +$(eval $(call gb_CppunitTest_use_rdb,sw_ww8export2,services)) $(eval $(call gb_CppunitTest_use_configuration,sw_ww8export2)) diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx index 099566cd8072..837111995c79 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx @@ -454,7 +454,7 @@ DECLARE_OOXMLEXPORT_TEST(testVMLData, "TestVMLData.docx") { // The problem was exporter was exporting vml data for shape in w:rPr element. // vml data should not come under w:rPr element. - xmlDocPtr pXmlDoc = parseExport("word/header1.xml"); + xmlDocPtr pXmlDoc = parseExport("word/header2.xml"); if (!pXmlDoc) return; CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:hdr/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape", "stroked").match("f")); @@ -464,7 +464,7 @@ DECLARE_OOXMLEXPORT_TEST(testImageData, "image_data.docx") { // The problem was exporter was exporting v:imagedata data for shape in w:pict as v:fill w element. - xmlDocPtr pXmlDoc = parseExport("word/header1.xml"); + xmlDocPtr pXmlDoc = parseExport("word/header2.xml"); if (!pXmlDoc) return; CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:hdr/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape/v:imagedata", "detectmouseclick").match("t")); diff --git a/sw/qa/extras/ww8export/data/tdf117503.docx b/sw/qa/extras/ww8export/data/tdf117503.docx Binary files differnew file mode 100644 index 000000000000..f817f035b5cf --- /dev/null +++ b/sw/qa/extras/ww8export/data/tdf117503.docx diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx index bc9a104740bb..f7ec720bce99 100644 --- a/sw/qa/extras/ww8export/ww8export2.cxx +++ b/sw/qa/extras/ww8export/ww8export2.cxx @@ -814,6 +814,13 @@ DECLARE_WW8EXPORT_TEST(testTdf112118_DOC, "tdf112118.doc") } } +DECLARE_WW8EXPORT_TEST(testTdf117503, "tdf117503.docx") +{ + // This was 3, first page + standard page styles were not merged together + // on export. + CPPUNIT_ASSERT_EQUAL(2, getPages()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |