From bc89d402b3df00c2402ac86896eb2ce4c3f7b7d0 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Fri, 17 Jan 2014 01:37:00 +0000 Subject: i123042 corrected reload of linked content to have access to it's own path --- svx/source/svdraw/svdograf.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'svx/source/svdraw/svdograf.cxx') diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 81daa7aa133b..84685b4a4aa1 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -135,7 +135,6 @@ const Graphic ImpLoadLinkedGraphic( const String aFileName, const String aFilter ? pGF->GetImportFormatNumber( aFilterName ) : GRFILTER_FORMAT_DONTKNOW; - String aEmptyStr; com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aFilterData( 1 ); // Room for improvment: @@ -144,7 +143,14 @@ const Graphic ImpLoadLinkedGraphic( const String aFileName, const String aFilter // there we should create a new service to provide this data if needed aFilterData[ 0 ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CreateNativeLink" ) ); aFilterData[ 0 ].Value = Any( sal_True ); - pGF->ImportGraphic( aGraphic, aEmptyStr, *pInStrm, nFilter, NULL, 0, &aFilterData ); + + // #123042# for e.g SVG the path is needed, so hand it over here. I have no real idea + // what consequences this may have; maybe this is not handed over by purpose here. Not + // handing it over means that any GraphicFormat that internallv needs a path as base + // to interpret included links may fail. + // Alternatively the path may be set at the result after this call when it is known + // that it is a SVG graphic, but only because noone yet tried to interpret it. + pGF->ImportGraphic( aGraphic, aFileName, *pInStrm, nFilter, NULL, 0, &aFilterData ); } return aGraphic; } -- cgit v1.2.1