Allow Repair Document to send message

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia75f12f155b80bfadcc164c0c8b4d3ed57ec1d44
This commit is contained in:
Szymon Kłos 2023-03-06 14:31:50 +01:00 committed by pedropintosilva
parent ab124ab097
commit 7eb9771601
2 changed files with 5 additions and 3 deletions

View file

@ -196,7 +196,7 @@ L.Control.DocumentRepair = L.Control.extend({
type: 'unsigned short',
value: index + 1
};
this._map.sendUnoCommand('.uno:' + action, command);
this._map.sendUnoCommand('.uno:' + action, command, true);
}
});

View file

@ -340,7 +340,7 @@ L.Map.include({
}
},
sendUnoCommand: function (command, json) {
sendUnoCommand: function (command, json, force) {
if ((command.startsWith('.uno:Sidebar') && !command.startsWith('.uno:SidebarShow')) ||
command.startsWith('.uno:SlideChangeWindow') || command.startsWith('.uno:CustomAnimation') ||
command.startsWith('.uno:MasterSlidesPanel') || command.startsWith('.uno:ModifyPage')) {
@ -394,7 +394,8 @@ L.Map.include({
if (this.uiManager.isUIBlocked())
return;
if ((this.dialog.hasOpenedDialog() || (this.jsdialog && this.jsdialog.hasDialogOpened()))
&& !command.startsWith('.uno:ToolbarMode')) {
&& !command.startsWith('.uno:ToolbarMode') && !force) {
console.debug('Cannot execute: ' + command + ' when dialog is opened.');
this.dialog.blinkOpenDialog();
} else if (this.isEditMode() || isAllowedInReadOnly) {
if (!this.messageNeedsToBeRedirected(command))
@ -801,6 +802,7 @@ L.Map.include({
// It prevents launching multiple instances of the same dialog.
if (this.dialog.hasOpenedDialog() || (this.jsdialog && this.jsdialog.hasDialogOpened())) {
this.dialog.blinkOpenDialog();
console.debug('Cannot dispatch: ' + action + ' when dialog is opened.');
return;
}