Commit graph

1700 commits

Author SHA1 Message Date
Pranav Kant
93fdcb34c4 loolwsd: Do not unload without a successfull load
A load document operation may fail, for example, when user enters
a wrong password or no password. In such cases ToPrisoner sends a
disconnect to child. Child do not need to take any steps in this
case, such as, decrementing the view counter, because nothing was
loaded.

Change-Id: Ib71f871aa1728c6355563362987800dece1679d3
Reviewed-on: https://gerrit.libreoffice.org/22203
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-15 00:31:29 +00:00
Henry Castro
cdcb32f013 loolwsd: loolbroker drop capabilities 2016-02-14 14:54:04 -04:00
Henry Castro
f5c163e6da loolwsd: avoid deadlock with mutex and join 2016-02-14 14:39:02 -04:00
Henry Castro
42abb3b1a7 loolwsd: websocket shutdown receive 2016-02-14 14:32:55 -04:00
Henry Castro
72db8ed63a loolwsd: replace the random jail id for lokit process id 2016-02-13 19:01:03 -04:00
Henry Castro
75b552bf71 loolwsd: create named pipes workspace 2016-02-13 13:22:15 -04:00
Henry Castro
9e3d5c0337 loolwsd: ensure chroot jail every lokit process 2016-02-13 10:15:28 -04:00
Tor Lillqvist
8a571401c0 Use less misleadit variable name 2016-02-12 14:09:29 +02:00
Tor Lillqvist
9a15bc6c2c Zero is a valid return value from open()
Sure, it is highly likely that fd 0 is already in other use, but let's
be correct.
2016-02-12 14:01:10 +02:00
Tor Lillqvist
d19433c3b8 Bin unused macros 2016-02-12 13:31:32 +02:00
Tor Lillqvist
ce3dc628be Fix misleading comment 2016-02-12 13:26:19 +02:00
Tor Lillqvist
39bfd5a210 Look for self-copmpiled Poco also in /opt/poco
That's where I have it...

Also, make sure such self-built Poco libraries themselves get copied
into the systemplate.
2016-02-12 13:23:41 +02:00
Andras Timar
97dcfdc7e8 loolwsd: bump version after tarball 2016-02-11 22:33:44 +01:00
Andras Timar
76b72c8008 loolwsd: bump version before tarball 2016-02-11 21:55:36 +01:00
Andras Timar
77fbb5d32d loleaflet: bump version after tarball 2016-02-11 21:55:08 +01:00
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