[Libreoffice-commits] core.git: sal/inc sal/osl

Stephan Bergmann sbergman at redhat.com
Thu Mar 31 11:10:12 UTC 2016


 sal/inc/internal/signalshared.hxx |    5 +----
 sal/osl/all/signalshared.cxx      |   12 +-----------
 sal/osl/unx/signal.cxx            |    2 ++
 sal/osl/w32/signal.cxx            |    2 --
 4 files changed, 4 insertions(+), 17 deletions(-)

New commits:
commit 7a2d55a1943e51895d808e87f1766b44761a495a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Mar 31 13:09:10 2016 +0200

    Fix Windows part of 97858ca008fd8cf405e52795c8db415ef6c5afb3
    
    "tdf#93548 Refactor sal signal to reduce code duplication"
    
    Change-Id: Ib0a872fb6023b6989c7931f4d57d911ddf76936f

diff --git a/sal/inc/internal/signalshared.hxx b/sal/inc/internal/signalshared.hxx
index 07f9976..3eaa32c 100644
--- a/sal/inc/internal/signalshared.hxx
+++ b/sal/inc/internal/signalshared.hxx
@@ -30,18 +30,15 @@ struct oslSignalHandlerImpl
     oslSignalHandlerImpl*       pNext;
 };
 
-typedef void (*ErrorReportingChangedHandler)(bool);
-
 extern bool                     bErrorReportingEnabled;
 extern bool                     bInitSignal;
 
-void setErrorReportingChangedHandler(ErrorReportingChangedHandler handler);
-
 oslSignalAction callSignalHandler(oslSignalInfo* pInfo);
 
 // platform-specific functions that need to be implemented
 bool onInitSignal();
 bool onDeInitSignal();
+void onErrorReportingChanged(bool enabled);
 
 #endif
 
diff --git a/sal/osl/all/signalshared.cxx b/sal/osl/all/signalshared.cxx
index fcafacd..f444f37 100644
--- a/sal/osl/all/signalshared.cxx
+++ b/sal/osl/all/signalshared.cxx
@@ -31,8 +31,6 @@ namespace
 oslSignalHandlerImpl* SignalList;
 oslMutex SignalListMutex;
 
-ErrorReportingChangedHandler errorReportingChangedHandler;
-
 bool initSignal()
 {
     SignalListMutex = osl_createMutex();
@@ -51,11 +49,6 @@ bool deInitSignal()
 
 }
 
-void setErrorReportingChangedHandler(ErrorReportingChangedHandler handler)
-{
-    errorReportingChangedHandler = handler;
-}
-
 oslSignalAction callSignalHandler(oslSignalInfo* pInfo)
 {
     oslSignalHandlerImpl* pHandler = SignalList;
@@ -167,10 +160,7 @@ sal_Bool SAL_CALL osl_setErrorReporting( sal_Bool bEnable )
 {
     bool bOld = bErrorReportingEnabled;
     bErrorReportingEnabled = bEnable;
-
-    if (errorReportingChangedHandler)
-        errorReportingChangedHandler(bEnable);
-
+    onErrorReportingChanged(bEnable);
     return bOld;
 }
 
diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 7f86456..73bb19d 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -281,6 +281,8 @@ bool onDeInitSignal()
     return false;
 }
 
+void onErrorReportingChanged(SAL_UNUSED_PARAMETER bool) {}
+
 namespace
 {
 void printStack(int sig)
diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index 3c7c47b..d4a7967 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -42,8 +42,6 @@
 namespace
 {
 long WINAPI signalHandlerFunction(LPEXCEPTION_POINTERS lpEP);
-
-void onErrorReportingChanged(bool bEnable);
 }
 
 bool onInitSignal()


More information about the Libreoffice-commits mailing list