misc

Change-Id: I24736c4bd05644ed61e6df50f2267f6a2cd2f7f3
diff --git a/slideshow/source/engine/slide/layermanager.cxx b/slideshow/source/engine/slide/layermanager.cxx
index 91bdb7b..bbe4578 100644
--- a/slideshow/source/engine/slide/layermanager.cxx
+++ b/slideshow/source/engine/slide/layermanager.cxx
@@ -636,6 +636,11 @@ namespace slideshow
                    OSL_FAIL( "BitmapView::setPriority(): This method is not supposed to be called!" );
                }

                virtual ::com::sun::star::geometry::IntegerSize2D getTranslationOffset() const
                {
                    return geometry::IntegerSize2D(0,0);
                }

                virtual ::basegfx::B2DHomMatrix getTransformation() const
                {
                    return mpCanvas->getTransformation();
diff --git a/slideshow/source/engine/slideview.cxx b/slideshow/source/engine/slideview.cxx
index 250de4e9..db2e471 100644
--- a/slideshow/source/engine/slideview.cxx
+++ b/slideshow/source/engine/slideview.cxx
@@ -489,6 +489,25 @@ public:
        }
    }

    virtual ::com::sun::star::geometry::IntegerSize2D getTranslationOffset() const
    {
        std::cerr << "slideshow/source/engine/slideview.cxx:522" << std::endl;
        basegfx::B2DRectangle aTmpRect;
        canvas::tools::calcTransformedRectBounds( aTmpRect,
                                                  maLayerBounds,
                                                  maTransformation );
        geometry::IntegerSize2D offset(0, 0);

        // Add translation according to the origin of aTmpRect.  Ignore the
        // translation when aTmpRect was not properly initialized.
        if ( ! aTmpRect.isEmpty())
        {
            offset.Width  = basegfx::fround(aTmpRect.getMinX());
            offset.Height = basegfx::fround(aTmpRect.getMinY());
        }
        return offset;
    }

private:
    // ViewLayer interface
    // ----------------------------------------------
@@ -700,6 +719,7 @@ private:
    virtual cppcanvas::CustomSpriteSharedPtr createSprite( const ::basegfx::B2DSize& rSpriteSizePixel,
                                                           double                    nPriority ) const;
    virtual void setPriority( const basegfx::B1DRange& rRange );
    virtual geometry::IntegerSize2D getTranslationOffset() const;
    virtual ::basegfx::B2DHomMatrix getTransformation() const;
    virtual basegfx::B2DHomMatrix getSpriteTransformation() const;
    virtual void setClip( const ::basegfx::B2DPolyPolygon& rClip );
@@ -960,6 +980,11 @@ basegfx::B2DHomMatrix SlideView::getTransformation() const
    return maViewTransform * aMatrix;
}

geometry::IntegerSize2D SlideView::getTranslationOffset() const
{
    return mxView->getTranslationOffset();
}

basegfx::B2DHomMatrix SlideView::getSpriteTransformation() const
{
    return getTransformation();
diff --git a/slideshow/source/inc/viewlayer.hxx b/slideshow/source/inc/viewlayer.hxx
index bddb210..f47f18a 100644
--- a/slideshow/source/inc/viewlayer.hxx
+++ b/slideshow/source/inc/viewlayer.hxx
@@ -22,6 +22,7 @@

#include <sal/config.h>
#include <boost/shared_ptr.hpp>
#include <com/sun/star/geometry/IntegerSize2D.hpp>

namespace basegfx
{
@@ -128,6 +129,8 @@ namespace slideshow
            */
            virtual basegfx::B2DHomMatrix getTransformation() const = 0;

            virtual ::com::sun::star::geometry::IntegerSize2D getTranslationOffset() const = 0;

            /** Get the overall view transformation.

                Same transformation as with getTransformation(), only