Kaydet (Commit) 4ec1ddec authored tarafından sjacobi's avatar sjacobi

oox import, added support for linked graphics (at least they are embedded now

Change-Id: I7fc8dcc989eb37d3a337f06137bb7361cce797d3
üst d4324078
......@@ -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 );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment