Commit graph

3328 commits

Author SHA1 Message Date
Pranav Kant
86891498a9 loolwsd: fix leftover confusing comment
Call to getStatus is gone in
2744caf97b, so there are no
"arguments" anywhere now.
2016-08-21 21:19:21 +05:30
Pranav Kant
77be7d6e18 loleaflet: Prevent double-decoding utf8; fixes context menu
Text messages are already utf8 decoded, so we only need to decode
if its a binary message, not otherwise.

This also fixes context menu invocation on the UI as in some
cases double-decoding of utf8 strings would throw a URI malformed
error. This problem started to appear after we explicitly started
sending context menu payload as text message rather than binary
message in ecd33e1b07
2016-08-21 19:41:33 +05:30
Miklos Vajna
e0cd11848a Update bundled headers 2016-08-19 16:55:09 +02:00
Andras Timar
a68274c1de loleaflet: spinner l10n 2016-08-19 14:34:30 +02:00
Marco Cecchetti
26fa0651d6 loleaflet: initial support for multiple cursor in Calc 2016-08-18 10:08:26 +02:00
Miklos Vajna
f85dcba905 QueueHandler: use std::move()
Change-Id: I849a273a68986fb665dc7c1d03c54fd7dcf9b488
2016-08-18 08:19:00 +02:00
Henry Castro
2757adc3c6 loleaflet: add dblclick row/column to process optimal height/width 2016-08-17 09:15:42 -04:00
Miklos Vajna
30f1a43615 UnitHTTP: avoid binding dereferenced null pointer to reference
As it's undefined behavior.

Change-Id: Icd172f23fbeb0ef9b9d792ffb39b08b361fa7844
2016-08-17 08:39:19 +02:00
Pranav Kant
f41b947960 loleaflet: Disable pointer events on graphic marker boundary 2016-08-16 22:43:48 +05:30
Pranav Kant
9ec2aba359 loleaflet: Disable pointer events on cell cursor
otherwise, it would invoke browser's context menu upon
right-clicking on the cell cursor (border of the cell; on black
lines)
2016-08-16 22:41:31 +05:30
Andras Timar
6380deb5a8 loolwsd: disable command trace when it's missing in config file 2016-08-16 11:24:22 +02:00
Andras Timar
e029d7ab14 loolwsd: typo exlcude->exclude 2016-08-16 11:15:49 +02:00
Andras Timar
ab1d022598 fix jake lint indentation errors 2016-08-16 10:59:36 +02:00
Pranav Kant
449861fa12 loleaflet: multi-view; better handling of polygons 2016-08-16 13:34:42 +05:30
Pranav Kant
eac8f32eda loleaflet: Prevent creating Polygon instances unnecessarily
L.Polygon can take array of latlng pairs. Lets pass the full
array instead of passing each array element one by one and
creating Polygon instances everytime.
2016-08-16 13:34:41 +05:30
Pranav Kant
1b92b481ee loleaflet: reference; add missing method to PolyUtil 2016-08-16 13:34:39 +05:30
Pranav Kant
93c114d0f4 Update README 2016-08-16 11:17:00 +05:30
Pranav Kant
e86e7a73f8 loleaflet: performance improvements in build process
Minifiying the js code was taking too much time. Minifying is not
really needed on developer's machine, so lets disable it by
default, otherwise it gets annoying during development having to
wait for so many seconds for it to build.

A simple 'make' now means no debug-info and non-minified
bundle.js. To add debug-info(source-maps), do 'make DEBUG=true'.
And to minify, similarly use the MINIFY=true variable with make.

'make dist' forcefully minifies the js code.
2016-08-16 11:11:16 +05:30
Miklos Vajna
c47c4fe5a4 Log: clean up unnecessary channelConsole
splitterChannel can be a raw pointer, at the end it'll be assigned to
channel, which does not call duplicate() on it. As a side effect this
fixes the use-after-free warnings reported by clang-tidy.

Change-Id: I8f5d7c9f6c8f280c9f1222c2ab6d7b0fddf64a30
Reviewed-on: https://gerrit.libreoffice.org/28145
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 16:49:20 +00:00
Pranav Kant
6df1c4c6f7 loolwsd: fix impress; get viewid after initializeForRendering()
For impress, call to initializeForRendering() *changes* the
viewid, so there's no point in remembering the viewid before call
to initializeForRendering().
2016-08-15 21:12:03 +05:30
Pranav Kant
82e1769fe8 loleaflet: textviewcallback support; colored text selections 2016-08-15 20:33:30 +05:30
Ashod Nakashian
a805b06874 loolwsd: fix unittest regressions
Change-Id: I502c87a2c6eb3d34c0e137c774c1c77bec8f50d9
Reviewed-on: https://gerrit.libreoffice.org/28144
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 12:12:39 +00:00
Miklos Vajna
955a2d5577 LOOLKit: fix -Werror,-Winconsistent-missing-override
Change-Id: Ia4ffbb32730880c188f9d9bf9b14d3e3daebc272
2016-08-15 09:47:31 +02:00
Ashod Nakashian
daad00812d loolwsd: refresh views on UI re-activation
Change-Id: I78d04abe939a91e56cb06f89184e651e7946b28b
Reviewed-on: https://gerrit.libreoffice.org/28134
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:19:15 +00:00
Ashod Nakashian
5af1f18e36 loolwsd: convert function-object callbacks to abstract interface
Change-Id: Ia2e832659f8deddd55b8be6507c2d7406f110085
Reviewed-on: https://gerrit.libreoffice.org/28133
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:18:26 +00:00
Ashod Nakashian
59ed1bd2ff loleaflet: new command remallviews to remove all views
This command is intended to be used when re-activating a
client. It is intended to be sent prior to sending the
list of active views, including the re-activating
client's own view.

A client UI must maintain its own view ID and info
when receiving this command.

Change-Id: Iea58c01fb30af139888e746b5cf9e7ba7e7eeab1
Reviewed-on: https://gerrit.libreoffice.org/28132
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:15:47 +00:00
Ashod Nakashian
fbcce1b803 loleaflet+loolwsd: new commands addview and remview
The new commands help the UI update the cursors and other
visual elements that track views and clients.

Currently, when remview is received loleaflet removes
the associated cursor from the screen.

Change-Id: I03e2f9e3485166adae31de84ae7ac6bd1c85b05d
Reviewed-on: https://gerrit.libreoffice.org/28131
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:15:01 +00:00
Ashod Nakashian
f64a18d520 loolwsd: corrected ChildSession and connection cleanup
ChildSession and Connection are run their own thread and
their destruction depends on the connection, which of course
is completely asynchronous.

This change fires the destruction of the ChildSession, which
unloads the view, without destroying the connection.

The latter is cleaned up when purgeSessions() is invoked.

Change-Id: I341bfdbdd4b37338d1813ec707a51aeb3be59497
Reviewed-on: https://gerrit.libreoffice.org/28130
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:13:39 +00:00
Ashod Nakashian
359731f096 loolwsd: cleanup of RuntimeConstant class
Change-Id: If3d57e73445cdb0b92c6b3721b4b7b0ca030a2d7
Reviewed-on: https://gerrit.libreoffice.org/28129
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:13:01 +00:00
Ashod Nakashian
08909b2a3d loolwsd: doxygen comments added to all classes
Change-Id: Ia485c2dcec20a6840d46836a61f75a8e7e8762ed
Reviewed-on: https://gerrit.libreoffice.org/28128
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:12:31 +00:00
Ashod Nakashian
8745e24fa9 loolwsd: ChildDispatcher -> CommandDispatcher
Change-Id: I9e51e4258ae05dd0e56d52ba2f99fadbcb58257c
Reviewed-on: https://gerrit.libreoffice.org/28127
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:11:30 +00:00
Ashod Nakashian
a30526c87e loolwsd: remove queue thread from child socket handler
Change-Id: Ibcdd6146bf3fc20813520213b696079b793cf830
Reviewed-on: https://gerrit.libreoffice.org/28126
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:10:56 +00:00
Ashod Nakashian
6af13994e6 loolwsd: cleanup and simplify
Change-Id: I48a841a3ce6638e33a96ed44c75e6d2e17dc1c37
Reviewed-on: https://gerrit.libreoffice.org/28125
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:10:29 +00:00
Ashod Nakashian
e3507552b7 loolwsd: one thread and queue per document
Each ChildSession had its own thread and queue,
which was an overkill. By moving the LOK callback
handler into Document and handling all events in the
same order that we receive them we reduce resource
consumption without affecting performance.

In fact, performance could improve by avoiding
unnecessary overheads.

Change-Id: Ic2bac0f08c28e91acabd512a704966c6b761fc7c
Reviewed-on: https://gerrit.libreoffice.org/28124
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:09:57 +00:00
Ashod Nakashian
58468c76be loolwsd: cleaned up ChildSession public members
Change-Id: I4bfc008859edb979688ece89d99af227ea3d0416
Reviewed-on: https://gerrit.libreoffice.org/28123
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:07:44 +00:00
Ashod Nakashian
ae5f47234c loolwsd: per-session callbacks
Callbacks from Core are now per-session and not
shared among all. A new descriptor is used to
help get from the callback to the respective
session.

Change-Id: Ie72771da05eef4760cf01351f7c06c034abf5109
Reviewed-on: https://gerrit.libreoffice.org/28122
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:06:59 +00:00
Ashod Nakashian
5a20ae67ba loolwsd: parse the ViewId of event payloads to dispatch
Change-Id: I70e603c7f9d5d63e6ca0c3fb0364310112bc03c0
Reviewed-on: https://gerrit.libreoffice.org/28121
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:06:24 +00:00
Ashod Nakashian
10737fdeab loolwsd: payload as std::string
Change-Id: Icee8a16fd18489da87e22955f3126851261332e5
Reviewed-on: https://gerrit.libreoffice.org/28120
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:05:53 +00:00
Ashod Nakashian
2744caf97b loolwsd: simplify status after load
Change-Id: I919e09616173d88eda8989e06da05ae54c0bdda0
Reviewed-on: https://gerrit.libreoffice.org/28119
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:05:02 +00:00
Ashod Nakashian
dafa5d078d loolwsd: split out per-view LOK callback from default
Change-Id: I01c0bb14cabbbe06bc790920d0f74d0f106bbbde
Reviewed-on: https://gerrit.libreoffice.org/28118
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:04:29 +00:00
Ashod Nakashian
96934590a0 loolwsd: do not cache status since it has per-view info
Change-Id: Ia32383cffd7b489fe3124457897991555b918db6
Reviewed-on: https://gerrit.libreoffice.org/28117
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:03:47 +00:00
Ashod Nakashian
6194b043c0 loolwsd: better UT failure message
Change-Id: Iad269910b1a38f67d87811590ffecefe27ba99cd
Reviewed-on: https://gerrit.libreoffice.org/28116
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:00:20 +00:00
Henry Castro
e41f8581d2 loolwsd: test: column/row re-size 2016-08-13 20:11:24 -04:00
Henry Castro
817cacde84 loleaflet: drag & drop to unhide column/row 2016-08-13 12:16:03 -04:00
Henry Castro
c7bef135c5 loolwsd: fix -Werror=shadow 2016-08-13 08:59:14 -04:00
Henry Castro
1de001e283 loleaflet: fix small column/row resize 2016-08-12 13:51:25 -04:00
Jan Holesovsky
b627e8d878 List the .deb dependencies explicitly. 2016-08-12 00:38:40 +02:00
Jan Holesovsky
3497076109 Update the changelog. 2016-08-12 00:38:40 +02:00
Jan Holesovsky
50bb072e1b Improve the explanation slightly. 2016-08-12 00:38:40 +02:00
Pranav Kant
461e1d5cb0 loleaflet: Externalize source-maps only if debug=true
Otherwise, running exorcist when debug is off gives a broken
bundle.js
2016-08-11 21:38:53 +05:30