summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2024-05-27 20:31:54 -0400
committerJustin Luth <jluth@mail.com>2024-05-30 01:21:48 +0200
commita2b00082114b443962715a671b8bbb17733d6453 (patch)
tree8a6d512c39d099d8ee961ea87162ed6c34fe8e0c
parent2862f1989591f4666ed0f7b994c80a0d0fd8ae52 (diff)
tdf#131098 docx export: write fill property of graphic
All these are round-tripping (at least at a basic level): - bitmap - hatch - solid color - transparency (unit test) make CppunitTest_sw_ooxmlexport21 \ CPPUNIT_TEST_NAME=testTdf131098_imageFill No existing unit tests had an image with a fill. Change-Id: I745fa064db83bdb3bb7ec67eef1ae803f3930a23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168134 Reviewed-by: Justin Luth <jluth@mail.com> Tested-by: Jenkins
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport21.cxx3
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx4
2 files changed, 4 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
index 901a0b161d6a..baeba733afcc 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport21.cxx
@@ -534,9 +534,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf126533_pageBitmap, "tdf126533_pageBitmap.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf131098_imageFill, "tdf131098_imageFill.docx")
{
- if (isExported())
- return;
-
// given a document with an image background transparency (blue-white)
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_GRADIENT,
getProperty<drawing::FillStyle>(getShape(1), "FillStyle"));
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 971f27df0314..827d037b274c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -5411,6 +5411,10 @@ void DocxAttributeOutput::FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size
m_pSerializer->singleElementNS(XML_a, XML_avLst);
m_pSerializer->endElementNS( XML_a, XML_prstGeom );
+ m_rDrawingML.SetFS(m_pSerializer); // to be sure that we write to the right stream
+ if (xShapePropSet)
+ m_rDrawingML.WriteFill(xShapePropSet, awt::Size(aSize.Width(), aSize.Height()));
+
const SvxBoxItem& rBoxItem = pFrameFormat->GetBox();
const SvxBorderLine* pLeft = rBoxItem.GetLine(SvxBoxItemLine::LEFT);
const SvxBorderLine* pRight = rBoxItem.GetLine(SvxBoxItemLine::RIGHT);