diff options
Diffstat (limited to 'oox/source/export')
-rw-r--r-- | oox/source/export/ThemeExport.cxx | 13 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 20 |
2 files changed, 29 insertions, 4 deletions
diff --git a/oox/source/export/ThemeExport.cxx b/oox/source/export/ThemeExport.cxx index 8f00058e0bb1..16da603fa14c 100644 --- a/oox/source/export/ThemeExport.cxx +++ b/oox/source/export/ThemeExport.cxx @@ -34,8 +34,10 @@ void writeRelativeRectangle(sax_fastparser::FSHelperPtr pFS, sal_Int32 nToken, } } // end anonymous namespace -ThemeExport::ThemeExport(oox::core::XmlFilterBase* pFilterBase) +ThemeExport::ThemeExport(oox::core::XmlFilterBase* pFilterBase, + oox::drawingml::DocumentType eDocumentType) : mpFilterBase(pFilterBase) + , meDocumentType(eDocumentType) { } @@ -579,7 +581,14 @@ OString convertRectangleAlignment(model::RectangleAlignment eFlipMode) } } // end anonymous ns -void ThemeExport::writeBlip(model::BlipFill const& /*rBlipFil*/) {} +void ThemeExport::writeBlip(model::BlipFill const& rBlipFil) +{ + if (!rBlipFil.mxGraphic.is()) + return; + oox::drawingml::GraphicExport aExporter(mpFS, mpFilterBase, meDocumentType); + Graphic aGraphic(rBlipFil.mxGraphic); + aExporter.writeBlip(aGraphic, false); +} void ThemeExport::writeBlipFill(model::BlipFill const& rBlipFill) { diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 97c5210d95f6..f58e76eda95e 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1475,7 +1475,23 @@ const char* DrawingML::GetRelationCompPrefix() const return getRelationCompPrefix(meDocumentType); } -OUString GraphicExport::write(const Graphic& rGraphic , bool bRelPathToMedia) +OUString GraphicExport::writeBlip(Graphic const& rGraphic , bool bRelPathToMedia) +{ + OUString sRelId; + + sRelId = writeToStorage(rGraphic, bRelPathToMedia); + + mpFS->startElementNS(XML_a, XML_blip, FSNS(XML_r, XML_embed), sRelId); + + //WriteImageBrightnessContrastTransparence(rXPropSet); + //WriteArtisticEffect(rXPropSet); + + mpFS->endElementNS(XML_a, XML_blip); + + return sRelId; +} + +OUString GraphicExport::writeToStorage(const Graphic& rGraphic , bool bRelPathToMedia) { GfxLink aLink = rGraphic.GetGfxLink (); BitmapChecksum aChecksum = rGraphic.GetChecksum(); @@ -1608,7 +1624,7 @@ OUString GraphicExport::write(const Graphic& rGraphic , bool bRelPathToMedia) OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia ) { GraphicExport exporter(mpFS, mpFB, meDocumentType); - return exporter.write(rGraphic, bRelPathToMedia); + return exporter.writeToStorage(rGraphic, bRelPathToMedia); } void DrawingML::WriteMediaNonVisualProperties(const css::uno::Reference<css::drawing::XShape>& xShape) |