From eaa9cf6a3069fba3d82c046f0041bfb537d9e648 Mon Sep 17 00:00:00 2001 From: Vasily Melenchuk Date: Fri, 18 Aug 2017 22:14:08 +0300 Subject: tdf#43017: Support for DOCX hyperlinks character properties Here goes a bunch of related changes: 1. Create new character style based on current character properties 2. Apply created style to hyperlink object 3. Fixes to predefined style names usage in w:rPr 4. Disable style usage for hyperlinks in TOC: they will receive later anoter styles Change-Id: I1a228992eb7c1e259a6a811aa7f959debaae4f35 Reviewed-on: https://gerrit.libreoffice.org/41784 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sw/qa/extras/ooxmlimport/ooxmlimport.cxx') diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 29e008b4d147..cafef1d2ee53 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1548,6 +1548,17 @@ DECLARE_OOXMLIMPORT_TEST(testTdf111550, "tdf111550.docx") getCell(innerTable, "A1", "[outer:A2]\n[inner:A1]"); } + +DECLARE_OOXMLIMPORT_TEST(testTdf43017, "tdf43017.docx") +{ + uno::Reference xParagraph = getParagraph(1); + uno::Reference xText = getRun(xParagraph, 2, "kick the bucket"); + + // Ensure that hyperlink text color is not blue (0x0000ff), but default (-1) + CPPUNIT_ASSERT_EQUAL_MESSAGE("Hyperlink color should be black!", + sal_Int32(-1), getProperty(xText, "CharColor")); +} + // tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit v1.2.3