Commit graph

1430 commits

Author SHA1 Message Date
Miklos Vajna
d91dd9774a loleaflet: prefer HTML over plain text for drop purposes
We iterate over an array provided by the browser, let's always use HTML
and not plain text, even if the array contains plain text first, and
only then HTML.
2016-01-15 16:06:52 +01:00
Miklos Vajna
82e12a199c loleaflet: fix plain text drop
I don't know yet how to test HTML drop, but probably it needs the same
fix.
2016-01-15 15:51:13 +01:00
Jan Holesovsky
a29a9d37d6 loleaflet: Simlify & beautify the row headers. 2016-01-15 14:44:21 +01:00
Miklos Vajna
1977f07d5c paste: handle data containing newlines
By changing the protocol, so that instead of "paste ... data=<data>",
the client is now expected to send "paste ...\n<data>".
2016-01-15 14:43:59 +01:00
Tomaž Vajngerl
033a066ba7 Don't send unneccesary "tilecombine" on multiple invalidates
It usually happens that we get more "invalidateTiles" requests
from LO for one change. To avoid unnecessary tile rerenders we
remember (in transientInvalidationKeys) all tile keys which we
send to the server for rerendering and don't send the request
for the same tile. This is effective until we get back a
rerendered tile from the server (transientInvalidationKeys is
cleared).

(cherry picked from commit fdd76332db6b9c3b59864132578dc01ce19f0214)
2016-01-15 14:16:15 +01:00
Jan Holesovsky
be46817a6f loleaflet: JS part of the HTML and images dropping.
So far it is commented out, as it needs improvements on the loolwsd side too.
2016-01-15 11:11:14 +01:00
Miklos Vajna
de7823744e loolwsd: fix naming style of LOOLWSD static members 2016-01-15 09:44:07 +01:00
Jan Holesovsky
ce69617fb8 loleaflet: Support for 'drop', 'text/plain' only for now. 2016-01-15 09:24:22 +01:00
Jan Holesovsky
7009ee8e20 loleaflet: Fix paste in Firefox. 2016-01-15 09:00:02 +01:00
Miklos Vajna
ec9cc2aecc loolwsd: adjust coding style to reality
E.g. it's DocumentURI::UriToDocumentURIMap, not
DocumentURI::_uriToDocumentURIMap.
2016-01-15 07:41:49 +01:00
Jan Holesovsky
0eb0bec296 loleaflet: Really fire the event on 'this'. 2016-01-14 23:39:57 +01:00
Jan Holesovsky
95bc0d4ebb loleaflet: Fire 'hyperlinkclicked' when the user clicks hyperlink in the doc. 2016-01-14 22:32:18 +01:00
Jan Holesovsky
43417659ad loleaflet: Implement 'id' for errors.
Most of the errors are not interesting for the user (in the sense that they
couldn't do anything about them anyway), for those return just a general
'internal error'; details are still available through the 'cmd' and 'kind'.

The rest have their own 'id'.
2016-01-14 21:30:53 +01:00
Andras Timar
6b767bc5ee loolwsd: loolwsd-systemplate-setup: remove OS X support attempt 2016-01-14 18:15:15 +01:00
Andras Timar
3a53c864b4 loolwsd: loolwsd-systemplate-setup: add libpng* 2016-01-14 18:15:15 +01:00
Andras Timar
37f5132e9e loolwsd: loolwsd-systemplate-setup: remove redundancy 2016-01-14 18:15:15 +01:00
Ashod Nakashian
0632da5edb loolwsd: reworked child management and load balancing in broker
Change-Id: I92874d1aeb8fe46f3bbc1cb9d3b2b9d46632f4b9
Reviewed-on: https://gerrit.libreoffice.org/21473
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-14 13:56:40 +00:00
Ashod Nakashian
558dfd40e0 loolwsd: unloading of disconnected documents
Documents that do not have any client connections to
are unloaded.

Currently we do not check for saved state of the
document before unloading.

Change-Id: I0f4f2ec1a7ddb15262833fe3d4ab73af16a2a959
Reviewed-on: https://gerrit.libreoffice.org/21472
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-14 13:55:50 +00:00
Ashod Nakashian
5d07c46065 loolwsd: logging improvements
Error can supress printing errno and warning can
be asked to print it by setting a bool argument.

Formatting has been improved for readability.

Change-Id: I93d2808fbff4f6cacc583923905438ada7b8e90e
Reviewed-on: https://gerrit.libreoffice.org/21471
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-14 13:41:18 +00:00
Ashod Nakashian
bdd3f73bd5 loolwsd: misc child cleanup
Change-Id: I5ed100e053925264db2cb8f60de67cf6a536a65b
Reviewed-on: https://gerrit.libreoffice.org/21470
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-14 13:40:40 +00:00
Ashod Nakashian
3d803dd9b0 loolwsd: Document -> DocumentURI
Change-Id: I7e5989dbee368314a4db7c723439060f1064e844
Reviewed-on: https://gerrit.libreoffice.org/21469
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-14 13:39:43 +00:00
Ashod Nakashian
c2af36d0ef loolwsd: simplified Connection
Change-Id: Ia7ff0d4b636513ce1b08641bb6db85c97ee5c2f9
Reviewed-on: https://gerrit.libreoffice.org/21468
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-14 13:38:45 +00:00
Andras Timar
3ec262e01b loolwsd: add loolbroker, loolkit and loolmap to rpm 2016-01-14 13:45:33 +01:00
Andras Timar
7cf9cdd4c8 loolwsd: add QueueHandler.hpp to dist tarball 2016-01-14 13:43:54 +01:00
Andras Timar
207925266c loolwsd: add Rectangle.hpp to dist tarball
(cherry picked from commit 69222ace7a67ca8adc9a21a988436aad92883b51)
2016-01-14 13:19:48 +01:00
Tomaž Vajngerl
c22842442b Send tilecombine command when invalidating tiles
(cherry picked from commit 2f58be7613f2bd663693b7022f7ca5e38f5c1f41)
2016-01-14 13:17:53 +01:00
Tomaž Vajngerl
721cbbcbb3 Add "tilecombine" command to render more tiles in one call
When invalidating we need to rerender more tiles at once.
This change optimizes that with a new command which rerenders a
larger area once and then separates the rendered buffer into more
tiles. This generally decreases the invalidation time by 2-4 times
and in some cases (when invalidating images in document) up to 9
times.
2016-01-14 13:11:57 +01:00
Tomaž Vajngerl
9af47a69d3 add simple Rectangle struct implementation
(cherry picked from commit 5c25dd61cb6a27da47c6e3776024cd7d622082b8)
2016-01-14 13:11:57 +01:00
Tomaž Vajngerl
8ee6503469 add function to convert string to integer
(cherry picked from commit f7acce6f20bf362b741542d66e2879c1638bab7c)
2016-01-14 13:11:57 +01:00
Andras Timar
26d30c88de loolwsd: -Werror,-Wunused-variable 2016-01-14 12:40:59 +01:00
Tomaž Vajngerl
9071f7c9bc encode PNG from buffer at arbitrary buffer position
This commit add 2 methods to encode a buffer to PNG: the "old"
method which encodes the whole buffer to a PNG, and a new method
to encode a part of a buffer (sub image) to PNG. The first method
is only added for convenience.
2016-01-14 12:34:01 +01:00
Jan Holesovsky
9337f96ac5 loleaflet: L.Socket should not be global. 2016-01-14 10:05:04 +01:00
Miklos Vajna
afed9b97f8 configure: use -Werror for C sources as well 2016-01-14 08:51:42 +01:00
Jan Holesovsky
d20eaa3014 loolwsd: More protection when inserting image. 2016-01-13 16:51:36 +01:00
Jan Holesovsky
b47fe0bd0b loolwsd: Fix inserting of images into files opened via http:// 2016-01-13 16:51:36 +01:00
Miklos Vajna
0c46431741 loolwsd: -Werror,-Wunused-variable 2016-01-13 14:34:01 +01:00
Jan Holesovsky
3cc15e88b9 loleaflet: Update the spreadsheet tabs after inserting a sheet. 2016-01-13 11:52:31 +01:00
Jan Holesovsky
2af63d4b2e loleaflet: Add more commands to the documentation. 2016-01-13 08:54:29 +01:00
Jan Holesovsky
d51972c28d loolwsd: Don't cache empty partpagerectangles.
This is implemented only for Writer, so they are empty for Calc and Impress;
and yet they can confuse loleaflet terribly...
2016-01-12 14:57:24 +01:00
Jan Holesovsky
ed7585e4ff loleaflet: Document how to insert a table via .uno: command. 2016-01-12 11:33:37 +01:00
Faruk Uzun
ca33f7e181 loleaflet: ccu#1368 add ctrl+f1 to view & hide comment on cell
In desktop version of Calc; Ctrl+F1 command toggles between
view and hide the comment attached to current cell. This adds
same shortcut to online.

Change-Id: I8d68ab935cc8a76ff8d288c58656c592bfa44eb1
Reviewed-on: https://gerrit.libreoffice.org/21359
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-01-12 08:20:23 +00:00
Miklos Vajna
50273a0bd2 configure: no need to link against PocoXML 2016-01-12 09:06:21 +01:00
Ashod Nakashian
6668dca7ac loolwsd: handle I/O error while destroying MasterProcessSession
Change-Id: I9618fb57bcb3cdb472d03abb6c49d649afbf25a5
Reviewed-on: https://gerrit.libreoffice.org/21379
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-12 04:35:16 +00:00
Ashod Nakashian
ecc35dcdb2 loolwsd: using recursive_mutex since callbacks invoke public functions
Change-Id: Iddcf342cf59c4bd534be52a4b4661bc630f07007
Reviewed-on: https://gerrit.libreoffice.org/21378
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-12 04:34:23 +00:00
Ashod Nakashian
37a4d8ec10 loolwsd: uniqueLock -> lock, lock() -> getLock()
Change-Id: I3ea58a1ee0f8c0d7a153b78a2a03104d07416760
Reviewed-on: https://gerrit.libreoffice.org/21377
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-12 04:33:42 +00:00
Jan Holesovsky
aca8d673b2 loleaflet: Don't crash on map.remove() when the underlying DOM is gone. 2016-01-11 16:43:40 +01:00
Miklos Vajna
b8ef0c8813 loolwsd: fix make check
After my commit 49b67cdc36b599f865d4a6de214d901861f27196 (tdf#96961 sw
Hide Whitespace: still show whitespace on the last page, 2016-01-08) in
core.git.
2016-01-11 11:24:20 +01:00
Miklos Vajna
d08b1ff7e2 loolwsd: -Werror=shadow 2016-01-11 11:17:36 +01:00
Miklos Vajna
1fbe0580e1 loolwsd: -Werror,-Wunused-private-field 2016-01-11 09:18:37 +01:00
Ashod Nakashian
55f857e17c loolwsd: Poco::Mutex -> std::mutex and callback locks on session
Change-Id: I9c7d16352110566e5fc31c280784ded30cd3a9be
Reviewed-on: https://gerrit.libreoffice.org/21333
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-11 04:12:11 +00:00