Commit graph

3893 commits

Author SHA1 Message Date
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
Pranav Kant
198b41676f loolwsd: new viewinfo message test
Change-Id: Icf9c74006bf6ee15864a266fef5aa49003ca1a70
2016-10-05 18:48:53 +05:30
Pranav Kant
aa674fbdbd loolwsd: Set view id before calling documentStatus
... otherwise in some cases viewid that is set internally in core
is different from the one which is being loaded resulting in an
incorrect status message which then leads to lot of other problems as
well.

Change-Id: I8488d7d54b211a6b6f6028128f8dfc3388b73efd
2016-10-05 17:08:40 +05:30
Pranav Kant
d5fdb210aa loolwsd: Kill unused code
Change-Id: I7c8d16ce2358ca9ab41fcc57a8e9b9241b240150
2016-10-05 17:08:40 +05:30
Andras Timar
81f374a940 loleaflet: add 'Freeze panes' item to View menu of Calc 2016-10-05 13:21:53 +02:00
Andras Timar
f4731c6875 loolwsd: add a few more supported file types to discovery.xml 2016-10-05 12:18:34 +02:00
Miklos Vajna
5fe8c5969f lint-discovery: detect missing file types
Which are known by core.git, but not advertised by discovery.xml.

Change-Id: Ic11b34dabb25b21899055c461b2eb791bd81cab1
2016-10-05 11:47:54 +02:00
Ashod Nakashian
a0f6f4e41c loolstress: use new URI for loading documents
Change-Id: If811deffc4b7a9b2cf290b93d9f87a840e64dc4e
Reviewed-on: https://gerrit.libreoffice.org/29531
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-04 23:35:04 +00:00
Miklos Vajna
d8daaff1e9 WOPI discovery: change action name to 'view' when we can import the format
Also add a script that can detect if discovery.xml is no longer in sync
with the core.git filter configuration.

richdocuments.git d6b65b79835bc499f720d15bb6c00441079b2fd6 (Respect WOPI
action names, 2016-10-04) can launch a read-only loleaflet based on this
info.

Change-Id: I09232bb53844d0737dfdc66cd0e87342b9dd0fb6
2016-10-04 18:50:46 +02:00
Tor Lillqvist
c453f2626a Let's not use lcl_ prefixes here 2016-10-04 15:41:50 +03:00
Jan Holesovsky
a1e9c1eb42 Handle the Impress slide previews with low priority + unit test.
After processing a tile request for a slide preview, move the rest of them to
the end of the queue, so that other events are processed before we render the
next preview.

Change-Id: I82aa411406d6731b1c0bf3b849780220b5e68110
2016-10-04 14:25:52 +02:00
Tor Lillqvist
97adaf935b Don't let 'canceltiles' messages affect slide thumbnails being rendered
Document that the 'id' parameter of a 'tile' message is not (should
not be) used for anything except slide thumbnails.

If we later need some more generic way to distinguish the purpose of
tile requests, need to come up with something else, like a 'purpose'
parameter.
2016-10-04 13:31:36 +03:00
Andras Timar
b5f95c2aed loleaflet: add Insert Footnote, Endnote, Page and Column break to Writer menu 2016-10-04 11:21:10 +02:00
Tor Lillqvist
7a2a1b1b99 Add another FIXME rant 2016-10-04 11:04:36 +03:00
Tor Lillqvist
dba94a9c03 Avoid annoying line wrapping of cppunit output 2016-10-04 11:04:22 +03:00
Tor Lillqvist
f9a6ed93d5 Add FIXME rant 2016-10-04 09:21:20 +03:00
Tor Lillqvist
c46986166c The coding style here is to put 'else if' on one line 2016-10-03 22:31:10 +03:00