Commit graph

4322 commits

Author SHA1 Message Date
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
Jan Holesovsky
2b13cfa1a7 Don't send setpart: to text documents, it will always jump to the 1st page.
Change-Id: I809f2ba493329174a33f99d63eec2c60b38acb05
2016-12-01 12:28:03 +01:00
Pranav Kant
15781a4655 loleaflet: Don't handle pageup/dn separately on 'keyup'
... as we handle it already during 'keydown' by sending keyboard
event to core which changes the slide for us.

Change-Id: Id61584ffa0ec5ff3aca098e3dcade664c306c6c3
Reviewed-on: https://gerrit.libreoffice.org/31475
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-01 11:17:37 +00:00
Pranav Kant
2c7f7e8b69 tdf#98484: Fix double-space in chrome when IME enabled
We regressed on chrome with
47699cd908 as 'textInput' event
clubbed with 'keypress' event started emitting double-spaces.

Tweak the hack to keep IME working on chrome while not regressing
when it is not enabled.

Change-Id: I0901724bf2db1794078fef3eb7283663b6f6a13b
Reviewed-on: https://gerrit.libreoffice.org/31469
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-12-01 10:45:24 +00:00
Pranav Kant
a0be903cd7 Document wopi: protocol message
Change-Id: I3a082a264a6081e8225a7820ec78d85f27aea404
Reviewed-on: https://gerrit.libreoffice.org/31380
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-01 10:26:46 +00:00
Ashod Nakashian
da3b1b208a loolwsd: alertAllUsersInternal expects lock to be taken
Change-Id: I50a4d0edd500043c52c28aba3e61ba2a892c102d
Reviewed-on: https://gerrit.libreoffice.org/31459
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-01 06:00:01 +00:00
Ashod Nakashian
c326228774 loolwsd: improved MessageQueue
Tiles no longer hog the queue ahead of all else.

We now give priority to callback events, so clients
get to know the document state sooner.

Since tiles take long to render, an equal time
is given to non-tiles (capped at 100ms).

Finally, Impress preview tiles are given
the lowest priority and rendered only when
the queue is drained.

Change-Id: I922c1e11200e5675f50d86b83baee1588cbbf66f
Reviewed-on: https://gerrit.libreoffice.org/31394
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-30 04:42:40 +00:00
Ashod Nakashian
283cf812de loolwsd: Writer doesn't have parts
Fixup the part for EMPTY invalidation as well.

N.B. Should replace 'EMPTY' with '0,0,INT_MAX,INT_MAX'
to be consistent. Since both are expected, no compat
issues should be expected.

Change-Id: I066981622b1de71e9e849530df0583291b74b804
Reviewed-on: https://gerrit.libreoffice.org/31393
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-30 04:40:09 +00:00
Henry Castro
4366d6aad4 kit: render font failure if and only if fails encode PNG 2016-11-29 20:24:13 -04:00
Ashod Nakashian
95e682a647 Revert "loolwsd: combine tiles strictly in the same row only"
This reverts commit b8c9163ac8.

Change-Id: I8279473209a376c963dc750c0ca4f68d23050e81
Reviewed-on: https://gerrit.libreoffice.org/31338
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-29 02:45:45 +00:00
Ashod Nakashian
7a4250b90e loolwsd: terminate forkit when wsd dies
When we the pipe with wsd is closed we
assume wsd has died and we terminate too.

WSD can fork us anew, if it's still alive.

Change-Id: I669ed717db973b50498a6bc08e1fca59c6563443
Reviewed-on: https://gerrit.libreoffice.org/31337
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-29 02:42:46 +00:00
Ashod Nakashian
21b1287444 Revert "IoUtil: remove never read write of 'n'"
Setting 'n = -1;' helps to detect where the failure happened
when receiveFrame throws. At the bottom of the function we log
partially processed data by checking n (among others).

This reverts commit 752372a2b0.

Change-Id: I3294329c3d95b38d72c3fc824ab2eb7f2339adee
Reviewed-on: https://gerrit.libreoffice.org/31339
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-29 02:42:10 +00:00
Andras Timar
740a28bfae Bump version to 2.0.0+ 2016-11-28 19:13:59 +01:00
Jan Holesovsky
5e02a43306 The 'make run' should advertise a copy of the document, not the source.
Change-Id: Idddd804432ea1147ffbb43bffa0784d2759a9a36
2016-11-28 19:12:45 +01:00
Andras Timar
7a5fbd7f3c Bump version to 2.0.0 2016-11-28 19:10:27 +01:00
Jan Holesovsky
e15ec1d33b These constants are not needed any more.
Change-Id: I5e73d4eacdf5e88f11bc3755162fe601a65417fe
2016-11-28 11:33:20 +01:00
Jan Holesovsky
9842f3239f Make sure we don't use the jitter / delay in production builds.
And default to 0 even for debug; who wants to use that for debugging, they
know what to do.

Change-Id: I23dd0c5f806b2b31a883b7a2b8d822ea8c0bb6c5
2016-11-28 11:31:06 +01:00
Miklos Vajna
752372a2b0 IoUtil: remove never read write of 'n'
Change-Id: I2dfd85696b39ae1f1c7bbc33cec544bc04f980ac
2016-11-28 09:11:11 +01:00
Ashod Nakashian
b8c9163ac8 loolwsd: combine tiles strictly in the same row only
Change-Id: I1d2ba647deac8da749e7cf7b56a1c9a19fe840f8
Reviewed-on: https://gerrit.libreoffice.org/31299
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 05:27:55 +00:00
Ashod Nakashian
2b9ea3d4a6 loolwsd: notify clients before recycling wsd
Change-Id: Ib2733a6af1c27fe39c54f5c3bc6f5bd3acb72a2b
Reviewed-on: https://gerrit.libreoffice.org/31298
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 05:27:34 +00:00
Ashod Nakashian
c0f9ccee42 loleaflet: activate and dismiss dialogs only upon reconnection
Change-Id: I2d8b3d9788b7f66bc746537e34c90493a7cb408a
Reviewed-on: https://gerrit.libreoffice.org/31296
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 05:04:49 +00:00
Ashod Nakashian
68519f0927 loolwsd: destroy DocBrokers sooner
Change-Id: I10d8ea57083c3b785748062a927574a63e0dd250
Reviewed-on: https://gerrit.libreoffice.org/31297
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 05:04:35 +00:00
Ashod Nakashian
2239f25684 Renamed 'shutdown' to 'shuttingdown'
Change-Id: Idae53a59af13eb54b1f18f1a8cd1dde06421b426
Reviewed-on: https://gerrit.libreoffice.org/31295
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 05:03:54 +00:00