[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-10-29 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 8f077de13e78cda0f626fa9ae386496ceba60c69
Author: Szymon Kłos 
AuthorDate: Mon Oct 25 15:02:30 2021 +0200
Commit: Szymon Kłos 
CommitDate: Fri Oct 29 10:23:38 2021 +0200

jsdialog: activate tabpage after switch

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

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 56163a3e377d..431b9a46df8a 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -983,6 +983,8 @@ void JSNotebook::set_current_page(int nPage)
 
 SalInstanceNotebook::set_current_page(nPage);
 sendFullUpdate(bForce);
+
+m_aEnterPageHdl.Call(get_current_page_ident());
 }
 
 void JSNotebook::set_current_page(const OString& rIdent)
@@ -994,6 +996,8 @@ void JSNotebook::set_current_page(const OString& rIdent)
 
 SalInstanceNotebook::set_current_page(rIdent);
 sendFullUpdate(bForce);
+
+m_aEnterPageHdl.Call(get_current_page_ident());
 }
 
 void JSNotebook::remove_page(const OString& rIdent)


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-06-08 Thread merttumer (via logerrit)
 vcl/jsdialog/executor.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit cb7a97c6ecf0bc1fbbf8a8b3494ed581cb9fb310
Author: merttumer 
AuthorDate: Mon Jun 7 20:16:50 2021 +0300
Commit: Mert Tumer 
CommitDate: Tue Jun 8 09:58:41 2021 +0200

Fix click on the drawing area of CSV dialog

Change-Id: I8c13698b5e9e2e9c8869aa9094ce93c38bf2276f
Signed-off-by: merttumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116796
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 4ce9b50e0364..4ee9865e5437 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -157,7 +157,11 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 {
 double posX = std::atof(clickPosX.getStr());
 double posY = std::atof(clickPosY.getStr());
-Size size = pArea->get_size_request();
+OutputDevice& rRefDevice = pArea->get_ref_device();
+// We send OutPutSize for the drawing area bitmap
+// get_size_request is not necessarily updated
+// therefore it may be incorrect.
+Size size = rRefDevice.GetOutputSize();
 posX = posX * size.Width();
 posY = posY * size.Height();
 LOKTrigger::trigger_click(*pArea, Point(posX, 
posY));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-04-26 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/executor.cxx |   22 +++---
 1 file changed, 19 insertions(+), 3 deletions(-)

New commits:
commit eb49b2a989e0765c2955b07c53d55c25c1b0f27b
Author: Szymon Kłos 
AuthorDate: Wed Apr 21 10:31:07 2021 +0200
Commit: Mert Tumer 
CommitDate: Mon Apr 26 09:46:22 2021 +0200

jsdialog: handle response buttons

Change-Id: I4e8efc4ef2d27e655208ff505167da8360f91a6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114379
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tumer 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 16096c6dcf01..4ce9b50e0364 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -48,11 +48,27 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 {
 weld::Widget* pWidget = JSInstanceBuilder::FindWeldWidgetsMap(nWindowId, 
rWidget);
 
-if (pWidget != nullptr)
+OUString sControlType = rData["type"];
+OUString sAction = rData["cmd"];
+
+if (sControlType == "responsebutton")
 {
-OUString sControlType = rData["type"];
-OUString sAction = rData["cmd"];
+if (pWidget == nullptr)
+{
+// welded wrapper not found - use response code instead
+pWidget = JSInstanceBuilder::FindWeldWidgetsMap(nWindowId, 
"__DIALOG__");
+sControlType = "dialog";
+sAction = "response";
+}
+else
+{
+// welded wrapper for button found - use it
+sControlType = "pushbutton";
+}
+}
 
+if (pWidget != nullptr)
+{
 if (sControlType == "tabcontrol")
 {
 auto pNotebook = dynamic_cast(pWidget);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-03-16 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/executor.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 719184cfc844562b498d76d606163dd51b8738b4
Author: Szymon Kłos 
AuthorDate: Mon Mar 15 16:23:48 2021 +0100
Commit: Andras Timar 
CommitDate: Tue Mar 16 21:30:27 2021 +0100

jsdialog: simplify unselect for treeview

Change-Id: Iaadd8122d735103d89e4acb65bef1ca8c1ad2e1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112532
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index aa71178a6605..16096c6dcf01 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -243,9 +243,7 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 OString nRowString
 = OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US);
 
-std::unique_ptr 
itSelected(pTreeView->make_iterator());
-pTreeView->get_selected(itSelected.get());
-pTreeView->unselect(*itSelected);
+pTreeView->unselect_all();
 
 int nAbsPos = std::atoi(nRowString.getStr());
 
@@ -262,7 +260,7 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 = OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US);
 int nRow = std::atoi(nRowString.getStr());
 
-pTreeView->unselect(pTreeView->get_selected_index());
+pTreeView->unselect_all();
 pTreeView->select(nRow);
 pTreeView->set_cursor(nRow);
 LOKTrigger::trigger_changed(*pTreeView);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-03-12 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/executor.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 2225d8530b4a7fa29e551f9354d679da78be6435
Author: Szymon Kłos 
AuthorDate: Fri Mar 12 09:35:30 2021 +0100
Commit: Andras Timar 
CommitDate: Fri Mar 12 11:37:01 2021 +0100

jsdialog: unselect treeview entry by iterator

avoid crash when using relative position from
deeper levels returned by get_selected_index
to unselect entry using unselect function
on root level

Change-Id: Iaaddb131031eb5273cb06412c976f310f7323f52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112374
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index bca3d0a98ea7..aa71178a6605 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -242,7 +242,10 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 {
 OString nRowString
 = OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US);
-pTreeView->unselect(pTreeView->get_selected_index());
+
+std::unique_ptr 
itSelected(pTreeView->make_iterator());
+pTreeView->get_selected(itSelected.get());
+pTreeView->unselect(*itSelected);
 
 int nAbsPos = std::atoi(nRowString.getStr());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-02-23 Thread Henry Castro (via logerrit)
 vcl/jsdialog/executor.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 9993801d0fc9574d03c40369de166f601d9c
Author: Henry Castro 
AuthorDate: Mon Feb 15 19:43:17 2021 -0400
Commit: Jan Holesovsky 
CommitDate: Tue Feb 23 15:21:52 2021 +0100

lok: fix treeview action "select"

Unfortunately the Macros dialog has a treeview control
that fill on demand and the position is absolute and
it has a side effect to deselect the item since the relative
entry position is nullptr.

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

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 4c40109a5057..bca3d0a98ea7 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -242,11 +242,14 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 {
 OString nRowString
 = OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US);
-int nRow = std::atoi(nRowString.getStr());
-
 pTreeView->unselect(pTreeView->get_selected_index());
-pTreeView->select(nRow);
-pTreeView->set_cursor(nRow);
+
+int nAbsPos = std::atoi(nRowString.getStr());
+
+std::unique_ptr 
itEntry(pTreeView->make_iterator());
+pTreeView->get_iter_abs_pos(*itEntry, nAbsPos);
+pTreeView->select(*itEntry);
+pTreeView->set_cursor(*itEntry);
 LOKTrigger::trigger_changed(*pTreeView);
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-02-23 Thread Henry Castro (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 97a9e3d99e0fea7a27d5f06d2d92e6c3c2549ca2
Author: Henry Castro 
AuthorDate: Mon Feb 22 15:16:06 2021 -0400
Commit: Jan Holesovsky 
CommitDate: Tue Feb 23 15:20:52 2021 +0100

jsdialog: fix missing update for "treeview" action "select"

When Treeview control selects an item, the state of the control
has changed and it should update the new changes to the client side.

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

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 484d95d64967..6bcf259423be 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1065,6 +1065,7 @@ void JSTreeView::select(int pos)
 }
 }
 enable_notify_events();
+sendUpdate();
 }
 
 weld::TreeView* JSTreeView::get_drag_source() const { return g_DragSource; }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-02-05 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |   12 +---
 1 file changed, 1 insertion(+), 11 deletions(-)

New commits:
commit a1d516a9b96fb8b40edc5934e69bf2b0a1d2ecd3
Author: Szymon Kłos 
AuthorDate: Tue Jan 19 14:08:35 2021 +0100
Commit: Tomaž Vajngerl 
CommitDate: Fri Feb 5 09:15:36 2021 +0100

jsdialog: enqueue update on dialog weld

Change-Id: I01f14cdf0aa3ea16cd311aed9abe14423e2ec846
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109727
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109958
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 4d4802138fcf..b4c214f3e4d7 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -472,18 +472,8 @@ std::unique_ptr 
JSInstanceBuilder::weld_dialog(const OString& id,
 
 RememberWidget("__DIALOG__", pRet.get());
 
-const vcl::ILibreOfficeKitNotifier* pNotifier = 
pDialog->GetLOKNotifier();
-if (pNotifier)
-{
-std::stringstream aStream;
-boost::property_tree::ptree aTree = 
m_aOwnedToplevel->DumpAsPropertyTree();
-aTree.put("id", m_aOwnedToplevel->GetLOKWindowId());
-boost::property_tree::write_json(aStream, aTree);
-const std::string message = aStream.str();
-pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, 
message.c_str());
-}
-
 initializeSender(GetNotifierWindow(), GetContentWindow(), 
GetTypeOfJSON());
+sendFullUpdate();
 }
 
 return pRet;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-02-05 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |   12 
 1 file changed, 12 insertions(+)

New commits:
commit 7b1bb4335c995757ff3b74584f6e9fda24bb0b67
Author: Szymon Kłos 
AuthorDate: Wed Jan 20 17:48:18 2021 +0100
Commit: Tomaž Vajngerl 
CommitDate: Fri Feb 5 09:15:08 2021 +0100

jsdialog: don't send multiple updates with the same content

Change-Id: I601511a85386a8a35cbc6a121a4719928f585794
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109726
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109957
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 55fdb2bd995d..4d4802138fcf 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -64,6 +64,18 @@ void JSDialogNotifyIdle::send(const 
boost::property_tree::ptree& rTree)
 
 void JSDialogNotifyIdle::sendMessage(jsdialog::MessageType eType, 
VclPtr pWindow)
 {
+// we want only the latest update of same type
+// TODO: also if we met full update - previous updates are not valid
+auto it = m_aMessageQueue.begin();
+
+while (it != m_aMessageQueue.end())
+{
+if (it->first == eType && it->second == pWindow)
+it = m_aMessageQueue.erase(it);
+else
+it++;
+}
+
 m_aMessageQueue.push_back(std::make_pair(eType, pWindow));
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-02-04 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 413c6ea09b1be588e64d8f10fa096f7375949467
Author: Szymon Kłos 
AuthorDate: Tue Jan 19 08:40:30 2021 +0100
Commit: Tomaž Vajngerl 
CommitDate: Fri Feb 5 05:26:54 2021 +0100

jsdialog: clear notifications when sent

Change-Id: I78b3904685b45d7c859bde07c78607671e215e98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109611
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109908
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index ea06e2518d0e..765177ad8a9d 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -142,6 +142,8 @@ void JSDialogNotifyIdle::Invoke()
 break;
 }
 }
+
+m_aMessageQueue.clear();
 }
 
 void JSDialogSender::notifyDialogState(bool bForce)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-02-04 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |   23 ---
 1 file changed, 20 insertions(+), 3 deletions(-)

New commits:
commit 9fd34175c7439dc48fd81a69fe4c1bc824c4c92d
Author: Szymon Kłos 
AuthorDate: Tue Dec 29 09:36:50 2020 +0100
Commit: Tomaž Vajngerl 
CommitDate: Thu Feb 4 13:00:24 2021 +0100

jsdialog: updates in similar fashion like other messages

to unify all jsdialog interactions

Change-Id: I22e14282f5a2c52ef44e68cb3933864c4e24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108435
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109783
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index d3c7f8f8764c..9829ca49d9ae 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -96,6 +96,7 @@ void JSDialogNotifyIdle::updateStatus(VclPtr 
pWindow)
 if (!m_aNotifierWindow)
 return;
 
+// will be deprecated soon
 if (m_aNotifierWindow->IsReallyVisible())
 {
 if (const vcl::ILibreOfficeKitNotifier* pNotifier = 
m_aNotifierWindow->GetLOKNotifier())
@@ -119,10 +120,25 @@ void JSDialogNotifyIdle::updateStatus(VclPtr 
pWindow)
 std::stringstream aStream;
 boost::property_tree::write_json(aStream, aTree);
 const std::string message = aStream.str();
-
pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_UNO_COMMAND_RESULT,
-  message.c_str());
+
pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_UNO_COMMAND_RESULT, 
message.c_str());
 }
 }
+
+// new approach - update also if hidden
+if (const vcl::ILibreOfficeKitNotifier* pNotifier = 
m_aNotifierWindow->GetLOKNotifier())
+{
+boost::property_tree::ptree aTree;
+
+aTree.put("jsontype", m_sTypeOfJSON);
+aTree.put("action", "update");
+aTree.put("id", m_aNotifierWindow->GetLOKWindowId());
+aTree.add_child("control", pWindow->DumpAsPropertyTree());
+
+std::stringstream aStream;
+boost::property_tree::write_json(aStream, aTree);
+const std::string message = aStream.str();
+pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, 
message.c_str());
+}
 }
 
 boost::property_tree::ptree JSDialogNotifyIdle::generateCloseMessage() const
@@ -465,7 +481,8 @@ std::unique_ptr 
JSInstanceBuilder::weld_dialog(const OString& id,
 return pRet;
 }
 
-std::unique_ptr 
JSInstanceBuilder::weld_message_dialog(const OString& id, bool bTakeOwnership)
+std::unique_ptr 
JSInstanceBuilder::weld_message_dialog(const OString& id,
+
bool bTakeOwnership)
 {
 std::unique_ptr pRet;
 ::MessageDialog* pMessageDialog = m_xBuilder->get<::MessageDialog>(id);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-01-21 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/executor.cxx |   14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit f14e38653fc2298471e4fa3326c47b84a9bc7520
Author: Szymon Kłos 
AuthorDate: Wed Jan 13 09:13:29 2021 +0100
Commit: Henry Castro 
CommitDate: Thu Jan 21 19:18:45 2021 +0100

jsdialog: TreeView row activation

Change-Id: I3d2884d456f8b6fa01d2dbe6c4d2f7d9e9528e1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109261
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 72f1cbe59a90921ef74bfda5ffb7f4db6578a1af)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109736
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 63a8f9dd011f..834962561acb 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -235,7 +235,19 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 pTreeView->select(nRow);
 pTreeView->set_cursor(nRow);
 LOKTrigger::trigger_changed(*pTreeView);
-//LOKTrigger::trigger_row_activated(*pTreeView);
+return true;
+}
+else if (sAction == "activate")
+{
+OString nRowString
+= OUStringToOString(rData["data"], 
RTL_TEXTENCODING_ASCII_US);
+int nRow = std::atoi(nRowString.getStr());
+
+pTreeView->unselect(pTreeView->get_selected_index());
+pTreeView->select(nRow);
+pTreeView->set_cursor(nRow);
+LOKTrigger::trigger_changed(*pTreeView);
+LOKTrigger::trigger_row_activated(*pTreeView);
 return true;
 }
 else if (sAction == "expand")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-01-19 Thread Caolán McNamara (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |   14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

New commits:
commit b48b8842feb31e299f8f0e39275f5466704755d8
Author: Caolán McNamara 
AuthorDate: Sat Jun 27 16:14:11 2020 +0100
Commit: Szymon Kłos 
CommitDate: Tue Jan 19 17:07:08 2021 +0100

cid#1464972 Unchecked dynamic_cast

Change-Id: If40ee310e0a16af7ce93a5f93e2b436069aa153a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97317
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109606
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index d040108b9e22..d3c7f8f8764c 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -252,13 +252,19 @@ void JSDropTarget::fire_dragEnter(const 
css::datatransfer::dnd::DropTargetDragEn
 }
 }
 
+namespace
+{
+vcl::Window* extract_sal_widget(weld::Widget* pParent)
+{
+SalInstanceWidget* pInstanceWidget = 
dynamic_cast(pParent);
+return pInstanceWidget ? pInstanceWidget->getWidget() : nullptr;
+}
+}
+
 // used for dialogs
 JSInstanceBuilder::JSInstanceBuilder(weld::Widget* pParent, const OUString& 
rUIRoot,
  const OUString& rUIFile)
-: SalInstanceBuilder(dynamic_cast(pParent)
- ? 
dynamic_cast(pParent)->getWidget()
- : nullptr,
- rUIRoot, rUIFile)
+: SalInstanceBuilder(extract_sal_widget(pParent), rUIRoot, rUIFile)
 , m_nWindowId(0)
 , m_aParentDialog(nullptr)
 , m_aContentWindow(nullptr)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-01-19 Thread Henry Castro (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 879680acca22f33416a77737774bca360107b089
Author: Henry Castro 
AuthorDate: Fri Jan 8 16:47:47 2021 -0400
Commit: Henry Castro 
CommitDate: Tue Jan 19 14:14:30 2021 +0100

lok: fix initialization variable

It should initialize false

Change-Id: I67249bc8040688ee82bf12532178eb133f80b8e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109021
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109151
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 6e2b1453f0ab..d040108b9e22 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -721,11 +721,11 @@ JSDialog::JSDialog(VclPtr aNotifierWindow, 
VclPtr aCon
std::string sTypeOfJSON)
 : JSWidget(aNotifierWindow, aContentWindow, 
pDialog, pBuilder,
 bTakeOwnership, sTypeOfJSON)
+, m_bNotifyCreated(false)
 {
 if (aNotifierWindow && aNotifierWindow->IsDisableIdleNotify())
 {
 pDialog->AddEventListener(LINK(this, JSDialog, on_window_event));
-m_bNotifyCreated = false;
 }
 }
 
@@ -914,11 +914,11 @@ JSMessageDialog::JSMessageDialog(::MessageDialog* 
pDialog, VclPtr a
  SalInstanceBuilder* pBuilder, bool 
bTakeOwnership)
 : SalInstanceMessageDialog(pDialog, pBuilder, bTakeOwnership)
 , JSDialogSender(m_xMessageDialog, aContentWindow, "dialog")
+, m_bNotifyCreated(false)
 {
 if (aContentWindow && aContentWindow->IsDisableIdleNotify())
 {
 pDialog->AddEventListener(LINK(this, JSMessageDialog, 
on_window_event));
-m_bNotifyCreated = false;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-01-18 Thread Henry Castro (via logerrit)
 vcl/jsdialog/executor.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fd23ba7af9031658e2ce1628d9716e5f6e4934d1
Author: Henry Castro 
AuthorDate: Fri Dec 18 08:05:12 2020 -0400
Commit: Henry Castro 
CommitDate: Tue Jan 19 03:05:07 2021 +0100

jsdialog: disable row activated on "select" action

Unfortunately, when the "Macro Selector Dialog" is shown
and issue the "select" action, it closes the dialog
because the row activated trigger double click the macro
selected.

for moment comment the unexpected side effect

Change-Id: Ibdfa09c444ee79376a9e2251e919f5f06dba577d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107964
Tested-by: Jenkins
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109144
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index f4bcc817a461..63a8f9dd011f 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -235,7 +235,7 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 pTreeView->select(nRow);
 pTreeView->set_cursor(nRow);
 LOKTrigger::trigger_changed(*pTreeView);
-LOKTrigger::trigger_row_activated(*pTreeView);
+//LOKTrigger::trigger_row_activated(*pTreeView);
 return true;
 }
 else if (sAction == "expand")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-01-18 Thread Henry Castro (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit a8de3a3f83615cdbb113f7713227a64621e937d8
Author: Henry Castro 
AuthorDate: Tue Dec 22 16:40:20 2020 -0400
Commit: Henry Castro 
CommitDate: Tue Jan 19 02:20:08 2021 +0100

jsdialog: fix disable idle notify

There is a possible crash due to nullptr deference

Change-Id: I3e2034ad89832eec61f1d6910a5ffd34c56df6a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108224
Tested-by: Jenkins
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109203
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 0cd9661b76ec..ceff10569e51 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -142,7 +142,8 @@ void JSDialogNotifyIdle::sendClose() { 
send(generateCloseMessage()); }
 
 void JSDialogSender::notifyDialogState(bool bForce)
 {
-if (mpIdleNotify->getNotifierWindow()->IsDisableIdleNotify())
+auto aNotifierWnd = mpIdleNotify->getNotifierWindow();
+if (aNotifierWnd && aNotifierWnd->IsDisableIdleNotify())
 return;
 
 if (bForce)
@@ -434,15 +435,15 @@ std::unique_ptr 
JSInstanceBuilder::weld_dialog(const OString& id,
 m_xBuilder->drop_ownership(pDialog);
 m_bHasTopLevelDialog = true;
 
+if (id == "MacroSelectorDialog")
+pDialog->SetDisableIdleNotify(true);
+
 pRet.reset(pDialog ? new JSDialog(m_aOwnedToplevel, m_aOwnedToplevel, 
pDialog, this, false,
   m_sTypeOfJSON)
: nullptr);
 
 RememberWidget("__DIALOG__", pRet.get());
 
-if (id == "MacroSelectorDialog")
-pDialog->SetDisableIdleNotify(true);
-
 const vcl::ILibreOfficeKitNotifier* pNotifier = 
pDialog->GetLOKNotifier();
 if (pNotifier && id != "MacroSelectorDialog")
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-01-18 Thread Henry Castro (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |   38 --
 1 file changed, 20 insertions(+), 18 deletions(-)

New commits:
commit 668fe5ba93a80f3949d0747917f74292a2606215
Author: Henry Castro 
AuthorDate: Fri Dec 4 17:00:51 2020 -0400
Commit: Henry Castro 
CommitDate: Mon Jan 18 21:43:57 2021 +0100

lok: jsdialog: fix possible nullptr dereference

p = nullptr;

if (p)
{
}

p->Somenthing();

Change-Id: I2a46d6a8e7eae96928210c8941ec71eed88bf631
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107245
Tested-by: Jenkins
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109136
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 649893bb6832..49cbac450087 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -375,35 +375,37 @@ VclPtr& 
JSInstanceBuilder::GetNotifierWindow()
 
 std::unique_ptr JSInstanceBuilder::weld_dialog(const OString& 
id, bool bTakeOwnership)
 {
+std::unique_ptr pRet;
 ::Dialog* pDialog = m_xBuilder->get<::Dialog>(id);
-m_nWindowId = pDialog->GetLOKWindowId();
-pDialog->SetLOKTunnelingState(false);
-
-InsertWindowToMap(m_nWindowId);
 
 if (bTakeOwnership && pDialog)
 {
+m_nWindowId = pDialog->GetLOKWindowId();
+pDialog->SetLOKTunnelingState(false);
+
+InsertWindowToMap(m_nWindowId);
+
 assert(!m_aOwnedToplevel && "only one toplevel per .ui allowed");
 m_aOwnedToplevel.set(pDialog);
 m_xBuilder->drop_ownership(pDialog);
 m_bHasTopLevelDialog = true;
-}
 
-std::unique_ptr pRet(pDialog ? new 
JSDialog(m_aOwnedToplevel, m_aOwnedToplevel,
-  pDialog, this, 
false, m_sTypeOfJSON)
-   : nullptr);
+pRet.reset(pDialog ? new JSDialog(m_aOwnedToplevel, m_aOwnedToplevel, 
pDialog, this, false,
+  m_sTypeOfJSON)
+   : nullptr);
 
-RememberWidget("__DIALOG__", pRet.get());
+RememberWidget("__DIALOG__", pRet.get());
 
-const vcl::ILibreOfficeKitNotifier* pNotifier = pDialog->GetLOKNotifier();
-if (pNotifier && id != "MacroSelectorDialog")
-{
-std::stringstream aStream;
-boost::property_tree::ptree aTree = 
m_aOwnedToplevel->DumpAsPropertyTree();
-aTree.put("id", m_aOwnedToplevel->GetLOKWindowId());
-boost::property_tree::write_json(aStream, aTree);
-const std::string message = aStream.str();
-pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, 
message.c_str());
+const vcl::ILibreOfficeKitNotifier* pNotifier = 
pDialog->GetLOKNotifier();
+if (pNotifier && id != "MacroSelectorDialog")
+{
+std::stringstream aStream;
+boost::property_tree::ptree aTree = 
m_aOwnedToplevel->DumpAsPropertyTree();
+aTree.put("id", m_aOwnedToplevel->GetLOKWindowId());
+boost::property_tree::write_json(aStream, aTree);
+const std::string message = aStream.str();
+pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, 
message.c_str());
+}
 }
 
 return pRet;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-01-18 Thread Henry Castro (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5780fcc21f8f1ed9409eff2b82b7c33e54ed8542
Author: Henry Castro 
AuthorDate: Fri Dec 4 16:49:31 2020 -0400
Commit: Henry Castro 
CommitDate: Mon Jan 18 21:21:06 2021 +0100

lok: jsbuilder: avoid sending early id to client side

In the case of Macro Selector Dialog it is not required
to send the id too early when the dialog is created and
it is not initialized yet.

Change-Id: I22fb05bd9ecff49b3e9eda19737750379a61dd69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107244
Tested-by: Jenkins
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109135
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index f0cb0475db08..649893bb6832 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -396,7 +396,7 @@ std::unique_ptr 
JSInstanceBuilder::weld_dialog(const OString& id,
 RememberWidget("__DIALOG__", pRet.get());
 
 const vcl::ILibreOfficeKitNotifier* pNotifier = pDialog->GetLOKNotifier();
-if (pNotifier)
+if (pNotifier && id != "MacroSelectorDialog")
 {
 std::stringstream aStream;
 boost::property_tree::ptree aTree = 
m_aOwnedToplevel->DumpAsPropertyTree();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2021-01-12 Thread Mert Tumer (via logerrit)
 vcl/jsdialog/executor.cxx |   17 +
 1 file changed, 17 insertions(+)

New commits:
commit a1549c122724733f51096611486a26dcad7321fe
Author: Mert Tumer 
AuthorDate: Wed Dec 16 23:01:25 2020 +0300
Commit: Mert Tumer 
CommitDate: Tue Jan 12 09:41:31 2021 +0100

jsdialogs: send click pos for drawingarea

Change-Id: I91aae808fe17f47fe9fa75dca069e4919c2ce4c3
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108685
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 62e6c2b660fd..f33eeb4b086a 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -118,6 +118,23 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 {
 if (sAction == "click")
 {
+int separatorPos = rData["data"].indexOf(';');
+if (separatorPos > 0)
+{
+// x;y
+OString clickPosX = 
OUStringToOString(rData["data"].copy(0, separatorPos),  
RTL_TEXTENCODING_ASCII_US);
+OString  clickPosY = 
OUStringToOString(rData["data"].copy(separatorPos + 1),  
RTL_TEXTENCODING_ASCII_US);
+if (!clickPosX.isEmpty() && !clickPosY.isEmpty())
+{
+double posX = std::atof(clickPosX.getStr());
+double posY = std::atof(clickPosY.getStr());
+Size size = pArea->get_size_request();
+posX = posX * size.Width();
+posY = posY * size.Height();
+LOKTrigger::trigger_click(*pArea, Point(posX, 
posY));
+return true;
+}
+}
 LOKTrigger::trigger_click(*pArea, Point(10, 10));
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2020-12-02 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit bc9f90ce8f5eb06b25cc65c0877050f6d6e59e9e
Author: Szymon Kłos 
AuthorDate: Wed Dec 2 15:06:35 2020 +0100
Commit: Szymon Kłos 
CommitDate: Thu Dec 3 08:45:17 2020 +0100

jsdialog: use valid window instance

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

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index bc80416ac335..befb682849a7 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -356,12 +356,6 @@ std::unique_ptr 
JSInstanceBuilder::weld_dialog(const OString& id,
 
 InsertWindowToMap(m_nWindowId);
 
-std::unique_ptr pRet(pDialog ? new 
JSDialog(m_aOwnedToplevel, m_aOwnedToplevel,
-  pDialog, this, 
false, m_sTypeOfJSON)
-   : nullptr);
-
-RememberWidget("__DIALOG__", pRet.get());
-
 if (bTakeOwnership && pDialog)
 {
 assert(!m_aOwnedToplevel && "only one toplevel per .ui allowed");
@@ -370,6 +364,12 @@ std::unique_ptr 
JSInstanceBuilder::weld_dialog(const OString& id,
 m_bHasTopLevelDialog = true;
 }
 
+std::unique_ptr pRet(pDialog ? new 
JSDialog(m_aOwnedToplevel, m_aOwnedToplevel,
+  pDialog, this, 
false, m_sTypeOfJSON)
+   : nullptr);
+
+RememberWidget("__DIALOG__", pRet.get());
+
 const vcl::ILibreOfficeKitNotifier* pNotifier = pDialog->GetLOKNotifier();
 if (pNotifier)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2020-06-25 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 58750ad38fc1e9809cc4febebf218c95845dfe05
Author: Szymon Kłos 
AuthorDate: Wed Jun 24 11:35:10 2020 +0200
Commit: Szymon Kłos 
CommitDate: Thu Jun 25 12:52:10 2020 +0200

remove warning: unknown log area vcl.jsdialog

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

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 24919571861c..5a972da6c9ab 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -49,7 +49,7 @@ void JSDialogNotifyIdle::Invoke()
 }
 catch (boost::property_tree::json_parser::json_parser_error& rError)
 {
-SAL_WARN("vcl.jsdialog", rError.message());
+SAL_WARN("vcl", rError.message());
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/jsdialog

2020-06-24 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 845ae6fbb7e187cd9daed1e4731a1c9e635ec976
Author: Szymon Kłos 
AuthorDate: Thu Jun 18 14:08:48 2020 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jun 24 14:01:24 2020 +0200

jsdialog: always clean remember widgets

avoid crash when old, freed widged will be used

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

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index ba19912db0a2..24919571861c 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -93,11 +93,7 @@ JSInstanceBuilder::JSInstanceBuilder(vcl::Window* pParent, 
const OUString& rUIRo
 }
 }
 
-JSInstanceBuilder::~JSInstanceBuilder()
-{
-if (m_nWindowId && m_bHasTopLevelDialog)
-GetLOKWeldWidgetsMap().erase(m_nWindowId);
-}
+JSInstanceBuilder::~JSInstanceBuilder() { 
GetLOKWeldWidgetsMap().erase(m_nWindowId); }
 
 std::map& 
JSInstanceBuilder::GetLOKWeldWidgetsMap()
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits