sd/source/ui/slideshow/slideshowviewimpl.cxx |   51 ++++++++++++---------------
 sd/source/ui/slideshow/slideshowviewimpl.hxx |    2 -
 2 files changed, 23 insertions(+), 30 deletions(-)

New commits:
commit adfceaf7429a7d30c69add8f7e16a908b9a42a1d
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Mon Dec 27 21:20:01 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Dec 28 13:51:16 2021 +0100

    inline SlideShowView::init
    
    only called from one spot
    
    Change-Id: Ib1351d91f8949c60b4c4a909e5b0672e4ac3f0f1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127607
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx 
b/sd/source/ui/slideshow/slideshowviewimpl.cxx
index fda57bbef651..de12be146e1d 100644
--- a/sd/source/ui/slideshow/slideshowviewimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx
@@ -160,7 +160,29 @@ SlideShowView::SlideShowView( ShowWindow&     
rOutputWindow,
     mbFullScreen( bFullScreen ),
     mbMousePressedEaten( false )
 {
-    init();
+    mxWindow->addWindowListener( this );
+    mxWindow->addMouseListener( this );
+
+    mxPointer = awt::Pointer::create( 
::comphelper::getProcessComponentContext() );
+
+    getTransformation();
+
+    // #i48939# only switch on kind of hacky scroll optimization, when
+    // running fullscreen. this minimizes the probability that other
+    // windows partially cover the show.
+    if( mbFullScreen )
+    {
+        try
+        {
+            Reference< beans::XPropertySet > xCanvasProps( getCanvas(),
+                                                           
uno::UNO_QUERY_THROW );
+            xCanvasProps->setPropertyValue("UnsafeScrolling",
+                uno::makeAny( true ) );
+        }
+        catch( uno::Exception& )
+        {
+        }
+    }
 
     mTranslationOffset.Width = 0;
     mTranslationOffset.Height = 0;
@@ -615,33 +637,6 @@ void SAL_CALL SlideShowView::mouseMoved( const 
awt::MouseEvent& e )
     updateimpl( aGuard, mpSlideShow ); // warning: clears guard!
 }
 
-void SlideShowView::init()
-{
-    mxWindow->addWindowListener( this );
-    mxWindow->addMouseListener( this );
-
-    mxPointer = awt::Pointer::create( 
::comphelper::getProcessComponentContext() );
-
-    getTransformation();
-
-    // #i48939# only switch on kind of hacky scroll optimization, when
-    // running fullscreen. this minimizes the probability that other
-    // windows partially cover the show.
-    if( !mbFullScreen )
-        return;
-
-    try
-    {
-        Reference< beans::XPropertySet > xCanvasProps( getCanvas(),
-                                                       uno::UNO_QUERY_THROW );
-        xCanvasProps->setPropertyValue("UnsafeScrolling",
-            uno::makeAny( true ) );
-    }
-    catch( uno::Exception& )
-    {
-    }
-}
-
 } // namespace ::sd
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/slideshow/slideshowviewimpl.hxx 
b/sd/source/ui/slideshow/slideshowviewimpl.hxx
index 7109ba65bf68..90d045998ef8 100644
--- a/sd/source/ui/slideshow/slideshowviewimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowviewimpl.hxx
@@ -170,8 +170,6 @@ protected:
     virtual ~SlideShowView() override {}
 
 private:
-    void init();
-
     void updateimpl( std::unique_lock<std::mutex>& rGuard, SlideshowImpl* 
pSlideShow );
 
     void disposingImpl( std::unique_lock<std::mutex>& );

Reply via email to