diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-31 12:38:56 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-11-01 11:00:12 +0100 |
commit | c86728655415ea507cb5f8d7f0588014db2d6098 (patch) | |
tree | 61765a8d10547cbbd183b6317c8f0601839cd785 /svx/source/gallery2 | |
parent | 52bbb04f1e39b2d778275c91f77b6c0714ecd0d0 (diff) |
replace VclAbstractDialog2 with VclAbstractDialog
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 <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 22 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws1.hxx | 10 |
2 files changed, 16 insertions, 16 deletions
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<GalleryButton> maNewTheme; VclPtr<GalleryThemeListBox> mpThemes; - VclPtr<VclAbstractDialog2> mpThemePropertiesDialog; // to keep it alive during execution + VclPtr<VclAbstractDialog> mpThemePropertiesDialog; // to keep it alive during execution Gallery* mpGallery; std::unique_ptr<ExchangeData> mpExchangeData; std::unique_ptr<SfxItemSet> mpThemePropsDlgItemSet; @@ -94,7 +94,9 @@ private: void ImplGetExecuteVector(std::vector<OString>& 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: |