Amazingly more time was spent allocating, wiping and freeing these
vectors on Android than the actual rendering of pixels in a profile.
Change-Id: I49ea093816eba0f4187613ab6c8dc24d8dcba75b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86335
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Use a fully reliable uniqueness check, rather than a hash, and get
simpler ids as a bonus. Fetch view data from the session itself
rather than passing it in too.
Change-Id: Ibcd625156b5a98eb280e35d6537b5c8c026d0197
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86150
Reviewed-by: Mert Tümer <mert.tumer@collabora.com>
Tested-by: Mert Tümer <mert.tumer@collabora.com>
It is painful to check and search manually the PID to attach the LOKit
process when exists several pre-spawned waiting to load a document.
This patch helps to attach the debugger when the LOKit process is about
to load a document then send the "signal SIGUSR1" to resume it.
Change-Id: I3b15bd522c6ef3ef57dc3453b457dcf91f2661b9
Reviewed-on: https://gerrit.libreoffice.org/85430
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
The failing scenario was reproducible on my old phone:
* start editing the document from the shell
* add a word
* leave the editing using the '<' in the top left
* start editing the document again => boom!
In the normali, non-crashing case, the order of destruction is that
~ChildSession is called first (and calls ChildSession::disconnect() that
consequently calls Document::onUnload() via _docManager->onUnLoad(...).
The Document::onUnload() then deregisters callbacks and all is fine.
The in the above described crashing case, the Document is destroyed
before ChildSession and calls resetDocManager() for all sessions.
Before this patch, this meant that the _docManager was set to nullptr,
leading to situation that later, in the ~ChildSession, the call of
onUnload() was avoided, the callbacks were not unregistered, and later,
on the next document load, the app crashed because it called stale
callbacks.
I suspect the change might be useful even for the non-mobile case, but
not 100% sure, so rather do it MOBILEAPP-only.
Change-Id: I279a160ccaab3080e84fe0437ed72684331b6e13
Reviewed-on: https://gerrit.libreoffice.org/84588
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
lok clients can request to complete a function name partially typed in
the formula input box.
Change-Id: If8e4485c5ed9f91a594dfcec04e0c0b10becdcd0
Reviewed-on: https://gerrit.libreoffice.org/83985
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Tested-by: Marco Cecchetti <marco.cecchetti@collabora.com>
View switching should not cause the sidebar UX to re-build at all. So
pass the view-id into the render call so we can avoid this.
Change-Id: I194c1841df2cedfcdf82defb2712d20715d7ff1d
Reviewed-on: https://gerrit.libreoffice.org/84131
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
This patch is a follow-up for overflowing
watermarks patch
Change-Id: I8613736dc4fea49a22ae29aba209c95b1ea93557
Reviewed-on: https://gerrit.libreoffice.org/83635
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
There are a few things acceptable/safe in a
signal handler, and taking locks is not one of them.
This replaces the logic with a simple counter that
serves the purpose just as well.
If we get a double signal, we log and ignore.
Change-Id: If589c18492468c120d00c213805467bcbba05d27
Reviewed-on: https://gerrit.libreoffice.org/83150
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Based on information from UNO ViewRowColumnHeaders messages, this draws
the grid lines with Leaflet's SVG polylines, in a background pane.
To prevent visual glitches on touchscreens, this also reverts parts of
26aad36771ebd5a304b763912184acd2ea26dfdf - that introduced a regression
that prevented 'dragend' events from being fired when inertia-dragging.
Instead, inertia drag is disabled in the L.Map constructor.
[ Miklos: cherry-pick these early as they prevent automatic merging. ]
Change-Id: I86c68214822a0a2c2f8ced82ccf5a6c201e2cf04
Particularly those used on Android...
Change-Id: I47bf9692f5e99ba30140d698558472201168a198
Reviewed-on: https://gerrit.libreoffice.org/82302
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
The following flags are affected:
ShutdownRequestFlag
TerminationFlag
DumpGlobalState
Since it's common to grep for all places
that set or reset these global flags, it
makes more sense to have explicit functions
for each operation. Now we have set and reset
accessors where appropriate and get is reserved
for read-only access.
This changes the getters to only return
the boolean value of these flags rather than
a reference to the atomic object, now that
they are read-only.
Also, a few Mobile-specific cases were folded
either with other Mobile-specific sections, or
they were now identical to the non-Mobile case
and therefore deduplicated, making the code
cleaner and more readable.
Change-Id: Icc852aa43e86695d4e7d5962040a9b5086d9d08c
Reviewed-on: https://gerrit.libreoffice.org/81978
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Add a "singleton" class method to DocumentViewController to return the
(as for now) singleton DocumentViewController.
Change-Id: I0b8a8def558cfe7f9469b6062a86311dfa63f549
Reviewed-on: https://gerrit.libreoffice.org/82007
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 2807f907d947549a17c5bae586b85d412d552a09)
Reviewed-on: https://gerrit.libreoffice.org/82021
Sometimes core renderes with sub-pixel differences
(the crosshair at the corners of the Writer pages
show line anti-aliasing differences). This causes
failure of the tests that count the tile deduplication.
We now tolerate when we get an unchanged tile twice,
assuming it was due to such a rendering difference,
but we re-trigger another change and this time we
don't expect any extra tiles, no more than two
variations of the anti-aliased crosshair was
observed.
We also move some duplicate code into utility
functions to improve readability and reuse.
Reviewed-on: https://gerrit.libreoffice.org/81196
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 9603597fd1aaecb27893792cfd2d243e450b58b8)
Change-Id: I1a66732dd3443bfbd770d8dc65721571dfa08615
Reviewed-on: https://gerrit.libreoffice.org/81572
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Always log when we set the termination flag
so we can trace how (and implicitly why) we
terminated. In practice trace logging is not
enabled, so a key event such as termination
should be logged at info level.
Reviewed-on: https://gerrit.libreoffice.org/80324
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 3f8d516e1399df687c2935fc551b171cbd850b7b)
Change-Id: Id6615181c81ea56777f44b551b39925065b0e578
Reviewed-on: https://gerrit.libreoffice.org/81562
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
... when the app starts.
Change-Id: Icac4a9e1074fb6c5f3c9b5282e20a4513717a323
Reviewed-on: https://gerrit.libreoffice.org/80881
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
With password-protected files, the first loading attempt
always fails due to missing password. At that point the
client is notified of the missing password and the user
is prompted. The second attempt includes a (hopefully)
correct password and the document loading commences.
Due to the fact that an exception is raised when
the loading fails, this left the loading latch
triggered, which blocked subsequent attempts.
Change-Id: I7cc257a36eb1cc080f460aac8cdb7030783a5914
(Because a mobile app is not supposed to ever exit voluntarily and
cleanly anyway.)
Perhaps we should call abort() in thse cases, though, and not just
continue as if nothing is wrong?
Change-Id: Iceb10cc767522c1fee587624ea6e810c62586207
Reviewed-on: https://gerrit.libreoffice.org/80446
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Otherwise the Kit main-loop continues while its event processing thread
is dead, leaving the client stalled.
Change-Id: I7089ed5b5bd8499623624ffdb84c22cedd80cc7e
As we register the global "kit" callback with the Document object
pointer as callback data, we must unregister it when the document is
being "unloaded" and the Document object will destruct shortly.
Otherwise the callback might be called for the next document with a
stale pointer.
Relevant only for the iOS app, and presumably the Android one. In
web-based Online, the kit process will exit anyway after the document
is closed. But in an app there is just one process that keeps running
for a long time handling all documents that are edited.
For some reason the crash only showed up when a document was created
from a template, closed, and another document was created from a
template.
Change-Id: Ieb47838a597c5bcab89c1a33d9bc2f2adb57b3b3
Reviewed-on: https://gerrit.libreoffice.org/79633
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit ee497b873eadfa3ab4ba77793748e83ff649dacf)
Reviewed-on: https://gerrit.libreoffice.org/79650
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>