[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - desktop/source
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 22 07:40:05 UTC 2019
desktop/source/lib/init.cxx | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
New commits:
commit 7eb60b0d656679e88619084103e5c3eca2dde511
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Oct 21 10:55:29 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Oct 22 09:39:26 2019 +0200
jsdialogs: use click event if not a combobox
Change-Id: I377de66bd086fa2cb5ef70514f5f1613a3fcb5cd
Reviewed-on: https://gerrit.libreoffice.org/81214
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 12cd3a40d86a..43dfaf896259 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3273,7 +3273,8 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
SolarMutexGuard aGuard;
char* pCopy = strdup(pArguments);
- if (!pCopy) {
+ if (!pCopy)
+ {
SetLastExceptionMsg("String copying error.");
return;
}
@@ -3282,7 +3283,8 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
char* pOptionalEventType = strtok(nullptr, " ");
char* pOptionalData = strtok(nullptr, " ");
- if (!pIdChar) {
+ if (!pIdChar)
+ {
SetLastExceptionMsg("Error parsing the command.");
free(pCopy);
return;
@@ -3307,8 +3309,11 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
WindowUIObject aUIObject(pWindow);
std::unique_ptr<UIObject> pUIWindow(aUIObject.get_child(sId));
if (pUIWindow) {
+ bool bIsClickAction = false;
+
if (pOptionalEventType) {
- if (strcmp(pOptionalEventType, "selected") == 0 && pOptionalData) {
+ if (strcmp(pOptionalEventType, "selected") == 0 && pOptionalData)
+ {
char* pPos = strtok(pOptionalData, ";");
char* pText = strtok(nullptr, ";");
@@ -3325,9 +3330,14 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
pUIWindow->execute(sSelectAction, aMap);
}
- } else {
- pUIWindow->execute(sClickAction, StringMap());
+ else
+ bIsClickAction = true;
}
+ else
+ bIsClickAction = true;
+
+ if (bIsClickAction)
+ pUIWindow->execute(sClickAction, StringMap());
}
} catch(...) {}
More information about the Libreoffice-commits
mailing list