Commit graph

4263 commits

Author SHA1 Message Date
Ashod Nakashian
a8f3263132 loolwsd: use more efficient matchPrefix
Change-Id: I6f34b314295335270ff4da2827517d818c6a62ab
Reviewed-on: https://gerrit.libreoffice.org/31285
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 04:53:04 +00:00
Ashod Nakashian
86b38a29de loolwsd: fast in-place getTokenStringFromMessage
Change-Id: I5a7a7402c9394ac72aca907fc8b1072f6d2df5ad
Reviewed-on: https://gerrit.libreoffice.org/31284
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 04:50:57 +00:00
Ashod Nakashian
456c666cc9 .gitignore editor dot files
Change-Id: If48670b2fb0c5c9eb71dedccfc7e1b46706c109c
Reviewed-on: https://gerrit.libreoffice.org/31283
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-28 04:50:32 +00:00
Henry Castro
02095a3387 loleaflet: notify repair document when exists a conflict of multiple ..
.. users undo/redo
2016-11-27 23:39:58 -04:00
Henry Castro
ddd91b4251 kit: enable notify undo/redo commands 2016-11-27 23:39:37 -04:00
Henry Castro
2c2d460172 loleaflet: forgot remove console.log
only debugging purpose
2016-11-27 23:06:58 -04:00
Henry Castro
6947e914e1 loleaflet: re-work special character dialog to render all glyphs
.. on server side
2016-11-27 22:47:36 -04:00
Henry Castro
7234db9317 wsd: fix sending wrong UTF-8 string to the client
Client side console error "ws stopped cannot read
utf8 string", the cause it is sending special character '{',
'}',
2016-11-27 22:45:14 -04:00
Henry Castro
7760d6d6d5 wsd: fix URL encoded char parameter 2016-11-27 22:24:45 -04:00
Michael Meeks
85583f0a89 Avoid PNG compression for un-changed tiles. 2016-11-25 15:48:56 +00:00
Andras Timar
0f2e5ef3fe loolwsd: add common/FileUtil.hpp to tarball 2016-11-25 12:58:13 +01:00
Andras Timar
3e98b1d139 loolwsd: add common/SigUtil.hpp to tarball 2016-11-25 12:56:04 +01:00
Pranav Kant
d0929fb2f6 loleaflet: Popup keyboard on mobile devices
Change-Id: I4f0d1928633f5f0be4148fffd2c68c7aad1a0508
2016-11-25 16:57:06 +05:30
Andras Timar
3402546fae adapt maketarballfordeb.sh script to new dir layout 2016-11-25 12:21:30 +01:00
Michael Meeks
bbe0723e78 Tweak code to use new paths. 2016-11-25 09:59:03 +00:00
Michael Meeks
c1a398977f Adapt makefiles, includes etc. to new locations. 2016-11-25 09:58:57 +00:00
Michael Meeks
cca657c8f2 Apply the pre-branch rename script to re-organize the source. 2016-11-25 09:58:48 +00:00
Michael Meeks
4432aba25b Revert "loolwsd: support reading long messages directly"
This reverts commit 84607b43a3.

LOOLWebSocket piece requires a much too recent Poco.
2016-11-25 09:48:59 +00:00
Michael Meeks
a2058341a3 Revert "loolwsd: kill receiveFrame with char* and cleanup usage cases"
This reverts commit 45c1856c6a.

This patch requires a very bleeding edge Poco, reverting for now.
2016-11-25 09:46:01 +00:00
Pranav Kant
47699cd908 tdf#98484: Handle spaces in chrome when IME is enabled
When IME is enabled and user presses the space button, firefox
sends 'compositionend' event with data = ' '. However, chrome
instead fires 'textInput'
event. Lets listen for 'textInput' event too and treat it like
'compositionend' event when data = ' '.

Change-Id: Icbebdf2e89f608f790e6ce68c49f474364e7d5ab
2016-11-25 14:42:12 +05:30
Pranav Kant
e9dbfa3953 tdf#98484: IME support - handle full string in compositions
Parse the compositionend event's string, convert each into a char
code and pass them individually to server.

Change-Id: If79d538ccaebaa29749a5ca48a1f6ed5e0689ed5
2016-11-25 10:08:27 +05:30
Ashod Nakashian
45c1856c6a loolwsd: kill receiveFrame with char* and cleanup usage cases
Change-Id: I64585f8992407e0a3ff26fba1dccd327de13b7ff
Reviewed-on: https://gerrit.libreoffice.org/31185
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-25 03:50:09 +00:00
Ashod Nakashian
84607b43a3 loolwsd: support reading long messages directly
Since Poco receiveFrame expected the buffer to be
at least as large as the frame, otherwise the socket
had to be closed, we sent a 'nextmessage' frame
before sending large frames with the payload size.

This caused many problems, not least related to threading
and lack of atomicity when sending large frames.

There is another API in Poco that doesn't have this
strict requirement, one that expects Poco::Buffer
and resizes it as necessary.

One potential issue is the possibility that a malicious
attacker might send very large frames to force the
server into allocating large buffers to read them,
thereby destibilizing the server, if not bringing it
down altogether.

Change-Id: I05014d54c3a1464f629ed82d761a7a65e4941985
Reviewed-on: https://gerrit.libreoffice.org/31184
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-25 03:48:32 +00:00
Ashod Nakashian
96a1a796c4 loolwsd: AdminModel cleanup
Change-Id: I2f73b0063b905b641e14110af6421191bc9b2533
Reviewed-on: https://gerrit.libreoffice.org/31183
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-25 03:47:32 +00:00
Ashod Nakashian
c8c8407e00 loolwsd: move ver field in tile to the end
tile and tilecombine have grown organically
and gained optional fields when originally
all fields were required.

Since internally we deduplicate them, we need
to compare the required fields and not the
optional ones. By moving all optional ones
after the landmark ver, we make comparison
easier and, hopefully, less error prone.

Change-Id: I309185d3e19a45c7d59bc872e8a76acd3c511c14
Reviewed-on: https://gerrit.libreoffice.org/31182
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-25 03:46:10 +00:00
Ashod Nakashian
f7ee76cbde loolwsd: simplify duplicate message detection
Change-Id: I54b9d7905a429c35c60062b51203db56d639b6b5
Reviewed-on: https://gerrit.libreoffice.org/31119
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-25 03:40:23 +00:00
Henry Castro
63e002d695 loleaflet: fix default image path 2016-11-24 23:24:31 -04:00
Henry Castro
8317cd46f1 loleaflet: scrollable special character dialog 2016-11-24 14:00:41 -04:00
Henry Castro
0ba3c23c87 loleaflet: do not allow empty option element 2016-11-24 10:19:54 -04:00
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