[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source sc/source

2020-03-24 Thread Dennis Francis (via logerrit)
 chart2/source/controller/main/ControllerCommandDispatch.cxx |   10 ++
 sc/source/ui/view/tabvwshb.cxx  |2 ++
 2 files changed, 12 insertions(+)

New commits:
commit 3e4fd7330b382a42e3dd2e1b8fd0b1f78a34b28d
Author: Dennis Francis 
AuthorDate: Tue Mar 24 18:26:16 2020 +0530
Commit: Andras Timar 
CommitDate: Wed Mar 25 00:04:43 2020 +0100

lokit: Mark document as modified on chart insert/edit...

immediately at least in the case when LOKit is active.
This is to allow prompt emission of .uno:ModifiedStatus=true statechange
message from lokit to the client. Without this, in online the chart
insert/modify related changes may not get saved on client exit.

Change-Id: I8c38a37cc455f74a70d43b6aaa3e5035b283d47f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90987
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx 
b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 0dac15954de8..a1857e7c08e5 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -35,6 +35,9 @@
 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 #include 
 #include 
@@ -812,6 +815,13 @@ void SAL_CALL ControllerCommandDispatch::modified( const 
lang::EventObject& aEve
 if( bUpdateCommandAvailability )
 updateCommandAvailability();
 
+if (comphelper::LibreOfficeKit::isActive())
+{
+if (SfxViewShell* pViewShell = SfxViewShell::Current())
+if (SfxObjectShell* pObjSh = pViewShell->GetObjectShell())
+pObjSh->SetModified();
+}
+
 CommandDispatch::modified( aEvent );
 }
 
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 7ac16fa1a0dc..2f2eb1bda630 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -337,6 +337,8 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
 
 case SID_INSERT_DIAGRAM:
 pFuInsertChart.reset(new FuInsertChart(*this, pWin, pView, 
pDrModel, rReq));
+if (comphelper::LibreOfficeKit::isActive())
+pDocSh->SetModified();
 break;
 
 case SID_INSERT_OBJECT:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source sc/source svtools/source sw/source

2019-09-28 Thread Szymon Kłos (via logerrit)
 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;
+
+