sw/source/uibase/shells/textsh1.cxx |    8 ++++----
 sw/source/uibase/utlui/content.cxx  |    6 ++++--
 vcl/jsdialog/enabled.cxx            |    2 ++
 3 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 1e561bdd193c82ed0e1e42c481bcd6fcf6e3f05a
Author:     Skyler Grey <skyler.g...@collabora.com>
AuthorDate: Wed Jun 18 12:20:29 2025 +0000
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Mon Jul 7 06:23:53 2025 +0200

    feat: enable renameobjectdialog.ui for jsdialog
    
    To fully enable jsdialogs for insertbookmark.ui, it's nice to enable
    jsdialogs for all dialogs it uses too.
    
    As it happens, there's only 1 use (out of 2) which doesn't already
    execute asyncly, and there's nothing particularly complex here which
    needs extra focus ontop of Just Turning The Setting On
    
    Signed-off-by: Skyler Grey <skyler.g...@collabora.com>
    Change-Id: I635354496f719f43d8ebf690f766a435864763fe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187192
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index cc8929a4b8ef..872232152e64 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -6302,7 +6302,7 @@ void SwContentTree::EditEntry(const weld::TreeIter& 
rEntry, EditEntryMode nMode)
         aObj >>= xTmp;
         uno::Reference< container::XNamed >  xNamed(xTmp, uno::UNO_QUERY);
         SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
-        ScopedVclPtr<AbstractSwRenameXNamedDlg> 
pDlg(pFact->CreateSwRenameXNamedDlg(m_xTreeView.get(), xNamed, xNameAccess));
+        VclPtr<AbstractSwRenameXNamedDlg> 
pDlg(pFact->CreateSwRenameXNamedDlg(m_xTreeView.get(), xNamed, xNameAccess));
         if(xSecond.is())
             pDlg->SetAlternativeAccess( xSecond, xThird);
 
@@ -6316,7 +6316,9 @@ void SwContentTree::EditEntry(const weld::TreeIter& 
rEntry, EditEntryMode nMode)
             sForbiddenChars = " .<>";
         }
         pDlg->SetForbiddenChars(sForbiddenChars);
-        pDlg->Execute();
+        pDlg->StartExecuteAsync([pDlg](sal_Int32) {
+                                    pDlg->disposeOnce();
+                                });
     }
     if(EditEntryMode::DELETE == nMode)
     {
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 4562d111b593..2c7491b99673 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -237,6 +237,7 @@ constexpr auto SwriterDialogList
         { u"modules/swriter/ui/paradialog.ui" },
         { u"modules/swriter/ui/picturedialog.ui" },
         { u"modules/swriter/ui/picturepage.ui" },
+        { u"modules/swriter/ui/renameobjectdialog.ui" },
         { u"modules/swriter/ui/sectionpage.ui" },
         { u"modules/swriter/ui/sortdialog.ui" },
         { u"modules/swriter/ui/splittable.ui" },
commit 751d3526cab25924be4691f6c3fbcd0d8c4bc07d
Author:     Skyler Grey <skyler.g...@collabora.com>
AuthorDate: Wed Jun 18 12:14:54 2025 +0000
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Mon Jul 7 06:23:45 2025 +0200

    feat: enable insertbookmark.ui for jsdialog
    
    This mostly works, although there is a subdialog which still needs to be
    enabled and editing text does not work... These issues will be solved in
    followup commits
    
    Signed-off-by: Skyler Grey <skyler.g...@collabora.com>
    Change-Id: I26596ff5559de66a036dcfbe5a16ba1aa13eb06a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187191
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sw/source/uibase/shells/textsh1.cxx 
b/sw/source/uibase/shells/textsh1.cxx
index 1042ff8bff42..ac1c0281b71e 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1330,10 +1330,10 @@ void SwTextShell::Execute(SfxRequest &rReq)
             }
             {
                 SwAbstractDialogFactory* pFact = 
SwAbstractDialogFactory::Create();
-                ScopedVclPtr<VclAbstractDialog> 
pDlg(pFact->CreateSwInsertBookmarkDlg(GetView().GetFrameWeld(), rWrtSh, oName ? 
&*oName : nullptr));
-                VclAbstractDialog::AsyncContext aContext;
-                aContext.maEndDialogFn = [](sal_Int32){};
-                pDlg->StartExecuteAsync(aContext);
+                VclPtr<VclAbstractDialog> 
pDlg(pFact->CreateSwInsertBookmarkDlg(GetView().GetFrameWeld(), rWrtSh, oName ? 
&*oName : nullptr));
+                pDlg->StartExecuteAsync([pDlg](sal_Int32){
+                                            pDlg->disposeOnce();
+                                        });
             }
 
             break;
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index c466e5a3bc0a..4562d111b593 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -225,6 +225,7 @@ constexpr auto SwriterDialogList
         { u"modules/swriter/ui/indentpage.ui" },
         { u"modules/swriter/ui/indexentry.ui" },
         { u"modules/swriter/ui/inforeadonlydialog.ui" },
+        { u"modules/swriter/ui/insertbookmark.ui" },
         { u"modules/swriter/ui/insertbreak.ui" },
         { u"modules/swriter/ui/insertcaption.ui" },
         { u"modules/swriter/ui/insertsectiondialog.ui" },

Reply via email to