Commit graph

4344 commits

Author SHA1 Message Date
Michael Meeks
4c2e59c1f2 Don't take down WSD with an assert on a badly formed URI. 2016-12-08 14:53:01 +00:00
Michael Meeks
7cf77c26f7 Improved fuzzer - to fuzz input.
Pass --unitlib=test/.libs/unit-fuzz.so to loolwsd to enable.
2016-12-08 14:53:01 +00:00
Pranav Kant
cba45fce42 loleaflet: Improved search
Start searching as you type
Press enter to search forward
Shift + enter to search backwards
Esc to get back to editing

Change-Id: Id366069aea9eb0e96e8d73fa4b57f972b0ce78e5
2016-12-08 19:21:36 +05:30
Tor Lillqvist
e221388c79 Add an 'Idle time' column to the Admin console
Use a new protocol message, 'resetidle' to inform Admin clients
whenever a user has done anything in a document view. This is a
message that Admin clients need to subscribe to.

Also add the current idle time for each document to the 'documents'
message.

To reduce protocol chatter, the idle time is updated at most once per
10 s.

Change-Id: I418e82b05048a3628f21dcd240ccd974b3a01356
Reviewed-on: https://gerrit.libreoffice.org/31653
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2016-12-08 08:39:11 +00:00
Miklos Vajna
cb8564b17f Storage: make sure matrix is initialized before read
Change-Id: I967ab34c0f0430900b4be4424fa4493386c96c33
2016-12-08 09:33:24 +01:00
László Németh
7bf2bec78f loleaflet: better user tooltip layout in Calc and Impress
Now it is similar to Writer user tooltip coloring.

Change-Id: I68ae24145a199957c506491d38ff50472abcf1bb
2016-12-08 00:40:58 +01:00
Pranav Kant
fbb26d0d13 loleaflet: Request higher pixel density tiles on retina display
Change-Id: I418f0db47239c915d8f12c07979306a814370b65
2016-12-07 21:01:14 +05:30
Pranav Kant
8ee3a8d6c2 loleaflet: Popup virtual keyboard only in editmode
Change-Id: I5e1e134e07f65bc52ff3c5f38879ad3b7097254c
2016-12-07 21:01:14 +05:30
Miklos Vajna
722f904019 TraceFile: clean up redundant member initializer
Change-Id: Ia7843f6009e209da351f241839084eb61f0bb299
2016-12-07 14:31:53 +01:00
Pranav Kant
5b06f7b916 loleaflet: Higher resoultion on retina displays
Change-Id: Ib2a031d2d1cb88fe7fede392cfc2332a73252bbb
2016-12-07 17:42:12 +05:30
Pranav Kant
322e00cab7 Ununsed option in TileLayer
Change-Id: Ida522fc8f92dd264e4544948394b9c7c11d993ab
2016-12-07 17:42:12 +05:30
Olivier Hallot
1a929bee71 Updated pt_BR translation
Change-Id: I287c8ed93991f9257245faf52c1204b60b285c14
2016-12-07 13:08:46 +01:00
Pranav Kant
d0558bae70 loleaflet: Don't prune tiles after every tile load
When the connection is slow and tiles are received after a good
amount of lag in between them, one tile load can prune tiles (of
earlier zoom level) for which we have not yet received the tile
response from the server - so there's nothing we have yet to
overlap these tiles completely, leading to grey-ish patches when zooming
in or out.

Pruning these tiles later ensures that we do not remove any tiles
of earlier zoom levels until all the tiles have been loaded.

Change-Id: Ibb03f0c6bf2031741f0b8a4584c1821539587e88
2016-12-07 16:16:40 +05:30
Andras Timar
d4286d9d48 loolwsd: add SpookyV2.h to dist tarball 2016-12-06 14:47:48 +01:00
Tomaž Vajngerl
e3fe9afa9c don't scroll to the cursor position after focus lose/get
Change-Id: Id017c5ea8c162a71a8b4d8ec47a6d9deb7357fca
2016-12-06 15:35:30 +02:00
Miklos Vajna
645049e081 Kit: clean up redundant member initializers
Change-Id: I3a320d9647ab729e71ce93ce90fb63eb3b39ae35
2016-12-06 14:05:49 +01:00
Pranav Kant
4c788c3014 loleaflet: Disable row/col header context menu in readonly/view
Also fix a js error trying to disable context menu before
row/column headers are created.

Change-Id: I6b04ce5c0fefa00567ce5fe58fdad9102d1f1651
2016-12-06 13:44:07 +05:30
Pranav Kant
5e4743a54c loleaflet: Missing semi-colon
Change-Id: I216dd1caa9bfba33b5538e149aeddfb7159ccbbd
2016-12-06 13:44:07 +05:30
Tor Lillqvist
ae2d02a45b Remove superfluous word 2016-12-05 22:31:12 +02:00
Pranav Kant
33a6096175 loleaflet: Disable calc toolbar items in readonly/view mode
Change-Id: I2989de5f201eb7f52f5f47d98f9172c640e38fad
2016-12-05 22:04:06 +05:30
Pranav Kant
68339f4673 wsd: 'perm: readonly' is already sent in ClientSession::setReadOnly
Change-Id: If8cb509f72539296dbfd816587df2674e82e1e60
2016-12-05 21:28:52 +05:30
Pranav Kant
c8b1b58477 wsd: Allow executing search in readonly mode
Change-Id: Ie0c2721e4f932a08dfefae742f9f3c934514fde6
2016-12-05 20:48:31 +05:30
Pranav Kant
8357a2bcee wsd: readonly message filtering in separate function
Change-Id: I1c02be876aa4cf2a878082b593de3c83e45e15b3
2016-12-05 20:48:31 +05:30
Tor Lillqvist
49c505f327 Display leading zero of minutes or seconds properly 2016-12-05 17:17:24 +02:00
Andras Timar
0e786d14a0 disable 'Insert Special Character' for Impress
Change-Id: I6c25d2eb68b0f757771a48bd3c732847d28caff7
Reviewed-on: https://gerrit.libreoffice.org/31628
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-12-05 12:17:23 +00:00
Miklos Vajna
6a08b44433 Png: avoid multiplication at int precision, then converting to long
Change-Id: Id05d1db07ae7e8978b2a6b989b6366ae66d0e9de
2016-12-05 11:56:46 +01:00
Pranav Kant
d4d4a11750 loleaflet: Disable zoom controls in spreadsheets, don't remove
Due to a bug in w2ui library, w2overlay doesn't popup when it is
near the edge of the screen (reproduceable only when no. of users
are greater than 3). Lets disable zoom controls in case of
spreadsheets so that userlist is not near the edge of the screen,
and hence pops up.

Change-Id: I6f2647d124484235afe6c92da18be38ed8e2b9ce
Reviewed-on: https://gerrit.libreoffice.org/31621
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-12-05 09:45:35 +00:00
Tor Lillqvist
dc18ccfd56 The part number we get here seems to be always 1, not 0
No deeper understanding of what is going on... This is when running
against cp-5.1
2016-12-05 11:02:26 +02:00
Ashod Nakashian
c7e5874eff loolwsd: invalidate all parts when document size changes
This is a stop-gap until Core sends these invalidations
with more precision. Otherwise, we may be wasting valuable
cache data here.

This fixes showing incorrect tiles when slides are
inserted/removed from a doc.

Change-Id: I7a02c6fb96ff27223afe71d891db639ab5b2cfae
Reviewed-on: https://gerrit.libreoffice.org/31616
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-05 04:50:35 +00:00
Ashod Nakashian
1a46557922 loolwsd: local names should begin with small case
Change-Id: I9b9da72f7d9bd94155cbe443f66aedc163a92aa8
Reviewed-on: https://gerrit.libreoffice.org/31615
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-05 04:50:09 +00:00
Andras Timar
a5c1bdfc6c fix mangled calc toolbar
Change-Id: I59826d82d1096ad5b9383611421cd4fd81416a85
Reviewed-on: https://gerrit.libreoffice.org/31603
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-12-04 21:44:12 +00:00
Michael Meeks
a2ff6528bb UnitPrefork: bump timeouts. 2016-12-03 23:02:29 +00:00
Michael Meeks
67fcc2f99c Turn termination off for Unit tests. 2016-12-03 23:02:29 +00:00
Marco Cecchetti
729197c676 loleaflet - calc: row/col header unproperly highlighted
Change-Id: I7299dedf8d42e7f185c8977270c4fa8c0d14b820
Reviewed-on: https://gerrit.libreoffice.org/31581
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-12-03 13:32:04 +00:00
Tor Lillqvist
7451a48511 Handle return value -1 from our LOOLWebSocket::receiveFrame()
It doesn't mean anything is wrong or that the connection would be in
some invalid or closed state, but just that we didn't actually receive
any "interesting" frame that could be handled in the caller.
2016-12-02 17:01:38 +02:00
Tor Lillqvist
7263491ea6 Document return value of our LOOLWebSocket::receiveFrame()
Especially the -1 return value, which is different from what
the Poco WebSocket::receiveFrame() can return.
2016-12-02 16:52:48 +02:00
Tor Lillqvist
2a307c3ef3 Show also the contents of PING and PONG frames in getAbbreviatedFrameDump() 2016-12-02 16:52:48 +02:00
Tor Lillqvist
f144dd9f05 Log also the frame as received 2016-12-02 16:52:48 +02:00
Tor Lillqvist
ffbc9baccc Use getAbbreviatedFrameDump() instead of getAbbreviatedMessage() when logging
The more information the better, when tracking problems.
2016-12-02 16:52:48 +02:00
Pranav Kant
dde653f920 tdf#103825: Prompt the user when session is about to expire
Set a timer in loleaflet 15 minutes before access token expiry
date (access_token_ttl value) to prompt the user to save and
refresh the session.

Change-Id: I98c3e47c9b7031e29e002f653d488747b9c17df8
Reviewed-on: https://gerrit.libreoffice.org/31381
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2016-12-02 12:38:51 +00:00
Marco Cecchetti
1ee96c9d97 loleaflet - calc: bad handling of text cursor on lost/got focus
This patch fixes the following bug:

Create blank sheet:
enter "." ie. just a period into A1
enter a "." into A2
now switch virtual desktop away and back again.
hit enter in A2
now switch virtual desktop away and back again.

You should have a blinking edit cursor in A2 - but the focus in A3.

Change-Id: Icda0123f35ecda04559fec859b6bbe6ff3ac33e8
Reviewed-on: https://gerrit.libreoffice.org/31541
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-02 12:20:00 +00:00
Marco Cecchetti
79d18be88c loleaflet - calc: fixed one pixel horizontal auto-scrolling issue
This patch fixes two problems for spreadsheets:

- one pixel alignment offset btw grid and column header

- a one pixel horizontal auto-scrolling issue

Change-Id: Ifd6a3b47863d345656d0dcf3fba2d253c43ba9b1
Reviewed-on: https://gerrit.libreoffice.org/31542
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-02 12:08:06 +00:00
Marco Cecchetti
e7822bb452 loleaflet - calc: horizontal scrollbar not updated on doc width change
Change-Id: I268ab65d0bf7a6794028e23e51012c11534d6f2f
Reviewed-on: https://gerrit.libreoffice.org/31543
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-02 12:01:20 +00:00
Ashod Nakashian
a652e6b583 loolwsd: guarantee DocBrokersMutex locked when alerting
We now guarantee that forkChildren will be invoked
under DocBrokersMutex lock.

This eliminates the case when alertAllUsersInternal
is invoked when this mutex isn't locked.

Change-Id: Ibb259bbb4f380300a90ad2fc7affe6013dd71fef
2016-12-02 11:20:58 +01:00
László Németh
1f0cbf75ce loleaflet: patch l10n-for-node for older Chrome versions
Online didn't work in Chrome 39 (2014-11). Fixed in
the l10n-for-node shrinkwrap archive (see the patch file in it).
2016-12-02 09:29:34 +01:00
Miklos Vajna
dd1dbaa737 common: clean up redundant initializers for members
Change-Id: I7ee177acdc2521bc5b2d9fd0b0d3fa4947d6f2e2
2016-12-02 08:16:40 +01:00
Henry Castro
09923cc10b loleaflet: remove invalid fonts
Change-Id: Ie0383d01f6040d00c630c0aab6b9a66666d079d3
2016-12-01 14:32:42 -04:00
Miklos Vajna
721003512e IoUtil: avoid multiplying at int precision, then comparing to long
Here:

if (payload.capacity() > READ_BUFFER_SIZE * 4)

Change-Id: I12e090d03b471b7394a4898d5e1a74992182051e
2016-12-01 18:15:58 +01:00
Henry Castro
539e239242 loleaflet: limit Unicode character ranges
There are very big ranges, that's probably not common use for final users
2016-12-01 10:13:12 -04:00
Jan Holesovsky
e277935b1e Revert "loolwsd: alertAllUsersInternal expects lock to be taken"
Unfortunately this brings back the deadlock that
51c88c5fb7 fixed :-(

This reverts commit da3b1b208a.

Change-Id: If48c0b3ddebf3fb366786d90cb35c3c22963b1a1
2016-12-01 12:35:14 +01:00