oox/source/drawingml/fillpropertiesgroupcontext.cxx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
New commits: commit 4ec1ddec3e8b3b22741504b0eca7b74c3377bf49 Author: sjacobi <sven-jac...@gmx.de> Date: Fri Apr 19 00:26:48 2013 +0200 oox import, added support for linked graphics (at least they are embedded now Change-Id: I7fc8dcc989eb37d3a337f06137bb7361cce797d3 diff --git a/oox/source/drawingml/fillpropertiesgroupcontext.cxx b/oox/source/drawingml/fillpropertiesgroupcontext.cxx index beca78f..7e004eb 100644 --- a/oox/source/drawingml/fillpropertiesgroupcontext.cxx +++ b/oox/source/drawingml/fillpropertiesgroupcontext.cxx @@ -23,6 +23,7 @@ #include "oox/core/xmlfilterbase.hxx" #include "oox/drawingml/drawingmltypes.hxx" #include "oox/drawingml/fillproperties.hxx" +#include <sfx2/docfile.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -166,9 +167,17 @@ BlipContext::BlipContext( ContextHandler& rParent, else if( aAttribs.hasAttribute( R_TOKEN( link ) ) ) { // external URL - // OUString aRelId = aAttribs.getString( R_TOKEN( link ), OUString() ); - // OUString aTargetLink = getFilter().getAbsoluteUrl( getRelations().getExternalTargetFromRelId( aRelId ) ); - // TODO: load external picture + + // we will embed this link, this is better than just doing nothing.. + // TODO: import this graphic as real link, but this requires some + // code rework. + OUString aRelId = aAttribs.getString( R_TOKEN( link ), OUString() ); + OUString aTargetLink = getFilter().getAbsoluteUrl( getRelations().getExternalTargetFromRelId( aRelId ) ); + SfxMedium xMed( aTargetLink, STREAM_STD_READ ); + xMed.DownLoad(); + Reference< io::XInputStream > xInStrm = xMed.GetInputStream(); + if ( xInStrm.is() ) + mrBlipProps.mxGraphic = getFilter().getGraphicHelper().importGraphic( xInStrm ); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits