Commit graph

3809 commits

Author SHA1 Message Date
Ashod Nakashian
128cd73154 loolwsd: send child messages to client via unified wsd-kit WS
Change-Id: I237120e5a81a2e6d8772a2b6f1e98b1ba567f97e
Reviewed-on: https://gerrit.libreoffice.org/29647
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:29:32 +00:00
Ashod Nakashian
22a5db2fc0 loolwsd: trim forwarded messages to avoid leading whitespace
Change-Id: I932baf3ec41789d89bf897fcbf25a1ee1d27f89d
Reviewed-on: https://gerrit.libreoffice.org/29646
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:29:20 +00:00
Ashod Nakashian
0f2f49823e loolwsd: unittest cleanup
Change-Id: I90e4fa7d5377b7ecf427c87ce068efdb4bffe933
Reviewed-on: https://gerrit.libreoffice.org/29645
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:28:06 +00:00
Ashod Nakashian
46aec10c3c loolwsd: cleanup of isDocumentLoaded
Change-Id: I28321bda3000b443aff4603ad438183fa6cfb2f9
Reviewed-on: https://gerrit.libreoffice.org/29644
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:27:22 +00:00
Ashod Nakashian
d7799d21a8 loolwsd: cleanup of LoolKit process counter
Change-Id: I7d8bec2634b1c838cd10a8bef928ea22c2d2f549
Reviewed-on: https://gerrit.libreoffice.org/29643
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:26:59 +00:00
Ashod Nakashian
48733fdfb1 loolwsd: unittest cleanup
Change-Id: Ia7c5f54f6737e2d8a7fc7062b5bc27ea8291bb0a
Reviewed-on: https://gerrit.libreoffice.org/29642
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:26:27 +00:00
Ashod Nakashian
a86bd6a8be loolwsd: unittest cleanup
Change-Id: I0d0bba86904ffe3f6b6c2d13de135ef957f75333
Reviewed-on: https://gerrit.libreoffice.org/29641
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:25:49 +00:00
Ashod Nakashian
0f4ccd8429 loolwsd: remove unnecessary unittest helpers
Change-Id: I85962c2c96c99a8132aa015670521dd5f6166097
Reviewed-on: https://gerrit.libreoffice.org/29640
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:25:18 +00:00
Ashod Nakashian
78356dabf4 loolwsd: unittest cleanup
Change-Id: I02e44eae87e81bda883dec66d133675ad2973203
Reviewed-on: https://gerrit.libreoffice.org/29639
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:24:51 +00:00
Ashod Nakashian
73632d43fd loolwsd: unittest cleanup
Change-Id: Ie3bf745414fee4deb067b482ae463d6c4e08b01e
Reviewed-on: https://gerrit.libreoffice.org/29638
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:24:30 +00:00
Ashod Nakashian
38cbfa96b0 loolwsd: forward client message to child via the process WS
Change-Id: I368e727b79b44b509ba49ed30218b8368c5eaad8
Reviewed-on: https://gerrit.libreoffice.org/29637
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:23:51 +00:00
Ashod Nakashian
6cf9cdf032 loolwsd: forward to child
Change-Id: I308963a78fb05e85bcb2e6c257640b56583859b5
Reviewed-on: https://gerrit.libreoffice.org/29636
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:23:07 +00:00
Ashod Nakashian
3963382913 loolwsd: forward child messages to the respective ChildSession
Change-Id: Ib1e0c51effd046a2f0d0e5708c501b6414caa81a
Reviewed-on: https://gerrit.libreoffice.org/29635
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:22:28 +00:00
Ashod Nakashian
f17ff9c1d9 loolwsd: forward client messages to the respective client's WS
Change-Id: Ie28223f985a7f24a7569300b846432bf77813ab0
Reviewed-on: https://gerrit.libreoffice.org/29634
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:20:25 +00:00
Ashod Nakashian
f7327115de loolwsd: allow for delimiter in LOOLProtocol parsers
Change-Id: I9c7e503aed067dfe36953552237941e7c1841457
Reviewed-on: https://gerrit.libreoffice.org/29633
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:18:18 +00:00
Ashod Nakashian
3f42ba342c loolwsd: inline some common LOOLProtocol functions and more args
Change-Id: If75fa5c7c606377b9a79aa6e8d927840b9da39fa
Reviewed-on: https://gerrit.libreoffice.org/29632
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:17:01 +00:00
Ashod Nakashian
0ec7b0e889 loolwsd: unittest cleanup
Change-Id: Id1816656bda88086779fad73b7e18fecf8892e41
Reviewed-on: https://gerrit.libreoffice.org/29631
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:16:17 +00:00
Ashod Nakashian
22fb71c672 loolwsd: cleanup lastEditableSession flag in DocumentBroker
Change-Id: Iab3a226e3ff089c6bdab264d6f1b1d639bcf3b37
Reviewed-on: https://gerrit.libreoffice.org/29630
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-10 06:15:44 +00:00
pootlebot automatic
29ce548144 Pootle automatic update from libo_online 2016-10-09 17:03:25 +00:00
Henry Castro
7f514422c3 loleaflet: increase re-size cursor zone 2016-10-09 11:43:26 -04:00
jan Iversen
83848bfb29 update from pootle 2016-10-09 09:42:29 +02:00
Ashod Nakashian
3f690113fb loolwsd: unittest invalidatetiles for Writer
Writer really has a single part for rendering
purposes, 0. This new unittest validates that
if we edit a page that isn't the first, part
in invalidatetiles will still be 0, and not
the page number of something else.

Change-Id: Idb5d14c2365cc0f73b76ee47223815ddf611f8ce
Reviewed-on: https://gerrit.libreoffice.org/29607
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-08 04:43:36 +00:00
Ashod Nakashian
a18c404f29 loolwsd: log test name from more helpers
Change-Id: I51240cf6dc3d2df3ed4b73f8a00dff968653de98
Reviewed-on: https://gerrit.libreoffice.org/29606
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-08 04:42:37 +00:00
Ashod Nakashian
23a2d2261e loolwsd: fix regression in rendering of Writer
Writer has only one part for rendering purposes (0).

With the new API that includes the part number in
the INVALIDATE_TILES event, the part number must
be 0, otherwise, there will not be anything to render.

Unfortunately Core issues part number == page number,
which we overwrite with 0 in Online.

Change-Id: I842fdd2f50021334dcd3fa47c0b1c9df34d8c5e1
Reviewed-on: https://gerrit.libreoffice.org/29605
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-08 04:41:51 +00:00
Michael Meeks
f5a7a19b95 Restore LD_BIND_NOW=1 to share linking.
Finally seen linking on a 'perf top' output, and restored this.
UnitPrefork shows that it saves memory, and it should save CPU time
and more memory as the suite is actually used.
2016-10-07 17:52:52 +01:00
Tor Lillqvist
a4b0c22161 There is nothing called 'PocoException' 2016-10-07 13:51:55 +03:00
Tor Lillqvist
3576b17ac9 Refuse to start a second loolwsd listening on the same socket
Poco's ServerSocket by default uses SO_REUSEPORT when one creates it
using the constructor that takes a port number. If one uses the
default constructor and calls bind() and listen() separately, one can
tell it not to reuse the port.
2016-10-07 13:49:28 +03:00
Tor Lillqvist
735713bfb4 The withColor parameter to Log::initialize() is bool
So passing a char* that never is null meant it will always be
automatically converted to true, which is not useful.
2016-10-07 11:53:07 +03:00
Miklos Vajna
3f0def0b02 Avoid 'auto' for getenv() result
Which is sometimes stored in a bool, but when auto is used, it's char*,
so it helps to have that written explicitly.

Change-Id: I561692e8d5c575b4ff8612fd50e489ad3c60d655
2016-10-07 10:20:13 +02:00
Henry Castro
b60f596a64 loolwsd: avoid getenv() nullptr
what():  basic_string::_S_construct null not valid
2016-10-06 15:02:13 -04:00
Henry Castro
0f86fde3e0 loleaflet: add .uno:AutoSum 2016-10-06 14:37:06 -04:00
Henry Castro
9b1087e000 loolwsd: test: .uno:AutoSum 2016-10-06 14:22:18 -04:00
Marco Cecchetti
fd3aba3be7 loleaflet: page-up/down - visible area is not scrolled as on desktop
Change-Id: Id6a61e93cd195cf731237961c0694685b2d497b4
2016-10-06 17:53:47 +02:00
Tor Lillqvist
c99379d67f The 'invalidatepreview' event handling seems to be unimplemented
No need to fire it if nothing happens. Just confuses a reader of the
code.

I don't really understand JavsScript events etc, so if I have
misunderstood something, feel free to revert.
2016-10-06 15:43:41 +03:00
Tor Lillqvist
e121e90f41 We don't use LOOLWSD_LOGFILE in any source code any longer
So no need to emit its definition to config.h.
2016-10-06 13:43:16 +03:00
Tor Lillqvist
3800c988b6 Don't claim log is available in a file if it isn't
Also, when it is, show the actual pathname from loolwsd.xml, not the
default.
2016-10-06 13:37:57 +03:00
Michael Meeks
39b2c725d9 Improve and standardize version details: display on start. 2016-10-06 11:18:50 +01:00
Tor Lillqvist
d7cabad884 We don't care that much about the distinction of TEXT vs BINARY frames
We shouldn't assert such details.

protocol.txt says:

    The WebSocket distinction between 'text' and 'binary' frames has
    no meaning for us for messages that don't contain additional
    binary data; such messages can be either 'binary' or 'text' from
    the WebSocket point of view even if we require them (the single
    line) to be UTF-8. In other words, an implementation is free to
    send such a single-line message as a WebSocket 'binary' frame, and
    the receiving implementation must treat that equally as if it was
    a 'text' frame.
2016-10-06 11:32:22 +03:00
Tor Lillqvist
7a3111632b Prefer string literals to pointless variables 2016-10-06 11:29:52 +03:00
Pranav Kant
2f59e19252 loolwsd: Also handle WOPI urls with spaces
URI::getPath() returns a _decoded_ path which was then being used
for the requests. This leads to failure for WOPI urls having
space in them.

Change-Id: I47bef643b09a919c56f9f0ec7b4dee8604dde089
Reviewed-on: https://gerrit.libreoffice.org/29536
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-06 06:00:06 +00:00
Ashod Nakashian
5b3e5f73a2 loolwsd: trade view creation and assert lock ownership
Change-Id: Ib593bec4d6e6b810d5f6cfb4bdf7d3f1212709b4
Reviewed-on: https://gerrit.libreoffice.org/29549
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-06 05:58:11 +00:00
Ashod Nakashian
c9349886c2 loolwsd: unittest cleanup
Change-Id: Ie5eca4a3d656b308932ead005788845d5ddf81fb
Reviewed-on: https://gerrit.libreoffice.org/29548
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-06 05:57:48 +00:00
Ashod Nakashian
d681d9b8d4 loolwsd: testGraphicInvalidate cleanup
Change-Id: I933aceb2873d393a93b942ccb13ab544aca4db9d
Reviewed-on: https://gerrit.libreoffice.org/29547
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-06 05:57:02 +00:00
Ashod Nakashian
ae2c5ba92b loolwsd: unittest cleanup
Change-Id: I4d7ff79a0d1c0993dfaf36d02df9adc46901a02c
Reviewed-on: https://gerrit.libreoffice.org/29546
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-06 05:56:30 +00:00
Ashod Nakashian
c542fde244 loolwsd: factor out getViewIds and broadcasting
This minimizes unlocking and relocking
on the LOK Document.

Change-Id: Ibe5045c82008df907dc329c1530cb50138b0c211
Reviewed-on: https://gerrit.libreoffice.org/29545
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-06 05:54:54 +00:00
Ashod Nakashian
f137a96d5c loolwsd: use less intrusive way of asserting lock ownership
Change-Id: I180cfc4effdf67e83ea4c4ca9958806d87d3f193
Reviewed-on: https://gerrit.libreoffice.org/29544
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-06 05:53:38 +00:00
Michael Meeks
e04cde4107 Avoid the returnValue hook - when not needed. 2016-10-05 23:24:23 +01:00
Michael Meeks
8a8323d0a0 More UnitPrefork cleanup.
Log data to std::cerr - so it goes to the log files.
Dump PSS / Dirty per child process for comparison.
Copy the child socket array before operating on it to fix a crash.
Add debug to ensure we are getting each child's true size.
2016-10-05 23:17:33 +01:00
Michael Meeks
d3daa2d9d9 Mend UnitPrefork.
Count pre-forked processes more correctly.
Use Unit's returnValue implementation to fix failure exit codes.
Accept new loolwsd.log socket as being authentic.
2016-10-05 22:38:07 +01:00
Andras Timar
fd1991a961 Revert "loleaflet: add 'Freeze panes' item to View menu of Calc"
This reverts commit 81f374a940.
2016-10-05 16:01:07 +02:00