summaryrefslogtreecommitdiff
path: root/sw/qa/extras/odfexport/odfexport.cxx
diff options
context:
space:
mode:
authorTünde Tóth <tundeth@gmail.com>2019-11-07 11:34:25 +0100
committerLászló Németh <nemeth@numbertext.org>2019-11-08 13:12:54 +0100
commit023285158bde72dcd73b965ce205cf8550e7a5e2 (patch)
treecd20c05c9b58cfcd0c11e8406e427212bfd086b9 /sw/qa/extras/odfexport/odfexport.cxx
parenteb6410b5cf5140a80a6d9703f26fc9a969996cfa (diff)
tdf#128504 save DOCX as ODT: don't color not highlighted hyperlinks
During DOCX import, not highlighted hyperlinks, ie. without hyperlink character styles, set the Visited/Unvisited character style text attributes to "Default Style" to avoid saving them with the default highlighted hyperlink character styles in ODT. Regression from the commit 576611895e51186d38ddefa10ed8d66075d9de37 "tdf#127741 DOCX import: format hyperlink with Default character style". Change-Id: I5ffbb107e6704b285bc3d1546e08a324c386a0ab Reviewed-on: https://gerrit.libreoffice.org/82205 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras/odfexport/odfexport.cxx')
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index a59c5dc3298f..0334a73debca 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2297,5 +2297,15 @@ DECLARE_ODFEXPORT_TEST(tdf99631, "tdf99631.docx")
assertXPathContent(pXmlDoc2, "//config:config-item[@config:name='VisibleAreaHeight']", "1354");
}
+DECLARE_ODFEXPORT_TEST(tdf128504, "tdf128504.docx")
+{
+ uno::Reference<text::XTextRange> xPara = getParagraph(6);
+ 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: */