Commit Graph

36 Commits

Author SHA1 Message Date
Jochen Nitschke
febbad7263 cleanup unused css/frame/* includes
Change-Id: I173a29fd1ee889127369d2bc2fce8e010b89ca65
Reviewed-on: https://gerrit.libreoffice.org/38633
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12 13:05:38 +02:00
Andrea Gelmini
834da9c476 Fix typos
Change-Id: I379c3f8ca971e6180744fb7270dde9164ebcec1a
Reviewed-on: https://gerrit.libreoffice.org/35814
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-29 05:10:01 +00:00
Andrea Gelmini
fd34499464 Fix typos
Change-Id: Ibef75de246fb31884153437fe8c05e299fe5962f
Reviewed-on: https://gerrit.libreoffice.org/35782
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-03-28 20:43:04 +00:00
Jan Holesovsky
5fefac660a lok: Allow setting of the language during load.
Change-Id: I9dbb62950e639376c26122ceb9fcec2982b3ca82
2017-03-24 19:01:53 +01:00
Jan Holesovsky
be71e2b860 Revert "Lok: support for batch API calls"
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
2017-01-31 17:45:29 +01:00
Ashod Nakashian
1c27286b9d Lok: support for batch API calls
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>
2017-01-23 03:23:19 +00:00
Noel Grandin
a71d6a2a84 loplugin:expandablemethods in dbaccess
Change-Id: I6087a3eff46926646ac1637615a0af30b38956a4
Reviewed-on: https://gerrit.libreoffice.org/30712
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-09 11:13:34 +00:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
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
2016-09-13 13:19:22 +02:00
Marco Cecchetti
7038a05224 LOK: new callback dropping implementation
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>
2016-09-10 19:31:57 +00:00
Marco Cecchetti
785a7e58c4 LOK: tidy up CallbackFlushHandler::queue, improved cell view cursor
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>
2016-09-10 18:08:01 +00:00
Ashod Nakashian
ce7484ffff LOK: queue-up events while processing client calls
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>
2016-08-31 11:51:51 +00:00
Miklos Vajna
a93217908d sw lok: move filtering of callbacks during paint to desktop
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>
2016-06-16 14:33:41 +00:00
Miklos Vajna
d368560882 desktop lok: implement per-view CallbackFlushHandler
With this, per-view cursor callbacks work again, as they did after
commit 32f419fee5 (sw: implement per-view
LOK_CALLBACK_CURSOR_VISIBLE, 2015-09-18).

Change-Id: Ic589276f99164a1a8d46f7a029d1a59ab6e971f3
Reviewed-on: https://gerrit.libreoffice.org/26102
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-09 13:17:21 +00:00
Miklos Vajna
de455afe51 desktop lok: move CallbackFlushHandler impl details out of header
To reduce the amount of rebuilt code when changing something there.

Change-Id: I8f3c18c29d5c08d70910ee2b204cafb99d6b4011
Reviewed-on: https://gerrit.libreoffice.org/26088
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-06-09 12:04:36 +00:00
Ashod Nakashian
c8a09eb373 bccu#1781: Impress/Comments - selection not updated on delete
Change-Id: I694d76785fcf6ec9c158c34cbe07f4d1f2c7a41d
Reviewed-on: https://gerrit.libreoffice.org/25219
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit b95e4e8681c9cefb4e1d4177192164e041baf9d9)
Reviewed-on: https://gerrit.libreoffice.org/25428
Tested-by: Jenkins <ci@libreoffice.org>
2016-05-29 01:56:38 +00:00
Ashod Nakashian
05b7ebaf98 LOK: don't filter cursor visibility during painting
Change-Id: Ia44ffe08dc8f46e0d10a73db374a283eb032f771
Reviewed-on: https://gerrit.libreoffice.org/25120
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit f805637353e4463d5b64f1b010bb580e191bd3aa)
Reviewed-on: https://gerrit.libreoffice.org/25427
Tested-by: Jenkins <ci@libreoffice.org>
2016-05-28 20:48:29 +00:00
Ashod Nakashian
692863ac38 LOK: improved event handling and fixes
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>
2016-05-28 20:38:37 +00:00
Ashod Nakashian
81d866a78d LOK: drop identical invalidation notifications
And drop duplicate GRAPHIC_SELECTION notifications.

(cherry picked from commit 7cdfe080432f69c2247cc7ff28316b653bd654ff)

Change-Id: I0c372efa9a58620e24cea219d82479cdc9dff359
Reviewed-on: https://gerrit.libreoffice.org/24771
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 13:58:30 +02:00
Ashod Nakashian
e394a8eab6 LOK: SAL_WARN for each removed event is unnecessary
Change-Id: If5e4c7b8751ae4eeb278475fb00118e32c6bb565
Reviewed-on: https://gerrit.libreoffice.org/24730
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-09 13:58:30 +02:00
Ashod Nakashian
70e8e788be Allow painting for arbitrary part
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>
2016-05-09 13:58:29 +02:00
Ashod Nakashian
bc990b011a Some LOK notifications are dropped if they are superseeded by later ones
Change-Id: I323e46a2a6c60b200b182b89199945f99a7f384a
Reviewed-on: https://gerrit.libreoffice.org/24567
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit cf98799fff7ae999bd62cec6486c986bf44000cc)
2016-05-09 13:58:29 +02:00
Ashod Nakashian
fda7a716a7 std::tuple -> std::pair
Change-Id: I2f11436a5c9691c2a0aac3655bc2c543d1c3d684
Reviewed-on: https://gerrit.libreoffice.org/24566
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit 8a6dab5da851f38a8ecef633e06e3cb2ac5e7849)
2016-05-09 13:58:28 +02:00
Ashod Nakashian
840e979757 More LOK callback notification compression
SET_PART, CELL_CURSOR, CELL_FORMULA, and CURSOR_VISIBLE are now deduplicated.

Change-Id: I4c17307c6f8b7c68bdfe55b4e90da4d34c55d085
Reviewed-on: https://gerrit.libreoffice.org/24565
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit a9771e1f4d0d2602713983ab1f3e743784e9ae72)
2016-05-09 13:58:28 +02:00
Ashod Nakashian
3d27afd26f Desktop compresses text selection start/end notifications
Change-Id: Ia85ded04d0eaf9d9b846fab6d86a44a758fccb69
Reviewed-on: https://gerrit.libreoffice.org/24320
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit 45037438d84485356a5ceb820ecc3e0bae4b112e)
Reviewed-on: https://gerrit.libreoffice.org/24380
Tested-by: Jenkins <ci@libreoffice.org>
2016-05-09 02:40:38 +00:00
Ashod Nakashian
dc464bdb08 Desktop compresses mouse pointer notifications
Change-Id: Id76f4e2952c4c551b626d094c11eb3339d76e50c
Reviewed-on: https://gerrit.libreoffice.org/24319
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit 7c01cf652850a8b8d3fd5ef6eb0a12ca6e725943)
Reviewed-on: https://gerrit.libreoffice.org/24379
Tested-by: Jenkins <ci@libreoffice.org>
2016-05-08 17:43:01 +00:00
Tor Lillqvist
cf2cff00de loplugin:redundantcast
Reinterpret_cast from 'void *' to 'desktop::CallbackFlushHandler *'
can be simplified to static_cast.

Change-Id: I648e91d0ca234162833f19595ae60838f81963bc
2016-05-08 09:07:10 +03:00
Ashod Nakashian
c327bb5c88 New LOKDocument callback queue to flush events lazily on idle
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>
2016-05-07 22:19:50 +00:00
Markus Mohrhard
98a8eafa91 add way to add additional information to the crash report
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>
2016-02-25 00:50:08 +00:00
Michael Stahl
23a0ee3c01 libreofficekit: password interaction optional and off by default
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>
2016-01-27 08:26:19 +00:00
Michael Stahl
2b63e576a5 libreofficekit: ask for password when loading encrypted documents
Change-Id: I3b3b0c0e64965280c24842b0cf70a21b8abb4dfb
2016-01-25 12:31:39 +01:00
Jan Holesovsky
8c987fabab lok: Introduce LOK_CALLBACK_UNO_COMMAND_RESULT callback.
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
2015-11-03 13:25:23 +01:00
Miklos Vajna
14a9a7d520 desktop: make LibLibreOffice_Impl visible to testcases
Change-Id: I345a6cab57cc594614e348700bb3c1c9a0673989
2015-09-25 01:06:31 +02:00
Miklos Vajna
17cf36bf72 desktop: missing header guard
Change-Id: Ibae1de013712e55930559b138aa07c15b590baea
2015-09-24 07:39:39 +02:00
Miklos Vajna
d77b49f070 desktop: avoid 'using' in headers
Change-Id: I9517a982daa48a6eb848360dee7739d15d42a971
2015-09-23 07:48:30 +02:00
Caolán McNamara
eaf2c27888 boost->std
Change-Id: Ifde84627578283bd057d7393eb7e5578ef5c029a
2015-09-17 11:00:51 +01:00
Mihai Varga
2290efa4a2 LOK: moved the decalaration of LibLODocument_Impl to make it visible
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
2015-09-09 18:02:10 +03:00