diff options
Diffstat (limited to 'vcl/source/app/session.cxx')
-rw-r--r-- | vcl/source/app/session.cxx | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx index 6874eb80285b..c3a36fb1c537 100644 --- a/vcl/source/app/session.cxx +++ b/vcl/source/app/session.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,10 +53,10 @@ class VCLSession : public cppu::WeakComponentImplHelper1 < XSessionManagerClient { struct Listener { - Reference< XSessionManagerListener > m_xListener; - bool m_bInteractionRequested; - bool m_bInteractionDone; - bool m_bSaveDone; + Reference< XSessionManagerListener > m_xListener; + bool m_bInteractionRequested; + bool m_bInteractionDone; + bool m_bSaveDone; Listener( const Reference< XSessionManagerListener >& xListener ) : m_xListener( xListener ), @@ -66,13 +66,13 @@ class VCLSession : public cppu::WeakComponentImplHelper1 < XSessionManagerClient {} }; - std::list< Listener > m_aListeners; - SalSession* m_pSession; - osl::Mutex m_aMutex; - bool m_bInteractionRequested; - bool m_bInteractionGranted; - bool m_bInteractionDone; - bool m_bSaveDone; + std::list< Listener > m_aListeners; + SalSession* m_pSession; + osl::Mutex m_aMutex; + bool m_bInteractionRequested; + bool m_bInteractionGranted; + bool m_bInteractionDone; + bool m_bSaveDone; static void SalSessionEventProc( SalSessionEvent* pEvent ); static VCLSession* pOneInstance; @@ -84,7 +84,7 @@ class VCLSession : public cppu::WeakComponentImplHelper1 < XSessionManagerClient public: VCLSession(); virtual ~VCLSession(); - + 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 ); @@ -136,7 +136,7 @@ void VCLSession::callSaveRequested( bool bShutdown, bool bCancelable ) // without session we assume UI is always possible, // so it was reqeusted and granted m_bInteractionRequested = m_bInteractionGranted = m_pSession ? false : true; - + // answer the session manager even if no listeners available anymore DBG_ASSERT( ! aListeners.empty(), "saveRequested but no listeners !" ); if( aListeners.empty() ) @@ -178,7 +178,7 @@ void VCLSession::callInteractionGranted( bool bInteractionGranted ) ULONG nAcquireCount = Application::ReleaseSolarMutex(); for( std::list< Listener >::const_iterator it = aListeners.begin(); it != aListeners.end(); ++it ) it->m_xListener->approveInteraction( bInteractionGranted ); - + Application::AcquireSolarMutex( nAcquireCount ); } @@ -248,7 +248,7 @@ void VCLSession::SalSessionEventProc( SalSessionEvent* pEvent ) void SAL_CALL VCLSession::addSessionManagerListener( const Reference<XSessionManagerListener>& xListener ) throw( RuntimeException ) { osl::MutexGuard aGuard( m_aMutex ); - + m_aListeners.push_back( Listener( xListener ) ); } @@ -266,7 +266,7 @@ void SAL_CALL VCLSession::removeSessionManagerListener( const Reference<XSession } else ++it; - } + } } void SAL_CALL VCLSession::queryInteraction( const Reference<XSessionManagerListener>& xListener ) throw( RuntimeException ) @@ -290,8 +290,8 @@ void SAL_CALL VCLSession::queryInteraction( const Reference<XSessionManagerListe { if( it->m_xListener == xListener ) { - it->m_bInteractionRequested = true; - it->m_bInteractionDone = false; + it->m_bInteractionRequested = true; + it->m_bInteractionDone = false; } } } @@ -365,7 +365,7 @@ Reference< XInterface > SAL_CALL vcl_session_createInstance( const Reference< XM ImplSVData* pSVData = ImplGetSVData(); if( ! pSVData->xSMClient.is() ) pSVData->xSMClient = new VCLSession(); - + return Reference< XInterface >(pSVData->xSMClient, UNO_QUERY ); } |