Commit graph

2529 commits

Author SHA1 Message Date
Henry Castro
33eff1fe31 loolwsd: test: add testClientPartImpress 2016-04-27 13:51:23 -04:00
Henry Castro
200c6a9281 loolwsd: rework setclientpart 2016-04-27 13:47:58 -04:00
Miklos Vajna
78308db763 loolwsd: remaining 'unnecessary copy' fixes
Change-Id: I138e8473a002a15aae7752136950bb905a21fb1f
2016-04-27 14:58:33 +02:00
Andras Timar
c11b4a2823 rpm spec file fixes (openSUSE dependencies, add 'lool' user in %pre) 2016-04-27 14:32:37 +02:00
Tor Lillqvist
ee7f8c158a Actually we want to check only for it starting with the expected string
As this assert fails at the moment (it did even before my previous
commit), I can't be 100% sure it is correct now. So sue me. Or revert
both my changes.
2016-04-27 14:19:01 +03:00
Tor Lillqvist
8480cad8ee Use CPPUNIT_ASSERT_EQUAL
It is useful to see the expected and actual values when the assertion
fails.
2016-04-27 14:08:34 +03:00
Pranav Kant
cc0814df04 loleaflet: Prevent intermixing of multiple timeouts
Clear a timeout before setting it.

Change-Id: Ic808962b880a4c18b24e2f603dc1d351d65419ed
2016-04-27 14:02:37 +05:30
Pranav Kant
f26900399d bccu#1745: Fix Calc blinking due to popup message
Use w2overlay instead of w2popup. The former adjusts itself in
the visible screen region and fixes, and does not introduce any
additional scrollbars for the lifetime of the popup message.

The w2overlay gets removed with mouse events. So instead of
'mousedown' events originally, use 'mouseup', so that there is no
succeeding mouse events to switch the overlay off.

Also point the overlay pointer towards the button, not the label.

Change-Id: Ic6c22fecc2e32075c27b6f4647373c28d2f635ae
2016-04-27 13:50:39 +05:30
Pranav Kant
2913691ed2 bccu#1747: Show tab div only for spreadsheets
Change-Id: I95fcb12d35c94f8640859cfb75c90d81ad21e1af
2016-04-27 12:36:31 +05:30
Tor Lillqvist
2743ce5f7c Revert "I don't think we want the hello-world.odt to be modified without noticing"
Ah, I was confused.

This reverts commit f6d0730379.
2016-04-27 09:53:31 +03:00
Tor Lillqvist
0d198eb0ec The loadtest program went away a while ago already 2016-04-27 09:51:31 +03:00
Tor Lillqvist
f6d0730379 I don't think we want the hello-world.odt to be modified without noticing 2016-04-27 09:51:04 +03:00
Pranav Kant
0e3e5e023e loleaflet: Fix AltGr on Windows
On Windows, AltGr events are treated as Alt + Ctrl. Use the
'location' property to distinguish from plain Alt + Ctrl.
It is not present in 'keypress' event, so use
the previous invocation of Alt + Ctrl to detect whether AltGr was
used or not.

Change-Id: Id6b64b6fc0a5300ea5362880536d3b926eb0acce
Reviewed-on: https://gerrit.libreoffice.org/24400
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Reviewed-by: pranavk <pranavk@collabora.com>
2016-04-27 05:47:53 +00:00
Ashod Nakashian
ffc873895d loolwsd: logs
Change-Id: Ic7632824c32d66eaf7d496e0824a57ebbef986f5
Reviewed-on: https://gerrit.libreoffice.org/24421
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-27 03:50:56 +00:00
Ashod Nakashian
e6a6b296ea loolwsd: avoid communicating with clients under shared lock
DocumentBroker is a central document management object.
Using it to communicate with clients leaves it open
to the whims of slow connections. When its lock
is help for a long time, all clients stall, giving
users a very poor experience.

The culprit in this case was takeEditLock, which
sent to all clients the new edit lock state.
To avoid this, DocumentBroker now sends this
state to the children (via a loopback socket,)
which process messages in a separate process and
each on its own queue thread. The children then
in turn echo this edit lock state back to the
clients. This communication back is done on the
prisoner socket thread, which doesn't lock or
stall any shared objects or threads.

Change-Id: I475f6b3ecac9ae2a689bd30f43d416871aa0e384
Reviewed-on: https://gerrit.libreoffice.org/24420
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-27 03:50:22 +00:00
Pranav Kant
80c48ff579 loleaflet: Fix an obvious typo
Change-Id: Id31d44539f78d8747595340c9bf231bbee262231
2016-04-26 19:59:35 +05:30
Ashod Nakashian
5cfc7b6580 loolwsd: logging and cosmetics
Change-Id: Idb2cdc22555d237a162b58cacbfd1986f8bc7656
Reviewed-on: https://gerrit.libreoffice.org/24383
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-26 10:41:41 +00:00
Ashod Nakashian
d07a582469 loolwsd: merged autoSave and waitSave
This makes for amore compact API and avoids
a race between issuing the save and waiting for it.

Also added force flag and autoSave now checks the
modified state of the document. If a document is
not modified, nor save forced, autoSave checks
the last activity on the document and only
if there is any since last save does it issue
a save command.

Change-Id: I962e36df18d7edf5f658992e97b5def5f6247dc3
Reviewed-on: https://gerrit.libreoffice.org/24382
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-26 10:40:35 +00:00
Ashod Nakashian
d4aa547d3c loolwsd: avoid persisting excessively
When multiple users have a document open,
save notficiations are broadcast to all.
Each session then tries to store the document
to the Storage when only the first should suffice.

A new file modified-time member tracks the file's
timestamp and only persists when it changes,
thereby avoid excessive stores.

Change-Id: I138f1aa812963a2120a1fcac763dfacccc542c1a
Reviewed-on: https://gerrit.libreoffice.org/24381
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-26 10:40:07 +00:00
Jan Holesovsky
f5abfcde68 Improve test to be able to see the message directly.
The test was unreliable, but any change there made it reliable, so not sure
yet what was the root cause - but at least this should help seeing the
brokeness once it appears again.
2016-04-26 11:54:20 +02:00
Jan Holesovsky
2f561802b3 The branding files do not have to be present, skip them.
Clean up tons of copy'n'paste when at that...
2016-04-26 11:32:01 +02:00
Andras Timar
5dec73b182 fix more package names on SUSE 2016-04-26 10:16:19 +02:00
Andras Timar
97453617e8 fix libatk package name 2016-04-26 10:01:08 +02:00
Miklos Vajna
25fa9653b8 Storage: avoid unnecessary copy-construct
Change-Id: I592adb26590f8957e01ed55a4ba9a976a3aac246
2016-04-26 09:35:01 +02:00
Tor Lillqvist
42dcd6ea99 Why log a string that we even expect to be junk?
WebSocket::receiveFrame() does not null-terminate the buffer even when
it successfully reads something into it, even less when it
doesn't. (Why would it, as it is perferctly fine to transmit WebSocket
(binary) frames that contain zero bytes.) So the 'received' string was
always full of random bytes.
2016-04-26 08:20:59 +03:00
Henry Castro
47917fb8c9 loolwsd: test: add testLinks 2016-04-25 21:40:24 -04:00
Henry Castro
7317345a2b loolwsd: test: add testScripts 2016-04-25 21:01:46 -04:00
Henry Castro
8ea127407b loolwsd: test: replace std::regex 2016-04-25 18:07:55 -04:00
Michael Meeks
dc035c83b7 Unit test to catch / avoid unexpected inherited sockets. 2016-04-25 21:09:57 +01:00
Jan Holesovsky
2c5c0d056b loleaflet: Many visual improvements in the spreadsheet.
Sheet buttons better aligned, no overlaps in sheet scrolling buttons, more
consistent colors, no remnants of scrollbars, etc.
2016-04-25 19:05:01 +02:00
Michael Meeks
3e151af9f6 Typo fix, and atomic markToDestroy. 2016-04-25 10:21:54 +01:00
Michael Meeks
e64bc95044 Further TileBeingRendered cleanup & re-factor.
Turn TileBeingRendered into an internal implementation detail.
2016-04-25 10:11:36 +01:00
Andras Timar
603b231937 put %{dist} after release number 2016-04-25 11:00:46 +02:00
Andras Timar
d7d373144d Bump version to 1.6.2 2016-04-25 11:00:46 +02:00
Tor Lillqvist
a25b7ad712 Bin unused Util::createRandomFile() 2016-04-25 11:23:08 +03:00
Tor Lillqvist
581037d45e There is no Util::hasCorrectUID() 2016-04-25 11:18:35 +03:00
Pranav Kant
c91c2a431f loleaflet: Fix lint errors
'jake test' was complaining a lot. There are still few errors
that needs fixing.

Change-Id: I83bc51c25a3ce3037617378f57dd06f5f9887f77
2016-04-25 13:17:41 +05:30
Pranav Kant
b825cd391f bccu#1693: Empty item is not an object
Treating empty item as an object expects `id` attribute on which
toString method would be invoked. In case of object without `id`, it
would throw an error trying to call toString on undefined
attribute.

Change-Id: I44e591044487b0d236760cc79438ccfcf0f53846
2016-04-25 12:59:43 +05:30
Miklos Vajna
9ea85e8d1a httpwstest: fix -Werror,-Wshadow
Change-Id: I64482d921409e291f6f60bf7d963a516ba4e7550
2016-04-25 09:22:41 +02:00
Miklos Vajna
f99e2146bc TileCache: loop variable is copied but only used as const reference
Change-Id: I2f4ec5dad91abd6776095962070bd5b12021c24f
2016-04-25 09:11:59 +02:00
Tor Lillqvist
246e341c66 There is a kill() system call 2016-04-25 09:25:23 +03:00
Tor Lillqvist
ada503d91e Bin unused variable 2016-04-25 09:15:25 +03:00
Tor Lillqvist
dcbb5eab33 Hmm, probably should remove all those commmented-out lines for consistency then
If there in fact was some good reason to have them, it is trivial to
add them back (with a comment telling why they are useful, thanks).
2016-04-25 08:25:32 +03:00
Tor Lillqvist
53de1935e3 Remove accidentally (?) committed commented-out line 2016-04-25 08:13:48 +03:00
Ashod Nakashian
4f7b911066 loolwsd: simplified the bridging between client and prisoner sessions
Change-Id: I1335060963eda3356312f42060da229f43d239d8
Reviewed-on: https://gerrit.libreoffice.org/24358
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-25 02:16:16 +00:00
Ashod Nakashian
afc152b0ce loolwsd: compiler fixes in the tests
GCC 5.x doesn't allow temporary strings in regex_match.

Change-Id: I4c62872661d6b78ce7e949cf524c7b2b36fb0197
Reviewed-on: https://gerrit.libreoffice.org/24357
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-25 02:14:30 +00:00
Ashod Nakashian
724911f522 loolwsd: let the exception bubble up instead of assertion
Change-Id: I471e017e486c2d7d7dcbf3cebd96d61eabfd54da
Reviewed-on: https://gerrit.libreoffice.org/24356
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-25 02:12:52 +00:00
Henry Castro
9720ea3781 loolwsd: test: add testParams 2016-04-24 21:00:44 -04:00
Ashod Nakashian
80429c6c1d loleaflet: activate upon reconnection, reconnect upon activation
Change-Id: I047b4e25a90dab25f92920f2cba272051e08c90c
Reviewed-on: https://gerrit.libreoffice.org/24354
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-24 22:24:26 +00:00
Ashod Nakashian
8f7ddbc495 loleaflet: close an existing dialog before showing a new one
Change-Id: Ic930fc692c93ff01a7b74f26f0153fd8a75692cb
Reviewed-on: https://gerrit.libreoffice.org/24353
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-24 22:23:42 +00:00