sc/source/ui/drawfunc/graphsh.cxx |   40 ++++++++++++++++++++------------------
 sc/source/ui/view/cellsh1.cxx     |   29 ++++++++++++++++++---------
 vcl/jsdialog/enabled.cxx          |   33 +++++++++++++++++++++++++++++--
 3 files changed, 72 insertions(+), 30 deletions(-)

New commits:
commit f25f343df9e0dd2e7b44d31939823ee738799d54
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Feb 12 17:10:02 2026 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Feb 24 09:23:50 2026 +0100

    make calc Compress Graphic dialog async
    
    Change-Id: I69d00fbe654113a0dc33f4c4359fd63b0630da3b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199306
    Reviewed-by: Miklos Vajna <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200121
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sc/source/ui/drawfunc/graphsh.cxx 
b/sc/source/ui/drawfunc/graphsh.cxx
index 71420be473b7..cfd06d481596 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -106,13 +106,13 @@ void ScGraphicShell::ExecuteFilter( const SfxRequest& 
rReq )
 
     if( rMarkList.GetMarkCount() == 1 )
     {
-        SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
+        rtl::Reference<SdrObject> xObj = rMarkList.GetMark( 0 
)->GetMarkedSdrObj();
 
-        if( auto pGraphicObj = dynamic_cast<SdrGrafObj*>( pObj) )
+        if( auto pGraphicObj = dynamic_cast<SdrGrafObj*>(xObj.get()) )
             if( pGraphicObj->GetGraphicType() == GraphicType::Bitmap )
             {
                 SvxGraphicFilter::ExecuteGrfFilterSlot( rReq, 
pGraphicObj->GetGraphicObject(),
-                    [pView, pGraphicObj, pObj, rMarkList] (GraphicObject 
aFilterObj) -> void
+                    [pView, pGraphicObj, xObj, rMarkList] (GraphicObject 
aFilterObj) -> void
                     {
                         if( SdrPageView* pPageView = pView->GetSdrPageView() )
                         {
@@ -120,7 +120,7 @@ void ScGraphicShell::ExecuteFilter( const SfxRequest& rReq )
                             OUString aStr = rMarkList.GetMarkDescription() + " 
" + ScResId(SCSTR_UNDO_GRAFFILTER);
                             pView->BegUndo( aStr );
                             pFilteredObj->SetGraphicObject( aFilterObj );
-                            pView->ReplaceObjectAtView( pObj, *pPageView, 
pFilteredObj.get() );
+                            pView->ReplaceObjectAtView( xObj.get(), 
*pPageView, pFilteredObj.get() );
                             pView->EndUndo();
                         }
                     });
@@ -198,25 +198,29 @@ void ScGraphicShell::ExecuteCompressGraphic( 
SAL_UNUSED_PARAMETER SfxRequest& )
 
     if( rMarkList.GetMarkCount() == 1 )
     {
-        SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
+        rtl::Reference<SdrObject> xObj = rMarkList.GetMark( 0 
)->GetMarkedSdrObj();
 
-        if( auto pGraphicObj = dynamic_cast<SdrGrafObj*>( pObj) )
+        if( auto pGraphicObj = dynamic_cast<SdrGrafObj*>(xObj.get()) )
+        {
             if( pGraphicObj->GetGraphicType() == GraphicType::Bitmap )
             {
-                CompressGraphicsDialog dialog(GetViewData().GetDialogParent(), 
pGraphicObj, GetViewData().GetBindings());
-                if (dialog.run() == RET_OK)
-                {
-                    rtl::Reference<SdrGrafObj> pNewObject = 
dialog.GetCompressedSdrGrafObj();
-                    SdrPageView* pPageView = pView->GetSdrPageView();
-                    OUString aUndoString = rMarkList.GetMarkDescription() + " 
Compress";
-                    pView->BegUndo( aUndoString );
-                    pView->ReplaceObjectAtView( pObj, *pPageView, 
pNewObject.get() );
-                    pView->EndUndo();
-                }
+                auto xDialog = 
std::make_shared<CompressGraphicsDialog>(GetViewData().GetDialogParent(), 
pGraphicObj, GetViewData().GetBindings());
+                OUString aUndoString = rMarkList.GetMarkDescription() + " 
Compress";
+                weld::DialogController::runAsync(xDialog, [this, pView, xObj, 
xDialog, aUndoString](sal_uInt32 nResult) {
+                    if (nResult == RET_OK)
+                    {
+                        rtl::Reference<SdrGrafObj> pNewObject = 
xDialog->GetCompressedSdrGrafObj();
+                        SdrPageView* pPageView = pView->GetSdrPageView();
+                        pView->BegUndo( aUndoString );
+                        pView->ReplaceObjectAtView( xObj.get(), *pPageView, 
pNewObject.get() );
+                        pView->EndUndo();
+
+                        Invalidate();
+                    }
+                });
             }
+        }
     }
-
-    Invalidate();
 }
 
 void ScGraphicShell::GetCropGraphicState( SfxItemSet& rSet )
commit 0a0190fc5b0902c5c962c3c17ca536180bcd9293
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Feb 12 16:41:22 2026 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Feb 24 09:23:43 2026 +0100

    make PasteTextImportDialog async
    
    Change-Id: I4c35a86150bd74f5f5264418c150770d008de60d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199305
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200120
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 6c4517cce733..f92b82958742 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1777,16 +1777,25 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
                     ScAddress aCellPos(nPosX, nPosY, 
GetViewData().CurrentTabForData());
                     auto pObj = 
std::make_shared<ScImportExport>(GetViewData().GetDocument(), aCellPos);
                     pObj->SetOverwriting(true);
-                    if (pDlg->Execute()) {
-                        ScAsciiOptions aOptions;
-                        pDlg->GetOptions(aOptions);
-                        pDlg->SaveParameters();
-                        pObj->SetExtOptions(aOptions);
-                        pObj->ImportString(sStrBuffer, format);
-                    }
-                    pDlg->disposeOnce();
-                    rReq.SetReturnValue(SfxInt16Item(nSlot, 1)); // 1 = 
success, 0 = fail
-                    rReq.Done();
+
+                    auto xRequest = std::make_shared<SfxRequest>(rReq);
+                    rReq.Ignore(); // the 'old' request is not relevant any 
more
+
+                    pDlg->StartExecuteAsync(
+                            [pDlg, pObj, format, sStrBuffer, 
xRequest=std::move(xRequest)](sal_Int32 nResult){
+                            if (nResult) {
+                                ScAsciiOptions aOptions;
+                                pDlg->GetOptions(aOptions);
+                                pDlg->SaveParameters();
+                                pObj->SetExtOptions(aOptions);
+                                pObj->ImportString(sStrBuffer, format);
+                            }
+
+                            pDlg->disposeOnce();
+                            
xRequest->SetReturnValue(SfxInt16Item(SID_PASTE_TEXTIMPORT_DIALOG, 1)); // 1 = 
success, 0 = fail
+                            xRequest->Done();
+                        }
+                    );
                 }
             }
             if (!bSuccess)
commit af6dc21f278ecd76e9fd794d9a54458fd7f61788
Author:     Caolán McNamara <[email protected]>
AuthorDate: Mon Feb 9 15:25:20 2026 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Feb 24 09:23:36 2026 +0100

    exclude some unreachable dialogs
    
    Change-Id: Ic7e2d683c26c3e89fd7522d991d3a73929bad7f7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199285
    Reviewed-by: Miklos Vajna <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200119
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index e530c000dab3..397812072e3a 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -692,6 +692,14 @@ std::vector<OUString> completeCalcDialogList(const 
o3tl::sorted_vector<OUString>
         // for SID_OUTLINE_REMOVE
         if (entry == u"modules/scalc/ui/ungroupdialog.ui")
             continue;
+        // Skip this one for now, it can only be seen in certain xlsx documents
+        else if (entry == u"modules/scalc/ui/definetablerangedialog.ui")
+            continue;
+        // Skip this one, I think it can only happen on loading
+        // an archaic lotus 123 file
+        else if (entry == u"modules/scalc/ui/imoptdialog.ui")
+            continue;
+
         OUString sEntry(entry);
         if (!entries.contains(sEntry))
             missing.push_back(sEntry);
@@ -785,15 +793,36 @@ std::vector<OUString> completeCommonDialogList(const 
o3tl::sorted_vector<OUStrin
                 if (o3tl::starts_with(entry, u"writerperfect"))
                     continue;
                 // The manage changes dialog is only enabled in writer
-                else if (entry == u"svx/ui/acceptrejectchangesdialog.ui")
+                else if (entry == u"svx/ui/acceptrejectchangesdialog.ui" ||
+                         entry == u"svx/ui/redlinecontrol.ui" ||
+                         entry == u"svx/ui/redlinefilterpage.ui" ||
+                         entry == u"svx/ui/redlineviewpage.ui")
+                {
                     continue;
+                }
             }
 
             if (docType == LOK_DOCTYPE_SPREADSHEET)
             {
                 // Not supported in Calc
                 if (entry == u"svx/ui/gotopagedialog.ui" ||
-                    entry == u"cui/ui/splitcellsdialog.ui")
+                    entry == u"cui/ui/borderareatransparencydialog.ui" ||
+                    entry == u"cui/ui/splitcellsdialog.ui" ||
+                    entry == u"cui/ui/objectnamedialog.ui" ||
+                    entry == u"cui/ui/objecttitledescdialog.ui" ||
+                    entry == u"cui/ui/croppage.ui" ||
+                    entry == u"cui/ui/spinbox.ui" ||
+                    entry == u"cui/ui/formatnumberdialog.ui" ||
+                    entry == u"cui/ui/numberingoptionspage.ui" ||
+                    entry == u"cui/ui/numberingpositionpage.ui" ||
+                    entry == u"cui/ui/pastespecial.ui" ||
+                    entry == u"cui/ui/textflowpage.ui" ||
+                    entry == u"cui/ui/twolinespage.ui" ||
+                    entry == u"cui/ui/pickbulletpage.ui" ||
+                    entry == u"cui/ui/pickgraphicpage.ui" ||
+                    entry == u"cui/ui/picknumberingpage.ui" ||
+                    entry == u"cui/ui/pickoutlinepage.ui" ||
+                    entry == u"sfx/ui/password.ui")
                 {
                     continue;
                 }

Reply via email to