summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport
diff options
context:
space:
mode:
authorVasily Melenchuk <Vasily.Melenchuk@cib.de>2017-08-18 22:14:08 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-11-10 02:01:57 +0100
commiteaa9cf6a3069fba3d82c046f0041bfb537d9e648 (patch)
tree55806b023e2f7c380a877d0df6b0bd5bb53ad46e /sw/qa/extras/ooxmlimport
parent7f603dd111afcc30eec8bbec97efc16ad8b4c4d1 (diff)
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 <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/qa/extras/ooxmlimport')
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf43017.docxbin0 -> 14890 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf43017.docx b/sw/qa/extras/ooxmlimport/data/tdf43017.docx
new file mode 100644
index 000000000000..c3372e11a0c8
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf43017.docx
Binary files differ
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<text::XTextRange> xParagraph = getParagraph(1);
+ uno::Reference<text::XTextRange> 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<sal_Int32>(xText, "CharColor"));
+}
+
// tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT
CPPUNIT_PLUGIN_IMPLEMENT();