This moves ClientRequestDispatcher and all
its direct exclusive dependencies to its
own file and adjusts formatting.
No functional changes were performed,
although namespaces were restored and
other minor changes were done for
consistency.
The resulting file is still rather large
at around 2000 lines, but that makes
COOLWSD.cpp smaller by about 30% now.
Change-Id: I59bcd997ad08702ce7029c6791095e75ad9b23b0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
In calc when a tab is moved to a new position or a sheet is inserted
or deleted, saved positions in SheetSwitchViewRestore which are used
to restore the correct document.
position when user switches back to a tab are no more valid.
In fact the internal map: sheet index -> sheet position becomes wrong.
This patch takes care to update such internal map when one of the
listed event occurs.
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: Ia4587b14179a35ff369d1f030657c4e5c64f5715
From CanvasTileLayer._saveMessageForReplay description:
"We will not get some messages (with coordinates) from core when zoom
changes because print-twips coordinates are zoom-invariant. So we need
to remember the last version of them and replay, when zoom is changed.
In calc we need to replay the messages when sheet-geometry changes
too. This is because it is possible for the updated print-twips
messages to arrive before the sheet-geometry update message arrives."
The problem is that after switching to a new tab it could occur that
some of these stored messages are replayed on the new sheet even if
they were related to the previous one.
So for instance if in the old tab there is a cell selection we could
end up try to select such cells in the new sheet too, and even if such
selection is successively cleared by further message specific for the
new sheet, such message replaya was causing an unexpected document
scroll.
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I63995aaa51c25216abd246551fbd2ec437a3f6de
- send new scroll position only on change
- this reduces a lot network traffic and makes
it more quick
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ifd4f3ecca2e826c3350d19e377cc265dbde563fe
Add a smoother scroll taking into account the row height of the data to
adapt the scroll height accordingly.
Signed-off-by: Méven Car <meven.car@collabora.com>
Change-Id: I96cf56367b80ca22f75b074e32ebff97eedeb0ab
This was introduced by backport #8271 of the sheet protection
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I07a9fd428b11042ce191a5c7a48d53400253c445
Parse jsdialog responses, and send the right dialog id
to click items on.
Adapt to unexpected multiple updates for the corrupted document
warning dialog on load.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I0f934cdc60b2204afc493cf367f98a9cfa0aa6c0
Kit's GlobalCallback has an alarming habit of enabling
inputprocessing during a jsdialog popup occuring during
load, so use a stronger heuristic to avoid sending errors.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I4a57685dcf63b4a3607c894e80a13e27bffaece5
Removing the prior apparently fragile approach of summing
view-ids.
Instead check for lack of duplicate view-ids, and still
load & close lots of views in random orders.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ibcefc54597cc4e37a9728dab2f32002620b01c4c
like we do for the spelling setting, so we have the document in the
desired state early before any rendering, dropping the early full
document invalidations during initial setup
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I6b762c95fd4c00c7da04cf89f7bbeef4bc57375d
Adapt checks for empty or non-empty timestamps so that we can
match previous failures, and ensure coolwsd is sending us the
right override state.
Change-Id: I604e3aa0315753ae02e5a6e4173d6b3b3ffa3b3e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Quite possibly we did successfully up-load, or at least our timestamp
may not match, but we cannot be sure enough to warn the user in this
case. We cannot reliably get notified of remote alteration on the
server of files, so wait until a more succesful save or new user
join to get an improved timestamp.
Change-Id: I5c8124ed74ba5c26371768ac778b9670282c87a3
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
config.h should be included as the 1st line in each source file.
It should not be included in headers.
config_version.h which changes on every commit should not be
included widely - so remove it from the HttpRequest heeader to
save tinderbox's ccache.
Fetch version info from helper methods rather than in-lining via
defines, to better encapsulate.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: If449a36f1ac61940f04d70d5f4180db389d9b4c4
Limit the workaround for "no copy event is emitted by hitting CTRL+C/X
with no selection" to Firefox version from 117 to 120.
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I00d3addc0330862bf07eebb8d030d1156fc6e321
On the client side, when setting up the socket, we encode beforehand, so there's no need to encode it again.
Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: I09e59c6fdda4c93de5dd36fca5023ac88926c4d4
Fixes and gives more details for debugging in case of:
INCOMING: viewinfo: [{"id":3,"userid":"admin","username":"admin","userextrainfo":{"avatar":"http://.../avatar/admin/64","is_admin":true},"readonly":"0","color":0}] cool.html:323:37
Exception TypeError: this.map._viewInfo[this.map._docLayer._viewId] is undefined emitting event [object Object] onUpdateViews@http://.....:9980/browser/08e0fd2e1b/src/control/Control.UIManager.js:823:31
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I915f4d6e235426d1ae1d12c64629a6e250c16766
- separator should treated as UI not any object value
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ie6182dda40b7fd3c0d1ea87c5df78a46239677ed
- when saving the json sent to client was wrong
Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: Ib5735dcf81db4257256a909fa7dface184f1c53d
problem:
when titles are long they go beyond dialog area and are not scrollable,
this hides the date and author details which can not be scrolled either
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Iae8a5affb870faff0639ac9083e118cec40debd0
If the notebookbar's paste or paste special button is pressed and
Chrome's clipboard permisson popup is rejected, then nothing happened,
while Firefox case was showing a more helpful popup, explaining the
problem.
This has two sides: error handling should be better and also the error
should not happen in the first place. The error can also happen when the
<iframe> is not set up correctly, but that's to be handled on the
nextcloud side.
When there *is* an error, improve error handling by restoring the
codepath that matches Firefox:
- extract the rest of the code after invoking the async clipboard read
in _execCopyCutPaste() to a new _afterCopyCutPaste()
- paste case: invoke _afterCopyCutPaste() when the paste fails
- paste special case: only pretend we're in paste special mode if the
success fallback is called
- if the failure callback is called, then invoke
_openPasteSpecialPopup()
With this, the "has async clipboard, but the permission request
rejected" and the "don't have async clipboard" codepath matches.
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I727f00a1cf94dd1837e15e60410e1798de5daecc
In calc all comments are hidden and only shown when
mouse hovers the cell to which the comment is attached.
Anchor was always a wrong value so when we were at
some more distant position - it always jumped to random
place on hover.
This is regression from:
commit 6550e713c4
annotation: calc scroll vertical to make selected comment visible
which was followup for:
commit 2bf93e34c3
annotation: writer scroll to make selected comment visible
We need to compare the same type of positions. Now all the
values will be in core pixels and methods have comment which
indicates that.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I8e86a31087ff491ace92f407b166788cea73b25a
This fixes a regression where `framed.doc.html` wouldn't load.
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I57b4a617755be4615ec6ec734f6e084d57eaebce
problem:
in some types of items fields may be named differently,
leading to fields not being found and empty dialog entries.
currently only itemType 'case' was culprit but in future there maybe some other types too
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I24b58dc474a555b3f26c34bb4ae0b144c06abc57
but it gets computed anyway, move it so its only called if actually
needed
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I187540df6def6b4f92199e273665e04ed493035a
This is consistent with LibreOffice: you can't delete nor rename
a protected sheet. It did nothing already.
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I81e91f0cddf8b0cf6004f1668cb996b7cd0ba8e4
This set the CSS class 'spreadsheet-tab-protected' on the sheet tab.
Requires LOKit change https://gerrit.libreoffice.org/c/core/+/163325
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: If199b36ba593c5e603d017346969360b6191fe5b
Don't show grey border for labels and similar widgets...
Now we have "disabled" property on the root container of
every widget. We should style disabled state based on that.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I9e49783e8905a4c36b0010fa19d5feb869151e77
Update checkbox state on jsdialog action.
To allow click handler use it's current state not
initial data.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I95796771a1347c78a9c5e1983e3b0af61a236bb2
- move listener watching disabled state to separate file
- use also for listboxes, comboboxes, spinfields
- handle state in menubutton
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I841413f17abd6398a7e82496c3f20bdc52ab9514
Invalidate tile preview when canonical view id
changes.
Change-Id: I62d2e20946ec863ceb71014bb0216675316a658b
Signed-off-by: Henry Castro <hcastro@collabora.com>