cppcanvas/source/uno/uno_mtfrenderer.cxx | 2 +- cppcanvas/source/wrapper/implspritecanvas.cxx | 4 ---- cppcanvas/source/wrapper/implspritecanvas.hxx | 4 ++-- cppcanvas/source/wrapper/vclfactory.cxx | 8 +++++++- include/cppcanvas/spritecanvas.hxx | 4 ++-- include/cppcanvas/vclfactory.hxx | 5 ++++- offapi/com/sun/star/rendering/XSpriteCanvas.idl | 11 +++++------ sd/source/ui/presenter/PresenterHelper.cxx | 2 +- sd/source/ui/presenter/PresenterPreviewCache.cxx | 6 ++---- sd/source/ui/presenter/PresenterTextView.cxx | 2 +- sd/source/ui/presenter/SlideRenderer.cxx | 14 ++++---------- sdext/source/presenter/PresenterSlideSorter.cxx | 4 ++-- 12 files changed, 31 insertions(+), 35 deletions(-)
New commits: commit 05d2994c136650deca2d80fedf6b14d10109986e Author: Thorsten Behrens <[email protected]> Date: Fri Nov 29 18:26:48 2013 +0100 Further XCanvas != XBitmapCanvas cleanup. It seems I missed a few places in 21ec9beae29b19b8ec6f0a16fd0e708e4f210208, getting that straight now hopefully. Change-Id: I34fc8df2d1ee65bef0639b3de9487ff311bed89a diff --git a/cppcanvas/source/uno/uno_mtfrenderer.cxx b/cppcanvas/source/uno/uno_mtfrenderer.cxx index 63271d7..8fa7199 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 a24025e..d27afa1 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 3b2b498..cb42627 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 eb5b185..52cce14 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 4810151..162ca55 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 9498212..c26d5aa 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 9cdfcf8..bb3e3f5 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 d8ab281..c1a2706 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. commit 1b10205c2cb952ab43e30706c05f78d6e8f642c3 Author: Thorsten Behrens <[email protected]> Date: Fri Nov 29 18:26:28 2013 +0100 Fix fdo#71527 no unguarded ptr dereference here. This is the real problem - mxPane can be validly NULL. Change-Id: Ie8d055db9bfb68cb9031fa970518343f5aec6619 diff --git a/sdext/source/presenter/PresenterPaneContainer.cxx b/sdext/source/presenter/PresenterPaneContainer.cxx index 105c124..c8de7bf 100644 --- a/sdext/source/presenter/PresenterPaneContainer.cxx +++ b/sdext/source/presenter/PresenterPaneContainer.cxx @@ -192,7 +192,8 @@ PresenterPaneContainer::SharedPaneDescriptor { pDescriptor->mxView = rxView; pDescriptor->mpViewBackground = rpViewBackground; - pDescriptor->mxPane->SetBackground(rpViewBackground); + if (pDescriptor->mxPane.is()) + pDescriptor->mxPane->SetBackground(rpViewBackground); try { if ( ! pDescriptor->maViewInitialization.empty()) commit b807b2d9291a2328a55de55d67c4874803d8b7fd Author: Thorsten Behrens <[email protected]> Date: Fri Nov 29 18:26:17 2013 +0100 Revert "Resolves: fdo#71527 don't crash in presenter console" This reverts commit bae01385c895a100b5371879889e606927cff877. Change-Id: Id149bae0904fd6c2120209d69490d0b257ac3f64 diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx index 98db0b1..9cdfcf8 100644 --- a/sd/source/ui/presenter/SlideRenderer.cxx +++ b/sd/source/ui/presenter/SlideRenderer.cxx @@ -134,15 +134,9 @@ Reference<rendering::XBitmap> SlideRenderer::createPreviewForCanvas ( cppcanvas::BitmapCanvasSharedPtr pCanvas (cppcanvas::VCLFactory::getInstance().createCanvas( Reference<rendering::XBitmapCanvas>(rxCanvas, UNO_QUERY))); if (pCanvas.get() != NULL) - { - cppcanvas::BitmapSharedPtr xBitmap( - cppcanvas::VCLFactory::getInstance().createBitmap( + return cppcanvas::VCLFactory::getInstance().createBitmap( pCanvas, - CreatePreview(rxSlide, rMaximalSize, nSuperSampleFactor))); - if (xBitmap.get() == NULL) - return NULL; - return xBitmap->getUNOBitmap(); - } + CreatePreview(rxSlide, rMaximalSize, nSuperSampleFactor))->getUNOBitmap(); else return NULL; } diff --git a/sdext/source/presenter/PresenterPaneContainer.cxx b/sdext/source/presenter/PresenterPaneContainer.cxx index c8de7bf..105c124 100644 --- a/sdext/source/presenter/PresenterPaneContainer.cxx +++ b/sdext/source/presenter/PresenterPaneContainer.cxx @@ -192,8 +192,7 @@ PresenterPaneContainer::SharedPaneDescriptor { pDescriptor->mxView = rxView; pDescriptor->mpViewBackground = rpViewBackground; - if (pDescriptor->mxPane.is()) - pDescriptor->mxPane->SetBackground(rpViewBackground); + pDescriptor->mxPane->SetBackground(rpViewBackground); try { if ( ! pDescriptor->maViewInitialization.empty()) commit 72aa51185fb7b1ff2ad9006f2067a680b70ab66d Author: Thorsten Behrens <[email protected]> Date: Fri Nov 29 18:25:55 2013 +0100 Revert "Resolves: fdo#71527 make presenter console not crash/useless" This reverts commit 639aa8e72639fd01e9004977f1cfaafc13b1e45f. Change-Id: I0ac1a7ada530791e2d34d2f0802213c869ea48a1 diff --git a/cppcanvas/source/wrapper/implspritecanvas.cxx b/cppcanvas/source/wrapper/implspritecanvas.cxx index c6b43a6a..7870178 100644 --- a/cppcanvas/source/wrapper/implspritecanvas.cxx +++ b/cppcanvas/source/wrapper/implspritecanvas.cxx @@ -51,8 +51,6 @@ namespace cppcanvas ImplSpriteCanvas::ImplSpriteCanvas( const uno::Reference< rendering::XSpriteCanvas >& rCanvas ) : ImplCanvas( uno::Reference< rendering::XCanvas >(rCanvas, uno::UNO_QUERY) ), - ImplBitmapCanvas( uno::Reference< rendering::XBitmapCanvas >(rCanvas, - uno::UNO_QUERY) ), mxSpriteCanvas( rCanvas ), mpTransformArbiter( new TransformationArbiter() ) { @@ -61,10 +59,8 @@ namespace cppcanvas ImplSpriteCanvas::ImplSpriteCanvas(const ImplSpriteCanvas& rOrig) : Canvas(), - BitmapCanvas(), SpriteCanvas(), ImplCanvas( rOrig ), - ImplBitmapCanvas( rOrig ), mxSpriteCanvas( rOrig.getUNOSpriteCanvas() ), mpTransformArbiter( new TransformationArbiter() ) { diff --git a/cppcanvas/source/wrapper/implspritecanvas.hxx b/cppcanvas/source/wrapper/implspritecanvas.hxx index 2e70b9a..1999c56 100644 --- a/cppcanvas/source/wrapper/implspritecanvas.hxx +++ b/cppcanvas/source/wrapper/implspritecanvas.hxx @@ -29,14 +29,14 @@ #include <cppcanvas/spritecanvas.hxx> -#include <implbitmapcanvas.hxx> +#include <implcanvas.hxx> namespace cppcanvas { namespace internal { - class ImplSpriteCanvas : public virtual SpriteCanvas, protected virtual ImplBitmapCanvas + class ImplSpriteCanvas : public virtual SpriteCanvas, protected virtual ImplCanvas { public: ImplSpriteCanvas( const ::com::sun::star::uno::Reference< diff --git a/include/cppcanvas/spritecanvas.hxx b/include/cppcanvas/spritecanvas.hxx index d5e6a27..91fc52b 100644 --- a/include/cppcanvas/spritecanvas.hxx +++ b/include/cppcanvas/spritecanvas.hxx @@ -28,7 +28,7 @@ #include <boost/shared_ptr.hpp> -#include <cppcanvas/bitmapcanvas.hxx> +#include <cppcanvas/canvas.hxx> #include <cppcanvas/sprite.hxx> #include <cppcanvas/customsprite.hxx> @@ -49,7 +49,7 @@ namespace cppcanvas /** SpriteCanvas interface */ - class SpriteCanvas : public virtual BitmapCanvas, private boost::noncopyable + class SpriteCanvas : public virtual Canvas, private boost::noncopyable { public: virtual bool updateScreen( bool bUpdateAll ) const = 0; diff --git a/offapi/com/sun/star/rendering/XSpriteCanvas.idl b/offapi/com/sun/star/rendering/XSpriteCanvas.idl index eb98a4f..f15b02b 100644 --- a/offapi/com/sun/star/rendering/XSpriteCanvas.idl +++ b/offapi/com/sun/star/rendering/XSpriteCanvas.idl @@ -30,7 +30,7 @@ interface XSprite; interface XAnimatedSprite; interface XCustomSprite; -/** Specialization of a XBitmapCanvas, where moving, animated objects +/** Specialization of a XCanvas, where moving, animated objects (called sprites) are supported.<p> @attention The screen output of canvas drawing operations is @@ -44,9 +44,9 @@ interface XCustomSprite; (because there's a defined moment in time where content display can happen, namely the XBufferController::showBuffer()) call. If you don't need sprite functionality, and don't want the - updateScreen hassle, simply use the XBitmapCanvas. + updateScreen hassle, simply use the XCanvas. */ -interface XSpriteCanvas : XBitmapCanvas +interface XSpriteCanvas : XCanvas { /** Create a sprite object from the specified animation sequence. A sprite is a back-buffered object with its own, @@ -98,9 +98,8 @@ interface XSpriteCanvas : XBitmapCanvas object. The cloned sprite always shows the same content as its - original. Furthermore, cloned copies of a hidden original are - never visible, although cloned copies of a visible original - can of course be invisible. + original, but of course the sprite position, visibility, alpha + etc. can be modified independently. @param original The original sprite to copy the content from. This sprite must _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
