[Libreoffice-commits] core.git: canvas/source cui/source include/vcl sc/source vcl/headless vcl/inc vcl/osx vcl/source vcl/unx vcl/win vcl/workben

Ryan McCoskrie ryan.mccoskrie at gmail.com
Fri Oct 30 20:07:42 UTC 2015


 canvas/source/vcl/spritecanvashelper.cxx |    2 +-
 cui/source/dialogs/cuigaldlg.cxx         |    6 ++----
 include/vcl/window.hxx                   |    1 -
 sc/source/ui/miscdlgs/optsolver.cxx      |    2 +-
 vcl/headless/svpframe.cxx                |    4 ----
 vcl/inc/headless/svpframe.hxx            |    1 -
 vcl/inc/osx/salframe.h                   |    1 -
 vcl/inc/salframe.hxx                     |    2 --
 vcl/inc/unx/gtk/gtkframe.hxx             |    1 -
 vcl/inc/unx/salframe.h                   |    1 -
 vcl/inc/win/salframe.h                   |    1 -
 vcl/osx/salframe.cxx                     |   12 ------------
 vcl/source/gdi/impanmvw.cxx              |    2 +-
 vcl/source/window/window.cxx             |    6 ------
 vcl/unx/generic/window/salframe.cxx      |    5 -----
 vcl/unx/gtk/window/gtkobject.cxx         |    2 +-
 vcl/unx/gtk/window/gtksalframe.cxx       |    5 -----
 vcl/win/source/window/salframe.cxx       |    5 -----
 vcl/workben/outdevgrind.cxx              |    2 +-
 19 files changed, 7 insertions(+), 54 deletions(-)

New commits:
commit d77af785f962efa6f783a5106671d608c313f853
Author: Ryan McCoskrie <ryan.mccoskrie at gmail.com>
Date:   Thu Sep 10 10:17:35 2015 +1200

    tdf#93684 - Remove SalFrame::Sync
    
    Change-Id: Icae9cf0a17f9cdf9a671c7e7278019d6980602b1
    Reviewed-on: https://gerrit.libreoffice.org/18453
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: jan iversen <jani at documentfoundation.org>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index 68a2c68..02c9fe4 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -305,7 +305,7 @@ namespace vclcanvas
         if( pTargetWindow )
         {
             // commit to screen
-            pTargetWindow->Sync();
+            pTargetWindow->Flush();
         }
 
         return true;
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 000a962..a42c00e 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -123,7 +123,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL,
         SolarMutexGuard aGuard;
 
         mpProgress->SetDirectory( rStartURL );
-        mpProgress->Sync();
+        mpProgress->Flush();
     }
 
     try
@@ -325,7 +325,7 @@ void TakeThread::execute()
 
             mpProgress->SetFile( aURL );
             pStatusProgress->Update( i, nEntries - 1 );
-            mpProgress->Sync();
+            mpProgress->Flush();
             pThm->InsertURL( aURL );
         }
     }
@@ -517,11 +517,9 @@ IMPL_LINK_TYPED( ActualizeProgress, ActualizeHdl, const INetURLObject&, rURL, vo
         Application::Reschedule();
 
     Flush();
-    Sync();
 
     m_pFtActualizeFile->SetText( GetReducedString( rURL, 30 ) );
     m_pFtActualizeFile->Flush();
-    m_pFtActualizeFile->Sync();
 }
 
 TitleDialog::TitleDialog(vcl::Window* pParent, const OUString& rOldTitle)
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 7a7d0a2..fd62a8a 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1131,7 +1131,6 @@ public:
     bool                                HasPaintEvent() const;
     void                                Update();
     void                                Flush();
-    void                                Sync();
 
     // toggles new docking support, enabled via toolkit
     void                                EnableDocking( bool bEnable = true );
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 01a7d5e..cd18e0a 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -849,7 +849,7 @@ bool ScOptSolverDlg::CallSolver()       // return true -> close dialog after cal
         aProgress->HideTimeLimit();
     aProgress->Show();
     aProgress->Update();
-    aProgress->Sync();
+    aProgress->Flush();
     // try to make sure the progress dialog is painted before continuing
     Application::Reschedule(true);
 
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index eeed1fc..f3f2cce 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -413,10 +413,6 @@ void SvpSalFrame::Flush()
 {
 }
 
-void SvpSalFrame::Sync()
-{
-}
-
 void SvpSalFrame::SetInputContext( SalInputContext* )
 {
 }
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index f64d22f..dbe7d91 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -106,7 +106,6 @@ public:
     virtual void                SetPointerPos( long nX, long nY ) override;
     using SalFrame::Flush;
     virtual void                Flush() override;
-    virtual void                Sync() override;
     virtual void                SetInputContext( SalInputContext* pContext ) override;
     virtual void                EndExtTextInput( EndExtTextInputFlags nFlags ) override;
     virtual OUString            GetKeyName( sal_uInt16 nKeyCode ) override;
diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h
index 4e483f8..1c0d8b7 100644
--- a/vcl/inc/osx/salframe.h
+++ b/vcl/inc/osx/salframe.h
@@ -132,7 +132,6 @@ public:
     virtual void                SetPointerPos( long nX, long nY ) override;
     virtual void                Flush( void ) override;
     virtual void                Flush( const Rectangle& ) override;
-    virtual void                Sync() override;
     virtual void                SetInputContext( SalInputContext* pContext ) override;
     virtual void                EndExtTextInput( EndExtTextInputFlags nFlags ) override;
     virtual OUString            GetKeyName( sal_uInt16 nKeyCode ) override;
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 0b781ef..14fb2fa 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -181,8 +181,6 @@ public:
     // flush output buffer
     virtual void            Flush() = 0;
     virtual void            Flush( const Rectangle& );
-    // flush output buffer, wait till outstanding operations are done
-    virtual void            Sync() = 0;
 
     virtual void            SetInputContext( SalInputContext* pContext ) = 0;
     virtual void            EndExtTextInput( EndExtTextInputFlags nFlags ) = 0;
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 4f73ac8..41cd6aa 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -410,7 +410,6 @@ public:
     using SalFrame::Flush;
     virtual void                Flush() override;
     // flush output buffer, wait till outstanding operations are done
-    virtual void                Sync() override;
 
     virtual void                SetInputContext( SalInputContext* pContext ) override;
     virtual void                EndExtTextInput( EndExtTextInputFlags nFlags ) override;
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index d595c44..fc8f0d3 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -234,7 +234,6 @@ public:
     virtual void                SetPointerPos( long nX, long nY ) override;
     using SalFrame::Flush;
     virtual void                Flush() override;
-    virtual void                Sync() override;
     virtual void                SetInputContext( SalInputContext* pContext ) override;
     virtual void                EndExtTextInput( EndExtTextInputFlags nFlags ) override;
     virtual OUString              GetKeyName( sal_uInt16 nKeyCode ) override;
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index 27fa46e..600946f 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -113,7 +113,6 @@ public:
     virtual void                SetPointerPos( long nX, long nY ) override;
     using SalFrame::Flush;
     virtual void                Flush() override;
-    virtual void                Sync() override;
     virtual void                SetInputContext( SalInputContext* pContext ) override;
     virtual void                EndExtTextInput( EndExtTextInputFlags nFlags ) override;
     virtual OUString            GetKeyName( sal_uInt16 nKeyCode ) override;
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index c4f0319..1ce314e 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -904,18 +904,6 @@ void AquaSalFrame::Flush( const Rectangle& rRect )
     }
 }
 
-void AquaSalFrame::Sync()
-{
-    if( mbGraphics && mpGraphics && mpNSView && mbShown )
-    {
-        // #i113170# may not be the main thread if called from UNO API
-        SalData::ensureThreadAutoreleasePool();
-
-        [mpNSView setNeedsDisplay: YES];
-        [mpNSView display];
-    }
-}
-
 void AquaSalFrame::SetInputContext( SalInputContext* pContext )
 {
     if (!pContext)
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 2b28b3c..65c3216 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -301,7 +301,7 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
             pDev.disposeAndClear();
 
             if( pRenderContext->GetOutDevType() == OUTDEV_WINDOW )
-                static_cast<vcl::Window*>( pRenderContext.get() )->Sync();
+                static_cast<vcl::Window*>( pRenderContext.get() )->Flush();
         }
     }
 }
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index f44f1a2..97a2991 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3156,12 +3156,6 @@ void Window::Flush()
     mpWindowImpl->mpFrame->Flush( aWinRect );
 }
 
-void Window::Sync()
-{
-
-    mpWindowImpl->mpFrame->Sync();
-}
-
 void Window::SetUpdateMode( bool bUpdate )
 {
     mpWindowImpl->mbNoUpdate = !bUpdate;
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 4be20a7..0b55e28 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -2289,11 +2289,6 @@ void X11SalFrame::Flush()
     XFlush( GetDisplay()->GetDisplay() );
 }
 
-void X11SalFrame::Sync()
-{
-    XSync( GetDisplay()->GetDisplay(), False );
-}
-
 // Keyboard
 
 void X11SalFrame::SetInputContext( SalInputContext* pContext )
diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx
index 3de060b..463c3c1 100644
--- a/vcl/unx/gtk/window/gtkobject.cxx
+++ b/vcl/unx/gtk/window/gtkobject.cxx
@@ -78,7 +78,7 @@ GtkSalObject::GtkSalObject( GtkSalFrame* pParent, bool bShow )
         g_signal_connect( G_OBJECT(m_pSocket), "destroy", G_CALLBACK(signalDestroy), this );
 
         // #i59255# necessary due to sync effects with java child windows
-        pParent->Sync();
+        pParent->Flush();
     }
 }
 
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 95a33f0..3e0749f 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -2642,11 +2642,6 @@ void GtkSalFrame::Flush()
 #endif
 }
 
-void GtkSalFrame::Sync()
-{
-    gdk_display_sync( getGdkDisplay() );
-}
-
 #ifndef GDK_Open
 #define GDK_Open 0x1008ff6b
 #endif
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 634d5fd..0203b05 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2205,11 +2205,6 @@ void WinSalFrame::Flush()
     GdiFlush();
 }
 
-void WinSalFrame::Sync()
-{
-    GdiFlush();
-}
-
 static void ImplSalFrameSetInputContext( HWND hWnd, const SalInputContext* pContext )
 {
     WinSalFrame*   pFrame = GetWindowPtr( hWnd );
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index e41f7a2..6326a77 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -752,7 +752,7 @@ void grindFunc( OutputDevice&                       rTarget,
         iter->second(&rTarget);
 
     if( rTarget.GetOutDevType() == OUTDEV_WINDOW )
-        static_cast< vcl::Window & >( rTarget ).Sync();
+        static_cast< vcl::Window & >( rTarget ).Flush();
 
     fprintf( stdout,
              "Duration: %d ms (%d repetitions)\tOperation: %s\tSetup: %s\n",


More information about the Libreoffice-commits mailing list