summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ww8export/ww8export3.cxx
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-04-14 17:39:36 +0300
committerJustin Luth <justin_luth@sil.org>2020-04-16 19:53:55 +0200
commit38e7e6f348df5d6b37d7e0051fd3b8c227db69e6 (patch)
treec393ee44a34f938a20668da9b5697f9503326f17 /sw/qa/extras/ww8export/ww8export3.cxx
parent1aaf5f559bcc1169cafb73ea4082643a840fcb39 (diff)
tdf#132094 doc: fix export of fill in wrap-through fly frames
This builds on commit 2f13dbac060ae6af7e25ad3eff675cc859cfb3ff by Miklos Vajna on Fri Jun 15 08:49:46 2012 +0100 n#325936 fix ww8 export of fly frames with transparent bg where he wisely and cautiously says Regression from commit ed8b5f2d -- to be safe, reverted only for fly frames in headers. because for some unknown reason, way back in 2002, commit ed8b5f2debac216243930aba0873e0d75de8d0dd forced all frames to specify a background fill. Typically of course this is white, and so who notices? Well, you notice if your frame is transparent, and now the area fill hides something that it is over top of. Like for example a transparent image, where the text wraps through the image. At first I was going to just try and revert everything. Then I decided it likely was a difference between how LO and MSO handled stacking/overlapping things. After that, I was going to just make an exception for eShapeType == mso_sptPictureFrame, but that only seems necessary if there is something underneath. If the something is just a background, that is handled anyway, so really it would only be other shapes or (most importantly) text, so the safest thing is testing wrap through, which there was already a pre-defined variable to reuse (and fix the spelling). Change-Id: I9236579fa692e22205bab5a21c3f9d919f4cf24f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92215 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/qa/extras/ww8export/ww8export3.cxx')
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index c077dfcb040d..d12eef55f6bd 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -300,6 +300,16 @@ DECLARE_WW8EXPORT_TEST(testTdf128608_fillStyleNoneB, "tdf128608_fillStyleNoneB.o
CPPUNIT_ASSERT_EQUAL_MESSAGE("No fill", drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xText, "FillStyle"));
}
+DECLARE_WW8EXPORT_TEST(testTdf132094_transparentPageImage, "tdf132094_transparentPageImage.doc")
+{
+ uno::Reference<drawing::XShape> image (getShape(1), uno::UNO_QUERY);
+ // Don't add fillstyle when none is set.
+ // Well, ok, at least make it transparent if you do uselessly set a solid color...
+ const bool bFillNone = drawing::FillStyle_NONE == getProperty<drawing::FillStyle>(image, "FillStyle");
+ const bool bTransparent = sal_Int16(0) != getProperty<sal_Int16>(image, "FillTransparence");
+ CPPUNIT_ASSERT_MESSAGE("no background fill", bTransparent || bFillNone);
+}
+
DECLARE_WW8EXPORT_TEST(testTdf112618_textbox_no_bg, "tdf112618_textbox_no_bg.doc")
{
sal_uInt16 nTransparence = getProperty<sal_Int16>(getShape(2), "FillTransparence");