diff options
-rw-r--r-- | cppcanvas/source/uno/uno_mtfrenderer.cxx | 2 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/vclfactory.cxx | 8 | ||||
-rw-r--r-- | include/cppcanvas/vclfactory.hxx | 5 | ||||
-rw-r--r-- | sd/source/ui/presenter/PresenterHelper.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/presenter/PresenterPreviewCache.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/presenter/PresenterTextView.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/presenter/SlideRenderer.cxx | 4 | ||||
-rw-r--r-- | sdext/source/presenter/PresenterSlideSorter.cxx | 4 |
8 files changed, 20 insertions, 13 deletions
diff --git a/cppcanvas/source/uno/uno_mtfrenderer.cxx b/cppcanvas/source/uno/uno_mtfrenderer.cxx index 63271d7940df..8fa7199933ca 100644 --- a/cppcanvas/source/uno/uno_mtfrenderer.cxx +++ b/cppcanvas/source/uno/uno_mtfrenderer.cxx @@ -23,7 +23,7 @@ void MtfRenderer::draw (double fScaleX, double fScaleY) throw (uno::RuntimeExcep { if (mpMetafile && mxCanvas.get()) { cppcanvas::VCLFactory& factory = cppcanvas::VCLFactory::getInstance(); - cppcanvas::BitmapCanvasSharedPtr canvas = factory.createCanvas (mxCanvas); + cppcanvas::BitmapCanvasSharedPtr canvas = factory.createBitmapCanvas (mxCanvas); cppcanvas::RendererSharedPtr renderer = factory.createRenderer (canvas, *mpMetafile, cppcanvas::Renderer::Parameters ()); ::basegfx::B2DHomMatrix aMatrix; aMatrix.scale( fScaleX, fScaleY ); diff --git a/cppcanvas/source/wrapper/vclfactory.cxx b/cppcanvas/source/wrapper/vclfactory.cxx index a24025e34f4e..d27afa18099d 100644 --- a/cppcanvas/source/wrapper/vclfactory.cxx +++ b/cppcanvas/source/wrapper/vclfactory.cxx @@ -59,7 +59,13 @@ namespace cppcanvas { } - BitmapCanvasSharedPtr VCLFactory::createCanvas( const uno::Reference< rendering::XBitmapCanvas >& xCanvas ) + CanvasSharedPtr VCLFactory::createCanvas( const uno::Reference< rendering::XCanvas >& xCanvas ) + { + return CanvasSharedPtr( + new internal::ImplCanvas( xCanvas ) ); + } + + BitmapCanvasSharedPtr VCLFactory::createBitmapCanvas( const uno::Reference< rendering::XBitmapCanvas >& xCanvas ) { return BitmapCanvasSharedPtr( new internal::ImplBitmapCanvas( xCanvas ) ); diff --git a/include/cppcanvas/vclfactory.hxx b/include/cppcanvas/vclfactory.hxx index 3b2b49826393..cb42627114ff 100644 --- a/include/cppcanvas/vclfactory.hxx +++ b/include/cppcanvas/vclfactory.hxx @@ -43,6 +43,7 @@ class Animation; namespace com { namespace sun { namespace star { namespace rendering { + class XCanvas; class XBitmapCanvas; class XSpriteCanvas; } } } } @@ -64,7 +65,9 @@ namespace cppcanvas public: static VCLFactory& getInstance(); - BitmapCanvasSharedPtr createCanvas( const ::com::sun::star::uno::Reference< + CanvasSharedPtr createCanvas( const ::com::sun::star::uno::Reference< + ::com::sun::star::rendering::XCanvas >& xCanvas ); + BitmapCanvasSharedPtr createBitmapCanvas( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas >& xCanvas ); SpriteCanvasSharedPtr createSpriteCanvas( const ::Window& rVCLWindow ) const; diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx index eb5b18520a75..52cce1468653 100644 --- a/sd/source/ui/presenter/PresenterHelper.cxx +++ b/sd/source/ui/presenter/PresenterHelper.cxx @@ -452,7 +452,7 @@ Reference<rendering::XBitmap> SAL_CALL PresenterHelper::loadBitmap ( const cppcanvas::CanvasSharedPtr pCanvas ( cppcanvas::VCLFactory::getInstance().createCanvas( - Reference<css::rendering::XBitmapCanvas>(rxCanvas,UNO_QUERY))); + Reference<css::rendering::XCanvas>(rxCanvas,UNO_QUERY))); if (pCanvas.get() != NULL) { diff --git a/sd/source/ui/presenter/PresenterPreviewCache.cxx b/sd/source/ui/presenter/PresenterPreviewCache.cxx index 48101513c30e..162ca5539a38 100644 --- a/sd/source/ui/presenter/PresenterPreviewCache.cxx +++ b/sd/source/ui/presenter/PresenterPreviewCache.cxx @@ -25,7 +25,6 @@ #include "sdpage.hxx" #include <cppcanvas/vclfactory.hxx> #include <com/sun/star/drawing/XDrawPage.hpp> -#include <com/sun/star/rendering/XBitmapCanvas.hpp> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -189,9 +188,8 @@ Reference<rendering::XBitmap> SAL_CALL PresenterPreviewCache::getSlidePreview ( ThrowIfDisposed(); OSL_ASSERT(mpCacheContext.get()!=NULL); - cppcanvas::BitmapCanvasSharedPtr pCanvas ( - cppcanvas::VCLFactory::getInstance().createCanvas( - Reference<rendering::XBitmapCanvas>(rxCanvas, UNO_QUERY))); + cppcanvas::CanvasSharedPtr pCanvas ( + cppcanvas::VCLFactory::getInstance().createCanvas(rxCanvas)); const SdrPage* pPage = mpCacheContext->GetPage(nSlideIndex); if (pPage == NULL) diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index 9498212b90a5..c26d5aab2de9 100644 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -167,7 +167,7 @@ void SAL_CALL PresenterTextView::initialize (const Sequence<Any>& rArguments) { try { - Reference<rendering::XBitmapCanvas> xCanvas (rArguments[0], UNO_QUERY_THROW); + Reference<rendering::XCanvas> xCanvas (rArguments[0], UNO_QUERY_THROW); if (xCanvas.is()) { mpImplementation->SetCanvas( diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx index 9cdfcf8cc19d..bb3e3f528c63 100644 --- a/sd/source/ui/presenter/SlideRenderer.cxx +++ b/sd/source/ui/presenter/SlideRenderer.cxx @@ -131,8 +131,8 @@ Reference<rendering::XBitmap> SlideRenderer::createPreviewForCanvas ( ThrowIfDisposed(); SolarMutexGuard aGuard; - cppcanvas::BitmapCanvasSharedPtr pCanvas (cppcanvas::VCLFactory::getInstance().createCanvas( - Reference<rendering::XBitmapCanvas>(rxCanvas, UNO_QUERY))); + cppcanvas::CanvasSharedPtr pCanvas ( + cppcanvas::VCLFactory::getInstance().createCanvas(rxCanvas)); if (pCanvas.get() != NULL) return cppcanvas::VCLFactory::getInstance().createBitmap( pCanvas, diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx index d8ab28177f94..c1a2706baee1 100644 --- a/sdext/source/presenter/PresenterSlideSorter.cxx +++ b/sdext/source/presenter/PresenterSlideSorter.cxx @@ -180,7 +180,7 @@ private: const OUString& rsText) const; OUString GetFittingText (const OUString& rsText, const double nMaximalWidth) const; void PaintButtonBackground ( - const Reference<rendering::XBitmapCanvas>& rxCanvas, + const Reference<rendering::XCanvas>& rxCanvas, const geometry::IntegerSize2D& rSize) const; }; @@ -1742,7 +1742,7 @@ geometry::IntegerSize2D PresenterSlideSorter::MouseOverManager::CalculateLabelSi } void PresenterSlideSorter::MouseOverManager::PaintButtonBackground ( - const Reference<rendering::XBitmapCanvas>& rxCanvas, + const Reference<rendering::XCanvas>& rxCanvas, const geometry::IntegerSize2D& rSize) const { // Get the bitmaps for painting the label background. |