cui/source/factory/dlgfact.cxx       |    4 ++--
 cui/source/factory/dlgfact.hxx       |    4 ++--
 sc/source/ui/drawfunc/drawsh5.cxx    |    9 +++++++--
 sc/source/ui/view/tabvwshb.cxx       |    9 +++++++--
 sd/source/ui/view/drviews2.cxx       |    9 +++++++--
 sd/source/ui/view/drviews3.cxx       |    9 +++++++--
 sw/source/uibase/shells/drwbassh.cxx |    9 +++++++--
 sw/source/uibase/uiview/viewdlg2.cxx |    9 +++++++--
 8 files changed, 46 insertions(+), 16 deletions(-)

New commits:
commit 9b517f9d4fdafbe7a8db8b7ed3c9e0f09f50cfda
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Jan 22 14:53:32 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Jan 23 07:17:47 2024 +0100

    make additions dialog async
    
    Change-Id: I239d8d344ed3152586567c6e1d9b529ba75925dd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162418
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 48320a25f7d2..30bdef345ff7 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -102,7 +102,7 @@ using ::com::sun::star::uno::Reference;
 
 using namespace svx;
 
-IMPL_ABSTDLG_CLASS(AbstractAdditionsDialog)
+IMPL_ABSTDLG_CLASS_ASYNC(AbstractAdditionsDialog, 
weld::GenericDialogController)
 IMPL_ABSTDLG_CLASS_ASYNC(AbstractDiagramDialog, DiagramDialog)
 IMPL_ABSTDLG_CLASS(AbstractFmInputRecordNoDialog)
 IMPL_ABSTDLG_CLASS(AbstractFmSearchDialog)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 5daaf967d95c..29b28ed8cab1 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -415,7 +415,7 @@ 
DECL_ABSTDLG_CLASS(AbstractSignSignatureLineDialog,SignSignatureLineDialog)
 };
 
 // AbstractAdditionsDialog_Impl
-DECL_ABSTDLG_CLASS(AbstractAdditionsDialog,weld::GenericDialogController)
+DECL_ABSTDLG_CLASS_ASYNC(AbstractAdditionsDialog,weld::GenericDialogController)
 };
 
 // AbstractDiagramDialog_Impl
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index ad0e757ce0aa..b727afae9c1c 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -442,9 +442,14 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
                     sAdditionsTag = pStringArg->GetValue();
 
                 VclAbstractDialogFactory* pFact = 
VclAbstractDialogFactory::Create();
-                ScopedVclPtr<AbstractAdditionsDialog> pDialog(
+                VclPtr<AbstractAdditionsDialog> pDialog(
                     pFact->CreateAdditionsDialog(pWin->GetFrameWeld(), 
sAdditionsTag));
-                pDialog->Execute();
+                pDialog->StartExecuteAsync(
+                    [pDialog] (sal_Int32 /*nResult*/)->void
+                    {
+                        pDialog->disposeOnce();
+                    }
+                );
                 break;
             }
 
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 8dbb3142e4c3..f9f176021410 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -3586,9 +3586,14 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
                 sAdditionsTag = pStringArg->GetValue();
 
             VclAbstractDialogFactory* pFact = 
VclAbstractDialogFactory::Create();
-            ScopedVclPtr<AbstractAdditionsDialog> pDlg(
+            VclPtr<AbstractAdditionsDialog> pDlg(
                 pFact->CreateAdditionsDialog(GetFrameWeld(), sAdditionsTag));
-            pDlg->Execute();
+            pDlg->StartExecuteAsync(
+                [pDlg] (sal_Int32 /*nResult*/)->void
+                {
+                    pDlg->disposeOnce();
+                }
+            );
             Cancel();
             rReq.Ignore ();
         }
diff --git a/sw/source/uibase/uiview/viewdlg2.cxx 
b/sw/source/uibase/uiview/viewdlg2.cxx
index 597731645ebe..a79b224ddbfd 100644
--- a/sw/source/uibase/uiview/viewdlg2.cxx
+++ b/sw/source/uibase/uiview/viewdlg2.cxx
@@ -91,9 +91,14 @@ void SwView::ExecDlgExt(SfxRequest const& rReq)
                 sAdditionsTag = pStringArg->GetValue();
 
             VclAbstractDialogFactory* pFact = 
VclAbstractDialogFactory::Create();
-            ScopedVclPtr<AbstractAdditionsDialog> pDialog(
+            VclPtr<AbstractAdditionsDialog> pDialog(
                 pFact->CreateAdditionsDialog(GetFrameWeld(), sAdditionsTag));
-            pDialog->Execute();
+            pDialog->StartExecuteAsync(
+                [pDialog] (sal_Int32 /*nResult*/)->void
+                {
+                    pDialog->disposeOnce();
+                }
+            );
             break;
         }
         case SID_SIGN_SIGNATURELINE:
commit 4cee40936ef39a61c56779e6059e79e7ea6b3961
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Jan 22 14:48:56 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Jan 23 07:17:38 2024 +0100

    make diagram dialog async
    
    Change-Id: I26ec71ab5b00545a2e173dd4cc3dcd49d79c2fa7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162417
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index dc61688e175e..48320a25f7d2 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -103,7 +103,7 @@ using ::com::sun::star::uno::Reference;
 using namespace svx;
 
 IMPL_ABSTDLG_CLASS(AbstractAdditionsDialog)
-IMPL_ABSTDLG_CLASS(AbstractDiagramDialog)
+IMPL_ABSTDLG_CLASS_ASYNC(AbstractDiagramDialog, DiagramDialog)
 IMPL_ABSTDLG_CLASS(AbstractFmInputRecordNoDialog)
 IMPL_ABSTDLG_CLASS(AbstractFmSearchDialog)
 IMPL_ABSTDLG_CLASS(AbstractFmShowColsDialog)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index cb671b40bdf3..5daaf967d95c 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -419,7 +419,7 @@ 
DECL_ABSTDLG_CLASS(AbstractAdditionsDialog,weld::GenericDialogController)
 };
 
 // AbstractDiagramDialog_Impl
-DECL_ABSTDLG_CLASS(AbstractDiagramDialog,DiagramDialog)
+DECL_ABSTDLG_CLASS_ASYNC(AbstractDiagramDialog,DiagramDialog)
 };
 
 //AbstractDialogFactory_Impl implementations
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx 
b/sc/source/ui/drawfunc/drawsh5.cxx
index 896e7e42c783..0baff09045cc 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -295,10 +295,15 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
                         {
                             VclAbstractDialogFactory* pFact = 
VclAbstractDialogFactory::Create();
                             vcl::Window* pWin = rViewData.GetActiveWin();
-                            ScopedVclPtr<VclAbstractDialog> pDlg = 
pFact->CreateDiagramDialog(
+                            VclPtr<VclAbstractDialog> pDlg = 
pFact->CreateDiagramDialog(
                                 pWin ? pWin->GetFrameWeld() : nullptr,
                                 *static_cast<SdrObjGroup*>(pObj));
-                            pDlg->Execute();
+                            pDlg->StartExecuteAsync(
+                                [pDlg] (sal_Int32 /*nResult*/)->void
+                                {
+                                    pDlg->disposeOnce();
+                                }
+                            );
                         }
                     }
                 }
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index a4e375890014..73edca29dd5e 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -503,10 +503,15 @@ void  DrawViewShell::ExecCtrl(SfxRequest& rReq)
                     else // SID_EDIT_DIAGRAM
                     {
                         VclAbstractDialogFactory* pFact = 
VclAbstractDialogFactory::Create();
-                        ScopedVclPtr<VclAbstractDialog> pDlg = 
pFact->CreateDiagramDialog(
+                        VclPtr<VclAbstractDialog> pDlg = 
pFact->CreateDiagramDialog(
                             GetFrameWeld(),
                             *static_cast<SdrObjGroup*>(pObj));
-                        pDlg->Execute();
+                        pDlg->StartExecuteAsync(
+                            [pDlg] (sal_Int32 /*nResult*/)->void
+                            {
+                                pDlg->disposeOnce();
+                            }
+                        );
                     }
                 }
             }
diff --git a/sw/source/uibase/shells/drwbassh.cxx 
b/sw/source/uibase/shells/drwbassh.cxx
index 979f63a14369..d4f169992534 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -462,10 +462,15 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
                         else // SID_EDIT_DIAGRAM
                         {
                             VclAbstractDialogFactory* pFact = 
VclAbstractDialogFactory::Create();
-                            ScopedVclPtr<VclAbstractDialog> pDlg = 
pFact->CreateDiagramDialog(
+                            VclPtr<VclAbstractDialog> pDlg = 
pFact->CreateDiagramDialog(
                                 GetView().GetFrameWeld(),
                                 *static_cast<SdrObjGroup*>(pObj));
-                            pDlg->Execute();
+                            pDlg->StartExecuteAsync(
+                                [pDlg] (sal_Int32 /*nResult*/)->void
+                                {
+                                    pDlg->disposeOnce();
+                                }
+                            );
                         }
                     }
                 }

Reply via email to