Commit graph

52 commits

Author SHA1 Message Date
Tor Lillqvist
eb2e62ebcd Fix misleading trace output: There is nothing called CallbackWorker::callback
Change-Id: I951d4a7706e0009b5a7266c86ea5b66a29242448
2018-01-17 12:35:38 +02:00
Miklos Vajna
d0d87401c1 kit: use NoFileSync flag for save
What LibreOffice sees as a save destination is just a temporary output
from the outside, so there is no point in doing fsync for that file.

This depends on core.git e90a16d71cdcfbd785401613a2e5a29cb1167acf (sfx2
store: handle NoFileSync for Save (not SaveAs), 2018-01-15).
2018-01-16 09:59:27 +01:00
Pranav Kant
f63858433b loplugin:includeform
Change-Id: Ib62a7aa61062f00698aa3e8a144438de5c57e53d
2017-12-20 21:21:05 +05:30
Jan Holesovsky
2ef04a6446 lokdialog: Fix RGBA vs. BGRA confusion.
Change-Id: I42ce8f46ab09e9b6684ace0627323a013831c571
Reviewed-on: https://gerrit.libreoffice.org/46564
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-12-15 17:11:05 +01:00
Pranav Kant
a5d4c3bb90 lokdialog: Set view id before posting to LOK dialog api
Change-Id: I53925a71718f1acfc2337f86f97f4f5526546383
2017-12-05 02:39:26 +05:30
Pranav Kant
53fc694a3c lokdialog: Use dialog close LOK API when user clicks 'X'
Change-Id: I3a90eb8b83688eed7db8228763633e31f82e58d1
2017-12-05 00:41:19 +05:30
Pranav Kant
849eb0d500 lokdialog: Adapt to LOK dialog API changes
Change-Id: I653304e71573eb253e09a72bc87d54b8554ba7ff
2017-12-04 22:13:50 +05:30
Marco Cecchetti
29a233e5a9 calc: set outline state
use a specific message from the client for set the visibility state of
a group instead of hijacking the update row/column header message

Change-Id: I69d66b30db0b4d8a0082cbd2524120491d4f97cb
Reviewed-on: https://gerrit.libreoffice.org/45446
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-01 01:10:43 +01:00
Pranav Kant
a91f022e42 lokdialog: Remove getDialogInfo call; ncorrect dialog size handling
Change-Id: Ieff59baa984982bd8126102dafc5a97f673a4150
2017-11-29 13:35:12 +05:30
Pranav Kant
a19121bbbc Adapt to dialog API changes in LOK
... and bypass some unncessary DocumentBroker handling of dialog
messages.

Change-Id: I378dff7a9786479baaa43f5fde9d30f35bc7f948
2017-11-28 22:18:21 +05:30
Jan Holesovsky
676b6ca610 Save As: If the LOK's saveAs failed, try under a different name.
This helps when the caller omitted the extension...

Change-Id: Ib7602ce8fa88bc867198dbba36b2582145bd0994
Reviewed-on: https://gerrit.libreoffice.org/44405
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-11-10 11:08:53 +01:00
Jan Holesovsky
b20faa8bdc Save As: Advertise the correct size when uploading the new file.
Change-Id: I9b20c4bdb7ddc848437edceae1a77ddb49d55133
Reviewed-on: https://gerrit.libreoffice.org/44357
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2017-11-10 11:08:53 +01:00
Jan Holesovsky
6745464c70 tdf#99744 SaveAs: Report back to loleaflet that the saveas succeeded.
Change-Id: I670c8b4503c1a4c0a88001a1343f6dec2974e044
2017-10-26 11:11:38 +02:00
Jan Holesovsky
7ff432a370 tdf#99744 SaveAs: Reimplementation of the PutRelativeFile going through Kit.
This is necessary so that changing of the file type works.

Includes a unit test.

Change-Id: Id01d44e555b6bac1002ff950de461fd330602f63
2017-10-26 11:11:38 +02:00
Pranav Kant
e9e162b35e lokdialog: Mouse/key events, canvas use & child window impl.
Change-Id: If8ae5c284e7166d4a01bd664644134f11197f988
2017-10-25 00:39:03 -07:00
Pranav Kant
55de8e6c1b lokdialog: Add dialog related callbacks
Change-Id: I5dc54c4bdbaf066b3b089a00fbc89b943e73caae
2017-10-02 15:40:23 +05:30
Marco Cecchetti
dee39a562c support for rendering a watermark on each tile
Change-Id: I3edccac49a3bcd3d2493d8d7ef3a1ae29307e727
Reviewed-on: https://gerrit.libreoffice.org/41898
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-09-07 17:28:44 +02:00
Aditya Dewan
8ef4d33e15 Adding ruler to loleaflet
Change-Id: I585850a7111eb5ab70bc5b51a508eb29317b92ca
Reviewed-on: https://gerrit.libreoffice.org/40461
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-08-28 10:45:33 +02:00
Pranav Kant
ef54b6ea16 wsd: Ignore useractive, userinactive when doc is not loaded
Sometimes client sends a userinactive message while the document is
already being loaded, which leads to the kit process skipping sending
the result of LOK callbacks to the client.

Handling this in child session is futile in the case when userinactive
message is sent when the document is being loaded, since kit process
handles the 'userinactive' message only after document is loaded (i.e
isLoaded() returns true). Moving this handling to DocumentBroker will
take care of both the cases - when 'userinactive' is sent before load
starts, and during load of the document.

Change-Id: I4ea3ac7b184d2ca373eb3ff4fb7b4ae394d454df
2017-08-11 23:27:17 +05:30
Aditya Dewan
3a43f69116 tdf#108341 automatic editor switch and follow added
Change-Id: I5129256a0633916a3ca2cb05ccba39a5f4a5d398
Reviewed-on: https://gerrit.libreoffice.org/39299
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-07-06 09:46:49 +02:00
Ashod Nakashian
8a2c60e5b6 wsd: avoid race during viewinfo notification
Change-Id: If2d8adc67337a5529cb6898808a84727ff1df38e
Reviewed-on: https://gerrit.libreoffice.org/38123
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-29 06:47:42 +02:00
Ashod Nakashian
da2d3cbc92 wsd: support per-user links and commands
userextrainfo is a json array that contains
extra user-specific links.

Currently 'avatar' is assumed to hold the
image url for the user's avatar.

'mail' and other links can also be added.

Change-Id: I37c4c68bfa0b7ee659e017b4867dcb8cf5c2ca2f
Reviewed-on: https://gerrit.libreoffice.org/38120
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-29 06:45:18 +02:00
Ashod Nakashian
873cbcbe91 wsd: logging corrections
Change-Id: I35c52494137ea174c218bf936bc2440634036e3e
Reviewed-on: https://gerrit.libreoffice.org/37889
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-22 07:03:47 +02:00
Marco Cecchetti
024e786e85 calc: added an address input field
Change-Id: Ic030724e392693847a195b5e53866b40ebad7435
Reviewed-on: https://gerrit.libreoffice.org/37359
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-05-11 17:55:23 +02:00
Jan Holesovsky
04bf59060d inactive: Record also the change tracking and comments.
Unfortunately we need to record the entire sequences of what was happening.

Change-Id: I6c52f187e881dd3eadaea6958c0d49ed8f6942cb
Reviewed-on: https://gerrit.libreoffice.org/36960
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-04-25 18:20:03 +02:00
Jan Holesovsky
c36e619d24 inactive: Invalidate tiles when we return back to the active state.
Change-Id: Ib97d6463c52ecf153d3c19ab7efc47d99b71ce9b
2017-04-24 19:24:28 +02:00
Jan Holesovsky
e78c862c47 inactive: Replay the state payload, not the only the value.
We need to replay 'client-0054 statechanged: .uno:StateWordCount=5 words, 30 characters',
not 'client-0054 statechanged: 5 words, 30 characters'.

Change-Id: Ifd1fc7d6d567bcf209dffdd826400f5a5248aa7e
2017-04-24 19:24:15 +02:00
Marco Cecchetti
1e0deae3df Calc: changed the way header are updated on row/col insertion/deletion
Now when a row/col is inserted/removed or resized is the core to
notify the client that current header is no more valid and a new
header should be requested by the client to core.

In this way core can notify the header invalidation to all views.

Change-Id: Ia3c1872b73cfb3458cd0d35907291a9fc9eebd11
Reviewed-on: https://gerrit.libreoffice.org/36729
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-04-21 15:45:15 +02:00
Pranav Kant
ce1084b74f wsd: Send readonly info to clients
With this every other client would be able to know about other client's
permission i.e whether they have opened the document as readonly. This
could be important eg: to hide the cursor overlay of readonly users in
the UI or to mark these users as readonly in the userlist.

Change-Id: I5dcb1b4e5a22c9b546d16b69b9216cc7653cff04
2017-03-31 12:20:09 +05:30
Jan Holesovsky
9f17050a7d Pass the locale settings from loleaflet to wsd/kit.
Change-Id: Ie530db73cfbdb62787f16eae0f4b07fbf8b8acb4
2017-03-24 12:34:32 +01:00
Michael Meeks
0eaef6c896 config.h - get includes right: must always be the first include. 2017-03-10 10:47:43 +01:00
Jan Holesovsky
a1a46c240e nb: Use the non-blocking socket in the loolwsd.
This so far only builds, but I did not even try to run it yet.

Change-Id: Iceacb5fc5c8994726508e8ea00bd495d758391a8
2017-03-10 10:47:39 +01:00
Ashod Nakashian
6cd1d511be wsd: avoid segfault when handling invalid paste command
The payload of paste can't have length 0.

Now we silently skip such cases, although perhaps we
should be more strict and disconnect the offending
client.

Change-Id: Iaa2e7373277f9e7d85209aec56a2f8ee0ef7e801
Reviewed-on: https://gerrit.libreoffice.org/34112
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-10 07:02:26 +00:00
Ashod Nakashian
5dad626b6d wsd: remove handling of depricated partpagerectangles command
Change-Id: I13285e83179ab7654b6fd21a6548730e74d67425
2017-02-05 21:59:22 -05:00
Pranav Kant
440ca8e2f7 Initial support for comments lok api
Change-Id: I1fc48e245a47f7b8d4260009d8c377c30d0b8820
2017-01-27 23:36:24 +05:30
Ashod Nakashian
25be7f0ab6 wsd: use own tokenizer
Change-Id: Ia6e58767e3a138d086d4e0ae287782d3ed558076
Reviewed-on: https://gerrit.libreoffice.org/33418
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-23 04:37:21 +00:00
Jan Holesovsky
1cf4334ec6 partpagerectangles is useless, and causes trouble for many documents.
When invoked too early after the document load, on slower servers it is
executed before the layout of the document is performed, leading to crashes.

It is useless for loleaflet, so let's disable it here, and remove it in
master for good.

Change-Id: Icf08d9df5efc8b0488c94048803e703b40f67e24
2017-01-17 19:18:54 +01:00
Tor Lillqvist
11ae90cfcb No Hungarian notation please
Change-Id: Ia624de45a792db7e39f2245aaea7d940b30b0db2
2017-01-13 14:52:08 +02:00
Tor Lillqvist
674fbc3f42 This variable can be const
Change-Id: Ie8b271c2383c2742b83139a43c90ba9272373d2f
2017-01-04 13:57:39 +02:00
Tor Lillqvist
a36d4b0fc3 Reanme png namespace to Png for consistency
As far as I see, we tend to use the same namespace name as the
basename of the corresponding include file, and this stuff is defined
in a file called Png.hpp.

Change-Id: Id859e13e94568abd9f1d5b4ef3bfbbb0c156db11
2017-01-04 13:35:26 +02:00
Tomaž Vajngerl
5d22bd5c95 Update cursor positions on active user - record events per view
When the user becomes inactive, we have to record events, that are
important to restore the user's document viewport when he becomes
active again.
We currently don't discriminate view events so events with different
view ID are considered as the same event and thus get overwritten.
The effect of this is that only the last cursor or selection of a
different view (different user working on a document) is updated
when the user becomes active again.
With this we discriminate view events and record them per view ID.
When the user becomes active again, we replay them for all views.

Change-Id: I0c6b9209f4d592d88fb23227c4de41084b8cd736
2017-01-02 14:34:46 +01:00
Ashod Nakashian
3a5be2926b wsd: log WS incoming messages only once
Change-Id: Iee31bc649ae2d194b6418367f0e9ab8561099b17
Reviewed-on: https://gerrit.libreoffice.org/32551
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-01 03:55:19 +00:00
Ashod Nakashian
477ca6f414 loolwsd: cleanup the Sessions
Change-Id: I3cd065ab84e17f943fa7de7e094db574ff6fde07
Reviewed-on: https://gerrit.libreoffice.org/31931
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-13 04:35:00 +00:00
Ashod Nakashian
e60bc28a00 loolwsd: LOOLSession -> Session
Change-Id: I94369480fb0a6789375dfe5610ada300e94b80eb
Reviewed-on: https://gerrit.libreoffice.org/31930
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-13 04:34:19 +00:00
Ashod Nakashian
c7e5874eff loolwsd: invalidate all parts when document size changes
This is a stop-gap until Core sends these invalidations
with more precision. Otherwise, we may be wasting valuable
cache data here.

This fixes showing incorrect tiles when slides are
inserted/removed from a doc.

Change-Id: I7a02c6fb96ff27223afe71d891db639ab5b2cfae
Reviewed-on: https://gerrit.libreoffice.org/31616
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-05 04:50:35 +00:00
Jan Holesovsky
2b13cfa1a7 Don't send setpart: to text documents, it will always jump to the 1st page.
Change-Id: I809f2ba493329174a33f99d63eec2c60b38acb05
2016-12-01 12:28:03 +01:00
Ashod Nakashian
283cf812de loolwsd: Writer doesn't have parts
Fixup the part for EMPTY invalidation as well.

N.B. Should replace 'EMPTY' with '0,0,INT_MAX,INT_MAX'
to be consistent. Since both are expected, no compat
issues should be expected.

Change-Id: I066981622b1de71e9e849530df0583291b74b804
Reviewed-on: https://gerrit.libreoffice.org/31393
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-30 04:40:09 +00:00
Henry Castro
4366d6aad4 kit: render font failure if and only if fails encode PNG 2016-11-29 20:24:13 -04:00
Henry Castro
ddd91b4251 kit: enable notify undo/redo commands 2016-11-27 23:39:37 -04:00
Henry Castro
7760d6d6d5 wsd: fix URL encoded char parameter 2016-11-27 22:24:45 -04:00