From 576611895e51186d38ddefa10ed8d66075d9de37 Mon Sep 17 00:00:00 2001 From: Tünde Tóth Date: Tue, 8 Oct 2019 13:58:44 +0200 Subject: tdf#127741 DOCX import: format hyperlink with Default character style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit according to correct hyperlink handling, avoiding various editing and layout problems; "sticky" and not easily removable character style around the hyperlink and multiple blue hyperlink colors. Set also Visited/Unvisited link character styles when the style of the hyperlink is not the requested "Internet Link". Change-Id: I3d7ba8dd225c693cc9f521b37767cf1e1e09d7c0 Reviewed-on: https://gerrit.libreoffice.org/80449 Reviewed-by: László Németh Tested-by: László Németh --- sw/qa/extras/ooxmlexport/data/tdf127741.docx | Bin 0 -> 19275 bytes sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 10 ++++++++++ 2 files changed, 10 insertions(+) create mode 100644 sw/qa/extras/ooxmlexport/data/tdf127741.docx (limited to 'sw') diff --git a/sw/qa/extras/ooxmlexport/data/tdf127741.docx b/sw/qa/extras/ooxmlexport/data/tdf127741.docx new file mode 100644 index 000000000000..1bedb9ade516 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf127741.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 89028e3e7e24..59556249cfb5 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -834,6 +834,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123628, "tdf123628.odt") assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='InternetLink']/w:name", "val", "Hyperlink"); } +DECLARE_OOXMLEXPORT_TEST(testTdf127741, "tdf127741.docx") +{ + uno::Reference xPara = getParagraph(1); + uno::Reference xRun(getRun(xPara,1), uno::UNO_QUERY); + OUString unVisitedStyleName = getProperty(xRun, "UnvisitedCharStyleName"); + CPPUNIT_ASSERT(unVisitedStyleName.equalsIgnoreAsciiCase("Internet Link")); + OUString visitedStyleName = getProperty(xRun, "VisitedCharStyleName"); + CPPUNIT_ASSERT(visitedStyleName.equalsIgnoreAsciiCase("Visited Internet Link")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3