Commit graph

4202 commits

Author SHA1 Message Date
Ashod Nakashian
4186149f5b loolwsd: some logs converted to new form
Change-Id: I7d478ff2fc5715c3f612bf57f98aa2ce454ed4ed
Reviewed-on: https://gerrit.libreoffice.org/30423
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:10:17 +00:00
Ashod Nakashian
8be8311eaa loolwsd: new logging macros with lower overhead
Change-Id: I6889af4dd18692877469e8b24671aaf4649055e5
Reviewed-on: https://gerrit.libreoffice.org/30422
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:09:59 +00:00
Ashod Nakashian
90c60d9931 loolwsd: more efficient stream logging
Change-Id: I6596f87be4d36d2857c40b88864099c6cb5ab5b0
Reviewed-on: https://gerrit.libreoffice.org/30421
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:09:17 +00:00
Ashod Nakashian
b14961ffaf loolwsd: logging cleanup
Streaming to string can now be disabled when
the not needed to reduce overhead.

Change-Id: I95e5a700776bd9f05b0d969703fc471401dfea3b
Reviewed-on: https://gerrit.libreoffice.org/30420
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:08:46 +00:00
Ashod Nakashian
c8eb2ba612 loolwsd: cleanup tile response handling
Change-Id: I34b76b463c05e3479d1fd1516906c9a75282c753
Reviewed-on: https://gerrit.libreoffice.org/30419
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:08:01 +00:00
Ashod Nakashian
c96c13f014 loolwsd: expect no sessions when destroying DocumentBroker
Change-Id: Ib8244cd8ae6449a07eb010fba4b26ec5bad09162
Reviewed-on: https://gerrit.libreoffice.org/30418
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:07:10 +00:00
Ashod Nakashian
ce785b6432 loolwsd: convert int to string before adding to literal
Change-Id: Ia3352589aa894b38892f98fedc93926f063dce72
Reviewed-on: https://gerrit.libreoffice.org/30417
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:06:55 +00:00
Ashod Nakashian
773c15f710 loolwsd: consistent formatting
With the help of clang-format.
For reference, the following command was used,
but not all changes were commited:

clang-format-3.9 -style='{BasedOnStyle: WebKit,
 AlignAfterOpenBracket: Align,
 AlwaysBreakAfterReturnType: None,
 BreakBeforeBraces: Allman,
 DerivePointerAlignment: 'true',
 ExperimentalAutoDetectBinPacking: 'true',
 IndentWrappedFunctionNames: 'true',
 UseTab: Never}'

Change-Id: I0f7490c7ee38aeefeefcf9d5d4c3dab380cd63b8
Reviewed-on: https://gerrit.libreoffice.org/30416
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:06:35 +00:00
Ashod Nakashian
d694e00e8e loolwsd: admin cleanups
String stream is overkill for a single string concatination,
even with int-to-string conversion.

Avoid unnecessary noise when no subscribers exist and
cleanup dead subscribers on notify failure correctly.

Change-Id: Iaad3281e29089e3be6c40c58ae2ec93097665777
Reviewed-on: https://gerrit.libreoffice.org/30415
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:05:04 +00:00
Ashod Nakashian
82ca247aea loolwsd: updated calc_render.xls with more shapes and test marks
Change-Id: Ic78d872901266f204f3528313108a357685305de
Reviewed-on: https://gerrit.libreoffice.org/30414
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:04:14 +00:00
Ashod Nakashian
3e1e3e788a loolwsd: remove outdated comment
...and enable a fragile and broken rendering
test into a warning until a the rendering is
more stable/fixed.

Change-Id: Id6ed596ddb64d94af2d4b7d49c8f185ac6a8b4ff
Reviewed-on: https://gerrit.libreoffice.org/30413
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:04:04 +00:00
Ashod Nakashian
fb8d89589b loleaflet: fire addview and removeview events last
This fixes regression to the hackish fix done
in b26f2f2738 -
loleaflet: prevent the zoomlevel from changing on connect/disconnect

Change-Id: I09c899546d0d8bfbe4c274b0774fd30008cbcfa5
Reviewed-on: https://gerrit.libreoffice.org/30400
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-30 16:51:10 +00:00
Henry Castro
3c9eed3bb0 loleaflet: row/column highlighting to reflect the existing selection 2016-10-29 16:05:31 -04:00
Henry Castro
52793e8dd2 loleaflet: add Ctrl+F for Find 2016-10-29 10:42:40 -04:00
Marco Cecchetti
5e90ce91cf loleaflet: PgUp/PgDn fix: check doc type
Change-Id: Ib240e50a4f973a6ba83916e6b551dcdbb017a919
Reviewed-on: https://gerrit.libreoffice.org/30362
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-10-28 15:40:29 +00:00
Andras Timar
c96ef2d3af add Formatting marks to Insert menu of Writer 2016-10-28 12:40:40 +02:00
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