diff options
author | Tibor Nagy <nagy.tibor2@nisz.hu> | 2022-11-09 14:08:02 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2022-11-21 10:04:36 +0100 |
commit | ab10008ecaa33228838115a0b714e4f118c07ac1 (patch) | |
tree | a4ddbec351bd39736e5fc74ad8179cef7eaa70c1 /oox | |
parent | e3245247421fc30c37a8b7321e2815e2507b5a1f (diff) |
tdf#149803 tdf#128150 PPTX: export UseBgFill of custom shapes
Fixing tdf#128150 the UseBgFill property of shapes can
be saved to PPTX, but not in the case of custom shapes.
Follow-up to commits c4cf2e82e8d0aaef9b1daedc033d6edf647e5284
(tdf#128150 Add OOXML import/export for "use background fill"),
commit 50394abcc36a73c0205e6cb69d925c66c25f81f2,
(tdf#128150 Implement/add SlideBackgroundFill visualization") and
commit 9c2c48f14535e58cad0453fef584400ee703aecc
"tdf#128150 xmloff: ODF import/export of fill-use-slide-background".
Change-Id: Ib88f236d2533ef71ea66718d380e83d9a0685c3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142489
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/shapes.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 9d00dff8348c..70466d17fdb1 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -812,11 +812,17 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape ) } FSHelperPtr pFS = GetFS(); - pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes ? XML_sp : XML_wsp)); - // non visual shape properties if (GetDocumentType() != DOCUMENT_DOCX || mbUserShapes) { + bool bUseBackground = false; + if (GETA(FillUseSlideBackground)) + mAny >>= bUseBackground; + if (bUseBackground) + mpFS->startElementNS(mnXmlNamespace, XML_sp, XML_useBgFill, "1"); + else + mpFS->startElementNS(mnXmlNamespace, XML_sp); + bool isVisible = true ; if( GETA (Visible)) { @@ -904,7 +910,10 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape ) pFS->endElementNS( mnXmlNamespace, XML_nvSpPr ); } else + { + pFS->startElementNS(mnXmlNamespace, XML_wsp); pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr); + } // visual shape properties pFS->startElementNS(mnXmlNamespace, XML_spPr); |