diff options
-rw-r--r-- | sd/source/ui/animations/CustomAnimationDialog.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationDialog.hxx | 3 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 17 |
3 files changed, 16 insertions, 12 deletions
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index cd2d4c393ea7..dea31a7edce4 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -2154,9 +2154,9 @@ IMPL_LINK_NOARG(CustomAnimationTextAnimTabPage, implSelectHdl, ListBox&, void) updateControlStates(); } -CustomAnimationDialog::CustomAnimationDialog(vcl::Window* pParent, STLPropertySet* pSet, const OString& sPage) +CustomAnimationDialog::CustomAnimationDialog(vcl::Window* pParent, std::unique_ptr<STLPropertySet> pSet, const OString& sPage) : TabDialog( pParent, "CustomAnimationProperties", "modules/simpress/ui/customanimationproperties.ui") -, mpSet( pSet ) +, mpSet( std::move(pSet) ) , mpResultSet( nullptr ) { get(mpTabControl, "tabs"); @@ -2171,8 +2171,8 @@ CustomAnimationDialog::CustomAnimationDialog(vcl::Window* pParent, STLPropertySe mpTabControl->SetTabPage( nTimingId, mpDurationTabPage ); bool bHasText = false; - if( pSet->getPropertyState( nHandleHasText ) != STLPropertyState::Ambiguous ) - pSet->getPropertyValue( nHandleHasText ) >>= bHasText; + if( mpSet->getPropertyState( nHandleHasText ) != STLPropertyState::Ambiguous ) + mpSet->getPropertyValue( nHandleHasText ) >>= bHasText; if( bHasText ) { diff --git a/sd/source/ui/animations/CustomAnimationDialog.hxx b/sd/source/ui/animations/CustomAnimationDialog.hxx index 14f605b2984f..6aaf713cfaea 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.hxx +++ b/sd/source/ui/animations/CustomAnimationDialog.hxx @@ -142,11 +142,12 @@ class STLPropertySet; class CustomAnimationDialog : public TabDialog { public: - CustomAnimationDialog(vcl::Window* pParent, STLPropertySet* pSet, const OString& Page); + CustomAnimationDialog(vcl::Window* pParent, std::unique_ptr<STLPropertySet> pSet, const OString& Page); virtual ~CustomAnimationDialog() override; virtual void dispose() override; STLPropertySet* getResultSet(); + STLPropertySet* getPropertySet() const { return mpSet.get(); } static std::unique_ptr<STLPropertySet> createDefaultSet(); diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index dea81a9cd6c9..ca2a57dc099a 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -1668,13 +1668,16 @@ void CustomAnimationPane::showOptions(const OString& sPage) { std::unique_ptr<STLPropertySet> pSet = createSelectionSet(); - VclPtrInstance< CustomAnimationDialog > pDlg(this, pSet.get(), sPage); - if( pDlg->Execute() ) - { - addUndo(); - changeSelection( pDlg->getResultSet(), pSet.get() ); - updateControls(); - } + auto pDlg = VclPtr<CustomAnimationDialog>::Create(this, std::move(pSet), sPage); + + pDlg->StartExecuteAsync([=](sal_Int32 nResult){ + if (nResult ) + { + addUndo(); + changeSelection( pDlg->getResultSet(), pDlg->getPropertySet() ); + updateControls(); + } + }); } void CustomAnimationPane::onChangeCurrentPage() |