vcl/inc/win/saltimer.h |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 4437d842650c851f45f89cc3499a59e83875b704
Author: Jan-Marek Glogowski <[email protected]>
Date:   Mon Oct 2 09:23:38 2017 +0200

    WIN handle timer Impl* access via friend function
    
    Not sure if this is the better approach, but this gives the
    application window dispatch function access to the now private
    timer implementation, so nobody else can call them.
    
    Change-Id: Ic361d2c93116fbd6c85b20f7da3cffbd538b3558
    Reviewed-on: https://gerrit.libreoffice.org/43041
    Tested-by: Jenkins <[email protected]>
    Reviewed-by: Jan-Marek Glogowski <[email protected]>

diff --git a/vcl/inc/win/saltimer.h b/vcl/inc/win/saltimer.h
index 9107dd1a0b19..f87361e55ed8 100644
--- a/vcl/inc/win/saltimer.h
+++ b/vcl/inc/win/saltimer.h
@@ -24,10 +24,17 @@
 
 class WinSalTimer : public SalTimer
 {
+    // for access to Impl* functions
+    friend LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM wParam, 
LPARAM lParam, int& rDef );
+
     HANDLE       m_nTimerId;          ///< Windows timer id
     sal_uInt32   m_nTimerStartTicks;  ///< system ticks at timer start % 
SAL_MAX_UINT32
     bool         m_bPollForMessage;   ///< Run yield until a message is caught 
(most likely the 0ms timer)
 
+    void ImplStart( sal_uIntPtr nMS );
+    void ImplStop();
+    void ImplEmitTimerCallback();
+
 public:
     WinSalTimer();
     virtual ~WinSalTimer() override;
@@ -38,14 +45,6 @@ public:
     inline bool IsValidWPARAM( WPARAM wParam ) const;
 
     inline bool PollForMessage() const;
-
-    // The Impl functions are just public to be called from the static
-    // SalComWndProc on main thread redirect! Otherwise they would be private.
-    // They must be called from the main application thread only!
-
-    void ImplStart( sal_uIntPtr nMS );
-    void ImplStop();
-    void ImplEmitTimerCallback();
 };
 
 inline bool WinSalTimer::IsValidWPARAM( WPARAM aWPARAM ) const
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to