diff options
author | Oliver Specht <oliver.specht@cib.de> | 2015-10-05 13:32:14 +0200 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2015-10-06 05:49:40 +0000 |
commit | 501e757649b760229cca1327ac2cf1945dc745a4 (patch) | |
tree | 49853b3161bf4985dd4973db5c2947d92aa439c8 /sw | |
parent | b1a6a99b9a78689c6d3649ce066fad66912188e2 (diff) |
tdf#91417: import hyperlink with history flag correctly
ignore '\h' flag in hyperlinks imported from docx
including import test
Change-Id: I512e811050704f118bf9b2c786378f99e5d04378
Reviewed-on: https://gerrit.libreoffice.org/19154
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/qa/extras/ooxmlimport/data/tdf91417.docx | bin | 0 -> 13007 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 10 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf91417.docx b/sw/qa/extras/ooxmlimport/data/tdf91417.docx Binary files differnew file mode 100755 index 000000000000..1427f8cb3a5d --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tdf91417.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 4f21820e152e..3b1024ea2eb2 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -2851,6 +2851,16 @@ DECLARE_OOXMLIMPORT_TEST(testTdf93919, "tdf93919.docx") // This was 0, left margin was not inherited from the list style. CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1270), getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin")); } +DECLARE_OOXMLIMPORT_TEST(testTdf91417, "tdf91417.docx") +{ + // The first paragraph should contain a link to "http://www.google.com/" + uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY); + uno::Reference<text::XTextCursor> xTextCursor(xTextDocument->getText()->createTextCursor( ), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xCursorProps(xTextCursor, uno::UNO_QUERY); + OUString aValue; + xCursorProps->getPropertyValue("HyperLinkURL") >>= aValue; + CPPUNIT_ASSERT_EQUAL(OUString("http://www.google.com/"), aValue); +} CPPUNIT_PLUGIN_IMPLEMENT(); |