diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-06-19 10:17:14 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-06-20 14:44:03 +0200 |
commit | 1cdb792368ed26d58828eead2848422e7dec4c7d (patch) | |
tree | a268bcfa0315ca6de5d55bd83f0023d6372194e3 /vcl/inc | |
parent | b11de026cb8eb520dc410fd974581e780ecbef92 (diff) |
Make VCLSession into a OneInstanceFactory
...so no need to hold the one instance as ImplSVData::xSMClient. Nor as
VCLSession::pOneInstance, after changing SalSession::SetCallback to carry
VCLSession* as user data.
Change-Id: I3180d72035e3da7aa164a20309fbaeccecbb9b65
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/salsession.hxx | 8 | ||||
-rw-r--r-- | vcl/inc/svdata.hxx | 12 |
2 files changed, 7 insertions, 13 deletions
diff --git a/vcl/inc/salsession.hxx b/vcl/inc/salsession.hxx index c912565a920c..89e9239cf0b9 100644 --- a/vcl/inc/salsession.hxx +++ b/vcl/inc/salsession.hxx @@ -84,25 +84,27 @@ struct SalSessionQuitEvent : public SalSessionEvent {} }; -typedef void(*SessionProc)( SalSessionEvent *pEvent); +typedef void(*SessionProc)(void *pData, SalSessionEvent *pEvent); class VCL_PLUGIN_PUBLIC SalSession { SessionProc m_aProc; + void * m_pProcData; public: SalSession() : m_aProc( 0 ) {} virtual ~SalSession(); - void SetCallback( SessionProc aCallback ) + void SetCallback( SessionProc aCallback, void * pCallbackData ) { m_aProc = aCallback; + m_pProcData = pCallbackData; } void CallCallback( SalSessionEvent* pEvent ) { if( m_aProc ) - m_aProc( pEvent ); + m_aProc( m_pProcData, pEvent ); } // query the session manager for a user interaction slot diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index 8aa5f8732ec1..e96979a07900 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -53,16 +53,9 @@ #include <boost/unordered_map.hpp> -namespace com { -namespace sun { -namespace star { -namespace lang { +namespace com { namespace sun { namespace star { namespace lang { class XMultiServiceFactory; -} -namespace frame { - class XSessionManagerClient; -} -}}} +} } } } struct ImplTimerData; struct ImplFileImageCacheData; @@ -366,7 +359,6 @@ struct ImplSVData rtl::Reference< vcl::DisplayConnection > mxDisplayConnection; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxAccessBridge; - com::sun::star::uno::Reference< com::sun::star::frame::XSessionManagerClient > xSMClient; ::vcl::SettingsConfigItem* mpSettingsConfigItem; std::list< vcl::DeleteOnDeinitBase* >* mpDeinitDeleteList; boost::unordered_map< int, rtl::OUString >* mpPaperNames; |