Commit graph

4086 commits

Author SHA1 Message Date
Andras Timar
453307a67c add left-to-right anf right-to-left commands to Writer Format menu 2016-10-28 12:22:36 +02:00
Andras Timar
ab0bd735e1 Writer Format menu 2016-10-28 11:44:04 +02:00
Andras Timar
36715b7a54 loleaflet: switch position of View and Insert menus 2016-10-28 11:44:04 +02:00
László Németh
443d0baea1 loleaflet: tile debug: add timestamps to the console log 2016-10-27 14:51:51 +02:00
Andras Timar
1496a08e78 too many connections/users -> jump to FAQ 2016-10-27 13:28:52 +02:00
Pranav Kant
e0e6a343da tdf#103450: Implement session management postmessage API
Change-Id: Id22759c5c103948078fb20943768a9ff6251dddf
2016-10-26 21:45:35 +05:30
Pranav Kant
56f6ee7a57 loleaflet: Store userid in map
Change-Id: Ia54516b52ace3f722ae27ee28b5a11897dedc479
2016-10-26 21:34:26 +05:30
Pranav Kant
4987df6547 tdf#103450: WOPI compliant message and new way to post message
Use map's WOPIPostMessage which takes care of bunch of things
according to WOPI

Change-Id: Id559179d684fd6243d3afa488d4cddc9eb92f4d6
2016-10-26 21:34:19 +05:30
Pranav Kant
cfcc6bdd94 tdf#103450: Implement WOPI initialization postmessage API
This includes support for Host_PostmessageReady and
App_LoadingStatus

Change-Id: Iaa0222dfa63c17b26a4fcb2236973bacdd61ee62
2016-10-26 21:34:11 +05:30
Pranav Kant
1c9e4f57d5 loolwsd: Include UserId in 'viewinfo' response
Change-Id: Ia467086343ff2308f80d873dfe0a617733036a2e
2016-10-26 21:10:15 +05:30
Pranav Kant
cccf6dcb7d loolwsd: Store UserId in ChildSession
Change-Id: I46593442f7f8c61bddf00a624977c9d32bffdf44
2016-10-26 21:10:15 +05:30
Michael Meeks
87d5849176 Pass master port number to forkit.
Fixes issues with free port selection.
2016-10-26 15:51:25 +01:00
Pranav Kant
1f14642f8c loolwsd: This is sessionId, not viewId
Change-Id: I98026369602fe6e25f72fe743e4f67b821ef0418
2016-10-26 20:16:06 +05:30
Pranav Kant
4269dfdf84 loolwsd: unsigned -> std::atomic<unsigned>
Change-Id: I41da65c7c5a43c2b1aafd8620042b0a3d34cc3af
2016-10-26 20:13:41 +05:30
Pranav Kant
cc184ea2c2 loolwsd: Separate FileInfo classes for different storages
The idea, for now, is to call the storage specific fileinfo
functions (getLocalFileInfo, getWOPIFileInfo) which returns the
file + user specific data for given URI. By user specific, it
means data which is token (provided in URI) dependent.
For WOPI, it would mean various user permissions
(editable/viewable etc.)

For our current storages, these calls also include the basic file
information which is common across all tokens. This can be
retreived by calling getFileInfo on the storage object.

Change-Id: Ibbd3b74b011d8bb6fe4730c33276ef9ac6c47103
2016-10-26 20:13:34 +05:30
Ashod Nakashian
a2ef70c71c loolwsd: mark all tiles but the first to have come from the cache
While this has some overhead, it makes debugging of tile
rendering easier.

Change-Id: I0430015f41fd044e4be1099a5d61a23c0ef88176
Reviewed-on: https://gerrit.libreoffice.org/30245
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-25 01:01:27 +00:00
Ashod Nakashian
cdf6beee86 loolwsd: lookupRendering -> lookupCachedFile
Change-Id: I668e1e11aaf9a88b40084ac23bcd574cf258262f
Reviewed-on: https://gerrit.libreoffice.org/30244
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-25 00:57:39 +00:00
Ashod Nakashian
ff7f325794 loolwsd: use a document with comments to test tile rendering
Change-Id: I694bee6523d0830af9f8496071f0f3a6f023736a
Reviewed-on: https://gerrit.libreoffice.org/30243
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-25 00:57:12 +00:00
Andras Timar
f79546853f loleaflet: spelling noun vs. verb: checkout -> check out 2016-10-24 22:18:00 +02:00
Andras Timar
ae0b3a6cac loleaflet: add loleaflet-font class to Calc tab context menu 2016-10-24 20:54:55 +02:00
Andras Timar
67d21d682d loleaflet: typo: initalized -> initialized 2016-10-24 20:52:52 +02:00
Andras Timar
e302993791 loolwsd: remove unused defines 2016-10-24 16:37:56 +02:00
Pranav Kant
d50d3f5b77 loleaflet: Fix missing comma, semi-colons etc
Change-Id: Ic47e6e44a83c43ff7aea840fb6b04d1ad7c4e4a2
2016-10-24 16:26:35 +05:30
Pranav Kant
36fece8b07 loolwsd: Separate WOPI load duration and check fileinfo duration
Add both of them and send them as wopiloadduration to the client,
if storage is WOPI.

Change-Id: I5652d346d70f473624f03536469acf45470db742
2016-10-24 16:04:28 +05:30
Pranav Kant
050bf4c65e loolwsd: Remove this comment - this is fixed now
Change-Id: I032c7e4a1609b68882dba6cc48ebd3fb2d59b8f5
2016-10-24 12:21:33 +05:30
Ashod Nakashian
b26f2f2738 loleaflet: prevent the zoomlevel from changing on connect/disconnect
When a client connects or disconnects ViewInfo message is sent.
The handler for this updates the number of users via addView
and removeView. Unfortunately when the toolbar control is
updated, it resets the zoomlevel to 100% (the initial value).

This is an ugly hack to change it back to the correct
value, since nothing really visually changes. It certainly
could be improved by only correcting the toolbar.

Change-Id: I37294da2d9d1bc84e8cb3b7f634aadcfd80d6497
Reviewed-on: https://gerrit.libreoffice.org/30218
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-24 04:19:29 +00:00
Ashod Nakashian
b78e224f8d loolwsd: log the invalid/dead PID in exception
Change-Id: Ib523e34de3b354944c53ce0e6b5a7cab8fdb8cf3
Reviewed-on: https://gerrit.libreoffice.org/30215
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:21:05 +00:00
Ashod Nakashian
5802d7e8a1 loolwsd: show disconnected usernames in the document repair
By retaining the view-ID to username mapping of disconnected
users we are able to show a disconnected username in the
document repair dialog.

Change-Id: Id08790de31f92653381b6a1525caf044bd875479
Reviewed-on: https://gerrit.libreoffice.org/30216
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:20:54 +00:00
Ashod Nakashian
cecb87dfe3 loolwsd: don't wait after autosaving to rebalance children
Change-Id: Ifb44d0395e8f416e418711b09deed3eb7f57effa
Reviewed-on: https://gerrit.libreoffice.org/30214
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:19:53 +00:00
Ashod Nakashian
f4b4037f9e loolwsd: spawn new children when no forks are outstanding
This avoids always waiting until child spawning times
out by being smarter about whether or not there are
any children spawning to wait for.

Change-Id: I96a16ac35f90f70219d4153db9862cf2ee5b6a76
Reviewed-on: https://gerrit.libreoffice.org/30213
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:19:03 +00:00
Ashod Nakashian
70690f6dab loolwsd: remove dead DocumentBrokers
Change-Id: If9b24ac1e45454e21222699a00defa70acc4ed80
Reviewed-on: https://gerrit.libreoffice.org/30212
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:18:19 +00:00
Ashod Nakashian
f68ece0037 loolwsd: fix testMaxDocuments unittest
Checking for document limit must be done before allocating
a child process, otherwise the new child process will not
be cleaned up or released, thereby failing the test.

Change-Id: I99b1155bdacf2f0b7a24c7b7330d207e4c7beee8
Reviewed-on: https://gerrit.libreoffice.org/30208
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:14:46 +00:00
Ashod Nakashian
30df646311 loolwsd: check for termination flag before loading new documents
Change-Id: I4b7117ba255dd81f28ed1279814048e4311c2473
Reviewed-on: https://gerrit.libreoffice.org/30211
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:14:29 +00:00
Ashod Nakashian
0287d7141d loolwsd: logs around testMaxConnections
Change-Id: I0f9dc957fb95d501626e321b4e15472d077c0301
Reviewed-on: https://gerrit.libreoffice.org/30210
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:14:15 +00:00
Ashod Nakashian
195936ffa1 loolwsd: prevent configuring max_connections less than max_documents
It would be nonsensical to allow less connections than documents
since each document must, by definition, have at least a
single connection.

This prevents blocking new documents because of connection
limit. If that were the intention, max_documents should be
lowered to match max_connections.

Change-Id: Ide07e977f548ed917c6e51a2ba88f3cc07947efe
Reviewed-on: https://gerrit.libreoffice.org/30209
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:13:51 +00:00
Ashod Nakashian
f0c3365f9f loolwsd: improve ChildProcess cleanup
Change-Id: I9852f04021097800d5ab0ce775f26fada5f3c8e7
Reviewed-on: https://gerrit.libreoffice.org/30207
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:11:19 +00:00
Ashod Nakashian
20b98906bd loolwsd: avoid superflous noise where possible
Change-Id: Idb9180d81e471da965152175aa3c327b83613ab1
Reviewed-on: https://gerrit.libreoffice.org/30206
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:10:32 +00:00
Ashod Nakashian
47ed5e40dd loolwsd: kill assertIsNotLocked
It was intended to assert that the *same* thread
hadn't locked, not any. As it stands, it's problematic
and was decided to let go.

Change-Id: Iddb76f0edd62b7cdca062c2aa924b08e3d7952ef
Reviewed-on: https://gerrit.libreoffice.org/30205
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:09:43 +00:00
Ashod Nakashian
0279fca436 loolwsd: Unit-Prefork threading fixes and cleanup
newChild is not thread safe and accessing _childSockets
must be accessed under the lock. This fixes
a segfault and merges getMemory with newChild.

Change-Id: I523c3c31d465118f263f7cb09d84105946e19720
Reviewed-on: https://gerrit.libreoffice.org/30204
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:09:19 +00:00
Ashod Nakashian
785fd972f4 loolwsd: cleanup dead children before balancing
Change-Id: I782080bb83973a795e2c967d91b152095678a93e
Reviewed-on: https://gerrit.libreoffice.org/30203
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:08:21 +00:00
Ashod Nakashian
a69a67e81b loolwsd: don't do in catch what might have thrown in try
Change-Id: I36d039f573529545c878d30e25f3884e2b4afeb2
Reviewed-on: https://gerrit.libreoffice.org/30202
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:07:21 +00:00
Ashod Nakashian
166b14a83a loolwsd: cleanup testBarren
Change-Id: I5affeb7938e3b1373043e86799c991ef84d9b191
Reviewed-on: https://gerrit.libreoffice.org/30201
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:06:56 +00:00
Ashod Nakashian
2644b39d5a loolwsd: use the container to track number of DocumentBrokers
Change-Id: Ic2d88eb6265365f8ffc99c9117a2a4383018e519
Reviewed-on: https://gerrit.libreoffice.org/30200
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:06:40 +00:00
Ashod Nakashian
6c0be6d90d loolwsd: move admin updates into DocumentBroker
Change-Id: Ic35198a7e4457a775fac25954279501e37b94b42
Reviewed-on: https://gerrit.libreoffice.org/30199
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:05:28 +00:00
Ashod Nakashian
2e9b3ae247 loolwsd: admin cleanups
Change-Id: I1ed9cdfe1c78665722ed517218ce45055c661b69
Reviewed-on: https://gerrit.libreoffice.org/30198
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:05:20 +00:00
Ashod Nakashian
05a967e827 loolwsd: two new tests for tile rendering
Tiles are checked for correct count and whether or
not they are serviced from cache or rendered.

One test is done with a single view and another
with four views.

Change-Id: Ieadeef8547097d4a53fb1ce42c56c33ec16d849f
Reviewed-on: https://gerrit.libreoffice.org/30197
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:02:10 +00:00
Ashod Nakashian
5c7c825e94 loolwsd: correct parsing of renderid in testSimultaneousTilesRenderedJustOnce
Change-Id: I7c3610c43e5506f3548006b8724afb21e771342c
Reviewed-on: https://gerrit.libreoffice.org/30196
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:01:18 +00:00
Ashod Nakashian
6486977ca7 loolwsd: cleanup testEachView
Change-Id: I5f2b6bf0f437b27c536fee9d1020b616a4ea215f
Reviewed-on: https://gerrit.libreoffice.org/30195
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:00:59 +00:00
Ashod Nakashian
58bf5bbf37 loolwsd: throw on unexpected errors in getResponseMessage
Tests should read errors and parse them if they are
expected. Otherwise, we should not ignore them and move
on, because they are (by the above definition) unexpected.

Change-Id: I9d7a9fb23879044ac4f11461e92c5f6fd6b03fa1
Reviewed-on: https://gerrit.libreoffice.org/30194
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 21:00:22 +00:00
Ashod Nakashian
85c1a0d868 loolwsd: no warning for a fairly common case
Change-Id: Ic461de074295eda4f15b6b7a8f787fc2624908ce
Reviewed-on: https://gerrit.libreoffice.org/30193
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-23 20:59:43 +00:00