Commit graph

4226 commits

Author SHA1 Message Date
Miklos Vajna
b7065d603d DocumentBroker: clean up redundant member init
Change-Id: I5b8f7afe5329c2d1f8abb404c086dcd08c6f1a1f
2016-11-23 09:06:56 +01:00
Andras Timar
8d577c8d96 loolwsd: add LibreOfficeKit.hxx to tarball 2016-11-23 08:29:26 +01:00
Pranav Kant
96952ceafd loolwsd: unused param
Change-Id: If74ccb603337971076e93c03ac28a9d8b5115f61
2016-11-23 11:31:39 +05:30
Pranav Kant
81e4b052be loolwsd: -Werror=shadow
Change-Id: If346299e76e50eabde65a4c3aab7b529a8c09148
2016-11-23 11:15:05 +05:30
Ashod Nakashian
51c88c5fb7 loolwsd: avoid deadlocking when alerting all users
Alerting all users is done from different contexts.
One such is when loading a new document.

Since both alerting all users and loading documents
need to hold the same lock, this would deadlock.

The solution here is to differentiate between
external alerts and internal ones (to WSD).

The internal one expects to be invoked while holding
the lock, while the external one always takes the lock.

Care should be taking when alerting from within WSD to
avoid this deadlock.

Change-Id: Idf0e952db1216a3d161f22c7da51af16701f685b
Reviewed-on: https://gerrit.libreoffice.org/31102
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-23 04:45:30 +00:00
Ashod Nakashian
5d4aa36240 loolwsd: minor cleanups
Change-Id: I9f75b991e6f4bedcffe1dd86f2a5cff2a606bf89
Reviewed-on: https://gerrit.libreoffice.org/31101
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-23 04:40:24 +00:00
Andras Timar
a01ec99e90 loleaflet: updated pot file 2016-11-22 23:14:49 +01:00
Andras Timar
8b8b02e252 loleaflet: extract strings from Insert Character dialog 2016-11-22 23:12:14 +01:00
Tor Lillqvist
8743e4bc85 Add comment that testConnectNoLoad does not fail all the time 2016-11-22 20:16:16 +02:00
Tor Lillqvist
c1fc1b33ab Change a few spurious messages to go to stderr as they should
Stdout is supposed to only get the "HTTPWSTest::testFontList. : OK"
style output.
2016-11-22 20:07:11 +02:00
Pranav Kant
6debf76cd3 loolwsd: Use document owner always, if available, to autosave
Change-Id: I826cbac642579261ca76d7cc5602c5d39a1587cb
2016-11-22 23:11:56 +05:30
Pranav Kant
c06c0f83c2 loolwsd: Set document owners unconditionally
Change-Id: I99b1ff4c30700a93a32f1a944704aee2b4b08ca8
2016-11-22 23:11:56 +05:30
Tor Lillqvist
8c2520a4ea testTilesRenderedJustOnceMultiClient seems to always fail nowadays 2016-11-22 19:34:41 +02:00
Henry Castro
1c1ecf20f6 loleaflet: add double click to insert the symbol 2016-11-21 22:43:21 -04:00
Henry Castro
5e143c813d loleaflet: process command values .uno:FontSubset 2016-11-21 22:13:46 -04:00
Pranav Kant
3c2337cfc5 loolwsd: Random latency simulator - delay, jitter in websockets
Only enabled in debug build. Default values for base delay is
10ms and jitter 5ms.

Override using LOOL_WS_DELAY, LOOL_WS_JITTER env. variables

Change-Id: I50502613075d6f73365623b93eb17748fe96fcc3
2016-11-21 16:18:50 +05:30
Miklos Vajna
c989ead6b8 DocumentBroker: fix uninitialized getInfoCallDuration
It was written in one conditional branch and was read in an other
conditional branch. So make sure no uninitialized data is read.

Change-Id: I230c6a4d3b048ee9d7f96881baf00eb041204ff0
2016-11-21 10:04:17 +01:00
Tor Lillqvist
8fe58df759 An updated preview of a slide should be broadcast to all document clients
Amazingly, this (my third attempt) seems to work.

Add a boolean 'forAllClients' parameter to the loleafget getPreview()
function, and pass it as true in the location where a new preview of
an edited slide is requested.

Add a parameter 'broadcast' to the 'tile' (request) message. Set to
'yes' in the above case. When subscribing to a such tile rendering,
subscribe all sessions of the document.

While at it, drop the default values for the parameters of the
TileDesc constructor. I dislike default values...

Change-Id: Idb438f11c953d791fafe4c890e0497d8dfbaa733
Reviewed-on: https://gerrit.libreoffice.org/29591
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-11-21 07:07:18 +00:00
Pranav Kant
4f5813b88e Refactor this unit test, indentation + fix some silliness
Change-Id: I382a187fa863ecb8d8ed81ed5b21acb08b14b9b1
2016-11-20 22:47:51 +05:30
Pranav Kant
93a5c95285 loolwsd: Incorrect URL in logs
Change-Id: I45a385d9f2866e6220869674ab131cbe7edc3c4e
2016-11-20 22:47:51 +05:30
Ashod Nakashian
7f29a11bf3 loleaflet: don't show disconnection notice when inactive
Users aren't bothered with connection errors when inactive.
Instead, when they try to re-activate, the connection is
re-established, and only if that is not possible does
the user see the disconnection notice. Otherwise,
the connection is re-established semi-transparently
(the is a small "connecting" status shown at the bottom).

Change-Id: If4735cc1593c6e29c65d3c9686a8f2861365c583
Reviewed-on: https://gerrit.libreoffice.org/31026
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 15:52:28 +00:00
Pranav Kant
57790dd2b8 loleaflet: Let readonly/view modes change slides
Change-Id: Ia4eef3f20cd0cc33c76de1070e09c8d4c8a6c4c8
2016-11-20 14:57:15 +05:30
Pranav Kant
8f3b5bff4c loleaflet: Let readonly/view views change spreadsheet tabs too
Change-Id: If443a71a4e009657ec7d29582a96f4c23962cfe3
2016-11-20 14:53:22 +05:30
Pranav Kant
4e945eefdf loleaflet: Do not grey out for disabled context menus
Change-Id: Id3bf5db6054e5df9511c491452ef164faa3289f9
2016-11-20 14:51:49 +05:30
Pranav Kant
7312aaced7 loleaflet: More sane names
Change-Id: Idc47e84cd1242e61c98b9caa5eed28dd3d1912e4
2016-11-20 14:50:23 +05:30
Pranav Kant
61af82792f loleaflet: Rename to spreadsheet-tabs-container
Change-Id: I08d57e55e4963beefb2aa3d26b05da75a5fd0ba6
2016-11-20 14:41:32 +05:30
Pranav Kant
8a2c2ad91d loleaflet: Don't unnecessarily update map bounds
This leads to emission of 'docsize' event somewhere down the line
which leads inconsistencies while navigating the document.

Change-Id: Iffabac66153e7b32c9b2af041282ef82b813bef3
2016-11-20 14:15:12 +05:30
Ashod Nakashian
fe10c1d272 loleaflet: close open dialogs before showing close frame
Change-Id: I833ec51f47106dc42b7e9d2412f03256721b270d
Reviewed-on: https://gerrit.libreoffice.org/31005
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:27:09 +00:00
Ashod Nakashian
efe6b96738 loolwsd: privatize ShutdownFlag and add public getter
Change-Id: I129fa8dda907758730bb494d1da950f48c61abbc
Reviewed-on: https://gerrit.libreoffice.org/31004
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:26:40 +00:00
Ashod Nakashian
6b7219e25a loleaflet: notify the user when server intentionally closes connection
Change-Id: I82d855c1a50dca42e40d1123e42b0e02227f73d1
Reviewed-on: https://gerrit.libreoffice.org/31003
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:26:00 +00:00
Ashod Nakashian
83b8234b44 loolwsd: cleanup includes
Change-Id: Ic81ffeacb1ad5bc72b04be68738f2d7c5b7b1b03
Reviewed-on: https://gerrit.libreoffice.org/31002
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:25:17 +00:00
Ashod Nakashian
3b90149229 loolwsd: notify clients of shutdown
Change-Id: I8dbe5752e8e36e2a1f6dee05f5f355f5a7b4d1b6
Reviewed-on: https://gerrit.libreoffice.org/31001
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:24:58 +00:00
Ashod Nakashian
98020193d4 loolwsd: add missing alertAllUsers definition in LOOLKit
Change-Id: I75a08c3c856cc4ff783ea3a805283c7d81c02249
Reviewed-on: https://gerrit.libreoffice.org/31000
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:23:43 +00:00
Ashod Nakashian
827c0865e7 loolwsd: handle exceptions from socket calls
Change-Id: I99e1df249e02f18d5b0c1b1c6a701e522baad87b
Reviewed-on: https://gerrit.libreoffice.org/30999
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:23:00 +00:00
Ashod Nakashian
0c44eeb39a loolwsd: support loading same document from aliased hosts
Change-Id: Ib46521dc05cb01fc4ca93d51671a75eab055e3cd
Reviewed-on: https://gerrit.libreoffice.org/30998
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:22:12 +00:00
Ashod Nakashian
d3e64b1aa4 loolwsd: improved alertAllUsers
More flexible reason message and other cleanups
to help use altertAllUsers in other situations.

Change-Id: I7f0c7b5ac21ffa55923f531d7b28f7537ef42dac
Reviewed-on: https://gerrit.libreoffice.org/30997
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:21:13 +00:00
Ashod Nakashian
c0e3460c68 loolwsd: MessageQueue cleanup
Change-Id: Iabc4d520dc754fc740f0b94a72237b63a216dd7a
Reviewed-on: https://gerrit.libreoffice.org/30996
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:20:16 +00:00
Ashod Nakashian
cd238ca7b7 loolwsd: MessageQueue logs updated
Change-Id: I4adbedce7ad0b284d899333d1ad2d04e0d45c83f
Reviewed-on: https://gerrit.libreoffice.org/30995
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-20 00:19:23 +00:00
Henry Castro
8876be85bc loleaflet: modify special character dialog 2016-11-19 17:17:25 -04:00
Henry Castro
b592fa923c loleaflet: add more constants for Unicode blocks 2016-11-19 17:17:25 -04:00
Henry Castro
647fe679e9 loleaflet: fix 0-based index 2016-11-19 17:17:24 -04:00
Miklos Vajna
68c18783b7 Fix -Werror,-Winconsistent-missing-override
Change-Id: I50c3a06c55a5d76971d3cac9d20db708f10e4c26
2016-11-18 15:20:02 +01:00
Miklos Vajna
eb199ba3c8 MessageQueue: clean up redundant member init
Change-Id: I1ebdc460740fa5b3fb36f1c59b55112b71737627
2016-11-18 15:17:24 +01:00
Pranav Kant
373e68d42c Set reconnection flag when reconnecting
'status' message can well be sent after document has already been
loaded. Eg: when the doc size is changed. We don't want this code
to execute in all such cases.

Change-Id: Ia69ab70edddda1a4e27618101eaff35bd0e5eb65
2016-11-18 17:20:19 +05:30
Pranav Kant
bad071760d Supercede a hack with a better solution + flush tiles on reconn.
This also introduced a regression where upon reconnection of the
document, tiles were not updated. This was because calling
setView leads to calling 'canceltiles' down the line which would
cancel the the 'tilecombine' request for fetching all tiles
leading to stale tiles in the UI

Change-Id: Ib0f583c92802195384ea10f328c0ba2eafc82ffd
2016-11-18 17:18:14 +05:30
Andras Timar
36950c2c50 loolwsd: Math documents are not supported yet (related: tdf#97006) 2016-11-18 11:49:38 +01:00
Pranav Kant
c511cf1d76 loolwsd: New test to check if request uris are valid
The current test tests if the embedded doc url recieved in websocket
URI endpoint is encoded or not.

Change-Id: I1e5d6639d6791be4e1e56701a9e444e33fc89aa2
2016-11-17 23:04:52 +05:30
Pranav Kant
1618f6be4d loolwsd: Decode the encoded access_token before CheckFileInfo
Change-Id: Ia4511803ca5570ad5675e00c99108fd32360734d
2016-11-17 17:22:09 +05:30
Pranav Kant
8a1ac91fa6 loolwsd: Prevent double decoding
Change-Id: I5927e0113505ffcc167e16700db7c2f6408ed3b7
2016-11-17 17:22:09 +05:30
Miklos Vajna
6d1c82d7ce Admin: clean up redundant '_modelMutex' initializer
Change-Id: I85a1b640b58e0956b2ac9fbee43e7c5e57c9e08c
2016-11-17 11:52:52 +01:00