summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ww8import
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2015-03-10 10:15:44 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-14 10:45:13 +0000
commit2ad285eacda91bb95ec2fbb44ce6fa0b4d50f817 (patch)
tree9ff3f9062057cdc303414cd95d54b50097377760 /sw/qa/extras/ww8import
parent7196df7ac616be39689f21d8784fd78030868586 (diff)
tdf#89482 fix __refheading__ regression, set only CrossRefs as TOC.
bugfix tdf#68963 marked all __refheading__ bookmarks at TOC, but those crossreferences were deleted if they are not recorded in aReferencedTOCBookmarks. Redesigned the fix to include _Toc in the crossreference name that is auto-generated, which is how MSWord differentiates the markers. Updated the test document to include even more combinations of cross-references and numbered heading references. Change-Id: I3d60d2b528ebfa1ffb108bbfc9e7db2c604af49b Reviewed-on: https://gerrit.libreoffice.org/14822 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras/ww8import')
-rw-r--r--sw/qa/extras/ww8import/data/fdo68963.docbin16384 -> 22528 bytes
-rw-r--r--sw/qa/extras/ww8import/ww8import.cxx2
2 files changed, 2 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8import/data/fdo68963.doc b/sw/qa/extras/ww8import/data/fdo68963.doc
index 4b331f03f9d0..b31741f7c545 100644
--- a/sw/qa/extras/ww8import/data/fdo68963.doc
+++ b/sw/qa/extras/ww8import/data/fdo68963.doc
Binary files differ
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 8ba9466d462e..0c0da881233a 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -521,6 +521,8 @@ DECLARE_WW8IMPORT_TEST(testfdo68963, "fdo68963.doc")
// The problem was that the text was not displayed.
CPPUNIT_ASSERT ( !parseDump("/root/page/body/tab/row[2]/cell[1]/txt/Special", "rText").isEmpty() );
CPPUNIT_ASSERT_EQUAL( OUString("Topic 1"), parseDump("/root/page/body/tab/row[2]/cell[1]/txt/Special", "rText") );
+ // all crossreference bookmarks should have a target. Shouldn't be any "Reference source not found" in the xml
+ CPPUNIT_ASSERT ( -1 == parseDump("/root/page/body/txt[24]/Special[2]","rText").indexOf("Reference source not found"));
}
CPPUNIT_PLUGIN_IMPLEMENT();