Commit graph

4329 commits

Author SHA1 Message Date
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
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