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 --- svx/source/gallery2/galbrws1.cxx | 22 +++++++++++----------- svx/source/gallery2/galbrws1.hxx | 10 +++++----- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'svx') diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index cfb835f2b0b5..e5349d31e02a 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -268,20 +268,20 @@ void GalleryBrowser1::ImplGalleryThemeProperties( const OUString & rThemeName, b if ( bCreateNew ) { - mpThemePropertiesDialog->StartExecuteModal( - LINK( this, GalleryBrowser1, EndNewThemePropertiesDlgHdl ) ); + mpThemePropertiesDialog->StartExecuteAsync([=](sal_Int32 nResult){ + EndNewThemePropertiesDlgHdl(nResult); + }); } else { - mpThemePropertiesDialog->StartExecuteModal( - LINK( this, GalleryBrowser1, EndThemePropertiesDlgHdl ) ); + mpThemePropertiesDialog->StartExecuteAsync([=](sal_Int32 nResult){ + EndThemePropertiesDlgHdl(nResult); + }); } } -void GalleryBrowser1::ImplEndGalleryThemeProperties(bool bCreateNew) +void GalleryBrowser1::ImplEndGalleryThemeProperties(bool bCreateNew, sal_Int32 nRet) { - long nRet = mpThemePropertiesDialog->GetResult(); - if( nRet == RET_OK ) { OUString aName( mpExchangeData->pTheme->GetName() ); @@ -318,14 +318,14 @@ void GalleryBrowser1::ImplEndGalleryThemeProperties(bool bCreateNew) Application::PostUserEvent( LINK( this, GalleryBrowser1, DestroyThemePropertiesDlgHdl ), nullptr, true ); } -IMPL_LINK( GalleryBrowser1, EndNewThemePropertiesDlgHdl, Dialog&, /*rDialog*/, void ) +void GalleryBrowser1::EndNewThemePropertiesDlgHdl(sal_Int32 nResult) { - ImplEndGalleryThemeProperties(true); + ImplEndGalleryThemeProperties(true, nResult); } -IMPL_LINK( GalleryBrowser1, EndThemePropertiesDlgHdl, Dialog&, /*rDialog*/, void ) +void GalleryBrowser1::EndThemePropertiesDlgHdl(sal_Int32 nResult) { - ImplEndGalleryThemeProperties(false); + ImplEndGalleryThemeProperties(false, nResult); } IMPL_LINK( GalleryBrowser1, DestroyThemePropertiesDlgHdl, void*, /*p*/, void ) diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx index 22b35ef6633d..f0791453ca96 100644 --- a/svx/source/gallery2/galbrws1.hxx +++ b/svx/source/gallery2/galbrws1.hxx @@ -59,7 +59,7 @@ public: class Gallery; class GalleryThemeEntry; class GalleryTheme; -class VclAbstractDialog2; +class VclAbstractDialog; struct ExchangeData; class SfxItemSet; @@ -76,7 +76,7 @@ private: VclPtr maNewTheme; VclPtr mpThemes; - VclPtr mpThemePropertiesDialog; // to keep it alive during execution + VclPtr mpThemePropertiesDialog; // to keep it alive during execution Gallery* mpGallery; std::unique_ptr mpExchangeData; std::unique_ptr mpThemePropsDlgItemSet; @@ -94,7 +94,9 @@ private: void ImplGetExecuteVector(std::vector& o_aExec); void ImplExecute(const OString &rIdent); void ImplGalleryThemeProperties( const OUString & rThemeName, bool bCreateNew ); - void ImplEndGalleryThemeProperties(bool bCreateNew); + void EndNewThemePropertiesDlgHdl(sal_Int32 nResult); + void EndThemePropertiesDlgHdl(sal_Int32 nResult); + void ImplEndGalleryThemeProperties(bool bCreateNew, sal_Int32 nResult); // Control virtual void Resize() override; @@ -107,8 +109,6 @@ private: DECL_LINK( SelectThemeHdl, ListBox&, void ); DECL_LINK( ShowContextMenuHdl, void*, void ); DECL_LINK( PopupMenuHdl, Menu*, bool ); - DECL_LINK( EndNewThemePropertiesDlgHdl, Dialog&, void ); - DECL_LINK( EndThemePropertiesDlgHdl, Dialog&, void ); DECL_LINK( DestroyThemePropertiesDlgHdl, void*, void ); public: -- cgit