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.grandin@collabora.co.uk>
diff --git a/sdext/source/pdfimport/tree/style.cxx b/sdext/source/pdfimport/tree/style.cxx
index b97b1d3..969fdc0 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() );