diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-08-26 11:35:48 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-08-26 13:11:09 +0200 |
commit | e9275c08acc2f4f1c925f78b56a1089515cd9a37 (patch) | |
tree | a03a1d4c26d45452eb5d0909a6332e446bb4c1e9 /sw/qa/extras/ooxmlexport | |
parent | 750f0ebf97d19d1cf305dabe72d52ad6e90adf70 (diff) |
bnc#834035 DOCX export: fix hyperlinks of illustration index
We used to export raw Writer bookmarks, but that's not valid in OOXML.
Instead, it has normal bookmarks around the sequence fields, so use them
if they are available.
Change-Id: I0ef2ff7967c2802b53752c9505ef6db4cc2b8265
Diffstat (limited to 'sw/qa/extras/ooxmlexport')
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index d5cb1cb0003d..e4347ddcc609 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -112,6 +112,7 @@ public: void testFdo44689_start_page_7(); void testFdo67737(); void testTransparentShadow(); + void testBnc834035(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -200,6 +201,7 @@ void Test::run() {"fdo44689_start_page_7.docx", &Test::testFdo44689_start_page_7}, {"fdo67737.docx", &Test::testFdo67737}, {"transparent-shadow.docx", &Test::testTransparentShadow}, + {"bnc834035.odt", &Test::testBnc834035}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -1233,6 +1235,18 @@ void Test::testTransparentShadow() CPPUNIT_ASSERT_EQUAL(sal_Int32(0x7f808080), aShadow.Color); } +void Test::testBnc834035() +{ + // This is tricky, when saving manually, there are 2 hyperlinks, here only + // one, no idea why. That one still shows that we're not using bookmarks, though. + + // Illustration index had wrong hyperlinks: anchor was using Writer's + // <seqname>!<index>|sequence syntax, not a bookmark name. + xmlDocPtr pXmlDoc = parseExport(); + // This was Figure!1|sequence. + assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink", "anchor", "_Toc363553908"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |