From 2ad285eacda91bb95ec2fbb44ce6fa0b4d50f817 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 10 Mar 2015 10:15:44 +0300 Subject: 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 Reviewed-by: Miklos Vajna --- sw/qa/extras/ww8import/data/fdo68963.doc | Bin 16384 -> 22528 bytes sw/qa/extras/ww8import/ww8import.cxx | 2 ++ 2 files changed, 2 insertions(+) (limited to 'sw/qa/extras/ww8import') diff --git a/sw/qa/extras/ww8import/data/fdo68963.doc b/sw/qa/extras/ww8import/data/fdo68963.doc index 4b331f03f9d0..b31741f7c545 100644 Binary files a/sw/qa/extras/ww8import/data/fdo68963.doc and b/sw/qa/extras/ww8import/data/fdo68963.doc 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(); -- cgit