chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx | 54 ++--
chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx | 16 -
sc/source/ui/drawfunc/fuins2.cxx| 130 ++--
sc/source/ui/inc/fuinsert.hxx | 14 +
sc/source/ui/inc/tabvwsh.hxx|3
sc/source/ui/view/tabvwsh4.cxx |1
sc/source/ui/view/tabvwshb.cxx |2
svtools/source/dialogs/wizardmachine.cxx|9
sw/source/uibase/inc/chartins.hxx |8
sw/source/uibase/inc/textsh.hxx |3
sw/source/uibase/shells/textsh.cxx | 23 ++
sw/source/uibase/table/chartins.cxx | 32 +-
12 files changed, 176 insertions(+), 119 deletions(-)
New commits:
commit cb01bb34713f39b55b5994c7a756d95db4a81231
Author: Szymon Kłos
AuthorDate: Wed Apr 17 17:33:10 2019 +0200
Commit: Michael Meeks
CommitDate: Sat Sep 28 11:00:00 2019 +0200
Make Chart Creation Wizard async
* FuInsertChart as a memeber in ScTabViewShell
stores instance is needed to react on the dialog's result
* CreationWizardUnoDlg converted to XAsynchronousExecutableDialog
added dialog close handler which notifies listeners
In the Online dialog become dead after closing, additional
PostUserEvent was needed to kill the dialog after real close
(without it user needed to select any cell to close dialog)
* Reuse in Writer
Change-Id: I9fe123d5c189d568f0edb4d36173a224a820a8a3
Reviewed-on: https://gerrit.libreoffice.org/79654
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Michael Meeks
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index 9606ae805c6f..ba08b5b7ed55 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -32,6 +32,7 @@
#include
#include
#include
+#include
namespace chart
{
@@ -83,9 +84,9 @@ void SAL_CALL CreationWizardUnoDlg::release() throw ()
}
uno::Any SAL_CALL CreationWizardUnoDlg::queryAggregation( uno::Type const &
rType )
{
-if (rType == cppu::UnoType::get())
+if (rType ==
cppu::UnoType::get())
{
-void * p = static_cast< ui::dialogs::XExecutableDialog * >( this );
+void * p = static_cast< ui::dialogs::XAsynchronousExecutableDialog *
>( this );
return uno::Any( , rType );
}
else if (rType == cppu::UnoType::get())
@@ -120,9 +121,8 @@ uno::Sequence< uno::Type > CreationWizardUnoDlg::getTypes()
cppu::UnoType::get(),
cppu::UnoType::get(),
cppu::UnoType::get(),
-
cppu::UnoType::get(),
+
cppu::UnoType::get(),
cppu::UnoType::get() };
-
return aTypeList;
}
@@ -147,7 +147,7 @@ void SAL_CALL CreationWizardUnoDlg::disposing( const
lang::EventObject& /*Source
//Listener should deregister himself and release all references to the
closing object.
}
-void SAL_CALL CreationWizardUnoDlg::setTitle( const OUString& /*rTitle*/ )
+void SAL_CALL CreationWizardUnoDlg::setDialogTitle( const OUString& /*rTitle*/
)
{
}
void CreationWizardUnoDlg::createDialogOnDemand()
@@ -176,32 +176,34 @@ void CreationWizardUnoDlg::createDialogOnDemand()
}
uno::Reference< XComponent > xComp( this );
if( m_xChartModel.is() )
-{
m_pDialog = VclPtr::Create( pParent,
m_xChartModel, m_xCC );
-m_pDialog->AddEventListener( LINK( this, CreationWizardUnoDlg,
DialogEventHdl ) );
-}
}
}
-IMPL_LINK( CreationWizardUnoDlg, DialogEventHdl, VclWindowEvent&, rEvent, void
)
-{
-if(rEvent.GetId() == VclEventId::ObjectDying)
-m_pDialog = nullptr;//avoid duplicate destruction of m_pDialog
-}
-sal_Int16 SAL_CALL CreationWizardUnoDlg::execute( )
+void SAL_CALL CreationWizardUnoDlg::startExecuteModal( const
css::uno::Reference& xListener )
{
-sal_Int16 nRet = RET_CANCEL;
-{
-SolarMutexGuard aSolarGuard;
-createDialogOnDemand();
-if( !m_pDialog )
-return nRet;
-TimerTriggeredControllerLock aTimerTriggeredControllerLock(
m_xChartModel );
-if( m_bUnlockControllersOnExecute && m_xChartModel.is() )
-m_xChartModel->unlockControllers();
-nRet = m_pDialog->Execute();
-}
-return nRet;
+SolarMutexGuard aSolarGuard;
+m_xDlgClosedListener = xListener;
+createDialogOnDemand();
+
+if( !m_pDialog )
+return;
+
+