diff options
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/fillpropertiesgroupcontext.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/oox/source/drawingml/fillpropertiesgroupcontext.cxx b/oox/source/drawingml/fillpropertiesgroupcontext.cxx index beca78f30658..7e004eb8d1d8 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 ); } } |