Commit graph

1844 commits

Author SHA1 Message Date
Andras Timar
2e6f401710 loleaflet: bump version after tarball 2016-02-24 14:10:18 +01:00
Andras Timar
b66a5f7987 loleaflet: bump version before tarball 2016-02-24 14:04:44 +01:00
Ozcan Esen
ded88d5e4c loleaflet: allow manually entered font sizes bccu#1354
Change-Id: I137e6f3ad9fb84de6a9179f9d4e00ca4c10e9469
Reviewed-on: https://gerrit.libreoffice.org/22605
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-02-24 12:56:36 +00:00
Tor Lillqvist
c25f819e83 Yoda naming avoid 2016-02-24 09:46:53 +02:00
Tor Lillqvist
72c6cb8980 No LibreOfficeKit used in this file 2016-02-24 09:46:53 +02:00
Tor Lillqvist
07dc25641d Increase stylistic consistency
Sort #includes and using statements. Use 'using' consistently for all
Poco:: types. (I am not 100% convinced that using 'using' like done
here in loolwsd was a good idea after all. But at least let's be
consistent now that we do use it.)
2016-02-24 09:45:52 +02:00
Tor Lillqvist
32dc0a3c87 Don't ever attempt to handle the payload of CLOSE frames 2016-02-23 20:03:52 +02:00
Tor Lillqvist
7320d8ca51 Bin unused 'using' 2016-02-23 20:02:54 +02:00
Tor Lillqvist
79037b687e Log received messages to stderr 2016-02-23 20:02:29 +02:00
Tor Lillqvist
fbee03cae2 Minor clarification
No need to pass the value of a variable, initialised much earlier, to
a system call when one can pass the required constant value as
such. Much clearer.
2016-02-23 17:59:52 +02:00
Faruk Uzun
02f6f0d6fa loleaflet: bccu#1456 fix spreadsheet tabs
Adds a custom navigation for spreadsheet-tabs

Change-Id: I57d9ef1ff9466c18c9edca849519bbe2af5826ab
Reviewed-on: https://gerrit.libreoffice.org/22610
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-02-23 15:56:44 +00:00
Miklos Vajna
7552fcd806 loolwsd: work around -Werror,-Wunused-private-field 2016-02-23 09:35:46 +01:00
Miklos Vajna
ae07c555bb loolwsd: fix -Werror,-Winconsistent-missing-override 2016-02-23 09:32:25 +01:00
Tor Lillqvist
6af8a9bbc1 Avoid 'short' and 'signed' 2016-02-23 10:22:18 +02:00
Tor Lillqvist
674ceb90b9 Add comment 2016-02-23 09:28:48 +02:00
Tor Lillqvist
c9fef1eb7e Add comment about weird use of condition variable 2016-02-23 09:09:22 +02:00
Pranav Kant
98fbc0c4a4 loleaflet: Handle password protected documents
Change-Id: Ife7923869710999de83365dc2c6be33ed42c2f3b
Reviewed-on: https://gerrit.libreoffice.org/21895
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-02-22 20:23:32 +00:00
Tor Lillqvist
00e3d6ca20 Cosmetics: add a space 2016-02-22 17:09:59 +02:00
Tor Lillqvist
819d5c23c0 Use all tokens 2016-02-22 16:31:24 +02:00
Tor Lillqvist
7ced4adc5e Just use "" instead of std::string() 2016-02-22 16:30:42 +02:00
Tor Lillqvist
72ff491fb2 Cosmetics: avoid trailing space in 'disconnect' message 2016-02-22 16:27:12 +02:00
Tor Lillqvist
ef30af121a Log a bit more information 2016-02-22 13:50:14 +02:00
Tor Lillqvist
5a69177f74 We are not interested in the payload of CLOSE frames 2016-02-22 13:50:14 +02:00
Marco Cecchetti
05c4a034c3 loleaflet - user view does not follow cell cursor - fixed corner cases
Change-Id: If6497d46c5d4457493864fdea04c28bb917865c0
Reviewed-on: https://gerrit.libreoffice.org/22519
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 27d4b4b75aeaddac550b5c2bdf04fcde744c87fe)
Reviewed-on: https://gerrit.libreoffice.org/22518
2016-02-22 10:47:40 +00:00
Andras Timar
33f66d4686 loolwsd: add new headers to distribution tarball 2016-02-22 11:16:05 +01:00
Tor Lillqvist
b4387a535a Bin some superfluous using declarations and includes, and actually use others
Sorry, could not resist. Obviously not very important.

In retrospect, maybe it would have been better to have as policy to
*not* use any 'using Poco::Foo'. Now there is an inconsistent mix of
writing out the complete type and using a 'using'. Plus copy-pasted
long lists of 'usings'. And of course, one should never have 'using'
in an include file. Oh well.
2016-02-22 11:37:47 +02:00
Henry Castro
fa4e3bcc86 loolwsd: use kill signal SIGINT 2016-02-21 14:48:05 -04:00
Pranav Kant
6722d430a5 loolwsd: Use helper functions for document password unit test
Change-Id: Ibf921ea1834f85b9a1d81232b1a018c1936fe620
2016-02-21 20:40:05 +05:30
Henry Castro
9b729b7a43 loolwsd: remove child jail path when the lokit process dies 2016-02-21 08:45:17 -04:00
Henry Castro
d835d53ff5 loolwsd: check last child exit code 2016-02-21 08:37:55 -04:00
Henry Castro
ba47e28581 loolwsd: re-work UriToDocumentURIMap
This is not in synchronization with lokit process because
it is normal that lokit dies now.
2016-02-21 08:26:29 -04:00
Henry Castro
730ec99194 loolwsd: ensure lokit process exited successfully after close the document and views 2016-02-21 08:10:30 -04:00
Henry Castro
b646fca95d loolwsd: add lokit iddle maintenance time out 2016-02-21 08:02:31 -04:00
Pranav Kant
f729156806 loolwsd: Fix misplaced break statement
Probably due to merge conflicts, it ended up in a wrong place.

Change-Id: Ia32e18149d99e901ceaa47a4e984f9ca818d0619
2016-02-21 14:08:00 +05:30
Henry Castro
cdc0ffb0cb loolwsd: add cppunit test partscountchanged 2016-02-20 17:14:10 -04:00
Henry Castro
c2413998be loolwsd: add partscountchanged protocol 2016-02-20 16:45:40 -04:00
Pranav Kant
d05f42df08 loolwsd: Rework document password unit test
Our unit test structure changed with
7037f07a38 . Restructure this one
too.

Change-Id: I1a14dd0ab0d631fd447edf620b6c24fe3730c843
2016-02-20 03:52:22 +05:30
Pranav Kant
b71ebb8dfc loolwsd: Ask for password for multiple views also
This is possible by moving all the password handling logic to
Document container class. When a user opens a password protected
document the first time, it saves all possible data such as
password, password type etc. Upon opening the same document
again, password is matched with the cached password saved in the
document container class before allowing the new view access to
this document.

Change-Id: Id1f2b6e06de806564bf865e83fed51b01c9a0fbc
Reviewed-on: https://gerrit.libreoffice.org/22208
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-19 22:00:46 +00:00
Pranav Kant
631ae0f11f loolwsd: Get the first *live* connection
Sometimes there are situations when `connection` map is filled
with dead sessions. We don't want to deal with those dead ones.

Change-Id: I00dda77c39b5adbba69421eace0be0159e02505c
Reviewed-on: https://gerrit.libreoffice.org/22207
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-19 21:57:10 +00:00
Pranav Kant
10db02c208 loolwsd: Move document related callback logic to Document class
There are 5 LOK callbacks currently that are triggered on LOKit,
and not on LOKitDocument. These include status indicators, and
document password callbacks during document load. Lets move all
the callbacks called during document load in the Document container
itself, and keep the callbacks called after document load in the
Child session.

Change-Id: I8e43c2baaa12023b34822954dd494780ee6dd7ca
Reviewed-on: https://gerrit.libreoffice.org/22206
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-19 21:56:50 +00:00
Pranav Kant
a2549e3df7 loolwsd: Disconnect the child if there is no client
Don't let them hanging around, otherwise we would keep sending
messages to a dead peer (ToClient) indefinitely.

Change-Id: I9d4bb6edee351bd31f1faa30deaa4f37c3c7d031
Reviewed-on: https://gerrit.libreoffice.org/22465
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-19 21:56:12 +00:00
Pranav Kant
7ecde23422 loolwsd: Remove superfluous registration of callback
Our DocumentCallback is smart enough which checks all the
running connections, and send the callback notification to all of
them. Registering the callback only during the first loadDocument
call should be enough.

Change-Id: I82bcb9525814dae14def3bfb6c088337d0d0ea3c
Reviewed-on: https://gerrit.libreoffice.org/22202
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-19 21:55:50 +00:00
Pranav Kant
b902d80ec7 loolwsd: Add a unit test for password protected documents
Change-Id: Ia675d2750e11cb466b2e80b8f36f2ef04e0a7a09
Reviewed-on: https://gerrit.libreoffice.org/22466
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-19 21:55:07 +00:00
Pranav Kant
3667bef9a6 loolwsd: Handle password protected documents
Change-Id: Iceb5bb598ef1517bf640994c27bad4ca36bd72c1
Reviewed-on: https://gerrit.libreoffice.org/21894
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-19 21:49:45 +00:00
Ashod Nakashian
13f9b7a2db loolwsd: Storage Abstraction support
An abstract Storage abstraction class is added.
There will be a factory to instantiate concrete
implementation for a given backend.

For WebDAV and similar hosted backends, authentication
and authorization will be done by the implementation
with the help of the Auth abstraction.

Change-Id: I38ec5dad4c2c4ce16df30d65826df96751b10e2d
Reviewed-on: https://gerrit.libreoffice.org/22513
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-19 21:45:25 +00:00
Ashod Nakashian
d8df19d064 loolwsd: Authentication and Authorization support
An abstract class to request an access token, given
an authorization grant. The class should be
specialized for each authentication/authorization
type we support.

Currently it's not enabled in the code as it's
an early stage in developing an general API.

Change-Id: I4f2efd376d575640bd3e17c7257994020b11bbe8
Reviewed-on: https://gerrit.libreoffice.org/22512
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-19 21:44:55 +00:00
Marco Cecchetti
049633a644 loleaflet - user view does not follow the cell cursor
Change-Id: I7e877847de0c2c644948b47daa0bff0e5f7da3a0
Reviewed-on: https://gerrit.libreoffice.org/22489
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-02-19 10:21:12 +00:00
Miklos Vajna
e3cc05ddcd loolwsd: fix indentation 2016-02-19 08:38:02 +01:00
Henry Castro
7037f07a38 loolwsd: re-work cppunit test websoket 2016-02-18 17:12:16 -04:00
Pranav Kant
10fcfdd210 loleaflet: Fix all ESLint errors
And we are now finally in a clean state.

Change-Id: Ifd949d925cc758a007d036e1de9df7dafd911c40
2016-02-19 01:02:55 +05:30