Commit graph

1785 commits

Author SHA1 Message Date
Andras Timar
6ac228401d loleaflet: bump version before tarball 2016-02-11 21:52:35 +01:00
Jan Holesovsky
f73c0980e2 loleaflet: Allow wss: protocol as a base for the image upload URL too. 2016-02-11 20:26:06 +01:00
Jan Holesovsky
9f96b1716f loleaflet: Init the handlers necessary for initializationcomplete first. 2016-02-11 11:20:45 +01:00
Pranav Kant
6a7a014d14 loolwsd: Remove cached 'status' command output on 'setclientpart'
Otherwise we have a problem when cached information is different than
the actual one maintained by LOKitDocument, keeping the whole
server setup in an inconsistent state.

For example, when client reloads the browser session quickly
after setting the current part (to say 3) of an opened part document.
If the reload occurs soon enough before the 'setclientpart'
message originated from the client is acknowledged by the server,
then the next reload would get the cached 'status' entry asking
the client to set 'currentpart' to something else leading to the
generation of another 'setclientpart' message. This thing would
go on, and we would run into a loop, as I have for the last few
hours.

Change-Id: Ia6260dfb772f2e3f023572aa060fd7da92b196c8
Reviewed-on: https://gerrit.libreoffice.org/22272
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-11 05:04:22 +00:00
Pranav Kant
b482dfba56 loleaflet: Fix wrong initializationcomplete signal
This should ideally be fired when we receive 'commandvalues'
command, not 'statechanged'.

Change-Id: I34748979a7606cd50e6965850757eda891a9aa15
2016-02-10 15:01:00 +01:00
Jan Holesovsky
f41b9c7703 loleaflet: Send 'saveas' with the 'TakeOwnership' option.
So that the .uno:ModifiedStatus works.
2016-02-10 15:00:50 +01:00
Jan Holesovsky
0f537ca780 loleaflet: Move _permission to L.Map. 2016-02-09 18:12:35 +01:00
Jan Holesovsky
65b492404c loleaflet: initializationComplete renamed to initializationcomplete.
This is for consistency with other events there.

Add documentation too.
2016-02-09 15:38:01 +01:00
Jan Holesovsky
5c01f032a0 loleaflet: Move the initializationComplete code around a bit. 2016-02-09 15:31:01 +01:00
Pranav Kant
6f69af91e6 loleaflet: Fire event on initialization complete
Change-Id: Iaba99d88b1ce770374f9f39a443b169c8c019d72
Reviewed-on: https://gerrit.libreoffice.org/22234
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-02-09 14:01:47 +00:00
Pranav Kant
290953979d loleaflet: Disable style list box for presentations and drawing
Lets enable them only after we add support for templates/layouts
in the UI.

Change-Id: I82bc855b4313e9dc9b925473b64e498002c42700
Reviewed-on: https://gerrit.libreoffice.org/22225
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-02-09 10:14:48 +00:00
Jan Holesovsky
93b65fc92f loolwsd: For the legacy loleaflet, default to the left button pressed. 2016-02-09 09:22:11 +01:00
Jan Holesovsky
70966240bf loleaflet: Trigger the clientvisiblearea message even when resizing. 2016-02-08 21:03:16 +01:00
Jan Holesovsky
03bbe395ec loleaflet: Let 'saveas' produce the 'document cannot be saved' id too (5). 2016-02-08 20:27:39 +01:00
Andras Timar
40251a92eb New loleaflet toolbar 2016-02-08 18:32:01 +01:00
Jan Holesovsky
7c96094c42 loolwsd: Make the mouse command in loolwsd compatible with older loleaflet. 2016-02-08 16:42:49 +01:00
Pranav Kant
5a31f99178 loolwsd: Thread name should not be static
... as we can have multiple connections for same document.

Change-Id: Ic213299d6a4ba703f1e27cf252f3a10209f08148
Reviewed-on: https://gerrit.libreoffice.org/22204
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2016-02-08 14:38:02 +00:00
Jan Holesovsky
551c868652 loleaflet: statusindicator messages must be handled already in the Socket.
Otherwise the messages will be lost - we don't have a docLayer instance yet.
2016-02-08 14:59:34 +01:00
Henry Castro
4ed8b37e9c loleaflet: rework Control.Presentation.js toolbar items 2016-02-07 18:42:12 -04:00
Henry Castro
587dde0908 loleaflet: fix disable state toolbar item 2016-02-07 18:38:17 -04:00
Marco Cecchetti
686a531287 loleaflet - L.Cursor.imagePath can be a relative path
Change-Id: Ib4e2c88f580ebc6322427d6f950231b603c58186
2016-02-06 18:23:34 +01:00
Marco Cecchetti
2a95b7dea3 loleaflet: now the 'search' event has a 'highlightAll' property
Change-Id: I2fffe54d1474d4dea3fd2d69f5cadc8ff7a0f459
2016-02-05 17:49:33 +01:00
Jan Holesovsky
8145ac71af loleaflet: Document .uno:CharBackgroundExt. 2016-02-05 12:33:53 +01:00
Jan Holesovsky
81bdf7cd7a loleaflet: When the 'premission' is 'edit', disable dragging too. 2016-02-04 20:46:44 +01:00
Jan Holesovsky
41378e9945 loleaflet: When the 'premission' is 'edit', request a session immediately. 2016-02-04 20:41:24 +01:00
Henry Castro
5848cff634 loolwsd: wait for loolbroker process to change state 2016-02-03 19:51:27 -04:00
Henry Castro
8469343da1 loolwsd: avoid fork a new child when its exit code is not success 2016-02-03 18:34:27 -04:00
Henry Castro
70ff592624 loolwsd: use strsignal 2016-02-03 18:08:16 -04:00
Henry Castro
661ae62259 loolwsd: exit when error no child process 2016-02-03 17:43:04 -04:00
Henry Castro
b7ee46f729 loolwsd: child exit codes are required before fork new lokit process 2016-02-03 17:35:35 -04:00
Henry Castro
1fc3d06e37 loolwsd: fix iterator erase 2016-02-03 17:15:20 -04:00
Henry Castro
3cda799328 loolwsd: avoid the loolbroker block forever before lokit launch 2016-02-03 17:07:36 -04:00
Henry Castro
58fa747bb4 loolwsd: avoid a broken lokit process block the loolbroker forever 2016-02-03 16:59:09 -04:00
Jan Holesovsky
32ecdb8ab6 loolwsd, loleaflet: Handle the ERROR callback.
This introduces a new error id 5 - "document save failed".
2016-02-03 11:24:21 +01:00
Henry Castro
647d7c7783 loolwsd: first, establish pipe connection 2016-02-02 20:09:26 -04:00
Miklos Vajna
1e3432b7e9 loleaflet: initial support for the clientvisiblearea command
This is enough, so that e.g. pagedown jumps down about a visual page
correctly.

Areas where this could be improved further in the future:

- Currently the visual area is only updated on zoom change. Perhaps it
  would be better to update it when the visual area really changes, i.e.
  on scroll or resize. But the cost of this only makes sense if
  something on the server side needs the correct position or width as
  well, not only the height (as pgdown does).
- Currently the visual area is sent only before a key command (if it's
  dirty), is there a use-case when sending it also before e.g. a mouse
  click is also useful?
2016-02-02 14:11:23 +01:00
Marco Cecchetti
876a04cb31 loleaflet - now only zoomlevelchange trigger _updateDisabled
Earlier both 'zoomend' and 'zoomlevelchange' triggered
Control.Zoom._updateDisabled.

Removing 'zoomend' let us fire 'zoomlevelchange' when the zoom level
is set (map.setZoom).

Change-Id: Ifde4977f39ca924bbcb7621d16f6169088d2c608
2016-02-02 14:01:04 +01:00
Marco Cecchetti
6da856dd29 loleaflet: map option: cursorURL - local server path to cursors
The meaning of the cursorURL option is changed: now it does not
represent anymore the full URL including protocol and server but only
the path local to the server.

Map option curosr.HotSpot has been removed since not requested.

cursorURL option has been documented in reference.html.

Change-Id: I9ccc4756ade469018837af08b1d32a3fabddc958
2016-02-02 12:07:22 +01:00
Miklos Vajna
aa450a0c38 loolwsd: add clientvisiblearea client -> server command 2016-02-02 11:49:22 +01:00
Miklos Vajna
816663f1e8 loolwsd: update bundled headers 2016-02-02 11:24:54 +01:00
Henry Castro
1b6425913d loolwsd: add LO core exit codes 2016-02-01 22:23:58 -04:00
Henry Castro
5fd2be332a loolwsd: use EXIT_SOFTWARE to indicate internal error 2016-02-01 21:53:16 -04:00
Ashod Nakashian
f3b319ee7f loolwsd: each HTTPServer has its params and skip failed child query
Change-Id: I41c730a935fd0d2e1e3181cced529d414c3aebb0
Reviewed-on: https://gerrit.libreoffice.org/22014
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-02 01:51:04 +00:00
Henry Castro
b477f41636 loolwsd: add fatal signals handler 2016-02-01 21:26:19 -04:00
Marco Cecchetti
e88d2f5ae7 loleaflet: custom cursor properties can be passed as map options
Change-Id: I0213278becc63bbd66e202c870cb55268c1bcd2b
2016-02-01 22:22:05 +01:00
Marco Cecchetti
e6d10469ee loleaflet - in highlighting mode a custom cursor is used
When the user clicks on the background text color control while
editing a text document, loleaflet enter in highlighting mode (exactly
as Wrieter does).
In order to notify that loleaflet has switched to highlighting mode
the cursor changes is shape to a small bottle in the act of dropping
ink.

Change-Id: Ic9a5a636df9fd6071e38edc7e0fc2e11e037a517
2016-02-01 18:45:16 +01:00
Pranav Kant
7ffd4b45db bccu#1468: handle 'nextmessage:' in prisoner -> master text frames
There are cases when prisoner would send huge text data but
without preceeding 'nextmessage' frames making the master throw
WebSocketException.

Also move the 'nextmessage' frame interpretation logic up in the
'else if' ladder to be able to detect and handle such huge text frames.

Change-Id: Ibe44b69f4ab75c1b8096648c6006316c88366e7c
Reviewed-on: https://gerrit.libreoffice.org/21835
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-01 05:09:35 +00:00
Ashod Nakashian
6f5afd92ba loolwsd: fixed server thread-pool
TCPServer doesn't use the custom ThreadPool passed to it
to dispatch connections. This leads to starvation
when too many connections are initiated together.

Because we open an internal socket back to master, we
need to be able to dispatch two connections (two threads)
for each client connection.

Therefore, the default ThreadPool needs to have sufficient
capacity to grow. A new constant is added to define this
capacity and it is used to configure both the TCPServer
(which configures the default ThreadPool) and the customer
ThreadPool (used to host the actuall connection handler).

Change-Id: I49adc039aa99e9350b0defc4a5e141b77524992e
Reviewed-on: https://gerrit.libreoffice.org/21976
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-01 05:06:35 +00:00
Ashod Nakashian
57240993b6 loolwsd: removed url cache in favor of unified child cache
Change-Id: I44d07ea3e03a78a6038322c8110f66dd9c161957
Reviewed-on: https://gerrit.libreoffice.org/21975
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-01 05:04:38 +00:00
Ashod Nakashian
b596c80e34 loolwsd: simplified child searching
Change-Id: I0d817876f5b83acff69e51c2c64cd6acfa8dc27d
Reviewed-on: https://gerrit.libreoffice.org/21974
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-01 05:02:35 +00:00