Commit graph

4434 commits

Author SHA1 Message Date
Andras Timar
c8fa6cb5b0 loleaflet: disable zoom for spreadsheet even on touchscreens 2016-11-24 15:12:14 +01:00
Pranav Kant
b8a21852b7 loleaflet: Display menu items always in a straight line
... even if the screen size is smaller than the menu size.

Change-Id: I93c579b7503ec98fadd62718ca8062ed7a564042
2016-11-24 16:51:24 +05:30
Pranav Kant
33393a4254 loolwsd: Handle zero jitter
While some value of jitter is default in debug builds, one should
easily be able to disable this latency stuff using env. variables
LOOL_WS_DELAY=0 LOOL_WS_JITTER=0

Change-Id: I345df8f48adc69b5f237f18c981172441d21c757
2016-11-24 15:09:23 +05:30
Ashod Nakashian
430e0cf021 loolwsd: alert users of low disk space after loading
Change-Id: I01426aafb353ac8e291969936afc4d276898f0f0
Reviewed-on: https://gerrit.libreoffice.org/31121
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-23 14:44:52 +00:00
Ashod Nakashian
c26e180c08 loolwsd: correct locking of DocBrokers
Change-Id: I52f10e06cf91db451eb34d6540d17db2e0d14385
Reviewed-on: https://gerrit.libreoffice.org/31120
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-23 14:44:38 +00:00
Ashod Nakashian
55c1e7568f loolwsd: kill redundant exception logging
Change-Id: I86ea48c4deaa42d164d2b0963931081d78d5f3ff
Reviewed-on: https://gerrit.libreoffice.org/31118
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-23 14:43:39 +00:00
Pranav Kant
a149a0c2e1 tdf#103679: Don't always change document permission on error
Have a new event 'warn' which doesn't change the document
permission but just show the user dialog with some message.

Change-Id: I455168e4f7315acdcccfb31fc8c70b86bbc6caad
2016-11-23 18:01:21 +05:30
Pranav Kant
f8e0b8c11e tdf#103679: Handle storage diskfull & other PutFile errors
The new behavior is to warn the user when we try to save to
storage and set all the sessions of
the opened document to readonly, if storage server has no disk
space left. In case of WOPI, this is intimated by HTTP response code 413 -
request entity too large.

If save operation to storage failed due to reasons other than
413, just warn the user and let it continue editing the document.
We can add more reasons of failure and act accordingly in future.

Change-Id: I4b046fc38bbc0d752c89d90acb5991a958b76670
2016-11-23 18:01:21 +05:30
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