summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ww8export
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2019-01-14 22:18:46 +0300
committerMiklos Vajna <vmiklos@collabora.com>2019-04-30 15:13:42 +0200
commitcc899c6967238877f0094bcf00627145e484ffec (patch)
treedbe42d9f42c1fdd8af6524aaf0ba7c42e1d5e6d2 /sw/qa/extras/ww8export
parentb593634d3cfbb2fc8522d99ce1c3f2a11445ea59 (diff)
tdf#101826 ww8import: Fly - don't convert XATTR back and forth
In this case we are explicitly interested in textboxes, but any fly that accepts XATTR will now use that and skip the old RES_BACKGROUND. In the case of textbox import, the properties were being converted into RES_BACKGROUND and then back to XATTR again. Just copy the XATTR properties to the new FlySet instead. The ability to import XATTRs into a textbox was added to LO6.3 with commit 15819181772d95963d16c1c2eaa9e51af81f7f68 Change-Id: Ib65b3d9097d0a56dbe205b419d052af53d0132c8 Reviewed-on: https://gerrit.libreoffice.org/66331 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa/extras/ww8export')
-rwxr-xr-xsw/qa/extras/ww8export/data/tdf101826_xattrTextBoxFill.docbin0 -> 55296 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf101826_xattrTextBoxFill.doc b/sw/qa/extras/ww8export/data/tdf101826_xattrTextBoxFill.doc
new file mode 100755
index 000000000000..206f4830958a
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf101826_xattrTextBoxFill.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 239ce2bcbf2e..339ebd17e440 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -179,6 +179,16 @@ DECLARE_WW8EXPORT_TEST(testTdf121111_fillStyleNone, "tdf121111_fillStyleNone.doc
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(xText, "FillStyle"));
}
+DECLARE_WW8EXPORT_TEST(testTdf101826_xattrTextBoxFill, "tdf101826_xattrTextBoxFill.doc")
+{
+ //Basic 1 Color Fill: gradient from yellow(FFFF00) to brown(767600) currently saves as mid-color
+ CPPUNIT_ASSERT_MESSAGE("background color", Color(0xFF, 0xFF, 0x00) != getProperty<Color>(getShape(1), "BackColor"));
+ //Basic 2 Color Fill: gradient from yellow(FFFF00) to green(00B050) currently saves as mid-color
+ CPPUNIT_ASSERT_MESSAGE("background color", Color(0xFF, 0xFF, 0x00) != getProperty<Color>(getShape(4), "BackColor"));
+ //Basic Picture Fill: Tux image
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("background image", drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(getShape(5), "FillStyle"));
+}
+
DECLARE_WW8EXPORT_TEST(testTdf123433_fillStyleStop, "tdf123433_fillStyleStop.doc")
{
uno::Reference<text::XTextRange> xText(getParagraph(12));