diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-04-29 10:19:25 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-29 10:47:06 +0100 |
commit | 501b1f5c77bf0b5409048470262bd99b818e7720 (patch) | |
tree | 9227ae9ba322730464528940d876ac03ea1bc9af /desktop | |
parent | d01810b745fad6afce8be838657471c297da6d53 (diff) |
fix dubious casts post VclPtr-ing
Change-Id: I6269eacb7ed1eb5ebd03a9a1b549a3e25e5f00c3
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 4 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_theextmgr.hxx | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index 3980a2396b81..3cad80342981 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx @@ -114,7 +114,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg ) { m_pUpdReqDialog = VclPtr<UpdateRequiredDialog>::Create( nullptr, this ); delete m_pExecuteCmdQueue; - m_pExecuteCmdQueue = new ExtensionCmdQueue( (DialogHelper*) m_pUpdReqDialog, this, m_xContext ); + m_pExecuteCmdQueue = new ExtensionCmdQueue( m_pUpdReqDialog.get(), this, m_xContext ); createPackageList(); } } @@ -122,7 +122,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg ) { m_pExtMgrDialog = VclPtr<ExtMgrDialog>::Create( m_pParent, this ); delete m_pExecuteCmdQueue; - m_pExecuteCmdQueue = new ExtensionCmdQueue( (DialogHelper*) m_pExtMgrDialog, this, m_xContext ); + m_pExecuteCmdQueue = new ExtensionCmdQueue( m_pExtMgrDialog.get(), this, m_xContext ); m_pExtMgrDialog->setGetExtensionsURL( m_sGetExtensionsURL ); createPackageList(); } diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx index 9281ddef4c05..39d41b2b8aa0 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx @@ -70,8 +70,18 @@ public: void createDialog( const bool bCreateUpdDlg ); sal_Int16 execute(); - Dialog* getDialog() { return m_pExtMgrDialog ? (Dialog*) m_pExtMgrDialog : (Dialog*) m_pUpdReqDialog; } - DialogHelper* getDialogHelper() { return m_pExtMgrDialog ? (DialogHelper*) m_pExtMgrDialog : (DialogHelper*) m_pUpdReqDialog; } + Dialog* getDialog() + { + if (m_pExtMgrDialog) + return m_pExtMgrDialog.get(); + return m_pUpdReqDialog.get(); + } + DialogHelper* getDialogHelper() + { + if (m_pExtMgrDialog) + return m_pExtMgrDialog.get(); + return m_pUpdReqDialog.get(); + } ExtensionCmdQueue* getCmdQueue() const { return m_pExecuteCmdQueue; } void SetText( const OUString &rTitle ); |