summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorTünde Tóth <tundeth@gmail.com>2019-10-08 13:58:44 +0200
committerLászló Németh <nemeth@numbertext.org>2019-10-12 10:00:20 +0200
commit576611895e51186d38ddefa10ed8d66075d9de37 (patch)
treeaa26c1878238bb6802cb403d9f68e98548bdaa1c /sw
parentd416250f4f1766e2d596ea3feef6a94b7adf29f4 (diff)
tdf#127741 DOCX import: format hyperlink with Default character style
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 <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf127741.docxbin0 -> 19275 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx10
2 files changed, 10 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf127741.docx
Binary files 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<text::XTextRange> xPara = getParagraph(1);
+ uno::Reference<beans::XPropertySet> xRun(getRun(xPara,1), uno::UNO_QUERY);
+ OUString unVisitedStyleName = getProperty<OUString>(xRun, "UnvisitedCharStyleName");
+ CPPUNIT_ASSERT(unVisitedStyleName.equalsIgnoreAsciiCase("Internet Link"));
+ OUString visitedStyleName = getProperty<OUString>(xRun, "VisitedCharStyleName");
+ CPPUNIT_ASSERT(visitedStyleName.equalsIgnoreAsciiCase("Visited Internet Link"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */