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

2024-05-09 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/enabled.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 68300e741bfd332e9ffef0f70a8c065672b18994
Author: Szymon Kłos 
AuthorDate: Sun Jan 28 22:28:40 2024 +0100
Commit: Tomaž Vajngerl 
CommitDate: Thu May 9 10:32:05 2024 +0200

jsdialog: enable animation properties in impress

to test:
1. click on any shape in Impress
2. go to Animation tab in sidebar
3. "add" animation
4. double-click on added animation on the list

Signed-off-by: Szymon Kłos 
Change-Id: I009cbdd295fac4f4533101c89d5c0268fbbe633a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164112
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 636def88df05..ab0fbdbd7751 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -170,6 +170,10 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/sdraw/ui/drawpagedialog.ui"
 || rUIFile == u"modules/sdraw/ui/drawparadialog.ui"
 // simpress
+|| rUIFile == u"modules/simpress/ui/customanimationeffecttab.ui"
+|| rUIFile == u"modules/simpress/ui/customanimationproperties.ui"
+|| rUIFile == u"modules/simpress/ui/customanimationtexttab.ui"
+|| rUIFile == u"modules/simpress/ui/customanimationtimingtab.ui"
 || rUIFile == u"modules/simpress/ui/headerfooterdialog.ui"
 || rUIFile == u"modules/simpress/ui/headerfootertab.ui"
 // swriter


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

2024-05-02 Thread Tomaž Vajngerl (via logerrit)
 vcl/jsdialog/enabled.cxx |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 8f5b8ecbcd2334a1747a341fb60d206fe0dfadaf
Author: Tomaž Vajngerl 
AuthorDate: Tue Apr 30 12:48:40 2024 +0900
Commit: Szymon Kłos 
CommitDate: Thu May 2 10:04:19 2024 +0200

jsdialog: enable a11y checker sidebar

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

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index b04418257bff..309d547a72dc 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -323,7 +323,7 @@ bool isBuilderEnabledForPopup(std::u16string_view rUIFile)
 
 bool isBuilderEnabledForSidebar(std::u16string_view rUIFile)
 {
-if (// scalc
+return // scalc
 rUIFile == u"modules/scalc/ui/functionpanel.ui"
 || rUIFile == u"modules/scalc/ui/navigatorpanel.ui"
 || rUIFile == u"modules/scalc/ui/sidebaralignment.ui"
@@ -350,6 +350,7 @@ bool isBuilderEnabledForSidebar(std::u16string_view rUIFile)
 || rUIFile == u"modules/smath/ui/sidebarelements_math.ui"
 || rUIFile == u"modules/smath/ui/sidebarproperties_math.ui"
 // swriter
+|| rUIFile == u"modules/swriter/ui/a11ycheckissuespanel.ui"
 || rUIFile == u"modules/swriter/ui/managechangessidebar.ui"
 || rUIFile == u"modules/swriter/ui/navigatorpanel.ui"
 || rUIFile == u"modules/swriter/ui/pagefooterpanel.ui"
@@ -379,10 +380,7 @@ bool isBuilderEnabledForSidebar(std::u16string_view 
rUIFile)
 || rUIFile == u"svx/ui/sidebarpossize.ui"
 || rUIFile == u"svx/ui/sidebarshadow.ui"
 || rUIFile == u"svx/ui/sidebarstylespanel.ui"
-|| rUIFile == u"svx/ui/sidebartextpanel.ui")
-return true;
-
-return false;
+|| rUIFile == u"svx/ui/sidebartextpanel.ui";
 }
 
 bool isInterimBuilderEnabledForNotebookbar(std::u16string_view rUIFile)


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

2024-02-21 Thread Caolán McNamara (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit e414437f8d16449be74c824d9d6c0a704f8d64e7
Author: Caolán McNamara 
AuthorDate: Wed Feb 21 12:30:41 2024 +
Commit: Caolán McNamara 
CommitDate: Wed Feb 21 16:18:38 2024 +0100

use after free on clicking cancel in a calc spelling message dialog

e.g. the calc subdialog "Should the spellcheck be continued from the
beginning of the current sheet" seen from the "spelling" dialog when
starting spelling from some cell beyond used sheet bounds.

With a local asan build, and hello-world.ods, load, put cursor in A2,
review, spelling to get the spelling dialog. There should then be a sub
dialog with "Should the spellcheck be continued ..." with "No" and "Yes"
options, hammer the "no" button a few times in rapid succession.

 2715237==ERROR: AddressSanitizer: heap-use-after-free on address 
0x6140007a8118 at pc 0x7fdf28e73ce1 bp 0x7ffd012c88d0 sp 0x7ffd012c88c8
 READ of size 8 at 0x6140007a8118 thread T0 (kitbroker_003)
 #0 0x7fdf28e73ce0  (instdir/program/libvcllo.so+0x2473ce0)

JSMessageDialog::~JSMessageDialog has:

JSMessageDialog::~JSMessageDialog()
{
if (m_pOK || m_pCancel)
JSInstanceBuilder::RemoveWindowWidget(m_sWindowId);
}

but has

int JSMessageDialog::run()
{
if (GetLOKNotifier())
{
RememberMessageDialog();
sendFullUpdate();
}
...
}

where RememberMessageDialog has 
JSInstanceBuilder::InsertWindowToMap(sWindowId);

this dialog doesn't have ok or cancel, so while it is inserted in that
map when the dialog is run, it doesn't get removed from the map when the
dtor is called, which goes on to cause use-after-free.

Given that we only set m_pCancel and/or m_pOK if there is no "builder"
it looks a more straight forward approach to simply call
JSInstanceBuilder::RemoveWindowWidget based on if there was no builder.

Change-Id: Icf04f0e9f3c3c864955e9d4ee41589f4d2aa4cb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163623
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 904ee9076f79..f5e3a9c65325 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1820,8 +1820,13 @@ JSMessageDialog::JSMessageDialog(::MessageDialog* 
pDialog, SalInstanceBuilder* p
 
 JSMessageDialog::~JSMessageDialog()
 {
-if (m_pOK || m_pCancel)
+if (!m_pBuilder)
+{
+// For Message Dialogs created from Application::CreateMessageDialog
+// (where there is no builder to take care of this for us) explicitly
+// remove this window id on tear down
 JSInstanceBuilder::RemoveWindowWidget(m_sWindowId);
+}
 }
 
 void JSMessageDialog::RememberMessageDialog()


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

2024-02-21 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |7 ---
 1 file changed, 7 deletions(-)

New commits:
commit 5ee46b44d207a0416623a5c506bb2052052500a7
Author: Szymon Kłos 
AuthorDate: Wed Feb 21 10:23:00 2024 +0100
Commit: Szymon Kłos 
CommitDate: Wed Feb 21 13:06:29 2024 +0100

jsdialog: don't duplicate MessageDialog messages

Remove hardcoded out-of-queue message for MessageDialog.
Now we send the messages in JSMessageDialog::run().
This prevents us from overwriting correct jsdialog window
in Online when we see messages before document was loaded
(from interaction handlers, like: macro warning, corrupted
file, etc.)

Change-Id: I364ac8460507dd6613b978230c9cf61cc5dfe91d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163679
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 48946baa15f9..904ee9076f79 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1310,13 +1310,6 @@ JSInstanceBuilder::CreateMessageDialog(weld::Widget* 
pParent, VclMessageType eMe
 pNotifier = xMessageDialog->GetLOKNotifier();
 if (pNotifier)
 {
-tools::JsonWriter aJsonWriter;
-xMessageDialog->DumpAsPropertyTree(aJsonWriter);
-aJsonWriter.put("id", xMessageDialog->GetLOKWindowId());
-aJsonWriter.put("jsontype", "dialog");
-OString message(aJsonWriter.finishAndGetAsOString());
-pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, message);
-
 OUString sWindowId = 
OUString::number(xMessageDialog->GetLOKWindowId());
 InsertWindowToMap(sWindowId);
 xMessageDialog->SetLOKTunnelingState(false);


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

2024-02-10 Thread Hubert Figuière (via logerrit)
 vcl/jsdialog/enabled.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5fccf088d19af7af42e99780a9ae8eb780800a2c
Author: Hubert Figuière 
AuthorDate: Fri Feb 9 14:56:49 2024 -0500
Commit: Michael Meeks 
CommitDate: Sat Feb 10 18:28:54 2024 +0100

vcl: Enable sheet protection dialog

Change-Id: Ib8e8209225d027472c1f2eef57839df5784acf30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163205
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
(cherry picked from commit 5c1c842863ee2a63ce69a75ef0820864864905f0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163175
Tested-by: Michael Meeks 

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index d792128f3360..beb12b5dd081 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -128,6 +128,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/scalc/ui/pastespecial.ui"
 || rUIFile == u"modules/scalc/ui/pivotfielddialog.ui"
 || rUIFile == u"modules/scalc/ui/pivottablelayoutdialog.ui"
+|| rUIFile == u"modules/scalc/ui/protectsheetdlg.ui"
 || rUIFile == u"modules/scalc/ui/regressiondialog.ui"
 || rUIFile == u"modules/scalc/ui/rowheightdialog.ui"
 || rUIFile == u"modules/scalc/ui/samplingdialog.ui"


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

2024-01-29 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/enabled.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4b3f04df684354b39a2791790c2ec2a4828c83ed
Author: Szymon Kłos 
AuthorDate: Sun Jan 28 22:15:49 2024 +0100
Commit: Szymon Kłos 
CommitDate: Tue Jan 30 08:15:34 2024 +0100

jsdialog: enable paste special in calc

to test:
- copy few cells in calc
- ctrl + shift + alt + v

Signed-off-by: Szymon Kłos 
Change-Id: Iac3a98c50355e2390a36195ba92ef25a30d73e75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162673
(cherry picked from commit 3cabc2504bbd2bc357fab97e16c14c05128db670)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162711
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index c8ed0d73efad..d792128f3360 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -125,6 +125,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/scalc/ui/optimalrowheightdialog.ui"
 || rUIFile == u"modules/scalc/ui/pagetemplatedialog.ui"
 || rUIFile == u"modules/scalc/ui/paratemplatedialog.ui"
+|| rUIFile == u"modules/scalc/ui/pastespecial.ui"
 || rUIFile == u"modules/scalc/ui/pivotfielddialog.ui"
 || rUIFile == u"modules/scalc/ui/pivottablelayoutdialog.ui"
 || rUIFile == u"modules/scalc/ui/regressiondialog.ui"


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

2024-01-15 Thread Jaume Pujantell (via logerrit)
 vcl/jsdialog/enabled.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 915697a17765db27b88cc84144b497e098975271
Author: Jaume Pujantell 
AuthorDate: Mon Jan 8 17:20:28 2024 +0100
Commit: Andras Timar 
CommitDate: Mon Jan 15 19:59:11 2024 +0100

cool#7996 enable jsdialog for font page in document properties

The checkboxes of font page on the document properties dialog were
not saving the changes after pressing ok.

Change-Id: I5e7d16de267dd5d6874a84b518f6ec769db4fcc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161795
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 545d512a5f7b866696b3a4dfc0e00748029d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161863
Tested-by: Jenkins

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index d5997c9c6a9f..058880a97835 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -227,6 +227,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"sfx/ui/custominfopage.ui"
 || rUIFile == u"sfx/ui/descriptioninfopage.ui"
 || rUIFile == u"sfx/ui/documentinfopage.ui"
+|| rUIFile == u"sfx/ui/documentfontspage.ui"
 || rUIFile == u"sfx/ui/documentpropertiesdialog.ui"
 || rUIFile == u"sfx/ui/editdurationdialog.ui"
 || rUIFile == u"svx/ui/headfootformatpage.ui"