summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2019-05-13 15:43:44 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-05-14 18:31:22 +0200
commit1b1caaf4bce6b60c4c1af7dfc6f90dbdf4c3f817 (patch)
tree2cbe93a0e4ea9faf242e2dcda06cd1cf88f984b8 /sw
parent04019e94680835e7acf475b2ddedb5002c4a5b94 (diff)
tdf#124754 sw docx import: do not override text color with -1 (auto) color
Change-Id: Id821b0d8bef69a7124ee41558e822cf8b025df9d Reviewed-on: https://gerrit.libreoffice.org/72232 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/72293 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf124754.docxbin0 -> 20960 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport2.cxx15
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tdf124754.docx b/sw/qa/extras/ooxmlimport/data/tdf124754.docx
new file mode 100644
index 000000000000..2f7f4e14bda5
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf124754.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index a74501cd708c..57c7f7ef4245 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -197,6 +197,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf117843, "tdf117843.docx")
getProperty<sal_Int32>(getParagraphOfText(1, xHeaderText), "ParaTopMargin"));
}
+// related tdf#124754
DECLARE_OOXMLIMPORT_TEST(testTdf43017, "tdf43017.docx")
{
uno::Reference<text::XTextRange> xParagraph = getParagraph(1);
@@ -207,6 +208,20 @@ DECLARE_OOXMLIMPORT_TEST(testTdf43017, "tdf43017.docx")
getProperty<sal_Int32>(xText, "CharColor"));
}
+// related tdf#43017
+DECLARE_OOXMLIMPORT_TEST(testTdf124754, "tdf124754.docx")
+{
+ uno::Reference<text::XText> textbox(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(1, getParagraphs(textbox));
+
+ uno::Reference<text::XTextRange> xParagraph = getParagraphOfText(1, textbox);
+ uno::Reference<text::XTextRange> xText = getRun(xParagraph, 2);
+
+ // Ensure that hyperlink text color is not black
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Hyperlink color should be not black!", sal_Int32(353217),
+ getProperty<sal_Int32>(xText, "CharColor"));
+}
+
DECLARE_OOXMLIMPORT_TEST(testTdf112443, "tdf112443.docx")
{
// the position of the flying text frame should be off page