desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 17 +++++++++-------- desktop/source/deployment/gui/dp_gui_theextmgr.hxx | 13 +++++++------ 2 files changed, 16 insertions(+), 14 deletions(-)
New commits: commit 222a9ef69c1a60526de5546433a9fce62d44823a Author: Michael Meeks <michael.me...@collabora.com> Date: Wed May 6 09:39:46 2015 +0100 tdf#91090 - avoid de-referencing DIALOG_NO_PARENT (-1) Change-Id: I1032054765013a43744a7be548e892fc973a40ce diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index 3cad803..fa42dc2 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx @@ -49,10 +49,10 @@ namespace dp_gui { // TheExtensionManager -TheExtensionManager::TheExtensionManager( vcl::Window *pParent, +TheExtensionManager::TheExtensionManager( const uno::Reference< awt::XWindow > &xParent, const uno::Reference< uno::XComponentContext > &xContext ) : m_xContext( xContext ), - m_pParent( pParent ), + m_xParent( xParent ), m_pExtMgrDialog( NULL ), m_pUpdReqDialog( NULL ), m_pExecuteCmdQueue( NULL ) @@ -120,7 +120,12 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg ) } else if ( !m_pExtMgrDialog ) { - m_pExtMgrDialog = VclPtr<ExtMgrDialog>::Create( m_pParent, this ); + // FIXME: horrible ... + vcl::Window* pParent = DIALOG_NO_PARENT; + if (m_xParent.is()) + pParent = VCLUnoHelper::GetWindow(m_xParent); + + m_pExtMgrDialog = VclPtr<ExtMgrDialog>::Create( pParent, this ); delete m_pExecuteCmdQueue; m_pExecuteCmdQueue = new ExtensionCmdQueue( m_pExtMgrDialog.get(), this, m_xContext ); m_pExtMgrDialog->setGetExtensionsURL( m_sGetExtensionsURL ); @@ -483,11 +488,7 @@ void TheExtensionManager::modified( ::lang::EventObject const & /*rEvt*/ ) return s_ExtMgr; } - vcl::Window* pParent = DIALOG_NO_PARENT; - if (xParent.is()) - pParent = VCLUnoHelper::GetWindow(xParent); - - ::rtl::Reference<TheExtensionManager> that( new TheExtensionManager( pParent, xContext ) ); + ::rtl::Reference<TheExtensionManager> that( new TheExtensionManager( xParent, xContext ) ); const SolarMutexGuard guard; if ( ! s_ExtMgr.is() ) diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx index 39d41b2..2341a5a 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx @@ -53,18 +53,19 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XExtensionManager > m_xExtensionManager; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xNameAccessNodes; - VclPtr<vcl::Window> m_pParent; - VclPtr<ExtMgrDialog> m_pExtMgrDialog; - VclPtr<UpdateRequiredDialog> m_pUpdReqDialog; - ExtensionCmdQueue *m_pExecuteCmdQueue; + css::uno::Reference< + css::awt::XWindow > m_xParent; + VclPtr<ExtMgrDialog> m_pExtMgrDialog; + VclPtr<UpdateRequiredDialog> m_pUpdReqDialog; + ExtensionCmdQueue *m_pExecuteCmdQueue; OUString m_sGetExtensionsURL; public: static ::rtl::Reference<TheExtensionManager> s_ExtMgr; - TheExtensionManager( vcl::Window * pParent, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &xContext ); + TheExtensionManager( const css::uno::Reference< css::awt::XWindow > &xParent, + const css::uno::Reference< css::uno::XComponentContext > &xContext ); virtual ~TheExtensionManager(); void createDialog( const bool bCreateUpdDlg ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits