diff options
Diffstat (limited to 'sd/source/ui/presenter/PresenterHelper.cxx')
-rw-r--r-- | sd/source/ui/presenter/PresenterHelper.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx index 9f2319d395cd..ca2baa7ff131 100644 --- a/sd/source/ui/presenter/PresenterHelper.cxx +++ b/sd/source/ui/presenter/PresenterHelper.cxx @@ -35,6 +35,7 @@ #include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <vcl/wrkwin.hxx> +#include <vcl/imagerepository.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -263,18 +264,17 @@ Reference<rendering::XBitmap> SAL_CALL PresenterHelper::loadBitmap ( if (pCanvas.get()!=NULL && rsURL.getLength()>0 && mpGraphicFilter.get()!=NULL) { - Graphic aGraphic; - OUString sFileName; - if (osl::FileBase::getSystemPathFromFileURL(rsURL, sFileName) - == osl::FileBase::E_None) + sal_Int32 nIndex = 0; + if( rsURL.getToken( 0, '/', nIndex ).equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM( "private:graphicrepository" ) ) ) { - if (mpGraphicFilter->ImportGraphic(aGraphic, rsURL) == GRFILTER_OK) - { - BitmapEx aBitmapEx (aGraphic.GetBitmapEx()); + OUString sPathName( rsURL.copy( nIndex ) ); + BitmapEx aBitmap; + if ( ::vcl::ImageRepository::loadImage( sPathName, aBitmap, false ) + && !aBitmap.IsEmpty() ) return cppcanvas::VCLFactory::getInstance().createBitmap( pCanvas, - aBitmapEx)->getUNOBitmap(); - } + aBitmap)->getUNOBitmap(); } } |