Kaydet (Commit) a76829b3 authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

merge vosremoval-signal patch

üst 8490c250
......@@ -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 );
}
......
......@@ -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;
}
// ----------------------------------------------------------------------------
......
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment