Document broker needs to know when the save request is sent and when the
save finished. It uses these parameters to avoid shutting down document,
in the document broker main polling loop, if save is already going on.
But direct .uno:Save commands issued from
loleaflet precludes document broker to keep track of it - in this case a
.uno:Save command issued from loleaflet followed by closing the
session will prevent saving the document to storage, if document is huge
enough and LO core takes a bit of time to save it. A save wrapper
command, 'save', ensures that document broker is aware of all such save
requests (_saveRequestTime member variable) and doesn't close the
document until we completely save it (to storage and other cleanups).
Change-Id: I5ec73d45adff23b2e7543e93dfd0624a5e5af46d
Timeouts to dimming the doc in the browser
are now configurable from WSD and is relayed
to loleflet as expected.
Out of focus timeout is now 60 seconds.
Change-Id: I8452e30976f6a81b0c3bb3ba5774daa244c1640c
Reviewed-on: https://gerrit.libreoffice.org/37489
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
Two timeout are now configurable.
idleTimeoutSecs, which controls when to dim because
of user inactivity, even if the tab is in focus.
outOfFocusTimeoutSecs, which controls when to dim
when the tab loses focus.
Currently they are set to 15 minutes and 30 seconds
respectively by default.
User_Idle event is now fired on dimming.
Change-Id: I894f6df44825b6814872f1c4986fab8dcd4d6cef
Reviewed-on: https://gerrit.libreoffice.org/37373
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Bin the internal command state recorder to Menubar and use the global
state recorder available in the map.
Change-Id: I32e81700e38c2d544b2d874e6a30fbe58e8d43bd
... instead of having this logic in our toolbar. All the elements like
menubar or toolbar can then use the map store to see the value of last
state change event for any particular uno command. We will be using it
when menubar starts using this store.
The frivolous logic in toolbar of reading the value of last uno command
should be removed. We don't expect loleaflet to change the permission
dynamically after loading the document anymore. But for now, just change
it accordingly and defer the task of removing it when we refactor
loleaflet codebase to trim our permission model (remove the 'view'
mode).
Change-Id: I1be54a62e96179b7db3f61470a92e3ddc745f52d
The localization.json file contains path like 'l10n/lang.json' which
means path relative the html file being accessed. This works when we
access .../loleaflet.html but not so when we access .../admin/admin.html because
then it tries to access .../admin/l10n/lang.json while it should look for
this file one directory up. One could think to change the paths in
localization.json file to something like '/loleaflet/dist/l10n/lang.json' so
that same path is accessed always for loleaflet UI as well as admin, but
it has repercussions that we access l10n data always using 'dist' prefix
and not using git hash, so browser caching the l10n data across multiple
versions.
Ideal would be to split the admin localization completely from the
loleaflet-ui localization. No point in fetching whole of the loleaflet
localizations strings when we are only accessing the admin console. This
would also solve problem mentioned previously.
For now, just split the admin localization file only while still
allowing admin console to fetch the same l10n files.
Change-Id: I0824fb05b9b4123b58d6fd8edafb374ee7128229
There is no `reply` support in Desktop for Calc and Impress comments.
Change-Id: I827ae99148cf8f65446e23e13e2588ce0ced788e
Reviewed-on: https://gerrit.libreoffice.org/36979
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
Otherwise the comment is animated from the bottom of the document to the
correct position and it confuses IE. Better to set the correct position
of the comment initially, so it doesn't have to animate all the way
through to the original position.
Change-Id: Ie59e2d785b6a778f3c918082a1a8cb7b2923cc33
Unlike writer and impress, editing annotation in calc creates a new note
without inheriting the author value from the previous cell annotation.
If we don't send the author field here while editing annotation, no
author would be set for the annotation resulting in empty string in the
UI, which looks quite incomplete and ugly.
It should be noted that the new author that is being sent to core
corresponds the current view now. So if cell annotation was added by
someone else and we are trying to edit it, we'd be the new author. This
is contrary to the behavior in writer and impress where author name
persists even if someone else edits the annotation.
Change-Id: I3bfbb34cef304687e42f4ee422d89c5a240834f0
No need as core renders its in-tile annotation marker now, if comment
indicator setting is on in the document.
Change-Id: I213827fc089790398e02b0fd9cba464ab62b0d8d
Otherwise, it was not possible to use the mouse to click on the text
beneath the text selection svg layer. This simulates a mouse click on
the document after selecting the comment.
Change-Id: Ia2717a0a4356f40e31db94b68563abffc87cac37
Hitting save, while there are redlines in the document, makes lo core send
redline information with empty textRange string. Further changes to the
document however brings in correct textRange rectangles back from the
core. Though ideally, it should be investigated why core is not able to
send correct redline text rectangles or why sending these redlines at
all while saving the document (not necessary unless some
attribute in redline changed), but no harm in having an additional check
here to filter unexpected messages received from server.
Change-Id: Ib709422e91cee6f141e4fea8ac923e88d7f65f50
It is possible that backend sends comment for which there is no parent
comment sent yet, as presently is the case as I am writing this. Warn
nicely in this case.
Change-Id: I2609dfdcdac69380b824d444ba8f64803996286c
overflow-break property is enough for us which still allows inserting
line breaks arbitrarily anywhere but only if there is no otherwise
acceptable break points in the line.
Change-Id: I8ea94daba258b00caa259c97597cf1206a89fa64
... in annotations. Emails, phone numbers, email address and what not.
We are not sending the generated markup, eg: the html <a> tags back to
LO core, only the representation in the UI is linkified.
Autolinker license: MIT
https://www.npmjs.com/package/autolinker
Change-Id: I8df3676a9eb6122884defb6bc3da87d30f993b04
This is just a quick workaround to circumvent the problem where
annotations dissappear when document is scrolled swiftly using the
mousewheel.
Change-Id: I51df6cecb770e5542ecdad765a5f0ccb6ec1eb98
Return early if there is no annotation selected currently.
Without this patch, we were unnecessarily layouting all the annotations
again and again on every click which is likely to make things slow.
Change-Id: I20ce5894a4d605b9811eb37d3b3af207bbb48d50