sw/source/ui/dbui/dbinsdlg.cxx |   22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

New commits:
commit c4df1c7ba91032ca0de0073d37ebc90c71c48eb7
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Jan 31 13:44:18 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Feb 1 07:00:27 2024 +0100

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

diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 7e8613235f26..647397ff0d24 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -719,14 +719,20 @@ IMPL_LINK_NOARG(SwInsertDBColAutoPilot, TableFormatHdl, 
weld::Button&, void)
 
     SwAbstractDialogFactory& rFact = swui::GetFactory();
 
-    ScopedVclPtr<SfxAbstractTabDialog> 
pDlg(rFact.CreateSwTableTabDlg(m_xDialog.get(), m_pTableSet.get(), &rSh));
-    if( RET_OK == pDlg->Execute() )
-        m_pTableSet->Put( *pDlg->GetOutputItemSet() );
-    else if( bNewSet )
-    {
-        m_pTableSet.reset();
-        m_pRep.reset();
-    }
+    VclPtr<SfxAbstractTabDialog> 
pDlg(rFact.CreateSwTableTabDlg(m_xDialog.get(), m_pTableSet.get(), &rSh));
+    pDlg->StartExecuteAsync(
+        [this, pDlg, bNewSet] (sal_Int32 nResult)->void
+        {
+            if( nResult == RET_OK )
+                m_pTableSet->Put( *pDlg->GetOutputItemSet() );
+            else if( bNewSet )
+            {
+                m_pTableSet.reset();
+                m_pRep.reset();
+            }
+            pDlg->disposeOnce();
+        }
+    );
 }
 
 IMPL_LINK_NOARG(SwInsertDBColAutoPilot, AutoFormatHdl, weld::Button&, void)

Reply via email to