sdext/source/pdfimport/tree/style.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit ff160e93d32c62e09b28393979b3535e01057cdc Author: Dr. David Alan Gilbert <d...@treblig.org> AuthorDate: Mon Feb 12 00:38:42 2024 +0000 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Feb 29 08:25:35 2024 +0100 tdf#113050 sdext.pdfimport: In styles wrap 'Contents' For draw:fill-image we need output like: <draw:fill-image draw:name="foo"> <office:binary-data>Base64stuff </office:binary-data> </draw:fill-image Style's 'Contents' entry, almost does that and is currently unused; but it doesn't put the tags in. Adding the tags manually in the Contents string doesn't work (because it bypasses something in the Emitter?). Since it's not currently used, add the office:binary-data tags for our use. Change-Id: Idaf11b49bd075bb82116a0578bb4c38790dd0fb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sdext/source/pdfimport/tree/style.cxx b/sdext/source/pdfimport/tree/style.cxx index b97b1d3e9cdf..969fdc0e9648 100644 --- a/sdext/source/pdfimport/tree/style.cxx +++ b/sdext/source/pdfimport/tree/style.cxx @@ -197,7 +197,11 @@ void StyleContainer::impl_emitStyle( sal_Int32 nStyleId, for(sal_Int32 nSubStyle : rStyle.SubStyles) impl_emitStyle( nSubStyle, rContext, rContainedElemVisitor ); if( !rStyle.Contents.isEmpty() ) + { + rContext.rEmitter.beginTag( "office:binary-data", PropertyMap() ); rContext.rEmitter.write( rStyle.Contents ); + rContext.rEmitter.endTag( "office:binary-data" ); + } if( rStyle.ContainedElement ) rStyle.ContainedElement->visitedBy( rContainedElemVisitor, std::list<std::unique_ptr<Element>>::iterator() );