summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2010-10-11 01:26:23 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2010-10-25 19:55:32 -0500
commit2afa8c18599b5f10f528ec408a0bc60e075bbe72 (patch)
tree08619a648e490ca97cb4621979960e941fe4d6c7
parent58cbef55a44cebbedecace6e4867aa3f49f85d11 (diff)
merge vosremoval-signal patch
-rw-r--r--desktop/source/app/app.cxx8
-rw-r--r--desktop/source/app/officeipcthread.cxx4
-rw-r--r--desktop/source/app/officeipcthread.hxx7
3 files changed, 8 insertions, 11 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 308949e87d..746040e888 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -188,7 +188,7 @@ ResMgr* desktop::Desktop::pResMgr = 0;
namespace desktop
{
-static SalMainPipeExchangeSignalHandler* pSignalHandler = 0;
+static oslSignalHandler pSignalHandler = 0;
static sal_Bool _bCrashReporterEnabled = sal_True;
static const ::rtl::OUString CFG_PACKAGE_COMMON_HELP ( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/Help"));
@@ -737,7 +737,7 @@ void Desktop::Init()
// disable IPC thread in an instance that is just showing a help message
OfficeIPCThread::DisableOfficeIPCThread();
}
- pSignalHandler = new SalMainPipeExchangeSignalHandler;
+ pSignalHandler = osl_addSignalHandler(SalMainPipeExchangeSignal_impl, NULL);
}
}
@@ -772,7 +772,7 @@ void Desktop::DeInit()
OfficeIPCThread::DisableOfficeIPCThread();
if( pSignalHandler )
- DELETEZ( pSignalHandler );
+ osl_removeSignalHandler( pSignalHandler );
} catch (RuntimeException&) {
// someone threw an exception during shutdown
// this will leave some garbage behind..
@@ -1467,7 +1467,7 @@ USHORT Desktop::Exception(USHORT nError)
{
OfficeIPCThread::DisableOfficeIPCThread();
if( pSignalHandler )
- DELETEZ( pSignalHandler );
+ osl_removeSignalHandler( pSignalHandler );
restartOnMac(false);
_exit( ExitHelper::E_CRASH_WITH_RESTART );
}
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 55aaaf682f..263a965b12 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -296,11 +296,11 @@ void ImplPostProcessDocumentsEvent( ProcessDocumentsRequest* pEvent )
Application::PostUserEvent( STATIC_LINK( NULL, ProcessEventsClass_Impl, ProcessDocumentsEvent ), pEvent );
}
-OSignalHandler::TSignalAction SAL_CALL SalMainPipeExchangeSignalHandler::signal(TSignalInfo *pInfo)
+oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* pInfo)
{
if( pInfo->Signal == osl_Signal_Terminate )
OfficeIPCThread::DisableOfficeIPCThread();
- return (TAction_CallNextHandler);
+ return osl_Signal_ActCallNextHdl;
}
// ----------------------------------------------------------------------------
diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx
index f65f9df875..98371a488d 100644
--- a/desktop/source/app/officeipcthread.hxx
+++ b/desktop/source/app/officeipcthread.hxx
@@ -32,7 +32,7 @@
#include <com/sun/star/frame/XTerminateListener.hpp>
#include <vos/pipe.hxx>
#include <osl/security.hxx>
-#include <vos/signal.hxx>
+#include <osl/signal.h>
#include <rtl/ustring.hxx>
#include <cppuhelper/implbase2.hxx>
#include <osl/conditn.hxx>
@@ -42,10 +42,7 @@
namespace desktop
{
-class SalMainPipeExchangeSignalHandler : public vos::OSignalHandler
-{
- virtual TSignalAction SAL_CALL signal(TSignalInfo *pInfo);
-};
+oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* pInfo);
// A request for the current office
// that was given by command line or by IPC pipe communication.