[ooo-build-commit] patches/dev300
Kohei Yoshida
kohei at kemper.freedesktop.org
Fri Sep 11 09:20:26 PDT 2009
patches/dev300/apply | 7
patches/dev300/session-management-m57.diff | 419 +++++++++++++++++++++++++++++
patches/dev300/session-management.diff | 108 +++----
3 files changed, 479 insertions(+), 55 deletions(-)
New commits:
commit 05e35ae52d5406e78fc305e440ba044eb94faf57
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Fri Sep 11 12:19:55 2009 -0400
Branched session-management.diff for dev300-m58.
* patches/dev300/apply:
* patches/dev300/session-management-m57.diff:
* patches/dev300/session-management.diff:
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 61bb3b5..3133e33 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1256,10 +1256,15 @@ default-openssl-no-idea-alg.diff, pmladek
# compressed ones (conforming to the odf specifications)
odf-flatxml-import-export.diff
-[ Features ]
+[ Features >= dev300-m58 ]
# ask user on logout/shutdown to save documents
session-management.diff, i#63156, rodo
+[ Features < dev300-m58 ]
+# ask user on logout/shutdown to save documents
+session-management-m57.diff, i#63156, rodo
+
+[ Features ]
# search <ooo-home>/share/template/common for language independent templates
# will not push it upstream because it will be replaced by upcomming kendy's work
office-cfg-common-template-dir.diff, pmladek
diff --git a/patches/dev300/session-management-m57.diff b/patches/dev300/session-management-m57.diff
new file mode 100644
index 0000000..63ab35c
--- /dev/null
+++ b/patches/dev300/session-management-m57.diff
@@ -0,0 +1,419 @@
+diff -rup vcl/inc/salsession.hxx vcl/inc/salsession.hxx
+--- vcl/inc/vcl/salsession.hxx 2005-09-09 13:22:55.000000000 +0200
++++ vcl/inc/vcl/salsession.hxx 2006-02-20 17:10:26.000000000 +0100
+@@ -109,11 +109,9 @@ public:
+ // query the session manager for a user interaction slot
+ virtual void queryInteraction() = 0;
+ // signal the session manager that we're done with user interaction
+- virtual void interactionDone() = 0;
++ virtual void interactionDone( bool bCancelShutdown ) = 0;
+ // signal that we're done saving
+ virtual void saveDone() = 0;
+- // try to cancel the sutdown in progress
+- virtual bool cancelShutdown() = 0;
+ };
+
+ #endif
+diff -rup vcl/source/app/session.cxx vcl/source/app/session.cxx
+--- vcl/source/app/session.cxx 2005-09-09 13:41:36.000000000 +0200
++++ vcl/source/app/session.cxx 2006-02-20 17:10:19.000000000 +0100
+@@ -126,9 +126,8 @@ public:
+ virtual void SAL_CALL addSessionManagerListener( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
+ virtual void SAL_CALL removeSessionManagerListener( const Reference< XSessionManagerListener>& xListener ) throw( RuntimeException );
+ virtual void SAL_CALL queryInteraction( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
+- virtual void SAL_CALL interactionDone( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
++ virtual void SAL_CALL interactionDone( const Reference< XSessionManagerListener >& xListener, sal_Bool bCancelShutdown ) throw( RuntimeException );
+ virtual void SAL_CALL saveDone( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
+- virtual sal_Bool SAL_CALL cancelShutdown() throw( RuntimeException );
+ };
+
+ VCLSession* VCLSession::pOneInstance = NULL;
+@@ -208,7 +207,7 @@ void VCLSession::callInteractionGranted(
+ if( aListeners.empty() )
+ {
+ if( m_pSession )
+- m_pSession->interactionDone();
++ m_pSession->interactionDone( false );
+ return;
+ }
+ }
+@@ -310,7 +309,7 @@ void SAL_CALL VCLSession::queryInteracti
+ }
+ }
+
+-void SAL_CALL VCLSession::interactionDone( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException )
++void SAL_CALL VCLSession::interactionDone( const Reference< XSessionManagerListener >& xListener, sal_Bool bCancelShutdown ) throw( RuntimeException )
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+ int nRequested = 0, nDone = 0;
+@@ -329,7 +328,7 @@ void SAL_CALL VCLSession::interactionDon
+ {
+ m_bInteractionDone = true;
+ if( m_pSession )
+- m_pSession->interactionDone();
++ m_pSession->interactionDone( bCancelShutdown );
+ }
+ }
+
+@@ -354,11 +353,6 @@ void SAL_CALL VCLSession::saveDone( cons
+ }
+ }
+
+-sal_Bool SAL_CALL VCLSession::cancelShutdown() throw( RuntimeException )
+-{
+- return m_pSession ? (sal_Bool)m_pSession->cancelShutdown() : sal_False;
+-}
+-
+ // service implementation
+
+ OUString SAL_CALL vcl_session_getImplementationName()
+diff -rup vcl/unx/inc/sm.hxx vcl/unx/inc/sm.hxx
+--- vcl/unx/inc/sm.hxx 2006-03-14 12:28:47.000000000 +0100
++++ vcl/unx/inc/sm.hxx 2006-02-20 17:37:18.000000000 +0100
+@@ -44,7 +44,8 @@ class SessionManagerClient
+ {
+ static SmcConn aSmcConnection;
+ static ByteString aClientID;
+- static bool bDocSaveDone;
++ static bool bDocSaveDone;
++ static bool bSaveDoneSent;
+
+ static void SaveYourselfProc( SmcConn connection,
+ SmPointer client_data,
+@@ -73,8 +74,8 @@ public:
+
+ static bool checkDocumentsSaved();
+ static bool queryInteraction();
+- static void saveDone();
+- static void interactionDone();
++ static void saveDone( bool bSuccess = true );
++ static void interactionDone( bool bCancelShutdown = false );
+
+ static String getExecName();
+ static VCL_DLLPUBLIC const ByteString& getSessionID();
+@@ -89,9 +90,8 @@ public:
+ virtual ~IceSalSession();
+
+ virtual void queryInteraction();
+- virtual void interactionDone();
++ virtual void interactionDone( bool bCancelShutdown );
+ virtual void saveDone();
+- virtual bool cancelShutdown();
+
+ static void handleOldX11SaveYourself( SalFrame* pFrame );
+ };
+Only in vcl/unx/inc: sm.hxx.~1.9.~
+diff -rup vcl/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
+--- vcl/unx/source/app/sm.cxx 2006-03-14 12:28:47.000000000 +0100
++++ vcl/unx/source/app/sm.cxx 2006-02-20 17:44:23.000000000 +0100
+@@ -129,9 +129,9 @@ void IceSalSession::queryInteraction()
+ }
+ }
+
+-void IceSalSession::interactionDone()
++void IceSalSession::interactionDone( bool bCancelShutdown )
+ {
+- SessionManagerClient::interactionDone();
++ SessionManagerClient::interactionDone( bCancelShutdown );
+ }
+
+ void IceSalSession::saveDone()
+@@ -144,11 +144,6 @@ void IceSalSession::saveDone()
+ }
+ }
+
+-bool IceSalSession::cancelShutdown()
+-{
+- return false;
+-}
+-
+ void IceSalSession::handleOldX11SaveYourself( SalFrame* pFrame )
+ {
+ // do this only once
+@@ -201,6 +196,7 @@ int ICEConnectionObserver::nWakeupFi
+ // HACK
+ bool SessionManagerClient::bDocSaveDone = false;
+
++bool SessionManagerClient::bSaveDoneSent = false;
+
+ static SmProp* pSmProps = NULL;
+ static SmProp** ppSmProps = NULL;
+@@ -269,12 +265,18 @@ bool SessionManagerClient::checkDocument
+ return bDocSaveDone;
+ }
+
++struct SaveYourselfArgs {
++ bool bShutdown;
++ bool bFast;
++ int nInteractionStyle;
++} aSaveYourselfArg;
++
+ IMPL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void*, EMPTYARG )
+ {
+ SMprintf( "posting save documents event shutdown = %s\n", (pThis!=0) ? "true" : "false" );
+ if( pOneInstance )
+ {
+- SalSessionSaveRequestEvent aEvent( pThis != 0, false );
++ SalSessionSaveRequestEvent aEvent( aSaveYourselfArg.bShutdown, aSaveYourselfArg.nInteractionStyle == SmInteractStyleAny && !aSaveYourselfArg.bFast );
+ pOneInstance->CallCallback( &aEvent );
+ }
+ else
+@@ -286,12 +288,13 @@ IMPL_STATIC_LINK( SessionManagerClient,
+ IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, InteractionHdl, void*, EMPTYARG )
+ {
+ SMprintf( "interaction link\n" );
+- if( pOneInstance )
++
++ if( pOneInstance )
+ {
+ SalSessionInteractionEvent aEvent( true );
+ pOneInstance->CallCallback( &aEvent );
+ }
+-
++
+ return 0;
+ }
+
+@@ -304,6 +307,9 @@ IMPL_STATIC_LINK( SessionManagerClient,
+ pOneInstance->CallCallback( &aEvent );
+ }
+
++ if( !bSaveDoneSent )
++ saveDone( false );
++
+ return 0;
+ }
+
+@@ -317,7 +317,7 @@ void SessionManagerClient::SaveYourselfP
+ int save_type,
+ Bool shutdown,
+ int interact_style,
+- Bool
++ Bool fast
+ )
+ {
+ SMprintf( "Session: save yourself, save_type = %s, shutdown = %s, interact_style = %s, fast = %s\n",
+@@ -324,8 +330,9 @@ void SessionManagerClient::SaveYourselfP
+ interact_style == SmInteractStyleNone ? "SmInteractStyleNone" :
+ ( interact_style == SmInteractStyleErrors ? "SmInteractStyleErrors" :
+ ( interact_style == SmInteractStyleAny ? "SmInteractStyleAny" : "<unknown>" ) ),
+- false ? "true" : "false"
++ fast ? "true" : "false"
+ );
++ bSaveDoneSent = false;
+ BuildSmPropertyList();
+ #ifdef USE_SM_EXTENSION
+ bDocSaveDone = false;
+@@ -340,7 +347,12 @@ void SessionManagerClient::SaveYourselfP
+ SessionManagerClient::saveDone();
+ return;
+ }
+- Application::PostUserEvent( STATIC_LINK( (void*)(shutdown ? 0xffffffff : 0x0), SessionManagerClient, SaveYourselfHdl ) );
++
++ aSaveYourselfArg.bShutdown = shutdown;
++ aSaveYourselfArg.nInteractionStyle = interact_style;
++ aSaveYourselfArg.bFast = fast;
++ Application::PostUserEvent( STATIC_LINK( NULL, SessionManagerClient, SaveYourselfHdl ) );
++
+ SMprintf( "waiting for save yourself event to be processed\n" );
+ #endif
+ }
+@@ -393,20 +405,21 @@ void SessionManagerClient::InteractProc(
+ Application::PostUserEvent( STATIC_LINK( NULL, SessionManagerClient, InteractionHdl ) );
+ }
+
+-void SessionManagerClient::saveDone()
++void SessionManagerClient::saveDone( bool bSuccess )
+ {
+ if( aSmcConnection )
+ {
+ ICEConnectionObserver::lock();
+- SmcSetProperties( aSmcConnection, nSmProps, ppSmProps );
+- SmcSaveYourselfDone( aSmcConnection, True );
++ if( bSuccess )
++ SmcSetProperties( aSmcConnection, nSmProps, ppSmProps );
++ SmcSaveYourselfDone( aSmcConnection, bSuccess );
+ SMprintf( "sent SaveYourselfDone\n" );
+- bDocSaveDone = true;
++ bDocSaveDone = bSuccess;
++ bSaveDoneSent = true;
+ ICEConnectionObserver::unlock();
+ }
+ }
+
+-
+ void SessionManagerClient::open()
+ {
+ static SmcCallbacks aCallbacks;
+@@ -505,12 +518,12 @@ bool SessionManagerClient::queryInteract
+ return bRet;
+ }
+
+-void SessionManagerClient::interactionDone()
++void SessionManagerClient::interactionDone( bool bCancelShutdown )
+ {
+ if( aSmcConnection )
+ {
+ ICEConnectionObserver::lock();
+- SmcInteractDone( aSmcConnection, False );
++ SmcInteractDone( aSmcConnection, bCancelShutdown );
+ ICEConnectionObserver::unlock();
+ }
+ }
+diff -rup offapi/com/sun/star/frame/XSessionManagerClient.idl offapi/com/sun/star/frame/XSessionManagerClient.idl
+--- offapi/com/sun/star/frame/XSessionManagerClient.idl 2005-09-08 03:25:36.000000000 +0200
++++ offapi/com/sun/star/frame/XSessionManagerClient.idl 2006-02-20 17:09:58.000000000 +0100
+@@ -88,7 +88,7 @@ module com { module sun { module star
+
+ @see XSessionManagerListener
+ */
+- [oneway] void interactionDone( [in] XSessionManagerListener xListener );
++ [oneway] void interactionDone( [in] XSessionManagerListener xListener, [in] boolean bCancelShutdown );
+
+ /** saveDone signals that a listener has processed a save request
+
+@@ -98,14 +98,6 @@ module com { module sun { module star
+ @see XSessionManagerListener
+ */
+ [oneway] void saveDone( [in] XSessionManagerListener xListener );
+-
+- /** Call cancelShutdown to try to cancel a desktop shutdown in progress
+-
+- @returns
+- <TRUE/> if shutdown was canceled,
+- <FALSE/> else.
+- */
+- boolean cancelShutdown();
+ };
+
+ }; }; }; };
+diff -rup framework-m188/inc/services/sessionlistener.hxx framework/inc/services/sessionlistener.hxx
+--- framework-m188/inc/services/sessionlistener.hxx 2006-10-31 13:13:27.000000000 +0100
++++ framework/inc/services/sessionlistener.hxx 2006-10-31 18:14:09.000000000 +0100
+@@ -161,6 +161,10 @@ class SessionListener : // interfaces
+
+ css::uno::Reference< css::frame::XSessionManagerClient > m_rSessionManager;
+
++ void _requestInteraction();
++ void _finishInteraction( sal_Bool bCancelShutdown );
++ void _saveAutorecovery( sal_Bool bSessionSave );
++
+ // restore handling
+ sal_Bool m_bRestored;
+
+diff -rup framework-m188/source/services/sessionlistener.cxx framework/source/services/sessionlistener.cxx
+--- framework-m188/source/services/sessionlistener.cxx 2006-10-31 13:13:29.000000000 +0100
++++ framework/source/services/sessionlistener.cxx 2006-11-01 13:08:26.000000000 +0100
+@@ -249,38 +249,50 @@ sal_Bool SAL_CALL SessionListener::doRes
+ return m_bRestored;
+ }
+
++void SessionListener::_saveAutorecovery( sal_Bool bSessionSave )
++{
++ sal_Bool bDispatched = sal_False;
++ ResetableGuard aGuard(m_aLock);
++ try
++ {
++ // ON session save
++ // xd create SERVICENAME_AUTORECOVERY -> XDispatch
++ // xd->dispatch("vnd.sun.star.autorecovery:/doSessionSave, async=true
++ // on stop event m_rSessionManager->saveDone(this);
++ // ON autosave ( bSessionSave == false)
++ // xd->dispatch("vnd.sun.star.autorecovery:/doAutoSave, async=false
++
++ css::uno::Reference< XDispatch > xDispatch(m_xSMGR->createInstance(SERVICENAME_AUTORECOVERY), UNO_QUERY_THROW);
++ css::uno::Reference< XURLTransformer > xURLTransformer(m_xSMGR->createInstance(SERVICENAME_URLTRANSFORMER), UNO_QUERY_THROW);
++ URL aURL;
++ aURL.Complete = OUString::createFromAscii(bSessionSave
++ ? "vnd.sun.star.autorecovery:/doSessionSave"
++ : "vnd.sun.star.autorecovery:/doAutoSave");
++ xURLTransformer->parseStrict(aURL);
++ if( bSessionSave )
++ xDispatch->addStatusListener(this, aURL);
++ Sequence< PropertyValue > args(1);
++ args[0] = PropertyValue(OUString::createFromAscii("DispatchAsynchron"),-1,makeAny(bSessionSave),PropertyState_DIRECT_VALUE);
++ xDispatch->dispatch(aURL, args);
++ bDispatched = sal_True;
++ // on stop event set call m_rSessionManager->saveDone(this);
++ } catch (com::sun::star::uno::Exception& e) {
++ OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8);
++ OSL_ENSURE(sal_False, aMsg.getStr());
++ // save failed, but tell manager to go on if we havent yet dispatched the request
++ if (m_rSessionManager.is() && !bDispatched && bSessionSave)
++ m_rSessionManager->saveDone(this);
++ }
++}
+
+-void SAL_CALL SessionListener::doSave( sal_Bool bShutdown, sal_Bool /*bCancelable*/ )
++void SAL_CALL SessionListener::doSave( sal_Bool bShutdown, sal_Bool bCancelable )
+ throw (RuntimeException)
+ {
+ if (bShutdown)
+ {
+- sal_Bool bDispatched = sal_False;
+- ResetableGuard aGuard(m_aLock);
+- try
+- {
+- // xd create SERVICENAME_AUTORECOVERY -> XDispatch
+- // xd->dispatch("vnd.sun.star.autorecovery:/doSessionSave, async=true
+- // on stop event m_rSessionManager->saveDone(this);
+-
+- css::uno::Reference< XDispatch > xDispatch(m_xSMGR->createInstance(SERVICENAME_AUTORECOVERY), UNO_QUERY_THROW);
+- css::uno::Reference< XURLTransformer > xURLTransformer(m_xSMGR->createInstance(SERVICENAME_URLTRANSFORMER), UNO_QUERY_THROW);
+- URL aURL;
+- aURL.Complete = OUString::createFromAscii("vnd.sun.star.autorecovery:/doSessionSave");
+- xURLTransformer->parseStrict(aURL);
+- xDispatch->addStatusListener(this, aURL);
+- Sequence< PropertyValue > args(1);
+- args[0] = PropertyValue(OUString::createFromAscii("DispatchAsynchron"),-1,makeAny(sal_True),PropertyState_DIRECT_VALUE);
+- xDispatch->dispatch(aURL, args);
+- bDispatched = sal_True;
+- // on stop event set call m_rSessionManager->saveDone(this);
+- } catch (com::sun::star::uno::Exception& e) {
+- OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8);
+- OSL_ENSURE(sal_False, aMsg.getStr());
+- // save failed, but tell manager to go on if we havent yet dispatched the request
+- if (m_rSessionManager.is() && !bDispatched)
+- m_rSessionManager->saveDone(this);
+- }
++ _saveAutorecovery( !bCancelable );
++ if (bCancelable)
++ _requestInteraction();
+ }
+ // we don't have anything to do so tell the session manager we're done
+ else if( m_rSessionManager.is() )
+@@ -289,12 +301,32 @@ void SAL_CALL SessionListener::doSave( s
+
+
+
+-void SAL_CALL SessionListener::approveInteraction( sal_Bool /*bInteractionGranted*/ )
++void SAL_CALL SessionListener::approveInteraction( sal_Bool bInteractionGranted )
+ throw (RuntimeException)
+-{}
++{
++ if( bInteractionGranted ) {
++ bool bExit = GetpApp()->QueryExit();
++
++ if( m_rSessionManager.is() )
++ m_rSessionManager->saveDone( this );
++
++ _finishInteraction( !bExit );
++ } else
++ _saveAutorecovery( sal_True );
++}
+
+ void SessionListener::shutdownCanceled()
+ throw (RuntimeException)
+ {}
+
++void SessionListener::_requestInteraction()
++{
++ m_rSessionManager->queryInteraction(Reference<XSessionManagerListener>(this));
++}
++
++void SessionListener::_finishInteraction( sal_Bool bCancelShutdown )
++{
++ m_rSessionManager->interactionDone(Reference< XSessionManagerListener >(this), bCancelShutdown );
++}
++
+ }
diff --git a/patches/dev300/session-management.diff b/patches/dev300/session-management.diff
index 63ab35c..da65e9a 100644
--- a/patches/dev300/session-management.diff
+++ b/patches/dev300/session-management.diff
@@ -1,7 +1,8 @@
-diff -rup vcl/inc/salsession.hxx vcl/inc/salsession.hxx
---- vcl/inc/vcl/salsession.hxx 2005-09-09 13:22:55.000000000 +0200
-+++ vcl/inc/vcl/salsession.hxx 2006-02-20 17:10:26.000000000 +0100
-@@ -109,11 +109,9 @@ public:
+diff --git vcl/inc/vcl/salsession.hxx vcl/inc/vcl/salsession.hxx
+index 13ec237..bff9626 100644
+--- vcl/inc/vcl/salsession.hxx
++++ vcl/inc/vcl/salsession.hxx
+@@ -102,11 +102,9 @@ public:
// query the session manager for a user interaction slot
virtual void queryInteraction() = 0;
// signal the session manager that we're done with user interaction
@@ -14,10 +15,11 @@ diff -rup vcl/inc/salsession.hxx vcl/inc/salsession.hxx
};
#endif
-diff -rup vcl/source/app/session.cxx vcl/source/app/session.cxx
---- vcl/source/app/session.cxx 2005-09-09 13:41:36.000000000 +0200
-+++ vcl/source/app/session.cxx 2006-02-20 17:10:19.000000000 +0100
-@@ -126,9 +126,8 @@ public:
+diff --git vcl/source/app/session.cxx vcl/source/app/session.cxx
+index e1ebe1e..7c1f14a 100644
+--- vcl/source/app/session.cxx
++++ vcl/source/app/session.cxx
+@@ -88,9 +88,8 @@ public:
virtual void SAL_CALL addSessionManagerListener( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
virtual void SAL_CALL removeSessionManagerListener( const Reference< XSessionManagerListener>& xListener ) throw( RuntimeException );
virtual void SAL_CALL queryInteraction( const Reference< XSessionManagerListener >& xListener ) throw( RuntimeException );
@@ -28,7 +30,7 @@ diff -rup vcl/source/app/session.cxx vcl/source/app/session.cxx
};
VCLSession* VCLSession::pOneInstance = NULL;
-@@ -208,7 +207,7 @@ void VCLSession::callInteractionGranted(
+@@ -170,7 +169,7 @@ void VCLSession::callInteractionGranted( bool bInteractionGranted )
if( aListeners.empty() )
{
if( m_pSession )
@@ -37,7 +39,7 @@ diff -rup vcl/source/app/session.cxx vcl/source/app/session.cxx
return;
}
}
-@@ -310,7 +309,7 @@ void SAL_CALL VCLSession::queryInteracti
+@@ -272,7 +271,7 @@ void SAL_CALL VCLSession::queryInteraction( const Reference<XSessionManagerListe
}
}
@@ -46,7 +48,7 @@ diff -rup vcl/source/app/session.cxx vcl/source/app/session.cxx
{
osl::MutexGuard aGuard( m_aMutex );
int nRequested = 0, nDone = 0;
-@@ -329,7 +328,7 @@ void SAL_CALL VCLSession::interactionDon
+@@ -291,7 +290,7 @@ void SAL_CALL VCLSession::interactionDone( const Reference< XSessionManagerListe
{
m_bInteractionDone = true;
if( m_pSession )
@@ -55,7 +57,7 @@ diff -rup vcl/source/app/session.cxx vcl/source/app/session.cxx
}
}
-@@ -354,11 +353,6 @@ void SAL_CALL VCLSession::saveDone( cons
+@@ -316,11 +315,6 @@ void SAL_CALL VCLSession::saveDone( const Reference< XSessionManagerListener >&
}
}
@@ -67,20 +69,21 @@ diff -rup vcl/source/app/session.cxx vcl/source/app/session.cxx
// service implementation
OUString SAL_CALL vcl_session_getImplementationName()
-diff -rup vcl/unx/inc/sm.hxx vcl/unx/inc/sm.hxx
---- vcl/unx/inc/sm.hxx 2006-03-14 12:28:47.000000000 +0100
-+++ vcl/unx/inc/sm.hxx 2006-02-20 17:37:18.000000000 +0100
-@@ -44,7 +44,8 @@ class SessionManagerClient
+diff --git vcl/unx/inc/sm.hxx vcl/unx/inc/sm.hxx
+index 998b8ec..03646ba 100644
+--- vcl/unx/inc/sm.hxx
++++ vcl/unx/inc/sm.hxx
+@@ -39,7 +39,8 @@ class SessionManagerClient
{
- static SmcConn aSmcConnection;
- static ByteString aClientID;
+ static SmcConn aSmcConnection;
+ static ByteString aClientID;
- static bool bDocSaveDone;
+ static bool bDocSaveDone;
+ static bool bSaveDoneSent;
- static void SaveYourselfProc( SmcConn connection,
- SmPointer client_data,
-@@ -73,8 +74,8 @@ public:
+ static void SaveYourselfProc( SmcConn connection,
+ SmPointer client_data,
+@@ -68,8 +69,8 @@ public:
static bool checkDocumentsSaved();
static bool queryInteraction();
@@ -89,9 +92,9 @@ diff -rup vcl/unx/inc/sm.hxx vcl/unx/inc/sm.hxx
+ static void saveDone( bool bSuccess = true );
+ static void interactionDone( bool bCancelShutdown = false );
- static String getExecName();
- static VCL_DLLPUBLIC const ByteString& getSessionID();
-@@ -89,9 +90,8 @@ public:
+ static String getExecName();
+ static VCL_DLLPUBLIC const ByteString& getSessionID();
+@@ -84,9 +85,8 @@ public:
virtual ~IceSalSession();
virtual void queryInteraction();
@@ -102,11 +105,11 @@ diff -rup vcl/unx/inc/sm.hxx vcl/unx/inc/sm.hxx
static void handleOldX11SaveYourself( SalFrame* pFrame );
};
-Only in vcl/unx/inc: sm.hxx.~1.9.~
-diff -rup vcl/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
---- vcl/unx/source/app/sm.cxx 2006-03-14 12:28:47.000000000 +0100
-+++ vcl/unx/source/app/sm.cxx 2006-02-20 17:44:23.000000000 +0100
-@@ -129,9 +129,9 @@ void IceSalSession::queryInteraction()
+diff --git vcl/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
+index c5c25a4..b9ed5ed 100644
+--- vcl/unx/source/app/sm.cxx
++++ vcl/unx/source/app/sm.cxx
+@@ -112,9 +112,9 @@ void IceSalSession::queryInteraction()
}
}
@@ -118,7 +121,7 @@ diff -rup vcl/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
}
void IceSalSession::saveDone()
-@@ -144,11 +144,6 @@ void IceSalSession::saveDone()
+@@ -127,11 +127,6 @@ void IceSalSession::saveDone()
}
}
@@ -130,7 +133,7 @@ diff -rup vcl/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
void IceSalSession::handleOldX11SaveYourself( SalFrame* pFrame )
{
// do this only once
-@@ -201,6 +196,7 @@ int ICEConnectionObserver::nWakeupFi
+@@ -184,6 +179,7 @@ int ICEConnectionObserver::nWakeupFiles[2] = { 0, 0 };
// HACK
bool SessionManagerClient::bDocSaveDone = false;
@@ -138,7 +141,7 @@ diff -rup vcl/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
static SmProp* pSmProps = NULL;
static SmProp** ppSmProps = NULL;
-@@ -269,12 +265,18 @@ bool SessionManagerClient::checkDocument
+@@ -265,6 +261,12 @@ bool SessionManagerClient::checkDocumentsSaved()
return bDocSaveDone;
}
@@ -151,6 +154,8 @@ diff -rup vcl/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
IMPL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void*, EMPTYARG )
{
SMprintf( "posting save documents event shutdown = %s\n", (pThis!=0) ? "true" : "false" );
+@@ -295,7 +297,7 @@ IMPL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void*, EMPTYARG )
+
if( pOneInstance )
{
- SalSessionSaveRequestEvent aEvent( pThis != 0, false );
@@ -158,7 +163,7 @@ diff -rup vcl/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
pOneInstance->CallCallback( &aEvent );
}
else
-@@ -286,12 +288,13 @@ IMPL_STATIC_LINK( SessionManagerClient,
+@@ -307,12 +309,13 @@ IMPL_STATIC_LINK( SessionManagerClient, SaveYourselfHdl, void*, EMPTYARG )
IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, InteractionHdl, void*, EMPTYARG )
{
SMprintf( "interaction link\n" );
@@ -174,7 +179,7 @@ diff -rup vcl/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
return 0;
}
-@@ -304,6 +307,9 @@ IMPL_STATIC_LINK( SessionManagerClient,
+@@ -325,6 +328,9 @@ IMPL_STATIC_LINK_NOINSTANCE( SessionManagerClient, ShutDownCancelHdl, void*, EMP
pOneInstance->CallCallback( &aEvent );
}
@@ -184,16 +189,16 @@ diff -rup vcl/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
return 0;
}
-@@ -317,7 +317,7 @@ void SessionManagerClient::SaveYourselfP
- int save_type,
- Bool shutdown,
- int interact_style,
-- Bool
+@@ -334,7 +340,7 @@ void SessionManagerClient::SaveYourselfProc(
+ int save_type,
+ Bool shutdown,
+ int interact_style,
+- Bool
+ Bool fast
- )
+ )
{
SMprintf( "Session: save yourself, save_type = %s, shutdown = %s, interact_style = %s, fast = %s\n",
-@@ -324,8 +330,9 @@ void SessionManagerClient::SaveYourselfP
+@@ -345,8 +351,9 @@ void SessionManagerClient::SaveYourselfProc(
interact_style == SmInteractStyleNone ? "SmInteractStyleNone" :
( interact_style == SmInteractStyleErrors ? "SmInteractStyleErrors" :
( interact_style == SmInteractStyleAny ? "SmInteractStyleAny" : "<unknown>" ) ),
@@ -201,10 +206,10 @@ diff -rup vcl/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
+ fast ? "true" : "false"
);
+ bSaveDoneSent = false;
- BuildSmPropertyList();
+ BuildSmPropertyList();
#ifdef USE_SM_EXTENSION
bDocSaveDone = false;
-@@ -340,7 +347,12 @@ void SessionManagerClient::SaveYourselfP
+@@ -361,7 +368,12 @@ void SessionManagerClient::SaveYourselfProc(
SessionManagerClient::saveDone();
return;
}
@@ -218,7 +223,7 @@ diff -rup vcl/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
SMprintf( "waiting for save yourself event to be processed\n" );
#endif
}
-@@ -393,20 +405,21 @@ void SessionManagerClient::InteractProc(
+@@ -414,15 +426,17 @@ void SessionManagerClient::InteractProc(
Application::PostUserEvent( STATIC_LINK( NULL, SessionManagerClient, InteractionHdl ) );
}
@@ -230,22 +235,17 @@ diff -rup vcl/unx/source/app/sm.cxx vcl/unx/source/app/sm.cxx
ICEConnectionObserver::lock();
- SmcSetProperties( aSmcConnection, nSmProps, ppSmProps );
- SmcSaveYourselfDone( aSmcConnection, True );
-+ if( bSuccess )
-+ SmcSetProperties( aSmcConnection, nSmProps, ppSmProps );
++ if( bSuccess )
++ SmcSetProperties( aSmcConnection, nSmProps, ppSmProps );
+ SmcSaveYourselfDone( aSmcConnection, bSuccess );
- SMprintf( "sent SaveYourselfDone\n" );
+ SMprintf( "sent SaveYourselfDone SmRestartHint of %d\n", *pSmRestartHint );
- bDocSaveDone = true;
+ bDocSaveDone = bSuccess;
-+ bSaveDoneSent = true;
++ bSaveDoneSent = true;
ICEConnectionObserver::unlock();
}
}
-
--
- void SessionManagerClient::open()
- {
- static SmcCallbacks aCallbacks;
-@@ -505,12 +518,12 @@ bool SessionManagerClient::queryInteract
+@@ -526,12 +540,12 @@ bool SessionManagerClient::queryInteraction()
return bRet;
}
More information about the ooo-build-commit
mailing list