This was for the moment removed from the online.git, so let's disable the API
bits too before it shows this is really necessary. Reverts also:
Revert "Lok: unittest batch API"
Change-Id: I7bf3fe62d1e73b6f233992d51f587868a78f4bec
Mouse and keyboard operations typically
come in batches, and often each results in
tile invalidations and/or layout modifications.
Processing each input event on its own, then processing
the resulting output event is very costly and unecessary
when we know there is more of the same.
The new API adds support for batching such related
input events by disabling the output events generated
by Core until the batch is done. The client can
then process the resulting events, which will
be compressed and deduplicated.
Change-Id: Id381dab807186d010021a8778ee440074a739920
Reviewed-on: https://gerrit.libreoffice.org/33402
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
The issue of 362d4f0cd4 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.
(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to
OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager();
in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)
Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
Now view callbacks have their own collection of last states where the
key is made up by both the view id and the callback type.
Callback dropping based on the last state is no more handled on
queueing but on flushing, since what really matters is the last
performed callback (for each callback type).
Anyway in order to not modify the order of callbacks, that could be
changed when an already queued callback is superseeded, dropping still
occurs on queuing too, just by looking for the last queued callback of
the same type.
The result is a substantial reduction of redundant callbacks and fix
the following problem in loleaflet: when there are more views for a
speadsheet and cell cursors for two view are placed on the same cell,
a continuos swapping between the two cell cursors can occur. That was
due to a sequence of "EMPTY" and coordinates messages or cell cursor
and cell view cursor messages which were sent in an alternating way.
Change-Id: I79e14d11d4e8590aff715181e3410ad88c4e6175
Reviewed-on: https://gerrit.libreoffice.org/28783
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Rewritten the switch statement in `CallbackFlushHandler::queue`:
- Now, the new callback data is emplaced after removing all states
overridden by the new one.
- View callbacks are checked not only for the same type but even for
the same view id: that allowed to fix the following issue: starting
from the 3rd view for a spreadsheet it could occur that only the cell
cursor of the previous last view was displayed in the new view.
Change-Id: I2b63526deb4dca39e3a1f430443ebc5d0f61938d
Reviewed-on: https://gerrit.libreoffice.org/28782
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
To prevent feedback effects and improve performance,
we now queue up events fired during the processing
of a client call on the LOK API.
This has the advantage of giving us a chance to
compress redundant events and to combine others
(where possible) into fewer ones.
Change-Id: I2f6ea12c5d85205e6495cb130f6a6262534b6bb2
Reviewed-on: https://gerrit.libreoffice.org/28311
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
This will be important when in the per-view case
SwViewShell::libreOfficeKitCallback() won't be called anymore; as
pointed out by online.git's TileCacheTests::testSimpleCombine() test.
Change-Id: Ie68f8c51facdba127763df660e9220f820805ecc
Reviewed-on: https://gerrit.libreoffice.org/26372
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
During painting, when notifications are disabled, we could still
receive notifications that are imporatant and cannot be suppressed.
So certain events are let through during painting.
A comment describes this better in the code.
Some widgets (notably postit/comment control) emits events in
relative (local) coordinates instead of absolute. This is patched
in many cases but some cases still exist that are rather hard
to patch due to the complex interaction with other parts of the code.
These supurious local coordinate updates (notably cursor invalidation)
are supressed to avoid the bad side-effects they cause in LOOL.
Change-Id: Ie22a316d54ea163c6976ed04314d6ced8247824c
Reviewed-on: https://gerrit.libreoffice.org/25013
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit b5c2a3fdbbf4161b0699ba515f63f98d7607ddf2)
Reviewed-on: https://gerrit.libreoffice.org/25424
Tested-by: Jenkins <ci@libreoffice.org>
Painting should not cause any state changes, but
to paint a tile on a different part than the current
has to change the document, which sends notifications
to all clients.
A new API, paintPartTile, allows for painting tiles
on any part without sending change of part notifications.
Furthermore, because we block notifications during this
operation, no tile invalidation is issued due to
changing of the part.
One issue remains in the cases when the LO Core
resets the cursor position internally and we resume
editing after painting, the cursor might be at the top
of the page. This needs fixing separately.
Change-Id: If19bd1c90ecad4d5ed5e8d09513741b7994fa6e5
Reviewed-on: https://gerrit.libreoffice.org/24698
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reinterpret_cast from 'void *' to 'desktop::CallbackFlushHandler *'
can be simplified to static_cast.
Change-Id: I648e91d0ca234162833f19595ae60838f81963bc
Since desktop now queues up callback notifications
and flushes them to the client on idle, the
unit-tests must yield and process all tasks
before they validate post-conditions.
(cherry picked from commit e6a429770bde5da75239961ae88c06c78cfa5686)
(cherry picked from commit 1f278848117080cd6e819f04ba428be52416af7c)
(cherry picked from commit 6ca6f22777eb3651109cbf403577d0022a735c9b)
(cherry picked from commit 548faf728cf097d93c3f6478ceea5f8747e789c6)
Change-Id: I78307db29a9ce647ffaed3539f953227c605968e
Reviewed-on: https://gerrit.libreoffice.org/24377
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
We can add several additional key value pairs during the execution of
the program that will be used on the server to show more information.
Change-Id: I4102adc15fc821415fa0b997ca7fe0dc4f7abcec
Reviewed-on: https://gerrit.libreoffice.org/22553
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Add setOptionalFeatures() function that clients must call during
initialization, and enum LibreOfficeKitOptionalFeatures.
Change-Id: I73035193c87033052921c3aad94fdc057fe81111
Reviewed-on: https://gerrit.libreoffice.org/21809
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Posting of the .uno:Something commands is asynchronous. To be able to find
out when eg. .uno:Save finished, this commit introduces a callback that fires
when that happens.
To be able to receive such a notification, the appropriate postUnoCommand()
must be called with 'true' as the parameter for bNotifyWhenFinished (defaults
to 'false').
Change-Id: I254939ebc8ea5f309ae39686dcaaeddd5148b0c9
We needed a better way to test LOK methods that are not app specific,
but are defined in /desktop/source/lib/init.cxx. So the decalaration
needs to be visible.
I also moved the `getStyles` test in the new test file
Change-Id: I98d97dc17a66e72732ca7bd848c131610790f48e