Commit graph

556 commits

Author SHA1 Message Date
Andras Timar
0002fdfd6c fix license headers
Change-Id: I8623770b32d278a45357dc7f757fabfadd2b4af7
2020-10-01 11:56:43 +02:00
gokaysatir
805ff2f2a8 Online: Copy hyperlink location. / Online side.
Unused selection variable has been removed. "clipboardchanged" event is activated.
LOK_CALLBACK_CLIPBOARD_CHANGED is handled according to existence of payload.

Change-Id: I6e37cb2ca4d4c59e55555ba3397cb00dbb7eafa2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103165
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-09-30 15:10:19 +02:00
Andras Timar
d6216e4335 default to Carlito in font selector
Change-Id: Ib568253adc48376cf57335934c3471b46d08fdbc
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103092
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-09-21 16:27:12 +02:00
gokaysatir
f05906aac5 Online: Show input help on Online / Online part.
Change-Id: Ida8c5e8baccf87dae68c1c6d8f5302b1288741e7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102747
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-09-17 14:23:13 +02:00
Miklos Vajna
07629f0d7c Mark getMobileAppDocId() as const
Change-Id: Ie02cf07ce12ad63bf5374d94bdbd1b55eaeec4da
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102897
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-09-17 09:24:44 +02:00
Miklos Vajna
3d082ad451 Mark processInputEnabled() as const
Change-Id: I98222269b20e01ba50166d696d1f6846c06d8764
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102703
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-09-15 09:34:18 +02:00
Szymon Kłos
70827c372c Simplify download process
Use hash to identify download and pass that to the client.
This allows us to reduce parameters for download requests.
DocBroker maps download ids to URL in the file system.

Change-Id: I254d4f0ccaf3cff9f038a817c8162510ae228bc5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101992
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-09-07 15:00:20 +02:00
Pranam Lashkari
0a54b23251 leaflet: wsd: select the page before opening the slide wizard
problem:
In the mobile view taping on the selected slide preview would open the wizard
but when some object is selected on the slide
wizard would open for that object
this patch helps us to set the Page as selection and as result
mobile wizard opens for the slide even when some object on slide is selected

Change-Id: Ia4f0d5fe6a4d82d101ee26b75f557a44e0627704
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101422
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-09-02 10:41:33 +02:00
Ashod Nakashian
9f5bd85008 wsd: use a shared threadname suffix for each document
The use of a common threadname suffix in the WSD and Kit
processes is intentional. It is designed to help filter
for a single document's logs across both processes.

The thread name has nothing to do with the classes in
the code, nor is it intended to imply any relationship
except with the process and the document in question.

As the comment in this patch explains, the choice of
the suffix is arbitrary and while it may be changed,
it has to be sensible and common between the two threads
to allow for easy grepping.

Historically, there were in fact dedicated threads
within the respective "broker" classes, but this
fact should be safely ignored, since at the log level
we care less about which part of the code generates a
log entry (that info, if needed, is at the end of each
log entry, in the form of filename and line number),
rather we care more about which document it relates to,
which is crucial in investigating production issues.

Logs and code structure are only incidentally related.
Logs are (or at least should be) designed around
the execution structure, not code architecture.

(This reverts 2a16f34812)

Change-Id: Ic6fe2f9425998824774d2644fe4362e75dea6b88
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101261
Tested-by: Jenkins
Tested-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-08-26 17:47:50 +02:00
Ashod Nakashian
29a5a1f1e9 wsd: move jail setup to the script to support readonly systemplate
We now gracefully fallback to copying when/if systemplate
is readonly.

The bulk of the change is to support proper cleanup in
both cases.

First, we had to move as much of the jail bootstrapping
into the loolwsd-systemplate-setup script, so systemplate
will be as complete as possible before it is locked down.
Next, we needed to update the jail with graceful fallback
to linking/copying upon failure. For that, the jail setup
logic in Kit.cpp has been reworked to support not just
update failures, but also more comprehensive mounting
failures as well.

Finally, jail cleanup now is seamless. To support proper
cleanup when we had mounting enabled but had to fallback,
we mark jails that aren't mounted so we can 'rm -rf' the
contents safely and without fear or causing undue damage
(as unlikely as that is, technically we wouldn't want to
rm systemplate files, if mounting read-only had failed).

There are a few minor refactorings of JailUtil to make
it cleaner and more robust.

Change-Id: Iac34869cb84f45acf64fbbc46d46898367b496d2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101260
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-08-25 07:58:30 +02:00
Ashod Nakashian
bc8da0cb33 wsd: support read-only systemplate
For various reasons, systemplate may be read-only
or under a different owner and therefore impossible
to update the dynamic files in it.

To support such a scenario, we first link the
eight dynamic files in /etc when creating systemplate.
If this fails, we copy the files.

When creating jails, we always check that all the
dynamic files are up-to-date. If they are, nothing
further is necessary and we bind-mount, if enabled
and possible.

However, if the dynamic files are not up-to-date,
we disable bind-mounting and force linking
the files in the jails. Failing that, we copy them,
which is not ideal, but allows us to ensure the
dynamic files are up-to-date as we copy them too.

Ideally, the dynamic files in question would be
hard-link (or at least soft-linked) in systemplate
at creation. From then on we would bind-mount
the jails and everything would work perfectly and
no files would need updating. This patch is fallback
for when this scheme fails, which should be exceedingly
rare anyway, but which still ensures correct operation.

Change-Id: I09c6f057c49396579aaddb1b8bf4af0930dd4247
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100834
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-08-17 13:51:56 +02:00
Tor Lillqvist
5df5329f83 Guard against view count being zero
Happened for me once in the iOS app, not sure if it was just a random
fluke while debugging, or whether it can happen in normal use. Anyway,
take it into consideration.

If the view count is zero, don't overwrite the '['.

Change-Id: Ia797d7cc99cc273e68ec184406f47283c9a647e2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100672
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-08-13 22:07:28 +02:00
Ashod Nakashian
c5f9d605e4 wsd: make outgoing connection timeout configurable
The default Poco connection timeout is 60 seconds,
which is probably excessive. The current configurable
default is a more reasonable 30 seconds.

Currently we set this timeout on Storage connections
going out (i.e. WOPI connections).

Change-Id: Ie80a9141ca9bf721addc74baf94e62e0ad72fdd2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98913
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ash@collabora.com>
2020-08-11 20:11:14 +02:00
Andras Timar
e857c1212b fix: error: ‘id’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
Change-Id: Idabda74d64bb7ee00e3323aee6fa114bed1593fd
2020-08-06 16:00:34 +02:00
Michael Meeks
9142828282 textinput: use a single input message per key on the wire.
Change-Id: Ibd0f7afb98c8ed278751c4b5b46d7ce2467cd71f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100184
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-08-05 18:44:10 +02:00
Szymon Kłos
16be50d757 Send Action_Save_Resp when notification was requested on save as
Change-Id: Iafe06873fcd8c25e93eb9daa2eea187827e3ac47
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99593
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-07-28 14:51:10 +02:00
Gabriel Masei
d458f35c1f kit: disable parallel processing at higher levels
Sometimes multiple messages are processed in a single iteration
at socket level. This happens in WebSocketHandler and when draining
Document queue.Just covered these cases.

Change-Id: Ifa46f5d484b67015cca64008b2c89426cc839e64
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99387
Tested-by: Jenkins
Tested-by: Gabriel Masei <gabriel.masei@1and1.ro>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Gabriel Masei <gabriel.masei@1and1.ro>
2020-07-25 21:22:50 +02:00
Gabriel Masei
9c6739eee0 kit: disable parallel handling of messages while processing load and save
The map._activate, among other actions, is sending indirectly some messages
to the server like clientzoom and clientvisiblearea. If these messages are send
before the document finishes processing the load message then there is
a chance that a nodocloaded error will be thrown because there is a
chance that the messages will be processed in parallel with load. This happens
constantly for xlsx files. This is generated by the Unipoll mechanism which,
in case of xlsx files, triggers a parallel processing.
To avoid the above scenario a mechanism of disabling parallel processing of
messages in kit was implemented and is used for load and save messages, for now.

Change-Id: I4c83e72e600f92d0bb4f1f18cebe694e326256d0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98519
Tested-by: Jenkins
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-07-22 17:38:05 +02:00
Miklos Vajna
57959d6e86 Document::dumpState: fix isLoading typo
Change-Id: I21fdb82bcd9ff9348b8a08de9a55a64164ce47f4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99117
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-21 09:17:24 +02:00
Michael Meeks
ca5d5943e4 Kit: add initial state dumping on USR1.
Change-Id: I8225f686e8678c08e505490df056904fc813d2fe
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98927
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-07-18 18:21:14 +02:00
Michael Meeks
0084c3b275 Process any pending tileQueue items first.
Change-Id: I078bc1f52ba7647ca1715ea3222d695936dd657f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98928
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-07-17 12:29:54 +02:00
Pranam Lashkari
22359767d6 tdf#129296 leaflet: Password protected document load failing
Do not send faileddocloading error if it is because of password.

When the document is password protected, we send to the client
both passwordrequired and faileddocloading.
These two are handled differently. While the first prompts the
user for password input, the second internally flags fatal error
and shows an error message that the document may be corrupted etc.
The end result is that the document is not loaded and displayed
when the user submits a correct password. To reset the fatal
error one has to reload, which is unhelpful when we need to
provide a password.

This patch makes sure that we only send one error message to
the client. If a password is required, it already implies that
the document didn't load, and that with the proper password we
should try again.
Similarly for when the password given is wrong. However, if
loading fails and it isn't a password-related failure,
faileddocloading error is returned and in this case the client
handles it as a final error (that requires reloading to retry).

Change-Id: I383418fd40b6e0749b20af0ef8dc40f391a05559
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98676
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-07-16 19:31:31 +02:00
Jan Holesovsky
1b3732b941 android: Call the SAVE directly from the native code.
Until now, for the "local save has completed, upload it back to the
content: URI" messages we were relying on the "local save" -> JavaScript
-> Java -> "upload to content:/ URI" chain.

It turns out though, that the WebView can be dead by the time we need
the notification that the save has completed.  This was particularly
seen on ChromeOS when the document was closed using the [x] in the
window decoration.

As a solution, we need to pass the info that the "local save" has
completed directly to Java.  So far this uses the same semantics as the
postMobileMessage() and reuse its code; but maybe in the future we'll
need to split this.

Change-Id: If1b93e4f76cee3abc6aebfc3e9072810ab73bb42
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98773
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-07-16 11:52:58 +02:00
Michael Meeks
6ca6a7649e Forkit: add dump_forkit_state and re-factor state checks to simplify.
Change-Id: Ic65bbd0894f26f69e1b55c769ac47013f9aaf163
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98746
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-07-14 17:28:32 +02:00
Tor Lillqvist
07bf598430 Make objects and threads go away more reliably in the iOS app
We probably used to have circular references that made KitSocketPoll
and KitWebSocketHandler objects hang around forever, or something.
(Not a problem in web-based Online where kit processes have a
restricted lifetime.)

Change-Id: Ia6eebc51f4a4a8fb4f69a2c83a0131de921ea1d6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98744
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-14 16:56:20 +02:00
Tor Lillqvist
b673417946 More re-factoring of tile rendering
This is for the benefit of a next-gen iOS app (without FakeSockets and
much of the current Online plumbing).

This is not supposed to cause any functional changes in normal Online
even if code is organised a bit differently.

Change-Id: Ib09a84ff5d3ba858cf3f50553d76757966af7ad2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98655
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-13 16:39:59 +02:00
Tor Lillqvist
619cf1b304 Bin DeltaGenerator-using code that has been commented out since 2017
"Disable for now - pushed in error" says the comment added in
e11794da25.

Change-Id: Ia2b72bfe20f8ff16d74d1966d511c74eab3e4417
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98587
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-12 12:39:16 +02:00
Tor Lillqvist
63620b1823 Re-factoring to make re-use in a next-gen iOS app easier
Change-Id: I1656d38fb8ad4213417b8c00c0c84540e0eacdbe
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98499
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-11 06:14:46 +02:00
Dennis Francis
d1b3f4c6af wsd/kit: use splitx/splity in clientvisiblearea message...
to filter tile-invalidation messages, so that the client gets
invalidations/new tiles for all split panes.

Change-Id: Ifacc452ed6bb43dfd36ff16386fb4a547ec8302b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98362
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-07-08 17:18:33 +02:00
Dennis Francis
5d2bb319e9 Calc: enable sheet-geometry data and printTwips messages
Change-Id: I80c61591a4e356cd406ecc1806ad387429ba13c1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98169
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-07-08 16:42:12 +02:00
Ashod Nakashian
9f7f6dca6a wsd: cleanup realpath call
The new utility is safer and more readable.

Change-Id: I3a86675378d458cb004e5534dbf2b401936d0e57
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98183
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-06 13:54:54 +02:00
Dennis Francis
b976a4bfc9 handle LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY
Change-Id: I2f894f32d4c9e852d89159a55c0dd9effb45c09e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97955
Tested-by: Dennis Francis <dennis.francis@collabora.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-07-04 12:30:16 +02:00
Tor Lillqvist
4ac9bd5c1b Fix a couple uses of misleading function names in logging
Change-Id: Id7be123b1183a9e21383eb4ac894d3bd88691f5a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97867
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-03 16:02:42 +02:00
Tor Lillqvist
3edc4d2201 Move the setupKitEnvironment() function into a file of its own
A small re-factoring to help planned re-plumbing of the iOS app.

Change-Id: I21f09216a7c5adf965179765a75f5a0d521cd7f3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97771
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-03 08:40:49 +02:00
Ashod Nakashian
02da27a436 wsd: improve readability
Change-Id: I2f85ebff783ebb799324b0aa95f5d0d023c19231
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96381
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 07:40:10 +02:00
Ashod Nakashian
5c9988f2e3 wsd: faster jail setup via bind-mount
loolmount now works and supports mounting and
unmounting, plus numerous improvements,
refactoring, logging, etc..  When enabled,
binding improves the jail setup time by anywhere
from 2x to orders of magnitude (in docker, f.e.).

A new config entry mount_jail_tree controls
whether mounting is used or the old method of
linking/copying of jail contents. It is set to
true by default and falls back to linking/copying.
A test mount is done when the setting is enabled,
and if mounting fails, it's disabled to avoid noise.

Temporarily disabled for unit-tests until we can
cleanup lingering mounts after Jenkins aborts our
build job. In a future patch we will have mount/jail
cleanup as part of make.

The network/system files in /etc that need frequent
refreshing are now updated in systemplate to make
their most recent version available in the jails.
These files can change during the course of loolwsd
lifetime, and are unlikely to be updated in
systemplate after installation at all. We link to
them in the systemplate/etc directory, and if that
fails, we copy them before forking each kit
instance to have the latest.

This reworks the approach used to bind-mount the
jails and the templates such that the total is
now down to only three mounts: systemplate, lo, tmp.

As now systemplate and lotemplate are shared, they
must be mounted as readonly, this means that user/
must now be moved into tmp/user/ which is writable.

The mount-points must be recursive, because we mount
lo/ within the mount-point of systemplate (which is
the root of the jail). But because we (re)bind
recursively, and because both systemplate and
lotemplate are mounted for each jails, we need to
make them unbindable, so they wouldn't multiply the
mount-points for each jails (an explosive growth!)
Contrarywise, we don't want the mount-points to
be shared, because we don't expect to add/remove
mounts after a jail is created.

The random temp directory is now created and set
correctly, plus many logging and other improvements.

Change-Id: Iae3fda5e876cf47d2cae6669a87b5b826a8748df
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92829
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 05:42:43 +02:00
Szymon Kłos
11965d083e notebookbar: early init
- read settings from loolwsd.xml
- in case of notebookbar activated send :notebookbar parameter
- for mobile apps I left empty parameter in setupKitEnvironment calls

Change-Id: I5813589564b37eecc1e77c5d0eb737eca5f92f04
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97233
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-30 08:15:25 +02:00
Miklos Vajna
2604913fb6 kit: mark KitSocketPoll as final
KitSocketPoll has virtual functions, but a non-virtual destructor. Mark
it as final to make it clear that it's safe to call delete on it.

Change-Id: I685f9d7bcfbb82115e9c25991c877aa99391dd3e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97361
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-29 09:18:16 +02:00
Tomaž Vajngerl
ab1fc4c7b3 Also send parthash info when using draw (in case of PDF)
Parts hashes were only sent for impress but we also need it for
draw (PDF) so that the annostions/comments start to work.

Change-Id: I8668c67cd9ae6ab0b5a3bda3eb5f784499a41927
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97332
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-06-28 00:37:24 +02:00
Tor Lillqvist
7f25109f72 tdf#128502: Chunk of work to enable "multi-tasking" in the iOS app
Seems to not cause any serious regressions in the iOS app or in "make
run", but of course I am not able to run a comprehensive check of all
functionality.

Change-Id: I44a0e8d60bdbc0a885db88475961575c5e95ce88
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93037
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-06-26 13:09:51 +02:00
Szymon Kłos
44b9f8f025 jsdialog: change sendDialogEvent API parameter
WindowId with 64bit length is needed

Change-Id: I681841f60636722aa96846d4130b22183876a500
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97107
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-26 09:24:02 +02:00
mert
d29c986e6a Fix insert local image for online
Change-Id: I4edde45cb6c36c5f52b34ac23692c10ef7a5148f
Signed-off-by: mert <mert.tumer@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96623
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-06-18 21:16:57 +02:00
mert
2231f1c568 online: fix io error on saveas
Change-Id: Icd91eacf2945c803660aaacb1d46d169b1f9bd86
Signed-off-by: mert <mert.tumer@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96546
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-06-18 16:32:14 +02:00
Andras Timar
945838ee50 fix bogus -Werror=maybe-uninitialized
Change-Id: Id8662bfdebe50ec87dd634f4564fab12c32ebdc1
2020-06-04 08:55:12 +02:00
Ashod Nakashian
4a8937d0d1 wsd: performance improvements
Change-Id: I137dc67b4231df1cd23a9dce72e6b12dc1bf364e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95343
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-06-02 20:01:39 +02:00
Ashod Nakashian
d2d0492245 wsd: move LOOLProtocol::tokenize to Util::tokenize
The tokenizer(s) are more generic than the protocol
logic, and are used from contexts that don't involve
the protocol as such.

Change-Id: Ie8c256bf11a91e466bff794021f41603c9596a7f
2020-06-02 18:03:36 +01:00
Ashod Nakashian
d89f509609 wsd: overload getTokenInteger for string-literals
When parsing, we virtually always know the name
of the token we are parsing at compile time.
Taking advantage of that means we also know
its size at compile time, and can optimize
std::string allocation, size counting and
the implementation of getTokenInteger.

Change-Id: I502a643c14cace7dd755df565b3b5c445688faad
2020-06-02 18:00:20 +01:00
Ashod Nakashian
68bdbcf798 wsd: remove unused QueueHandler
Change-Id: Iec80d2afb1762175088b92a6e7140b0ca863a483
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95339
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-06-02 17:26:08 +02:00
Ashod Nakashian
6ab64ac992 wsd: single-char string literals -> char
Change-Id: I163d6fe1c80334317d38f8fed2199ad2b31a0f8a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95335
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-06-02 17:22:26 +02:00
Ashod Nakashian
784b7dc39d wsd: optimize StringVector
StringVector is heavily used for tokenization
and benefits from inlining of small functions.

Also, cat doesn't need to be slower than necessary.

Change-Id: I4ab2ff1b1f1a81092049d2cde64b6df10b34b5f7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95287
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins
2020-06-02 01:39:37 +02:00