PresenterHelper.cxx (11022fa0) | PresenterHelper.cxx (45b93914) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 21 unchanged lines hidden (view full) --- 30#include <com/sun/star/awt/WindowAttribute.hpp> 31#include <com/sun/star/awt/WindowClass.hpp> 32#include <com/sun/star/awt/WindowDescriptor.hpp> 33#include <osl/file.hxx> 34#include <toolkit/helper/vclunohelper.hxx> 35#include <vcl/svapp.hxx> 36#include <vcl/window.hxx> 37#include <vcl/wrkwin.hxx> | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 21 unchanged lines hidden (view full) --- 30#include <com/sun/star/awt/WindowAttribute.hpp> 31#include <com/sun/star/awt/WindowClass.hpp> 32#include <com/sun/star/awt/WindowDescriptor.hpp> 33#include <osl/file.hxx> 34#include <toolkit/helper/vclunohelper.hxx> 35#include <vcl/svapp.hxx> 36#include <vcl/window.hxx> 37#include <vcl/wrkwin.hxx> |
38#include <vcl/imagerepository.hxx> | |
39 40using namespace ::com::sun::star; 41using namespace ::com::sun::star::uno; 42using ::rtl::OUString; 43 44namespace sd { namespace presenter { 45 46//===== Service =============================================================== --- 212 unchanged lines hidden (view full) --- 259 mpGraphicFilter.reset(new GraphicFilter(sal_False)); 260 261 const cppcanvas::CanvasSharedPtr pCanvas ( 262 cppcanvas::VCLFactory::getInstance().createCanvas( 263 Reference<css::rendering::XBitmapCanvas>(rxCanvas,UNO_QUERY))); 264 265 if (pCanvas.get()!=NULL && rsURL.getLength()>0 && mpGraphicFilter.get()!=NULL) 266 { | 38 39using namespace ::com::sun::star; 40using namespace ::com::sun::star::uno; 41using ::rtl::OUString; 42 43namespace sd { namespace presenter { 44 45//===== Service =============================================================== --- 212 unchanged lines hidden (view full) --- 258 mpGraphicFilter.reset(new GraphicFilter(sal_False)); 259 260 const cppcanvas::CanvasSharedPtr pCanvas ( 261 cppcanvas::VCLFactory::getInstance().createCanvas( 262 Reference<css::rendering::XBitmapCanvas>(rxCanvas,UNO_QUERY))); 263 264 if (pCanvas.get()!=NULL && rsURL.getLength()>0 && mpGraphicFilter.get()!=NULL) 265 { |
267 sal_Int32 nIndex = 0; 268 if( rsURL.getToken( 0, '/', nIndex ).equalsAsciiL( 269 RTL_CONSTASCII_STRINGPARAM( "private:graphicrepository" ) ) ) | 266 Graphic aGraphic; 267 OUString sFileName; 268 if (osl::FileBase::getSystemPathFromFileURL(rsURL, sFileName) 269 == osl::FileBase::E_None) |
270 { | 270 { |
271 OUString sPathName( rsURL.copy( nIndex ) ); 272 BitmapEx aBitmap; 273 if ( ::vcl::ImageRepository::loadImage( sPathName, aBitmap, false ) 274 && !aBitmap.IsEmpty() ) | 271 if (mpGraphicFilter->ImportGraphic(aGraphic, rsURL) == GRFILTER_OK) 272 { 273 BitmapEx aBitmapEx (aGraphic.GetBitmapEx()); |
275 return cppcanvas::VCLFactory::getInstance().createBitmap( 276 pCanvas, | 274 return cppcanvas::VCLFactory::getInstance().createBitmap( 275 pCanvas, |
277 aBitmap)->getUNOBitmap(); | 276 aBitmapEx)->getUNOBitmap(); 277 } |
278 } 279 } 280 281 return NULL; 282} 283 284 285 --- 54 unchanged lines hidden --- | 278 } 279 } 280 281 return NULL; 282} 283 284 285 --- 54 unchanged lines hidden --- |