[Libreoffice-commits] .: Branch 'libreoffice-3-5' - slideshow/source
Tor Lillqvist
tml at kemper.freedesktop.org
Sun Mar 18 23:42:16 PDT 2012
slideshow/source/engine/slideview.cxx | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
New commits:
commit e3f835eee16ac7d9dfa76eed8c043e7874995058
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Fri Mar 16 10:06:08 2012 +0100
Clear whole layer in slideshow sprites fdo#45219
The clear() previously offsetted the topleft rect corner for sprites
by _the sprite topleft_ position, which is rather unhelpful but for
sprites located at (0,0).
(cherry picked from commit d32cf8d820be839c7303e3c5962c17f64cac2812)
Signed-off-by: Tor Lillqvist <tlillqvist at suse.com>
diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx
index 0d55528..2309c4c 100644
--- a/slideshow/source/engine/slideview.cxx
+++ b/slideshow/source/engine/slideview.cxx
@@ -557,20 +557,27 @@ private:
virtual void clear() const
{
- // keep layer clip
- clearRect(getCanvas()->clone(),
- maLayerBoundsPixel);
+ // grab canvas - that also lazy-initializes maLayerBoundsPixel
+ cppcanvas::CanvasSharedPtr pCanvas=getCanvas()->clone();
+
+ // clear whole canvas
+ const basegfx::B2I64Tuple& rSpriteSize(maLayerBoundsPixel.getRange());
+ clearRect(pCanvas,
+ basegfx::B2IRange(0,0,rSpriteSize.getX(),rSpriteSize.getY()));
}
virtual void clearAll() const
{
+ // grab canvas - that also lazy-initializes maLayerBoundsPixel
::cppcanvas::CanvasSharedPtr pCanvas( getCanvas()->clone() );
// clear layer clip, to clear whole area
pCanvas->setClip();
+ // clear whole canvas
+ const basegfx::B2I64Tuple& rSpriteSize(maLayerBoundsPixel.getRange());
clearRect(pCanvas,
- maLayerBoundsPixel);
+ basegfx::B2IRange(0,0,rSpriteSize.getX(),rSpriteSize.getY()));
}
virtual bool isOnView(boost::shared_ptr<View> const& rView) const
More information about the Libreoffice-commits
mailing list