core.git: sd/source

2024-05-10 Thread Méven Car (via logerrit)
 sd/source/ui/view/ViewShellBase.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6f993ff3c16fe3a826cfb2d9c82f45a401d77666
Author: Méven Car 
AuthorDate: Wed May 8 16:36:20 2024 +0200
Commit: Miklos Vajna 
CommitDate: Fri May 10 09:06:48 2024 +0200

sd: prevent some work outside of LibreOfficeKit

fbd8cfb046fd0882402e01c2e0b2955e6972737f added a stateChange event for 
Is/GetStartWithPresentation.
This is needed only in case we are in LibreOfficeKit context.

Change-Id: I9d853c4d50fd07c45c40fb20c27bd26ab30c1680
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167362
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sd/source/ui/view/ViewShellBase.cxx 
b/sd/source/ui/view/ViewShellBase.cxx
index 1d7bf8caadd9..f03eca21b088 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -74,6 +74,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1039,7 +1040,7 @@ void ViewShellBase::afterCallbackRegistered()
 svx::theme::notifyLOK(pThemeColors, aDocumentColors);
 }
 
-if (mpDocument && mpDocument->GetStartWithPresentation())
+if (comphelper::LibreOfficeKit::isActive() && mpDocument && 
mpDocument->GetStartWithPresentation())
 {
 // Be consistent with SidebarController, emit JSON.
 boost::property_tree::ptree aTree;


core.git: sd/qa sd/source

2024-05-07 Thread Méven Car (via logerrit)
 sd/qa/unit/tiledrendering/data/test.ppsx |binary
 sd/qa/unit/tiledrendering/tiledrendering.cxx |   15 +++
 sd/source/ui/view/ViewShellBase.cxx  |   13 +
 3 files changed, 28 insertions(+)

New commits:
commit fbd8cfb046fd0882402e01c2e0b2955e6972737f
Author: Méven Car 
AuthorDate: Tue Feb 20 12:51:39 2024 +0100
Commit: Miklos Vajna 
CommitDate: Tue May 7 17:00:55 2024 +0200

Impress: transmit document's property StartWithPresentation

This is transmitted as stateChanged event.

This property is set for ppsx/pps files.

Change-Id: Ic2f495cb9923b385bce7d93a2d8121d2945221ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163652
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit b951c57d4b723621d211b552f2cd238ae0dc246a)

Change-Id: I7eedc855255a30abdfdf61c8315b4f8238c07ca9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165094
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167277
Tested-by: Jenkins

diff --git a/sd/qa/unit/tiledrendering/data/test.ppsx 
b/sd/qa/unit/tiledrendering/data/test.ppsx
new file mode 100644
index ..2b955adeca97
Binary files /dev/null and b/sd/qa/unit/tiledrendering/data/test.ppsx differ
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index b15821f1329b..7f8c4fa19338 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2983,6 +2983,21 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testSidebarHide)
 CPPUNIT_ASSERT(it != aView.m_aStateChanges.end());
 }
 
+CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testStartPresentation)
+{
+SdXImpressDocument* pXImpressDocument = createDoc("test.ppsx");
+ViewCallback aView;
+CPPUNIT_ASSERT(pXImpressDocument->GetDoc()->IsStartWithPresentation());
+Scheduler::ProcessEventsToIdle();
+
+const auto it = aView.m_aStateChanges.find(".uno:StartWithPresentation");
+CPPUNIT_ASSERT(it != aView.m_aStateChanges.end());
+
+const auto value = it->second;
+CPPUNIT_ASSERT(value.get_child_optional("state").has_value());
+CPPUNIT_ASSERT_EQUAL(std::string("true"), 
value.get_child("state").get_value());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/view/ViewShellBase.cxx 
b/sd/source/ui/view/ViewShellBase.cxx
index 8a25f0593b87..a86a448900f4 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -19,6 +19,8 @@
 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -1031,6 +1033,17 @@ void ViewShellBase::afterCallbackRegistered()
 std::set aDocumentColors = pDocShell->GetDocColors();
 svx::theme::notifyLOK(pThemeColors, aDocumentColors);
 }
+
+if (mpDocument && mpDocument->IsStartWithPresentation())
+{
+// Be consistent with SidebarController, emit JSON.
+boost::property_tree::ptree aTree;
+aTree.put("commandName", ".uno:StartWithPresentation");
+aTree.put("state", "true");
+std::stringstream aStream;
+boost::property_tree::write_json(aStream, aTree);
+libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, 
OString(aStream.str()));
+}
 }
 
 void ViewShellBase::NotifyCursor(SfxViewShell* pOtherShell) const


core.git: Branch 'distro/collabora/co-24.04' - sd/qa sd/source

2024-03-21 Thread Méven Car (via logerrit)
 sd/qa/unit/tiledrendering/tiledrendering.cxx |   10 ++
 sd/source/ui/view/ViewShellBase.cxx  |   11 +--
 2 files changed, 15 insertions(+), 6 deletions(-)

New commits:
commit f3e3e6442eb84f0fc73f6ddb7a0656307ff50b1b
Author: Méven Car 
AuthorDate: Thu Mar 21 10:52:06 2024 +0100
Commit: Miklos Vajna 
CommitDate: Thu Mar 21 16:40:05 2024 +0100

impress: Use json to send StartWithPresentation state

To prevent potential issue, use the json format.

Change-Id: I7eedc855255a30abdfdf61c8315b4f8238c07ca9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165094
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 79fd5534de10..40e1fc7e4ef6 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2970,14 +2970,16 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testShapeEditInMultipleViews)
 CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testStartPresentation)
 {
 SdXImpressDocument* pXImpressDocument = createDoc("test.ppsx");
-ViewCallback aView1;
+ViewCallback aView;
 CPPUNIT_ASSERT(pXImpressDocument->GetDoc()->IsStartWithPresentation());
 Scheduler::ProcessEventsToIdle();
 
-CPPUNIT_ASSERT(aView1.m_aStateChanged.size() >= 1);
+const auto it = aView.m_aStateChanges.find(".uno:StartWithPresentation");
+CPPUNIT_ASSERT(it != aView.m_aStateChanges.end());
 
-CPPUNIT_ASSERT(std::find(aView1.m_aStateChanged.begin(),
-aView1.m_aStateChanged.end(), ".uno:StartWithPresentation=true") != 
aView1.m_aStateChanged.end());
+const auto value = it->second;
+CPPUNIT_ASSERT(value.get_child_optional("state").has_value());
+CPPUNIT_ASSERT_EQUAL(std::string("true"), 
value.get_child("state").get_value());
 }
 
 CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testSidebarHide)
diff --git a/sd/source/ui/view/ViewShellBase.cxx 
b/sd/source/ui/view/ViewShellBase.cxx
index b308ad108b0a..88f9c3e77e88 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -19,6 +19,8 @@
 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -1026,8 +1028,13 @@ void ViewShellBase::afterCallbackRegistered()
 
 if (mpDocument && mpDocument->IsStartWithPresentation())
 {
-this->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
-
".uno:StartWithPresentation=true"_ostr);
+// Be consistent with SidebarController, emit JSON.
+boost::property_tree::ptree aTree;
+aTree.put("commandName", ".uno:StartWithPresentation");
+aTree.put("state", "true");
+std::stringstream aStream;
+boost::property_tree::write_json(aStream, aTree);
+libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, 
OString(aStream.str()));
 }
 }
 


core.git: Branch 'distro/collabora/co-24.04' - sd/qa sd/source

2024-03-14 Thread Méven Car (via logerrit)
 sd/qa/unit/tiledrendering/data/test.ppsx |binary
 sd/qa/unit/tiledrendering/tiledrendering.cxx |   21 +
 sd/source/ui/view/ViewShellBase.cxx  |6 ++
 3 files changed, 27 insertions(+)

New commits:
commit b951c57d4b723621d211b552f2cd238ae0dc246a
Author: Méven Car 
AuthorDate: Tue Feb 20 12:51:39 2024 +0100
Commit: Miklos Vajna 
CommitDate: Thu Mar 14 08:15:33 2024 +0100

Impress: transmit document's property StartWithPresentation

This is transmitted as stateChanged event.

This property is set for ppsx/pps files.

Change-Id: Ic2f495cb9923b385bce7d93a2d8121d2945221ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163652
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sd/qa/unit/tiledrendering/data/test.ppsx 
b/sd/qa/unit/tiledrendering/data/test.ppsx
new file mode 100644
index ..2b955adeca97
Binary files /dev/null and b/sd/qa/unit/tiledrendering/data/test.ppsx differ
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 31d61c1fb1a0..e9a3f0f81e38 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -778,6 +778,7 @@ public:
 bool m_bViewLock;
 bool m_bTilesInvalidated;
 std::vector m_aInvalidations;
+std::vector m_aStateChanged;
 std::map m_aViewCursorInvalidations;
 std::map m_aViewCursorVisibilities;
 bool m_bViewSelectionSet;
@@ -895,6 +896,13 @@ public:
 m_aCommentCallbackResult = 
m_aCommentCallbackResult.get_child("comment");
 }
 break;
+case LOK_CALLBACK_STATE_CHANGED:
+{
+std::stringstream aStream(pPayload);
+
+m_aStateChanged.push_back(aStream.str());
+}
+break;
 }
 }
 };
@@ -2942,6 +2950,19 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, 
testShapeEditInMultipleViews)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testStartPresentation)
+{
+SdXImpressDocument* pXImpressDocument = createDoc("test.ppsx");
+ViewCallback aView1;
+CPPUNIT_ASSERT(pXImpressDocument->GetDoc()->IsStartWithPresentation());
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT(aView1.m_aStateChanged.size() >= 1);
+
+CPPUNIT_ASSERT(std::find(aView1.m_aStateChanged.begin(),
+aView1.m_aStateChanged.end(), ".uno:StartWithPresentation=true") != 
aView1.m_aStateChanged.end());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/view/ViewShellBase.cxx 
b/sd/source/ui/view/ViewShellBase.cxx
index 70691ce1133e..b308ad108b0a 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -1023,6 +1023,12 @@ void ViewShellBase::afterCallbackRegistered()
 std::set aDocumentColors = pDocShell->GetDocColors();
 svx::theme::notifyLOK(pThemeColors, aDocumentColors);
 }
+
+if (mpDocument && mpDocument->IsStartWithPresentation())
+{
+this->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
+
".uno:StartWithPresentation=true"_ostr);
+}
 }
 
 void ViewShellBase::NotifyCursor(SfxViewShell* pOtherShell) const


core.git: sfx2/source

2024-02-21 Thread Méven Car (via logerrit)
 sfx2/source/dialog/dinfdlg.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit f1a780cb6b7b860856de7ce2d8735432523c9e73
Author: Méven Car 
AuthorDate: Thu Feb 8 17:43:25 2024 +0100
Commit: Caolán McNamara 
CommitDate: Wed Feb 21 11:01:05 2024 +0100

Allow Document properties tab custom properties for LOK

Change-Id: I4860f9bad69b3db0eef7b0e98159ca2b336b4f60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163611
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit f8f89de7a49db563b870dbaada6f010f2f75254f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163619
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index a5d45f322603..f103654f04a9 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1324,10 +1324,7 @@ 
SfxDocumentInfoDialog::SfxDocumentInfoDialog(weld::Window* pParent, const SfxIte
 AddTabPage("general", SfxDocumentPage::Create, nullptr);
 AddTabPage("description", SfxDocumentDescPage::Create, nullptr);
 
-if (!comphelper::LibreOfficeKit::isActive())
-AddTabPage("customprops", SfxCustomPropertiesPage::Create, nullptr);
-else
-RemoveTabPage("customprops");
+AddTabPage("customprops", SfxCustomPropertiesPage::Create, nullptr);
 
 if (rInfoItem.isCmisDocument())
 AddTabPage("cmisprops", SfxCmisPropertiesPage::Create, nullptr);


core.git: Branch 'distro/collabora/co-24.04' - sfx2/source

2024-02-20 Thread Méven Car (via logerrit)
 sfx2/source/dialog/dinfdlg.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit f8f89de7a49db563b870dbaada6f010f2f75254f
Author: Méven Car 
AuthorDate: Thu Feb 8 17:43:25 2024 +0100
Commit: Szymon Kłos 
CommitDate: Tue Feb 20 11:05:04 2024 +0100

Allow Document properties tab custom properties for LOK

Change-Id: I4860f9bad69b3db0eef7b0e98159ca2b336b4f60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163611
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 26f34882ec42..fc8754e5f12a 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1324,10 +1324,7 @@ 
SfxDocumentInfoDialog::SfxDocumentInfoDialog(weld::Window* pParent, const SfxIte
 AddTabPage("general", SfxDocumentPage::Create, nullptr);
 AddTabPage("description", SfxDocumentDescPage::Create, nullptr);
 
-if (!comphelper::LibreOfficeKit::isActive())
-AddTabPage("customprops", SfxCustomPropertiesPage::Create, nullptr);
-else
-RemoveTabPage("customprops");
+AddTabPage("customprops", SfxCustomPropertiesPage::Create, nullptr);
 
 if (rInfoItem.isCmisDocument())
 AddTabPage("cmisprops", SfxCmisPropertiesPage::Create, nullptr);


core.git: vcl/source

2024-01-30 Thread Méven Car (via logerrit)
 vcl/source/control/fmtfield.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit e785ee257a44bd406909ef012bddde29a1fe3f0d
Author: Méven Car 
AuthorDate: Fri Jan 26 11:46:27 2024 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jan 30 10:52:35 2024 +0100

LOK: exposed time formatted field as time fields

Change-Id: Idf7613b9141c55372e19199b5641719ba42e43ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162598
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 2de4572fdff7364c98fd7c9440c4cf132206031d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162713
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/control/fmtfield.cxx b/vcl/source/control/fmtfield.cxx
index fc7bdfee6f58..e8b02a29c111 100644
--- a/vcl/source/control/fmtfield.cxx
+++ b/vcl/source/control/fmtfield.cxx
@@ -27,10 +27,12 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1352,6 +1354,12 @@ void 
FormattedField::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
 {
 SpinField::DumpAsPropertyTree(rJsonWriter);
 Formatter& rFormatter = GetFormatter();
+
+if (dynamic_cast())
+{
+// weld::TimeFormatter uses h24 format
+rJsonWriter.put("type", "time");
+}
 rJsonWriter.put("min", rFormatter.GetMinValue());
 rJsonWriter.put("max", rFormatter.GetMaxValue());
 rJsonWriter.put("value", rFormatter.GetValue());


core.git: Branch 'distro/collabora/co-24.04' - vcl/source

2024-01-30 Thread Méven Car (via logerrit)
 vcl/source/control/fmtfield.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 96e9f6dd15a3be3526595cbbca144dd976e6fc92
Author: Méven Car 
AuthorDate: Fri Jan 26 11:46:27 2024 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jan 30 10:52:43 2024 +0100

LOK: exposed time formatted field as time fields

Change-Id: Idf7613b9141c55372e19199b5641719ba42e43ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162598
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 2de4572fdff7364c98fd7c9440c4cf132206031d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162714
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/control/fmtfield.cxx b/vcl/source/control/fmtfield.cxx
index fc7bdfee6f58..e8b02a29c111 100644
--- a/vcl/source/control/fmtfield.cxx
+++ b/vcl/source/control/fmtfield.cxx
@@ -27,10 +27,12 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1352,6 +1354,12 @@ void 
FormattedField::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
 {
 SpinField::DumpAsPropertyTree(rJsonWriter);
 Formatter& rFormatter = GetFormatter();
+
+if (dynamic_cast())
+{
+// weld::TimeFormatter uses h24 format
+rJsonWriter.put("type", "time");
+}
 rJsonWriter.put("min", rFormatter.GetMinValue());
 rJsonWriter.put("max", rFormatter.GetMaxValue());
 rJsonWriter.put("value", rFormatter.GetValue());


core.git: Branch 'distro/collabora/co-23.05' - vcl/source

2024-01-29 Thread Méven Car (via logerrit)
 vcl/source/control/fmtfield.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 2de4572fdff7364c98fd7c9440c4cf132206031d
Author: Méven Car 
AuthorDate: Fri Jan 26 11:46:27 2024 +0100
Commit: Szymon Kłos 
CommitDate: Mon Jan 29 10:02:11 2024 +0100

LOK: exposed time formatted field as time fields

Change-Id: Idf7613b9141c55372e19199b5641719ba42e43ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162598
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/source/control/fmtfield.cxx b/vcl/source/control/fmtfield.cxx
index 4504b63c23b3..e4b1f1dbfb46 100644
--- a/vcl/source/control/fmtfield.cxx
+++ b/vcl/source/control/fmtfield.cxx
@@ -27,10 +27,12 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1358,6 +1360,12 @@ void 
FormattedField::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
 {
 SpinField::DumpAsPropertyTree(rJsonWriter);
 Formatter& rFormatter = GetFormatter();
+
+if (weld::TimeFormatter* timeFormatter = 
dynamic_cast())
+{
+// weld::TimeFormatter uses h24 format
+rJsonWriter.put("type", "time");
+}
 rJsonWriter.put("min", rFormatter.GetMinValue());
 rJsonWriter.put("max", rFormatter.GetMaxValue());
 rJsonWriter.put("value", rFormatter.GetValue());


core.git: sw/source vcl/jsdialog

2024-01-15 Thread Méven Car (via logerrit)
 sw/source/ui/dialog/swdlgfact.cxx|5 +
 sw/source/ui/dialog/swdlgfact.hxx|1 +
 sw/source/ui/dialog/uiregionsw.cxx   |7 +--
 sw/source/uibase/dialog/regionsw.cxx |   16 +---
 vcl/jsdialog/enabled.cxx |1 +
 5 files changed, 21 insertions(+), 9 deletions(-)

New commits:
commit 0ffa0f103f928da3785f8b6a71d2956ba51b6989
Author: Méven Car 
AuthorDate: Tue Jan 9 15:15:23 2024 +0100
Commit: Andras Timar 
CommitDate: Tue Jan 16 07:59:51 2024 +0100

cool#1770 sw: make Edit Sections dialog async and mark it a jsdialog

We want our dialogs to be async so they don't lock documents when opened
and to allow concurrent edition.

In SwEditRegionDlg, we need to make sure the reference to the SwWrtShell
isn't read from 'this' after `response()`, as it is now the dialog is 
disposed of earlier in the async case.

How to test: Create a new Writer document, insert a section, right-click 
inside the section, pick the 'edit section' menu item to trigger this dialog.

Change-Id: Ibafca69542f13d16beef5a8fca006428cbcfe5c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161828
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161830
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 66ac1ec21a25..30e41e4edaf4 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -307,6 +307,11 @@ short AbstractEditRegionDlg_Impl::Execute()
 return m_xDlg->run();
 }
 
+bool AbstractEditRegionDlg_Impl::StartExecuteAsync(AsyncContext )
+{
+return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 short AbstractInsertSectionTabDialog_Impl::Execute()
 {
 return m_xDlg->run();
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index d5c1c43806d8..c2c043bb3eb6 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -663,6 +663,7 @@ public:
 {
 }
 virtual short Execute() override;
+virtual bool StartExecuteAsync(AsyncContext ) override;
 virtual voidSelectSection(const OUString& rSectionName) override;
 };
 
diff --git a/sw/source/ui/dialog/uiregionsw.cxx 
b/sw/source/ui/dialog/uiregionsw.cxx
index e3b56283f5cc..f1499b6a28ca 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -820,12 +820,15 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl, weld::Button&, 
void)
 
 aOrigArray.clear();
 
+SwWrtShell& rSh = m_rSh;
+
 // response must be called ahead of EndAction's end,
 // otherwise ScrollError can occur.
 m_xDialog->response(RET_OK);
 
-m_rSh.EndUndo();
-m_rSh.EndAllAction();
+// accessing 'this' after response isn't safe, as the callback might cause 
the dialog to be disposed
+rSh.EndUndo();
+rSh.EndAllAction();
 }
 
 // Toggle protect
diff --git a/sw/source/uibase/dialog/regionsw.cxx 
b/sw/source/uibase/dialog/regionsw.cxx
index 9eaa64c89456..71f0c165b458 100644
--- a/sw/source/uibase/dialog/regionsw.cxx
+++ b/sw/source/uibase/dialog/regionsw.cxx
@@ -217,15 +217,17 @@ void SwBaseShell::EditRegionDialog(SfxRequest const & 
rReq)
 case FN_EDIT_CURRENT_REGION:
 {
 weld::Window* pParentWin = GetView().GetFrameWeld();
+
+SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+VclPtr 
pEditRegionDlg(pFact->CreateEditRegionDlg(pParentWin, rWrtShell));
+
+if(auto pStringItem = dynamic_cast< const SfxStringItem *>( pItem 
))
 {
-SwAbstractDialogFactory* pFact = 
SwAbstractDialogFactory::Create();
-ScopedVclPtr 
pEditRegionDlg(pFact->CreateEditRegionDlg(pParentWin, rWrtShell));
-if(auto pStringItem = dynamic_cast< const SfxStringItem *>( 
pItem ))
-{
-pEditRegionDlg->SelectSection(pStringItem->GetValue());
-}
-pEditRegionDlg->Execute();
+pEditRegionDlg->SelectSection(pStringItem->GetValue());
 }
+pEditRegionDlg->StartExecuteAsync([pEditRegionDlg](sal_Int32 
/*nResult */){
+pEditRegionDlg->disposeOnce();
+});
 }
 break;
 }
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 058880a97835..c8ed0d73efad 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -178,6 +178,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/contentcontrollistitemdlg.ui"
 || rUIFile == u"modules/swriter/ui/dropcapspage.ui"
 || rUIFile == u"modules/swriter/ui/dropdownfielddialog.ui"
+|| rUIFile == u"modules/swriter/ui/editsectiondialog.ui"
 || rUIFile == 

core.git: sw/source sw/uiconfig

2024-01-15 Thread Méven Car (via logerrit)
 sw/source/ui/dialog/uiregionsw.cxx  |2 ++
 sw/source/uibase/inc/regionsw.hxx   |1 +
 sw/uiconfig/swriter/ui/editsectiondialog.ui |2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 777b549242ab188eb68a8201cd0659d706f627e9
Author: Méven Car 
AuthorDate: Wed Jan 10 10:26:38 2024 +0100
Commit: Andras Timar 
CommitDate: Tue Jan 16 07:58:21 2024 +0100

sw Edit Sections: hide Link section in LOK case

In the LibreOfficeKit case the section does not make sense as the
application has only restricted access to files, so hide it.

Test: In Writer new document, insert a section, right click on section,
Edit section..., Link section is visible.

In LOK case the Link section is not present.

Change-Id: I7aab8b384909d25e52f5fca2bf54f86e5c662b54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161878
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit f9546a5e9e204fc058365aaddfb0dfa8f9a26418)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162130
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/sw/source/ui/dialog/uiregionsw.cxx 
b/sw/source/ui/dialog/uiregionsw.cxx
index f0318a4cafe3..e3b56283f5cc 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -357,6 +357,7 @@ SwEditRegionDlg::SwEditRegionDlg(weld::Window* pParent, 
SwWrtShell& rWrtSh)
 , m_xOptionsPB(m_xBuilder->weld_button("options"))
 , m_xDismiss(m_xBuilder->weld_button("remove"))
 , m_xHideFrame(m_xBuilder->weld_widget("hideframe"))
+, m_xLinkFrame(m_xBuilder->weld_frame("linkframe"))
 {
 m_xTree->set_size_request(-1, m_xTree->get_height_rows(16));
 m_xFileCB->set_state(TRISTATE_FALSE);
@@ -418,6 +419,7 @@ SwEditRegionDlg::SwEditRegionDlg(weld::Window* pParent, 
SwWrtShell& rWrtSh)
 
 if(comphelper::LibreOfficeKit::isActive())
 {
+m_xLinkFrame->hide();
 m_xDDECB->hide();
 m_xDDECommandFT->hide();
 m_xFileNameFT->hide();
diff --git a/sw/source/uibase/inc/regionsw.hxx 
b/sw/source/uibase/inc/regionsw.hxx
index 410b9d6db8a7..ad425df898e5 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -77,6 +77,7 @@ class SwEditRegionDlg final : public SfxDialogController
 std::unique_ptr m_xOptionsPB;
 std::unique_ptr m_xDismiss;
 std::unique_ptr m_xHideFrame;
+std::unique_ptr m_xLinkFrame;
 
 voidRecurseList(const SwSectionFormat* pFormat, const weld::TreeIter* 
pIter);
 size_t  FindArrPos(const SwSectionFormat* pFormat);
diff --git a/sw/uiconfig/swriter/ui/editsectiondialog.ui 
b/sw/uiconfig/swriter/ui/editsectiondialog.ui
index 3a571100684f..2c358fa69fa5 100644
--- a/sw/uiconfig/swriter/ui/editsectiondialog.ui
+++ b/sw/uiconfig/swriter/ui/editsectiondialog.ui
@@ -237,7 +237,7 @@
 12
 12
 
-  
+  
 True
 False
 True


core.git: Branch 'distro/collabora/co-24.04' - 3 commits - sw/source sw/uiconfig vcl/jsdialog

2024-01-15 Thread Méven Car (via logerrit)
 sw/source/filter/ww8/docxattributeoutput.cxx |   29 ---
 sw/source/filter/ww8/docxattributeoutput.hxx |2 -
 sw/source/ui/dialog/swdlgfact.cxx|5 
 sw/source/ui/dialog/swdlgfact.hxx|1 
 sw/source/ui/dialog/uiregionsw.cxx   |9 ++--
 sw/source/uibase/dialog/regionsw.cxx |   16 --
 sw/source/uibase/inc/regionsw.hxx|1 
 sw/uiconfig/swriter/ui/editsectiondialog.ui  |2 -
 vcl/jsdialog/enabled.cxx |1 
 9 files changed, 44 insertions(+), 22 deletions(-)

New commits:
commit 165a3995d396455eaf0482f407211f7e9ba61923
Author: Méven Car 
AuthorDate: Wed Jan 10 10:26:38 2024 +0100
Commit: Andras Timar 
CommitDate: Mon Jan 15 20:08:56 2024 +0100

sw Edit Sections: hide Link section in LOK case

In the LibreOfficeKit case the section does not make sense as the
application has only restricted access to files, so hide it.

Test: In Writer new document, insert a section, right click on section,
Edit section..., Link section is visible.

In LOK case the Link section is not present.

Change-Id: I7aab8b384909d25e52f5fca2bf54f86e5c662b54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161878
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit f9546a5e9e204fc058365aaddfb0dfa8f9a26418)

diff --git a/sw/source/ui/dialog/uiregionsw.cxx 
b/sw/source/ui/dialog/uiregionsw.cxx
index fd61903a0068..f1499b6a28ca 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -357,6 +357,7 @@ SwEditRegionDlg::SwEditRegionDlg(weld::Window* pParent, 
SwWrtShell& rWrtSh)
 , m_xOptionsPB(m_xBuilder->weld_button("options"))
 , m_xDismiss(m_xBuilder->weld_button("remove"))
 , m_xHideFrame(m_xBuilder->weld_widget("hideframe"))
+, m_xLinkFrame(m_xBuilder->weld_frame("linkframe"))
 {
 m_xTree->set_size_request(-1, m_xTree->get_height_rows(16));
 m_xFileCB->set_state(TRISTATE_FALSE);
@@ -418,6 +419,7 @@ SwEditRegionDlg::SwEditRegionDlg(weld::Window* pParent, 
SwWrtShell& rWrtSh)
 
 if(comphelper::LibreOfficeKit::isActive())
 {
+m_xLinkFrame->hide();
 m_xDDECB->hide();
 m_xDDECommandFT->hide();
 m_xFileNameFT->hide();
diff --git a/sw/source/uibase/inc/regionsw.hxx 
b/sw/source/uibase/inc/regionsw.hxx
index 410b9d6db8a7..ad425df898e5 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -77,6 +77,7 @@ class SwEditRegionDlg final : public SfxDialogController
 std::unique_ptr m_xOptionsPB;
 std::unique_ptr m_xDismiss;
 std::unique_ptr m_xHideFrame;
+std::unique_ptr m_xLinkFrame;
 
 voidRecurseList(const SwSectionFormat* pFormat, const weld::TreeIter* 
pIter);
 size_t  FindArrPos(const SwSectionFormat* pFormat);
diff --git a/sw/uiconfig/swriter/ui/editsectiondialog.ui 
b/sw/uiconfig/swriter/ui/editsectiondialog.ui
index 3a571100684f..2c358fa69fa5 100644
--- a/sw/uiconfig/swriter/ui/editsectiondialog.ui
+++ b/sw/uiconfig/swriter/ui/editsectiondialog.ui
@@ -237,7 +237,7 @@
 12
 12
 
-  
+  
 True
 False
 True
commit 85ab8d8c6c138fe2f28a65d682b38205d124c7ef
Author: Méven Car 
AuthorDate: Tue Jan 9 15:15:23 2024 +0100
Commit: Andras Timar 
CommitDate: Mon Jan 15 20:08:10 2024 +0100

cool#1770 sw: make Edit Sections dialog async and mark it a jsdialog

We want our dialogs to be async so they don't lock documents when opened
and to allow concurrent edition.

In SwEditRegionDlg, we need to make sure the reference to the SwWrtShell
isn't read from 'this' after `response()`, as it is now the dialog is 
disposed of earlier in the async case.

How to test: Create a new Writer document, insert a section, right-click 
inside the section, pick the 'edit section' menu item to trigger this dialog.

Change-Id: Ibafca69542f13d16beef5a8fca006428cbcfe5c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161828
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index daf0dd6ff3f1..fbe9d4a5d9ed 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -307,6 +307,11 @@ short AbstractEditRegionDlg_Impl::Execute()
 return m_xDlg->run();
 }
 
+bool AbstractEditRegionDlg_Impl::StartExecuteAsync(AsyncContext )
+{
+return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 short AbstractInsertSectionTabDialog_Impl::Execute()
 {
 return m_xDlg->run();
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index d5c1c43806d8..c2c043bb3eb6 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ 

core.git: Branch 'distro/collabora/co-23.05' - sw/source sw/uiconfig

2024-01-12 Thread Méven Car (via logerrit)
 sw/source/ui/dialog/uiregionsw.cxx  |2 ++
 sw/source/uibase/inc/regionsw.hxx   |1 +
 sw/uiconfig/swriter/ui/editsectiondialog.ui |2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f9546a5e9e204fc058365aaddfb0dfa8f9a26418
Author: Méven Car 
AuthorDate: Wed Jan 10 10:26:38 2024 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 12 15:50:54 2024 +0100

sw Edit Sections: hide Link section in LOK case

In the LibreOfficeKit case the section does not make sense as the
application has only restricted access to files, so hide it.

Test: In Writer new document, insert a section, right click on section,
Edit section..., Link section is visible.

In LOK case the Link section is not present.

Change-Id: I7aab8b384909d25e52f5fca2bf54f86e5c662b54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161878
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sw/source/ui/dialog/uiregionsw.cxx 
b/sw/source/ui/dialog/uiregionsw.cxx
index b3dff074fdc1..dfab16785270 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -357,6 +357,7 @@ SwEditRegionDlg::SwEditRegionDlg(weld::Window* pParent, 
SwWrtShell& rWrtSh)
 , m_xOptionsPB(m_xBuilder->weld_button("options"))
 , m_xDismiss(m_xBuilder->weld_button("remove"))
 , m_xHideFrame(m_xBuilder->weld_widget("hideframe"))
+, m_xLinkFrame(m_xBuilder->weld_frame("linkframe"))
 {
 m_xTree->set_size_request(-1, m_xTree->get_height_rows(16));
 m_xFileCB->set_state(TRISTATE_FALSE);
@@ -418,6 +419,7 @@ SwEditRegionDlg::SwEditRegionDlg(weld::Window* pParent, 
SwWrtShell& rWrtSh)
 
 if(comphelper::LibreOfficeKit::isActive())
 {
+m_xLinkFrame->hide();
 m_xDDECB->hide();
 m_xDDECommandFT->hide();
 m_xFileNameFT->hide();
diff --git a/sw/source/uibase/inc/regionsw.hxx 
b/sw/source/uibase/inc/regionsw.hxx
index 8cd22491cc3a..dae59fc58362 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -77,6 +77,7 @@ class SwEditRegionDlg final : public SfxDialogController
 std::unique_ptr m_xOptionsPB;
 std::unique_ptr m_xDismiss;
 std::unique_ptr m_xHideFrame;
+std::unique_ptr m_xLinkFrame;
 
 voidRecurseList(const SwSectionFormat* pFormat, const weld::TreeIter* 
pIter);
 size_t  FindArrPos(const SwSectionFormat* pFormat);
diff --git a/sw/uiconfig/swriter/ui/editsectiondialog.ui 
b/sw/uiconfig/swriter/ui/editsectiondialog.ui
index 3a571100684f..2c358fa69fa5 100644
--- a/sw/uiconfig/swriter/ui/editsectiondialog.ui
+++ b/sw/uiconfig/swriter/ui/editsectiondialog.ui
@@ -237,7 +237,7 @@
 12
 12
 
-  
+  
 True
 False
 True


core.git: Branch 'distro/collabora/co-23.05' - sw/source vcl/jsdialog

2024-01-12 Thread Méven Car (via logerrit)
 sw/source/ui/dialog/swdlgfact.cxx|5 +
 sw/source/ui/dialog/swdlgfact.hxx|1 +
 sw/source/ui/dialog/uiregionsw.cxx   |7 +--
 sw/source/uibase/dialog/regionsw.cxx |   16 +---
 vcl/jsdialog/enabled.cxx |1 +
 5 files changed, 21 insertions(+), 9 deletions(-)

New commits:
commit 803d572838d8075e79d001fe6548f45878ea466f
Author: Méven Car 
AuthorDate: Tue Jan 9 15:15:23 2024 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 12 10:38:57 2024 +0100

cool#1770 sw: make Edit Sections dialog async and mark it a jsdialog

We want our dialogs to be async so they don't lock documents when opened
and to allow concurrent edition.

In SwEditRegionDlg, we need to make sure the reference to the SwWrtShell
isn't read from 'this' after `response()`, as it is now the dialog is 
disposed of earlier in the async case.

How to test: Create a new Writer document, insert a section, right-click 
inside the section, pick the 'edit section' menu item to trigger this dialog.

Change-Id: Ibafca69542f13d16beef5a8fca006428cbcfe5c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161828
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index f9e05b3f0d35..8c6cabae64cc 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -302,6 +302,11 @@ short AbstractEditRegionDlg_Impl::Execute()
 return m_xDlg->run();
 }
 
+bool AbstractEditRegionDlg_Impl::StartExecuteAsync(AsyncContext )
+{
+return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 short AbstractInsertSectionTabDialog_Impl::Execute()
 {
 return m_xDlg->run();
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 359af1bc2e31..e0f21d170b57 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -644,6 +644,7 @@ public:
 {
 }
 virtual short Execute() override;
+virtual bool StartExecuteAsync(AsyncContext ) override;
 virtual voidSelectSection(const OUString& rSectionName) override;
 };
 
diff --git a/sw/source/ui/dialog/uiregionsw.cxx 
b/sw/source/ui/dialog/uiregionsw.cxx
index 89248e7eed8d..b3dff074fdc1 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -818,12 +818,15 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl, weld::Button&, 
void)
 
 aOrigArray.clear();
 
+SwWrtShell& rSh = m_rSh;
+
 // response must be called ahead of EndAction's end,
 // otherwise ScrollError can occur.
 m_xDialog->response(RET_OK);
 
-m_rSh.EndUndo();
-m_rSh.EndAllAction();
+// accessing 'this' after response isn't safe, as the callback might cause 
the dialog to be disposed
+rSh.EndUndo();
+rSh.EndAllAction();
 }
 
 // Toggle protect
diff --git a/sw/source/uibase/dialog/regionsw.cxx 
b/sw/source/uibase/dialog/regionsw.cxx
index 834f1b332bc5..ad020e28b92d 100644
--- a/sw/source/uibase/dialog/regionsw.cxx
+++ b/sw/source/uibase/dialog/regionsw.cxx
@@ -218,15 +218,17 @@ void SwBaseShell::EditRegionDialog(SfxRequest const & 
rReq)
 case FN_EDIT_CURRENT_REGION:
 {
 weld::Window* pParentWin = GetView().GetFrameWeld();
+
+SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+VclPtr 
pEditRegionDlg(pFact->CreateEditRegionDlg(pParentWin, rWrtShell));
+
+if(auto pStringItem = dynamic_cast< const SfxStringItem *>( pItem 
))
 {
-SwAbstractDialogFactory* pFact = 
SwAbstractDialogFactory::Create();
-ScopedVclPtr 
pEditRegionDlg(pFact->CreateEditRegionDlg(pParentWin, rWrtShell));
-if(auto pStringItem = dynamic_cast< const SfxStringItem *>( 
pItem ))
-{
-pEditRegionDlg->SelectSection(pStringItem->GetValue());
-}
-pEditRegionDlg->Execute();
+pEditRegionDlg->SelectSection(pStringItem->GetValue());
 }
+pEditRegionDlg->StartExecuteAsync([pEditRegionDlg](sal_Int32 
/*nResult */){
+pEditRegionDlg->disposeOnce();
+});
 }
 break;
 }
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 058880a97835..c8ed0d73efad 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -178,6 +178,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/contentcontrollistitemdlg.ui"
 || rUIFile == u"modules/swriter/ui/dropcapspage.ui"
 || rUIFile == u"modules/swriter/ui/dropdownfielddialog.ui"
+|| rUIFile == u"modules/swriter/ui/editsectiondialog.ui"
 || rUIFile == u"modules/swriter/ui/endnotepage.ui"
 || rUIFile == u"modules/swriter/ui/footendnotedialog.ui"
 || rUIFile ==