From c86728655415ea507cb5f8d7f0588014db2d6098 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 31 Oct 2018 12:38:56 +0000 Subject: replace VclAbstractDialog2 with VclAbstractDialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and drop Dialog::GetResult as a consequence Change-Id: Id80a9dc1eab1a23daf4489719b3bafec976bb048 Reviewed-on: https://gerrit.libreoffice.org/62700 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- cui/source/factory/dlgfact.cxx | 40 ++-------------------------------------- cui/source/factory/dlgfact.hxx | 16 +--------------- 2 files changed, 3 insertions(+), 53 deletions(-) (limited to 'cui') diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 067e91c7657b..ff95f66b2574 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -278,42 +278,6 @@ short AbstractSignSignatureLineDialog_Impl::Execute() IMPL_ABSTDLG_BASE(AbstractScreenshotAnnotationDlg_Impl); -// VclAbstractDialog2_Impl - - -// virtual -VclAbstractDialog2_Impl::~VclAbstractDialog2_Impl() -{ - disposeOnce(); -} - -void VclAbstractDialog2_Impl::dispose() -{ - m_pDlg.disposeAndClear(); - VclAbstractDialog2::dispose(); -} - -// virtual -void VclAbstractDialog2_Impl::StartExecuteModal( const Link& rEndDialogHdl ) -{ - m_aEndDlgHdl = rEndDialogHdl; - m_pDlg->StartExecuteAsync([=](sal_Int32 nResult){ - EndDialogHdl(nResult); - }); -} - -// virtual -sal_Int32 VclAbstractDialog2_Impl::GetResult() -{ - return m_pDlg->GetResult(); -} - -void VclAbstractDialog2_Impl::EndDialogHdl(sal_Int32 /*nResult*/) -{ - m_aEndDlgHdl.Call( *m_pDlg ); - m_aEndDlgHdl = Link(); -} - void CuiAbstractTabDialog_Impl::SetCurPageId( const OString& rName ) { pDlg->SetCurPageId( rName ); @@ -1154,12 +1118,12 @@ VclPtr AbstractDialogFactory_Impl::CreateGalleryIdDialo return VclPtr::Create(o3tl::make_unique(pParent, pThm)); } -VclPtr AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog(vcl::Window* pParent, +VclPtr AbstractDialogFactory_Impl::CreateGalleryThemePropertiesDialog(vcl::Window* pParent, ExchangeData* pData, SfxItemSet* pItemSet) { VclPtrInstance pDlg(pParent, pData, pItemSet); - return VclPtr::Create( pDlg ); + return VclPtr::Create( pDlg ); } VclPtr AbstractDialogFactory_Impl::CreateURLDialog( vcl::Window* pParent, diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index d780da073e28..a662aa09ee07 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -80,20 +80,6 @@ bool Class::StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) \ return pDlg->StartExecuteAsync(rCtx); \ } -class VclAbstractDialog2_Impl : public VclAbstractDialog2 -{ - ScopedVclPtr m_pDlg; - Link m_aEndDlgHdl; -public: - explicit VclAbstractDialog2_Impl( Dialog* p ) : m_pDlg( p ) {} - virtual ~VclAbstractDialog2_Impl() override; - virtual void dispose() override; - virtual void StartExecuteModal( const Link& rEndDialogHdl ) override; - virtual sal_Int32 GetResult() override; -private: - void EndDialogHdl(sal_Int32 nResult); -}; - class CuiVclAbstractDialog_Impl : public VclAbstractDialog { DECL_ABSTDLG_BASE(CuiVclAbstractDialog_Impl,Dialog) @@ -756,7 +742,7 @@ public: virtual VclPtr CreateTitleDialog(weld::Window* pParent, const OUString& rOldText) override; virtual VclPtr CreateGalleryIdDialog(weld::Window* pParent, GalleryTheme* pThm) override; - virtual VclPtr CreateGalleryThemePropertiesDialog(vcl::Window* pParent, + virtual VclPtr CreateGalleryThemePropertiesDialog(vcl::Window* pParent, ExchangeData* pData, SfxItemSet* pItemSet) override; virtual VclPtr CreateURLDialog( vcl::Window* pParent, -- cgit