summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@suse.com>2012-01-31 01:04:10 +0100
committerThorsten Behrens <tbehrens@suse.com>2013-10-07 17:33:45 +0200
commit21ec9beae29b19b8ec6f0a16fd0e708e4f210208 (patch)
tree84b5d635ba0c39282665dea33f40348a1ca73178 /slideshow
parent3e2dba1accbd018f7dac362a2636bed135f1b5bb (diff)
XCanvas does no longer imply XBitmapCanvas
Remove the implication that XCanvas IS-A XBitmapCanvas, i.e. one can access underlying pixels. That's a preparation for display-list based canvas implementations, and was a rather silly assumption in the first place. Also fixes up all client sites. Change-Id: I7a3d6f68ef46fe94b23cce7759cc0b8b6ca4dae9
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/slideview.cxx9
-rw-r--r--slideshow/source/engine/transitions/slidechangebase.cxx1
-rw-r--r--slideshow/source/engine/waitsymbol.cxx13
3 files changed, 13 insertions, 10 deletions
diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx
index 0d147b9bb64e..2d2c42153318 100644
--- a/slideshow/source/engine/slideview.cxx
+++ b/slideshow/source/engine/slideview.cxx
@@ -909,6 +909,11 @@ void SlideView::clearAll() const
if( !mxView.is() || !mpCanvas )
return;
+ mpCanvas->clear(); // this is unnecessary, strictly speaking. but
+ // it makes the SlideView behave exactly like a
+ // sprite-based SlideViewLayer, because those
+ // are created from scratch after a resize
+
// clear whole view
mxView->clear();
}
@@ -1126,10 +1131,6 @@ void SlideView::updateCanvas()
if( !mpCanvas || !mxView.is())
return;
- mpCanvas->clear(); // this is unnecessary, strictly speaking. but
- // it makes the SlideView behave exactly like a
- // sprite-based SlideViewLayer, because those
- // are created from scratch after a resize
clearAll();
mpCanvas->setTransformation( getTransformation() );
mpCanvas->setClip(
diff --git a/slideshow/source/engine/transitions/slidechangebase.cxx b/slideshow/source/engine/transitions/slidechangebase.cxx
index 56d7887fdb07..dd0cabfbce4d 100644
--- a/slideshow/source/engine/transitions/slidechangebase.cxx
+++ b/slideshow/source/engine/transitions/slidechangebase.cxx
@@ -231,6 +231,7 @@ void SlideChangeBase::end()
const SlideBitmapSharedPtr pSlideBitmap( getEnteringBitmap( *aCurr ));
pSlideBitmap->clip( basegfx::B2DPolyPolygon() /* no clipping */ );
+ aCurr->mpView->clearAll();
renderBitmap( pSlideBitmap,
aCurr->mpView->getCanvas() );
diff --git a/slideshow/source/engine/waitsymbol.cxx b/slideshow/source/engine/waitsymbol.cxx
index 6c56ac795749..2017d7419ed1 100644
--- a/slideshow/source/engine/waitsymbol.cxx
+++ b/slideshow/source/engine/waitsymbol.cxx
@@ -28,6 +28,7 @@
#include <basegfx/vector/b2dvector.hxx>
#include <com/sun/star/rendering/XCanvas.hpp>
+#include <com/sun/star/presentation/XSlideShowView.hpp>
#include "waitsymbol.hxx"
#include "eventmultiplexer.hxx"
@@ -103,13 +104,13 @@ void WaitSymbol::setVisible( const bool bVisible )
basegfx::B2DPoint WaitSymbol::calcSpritePos(
UnoViewSharedPtr const & rView ) const
{
- const uno::Reference<rendering::XBitmap> xBitmap( rView->getCanvas()->getUNOCanvas(),
- uno::UNO_QUERY_THROW );
- const geometry::IntegerSize2D realSize( xBitmap->getSize() );
+ const awt::Rectangle aViewArea( rView->getUnoView()->getCanvasArea() );
return basegfx::B2DPoint(
- std::min<sal_Int32>( realSize.Width, LEFT_BORDER_SPACE ),
- std::max<sal_Int32>( 0, realSize.Height - mxBitmap->getSize().Height
- - LOWER_BORDER_SPACE ) );
+ aViewArea.X + std::min<sal_Int32>( aViewArea.Width, LEFT_BORDER_SPACE ),
+ aViewArea.X + std::max<sal_Int32>( 0,
+ aViewArea.Height
+ - mxBitmap->getSize().Height
+ - LOWER_BORDER_SPACE ) );
}
void WaitSymbol::viewAdded( const UnoViewSharedPtr& rView )