Commit graph

284 commits

Author SHA1 Message Date
Miklos Vajna
547f9ea731 Rework StringVector to have a single underlying string
This is meant to reduce lots of small allocations and instead have
pointers into the single string for the various tokens instead.

This has a few requirements, though:

1) It's no longer OK to modify the tokens, changing their length would
invalidate the start/length of other tokens. Rework
DocumentBroker::load() to avoid such mutation.

2) The iterators no longer expose zero-terminated strings, so
Poco::cat() doesn't work anymore: add an own cat() instead and use that
in e.g. ChildSession. The own cat() has the benefit that it won't read
past the end of the array if the begin index is out of bounds to add
more safety.

(This nicely works towards killing Poco usage in general.)

3) If zero-terminated strings for all individual tokens is needed, a
copy has to be made, as done in spawnProcess().

(For all of these requirements, the build fails if there are problems.)

Change-Id: Iea40e4400e630b2d669f5c72aea85cb40edf9a2c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89711
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-02-28 18:31:37 +01:00
Miklos Vajna
b8bd1990aa Rework LOOLProtocol::tokenize() to return a StringVector object
The bulk of this commit just changes std::vector<std::string> to
StringVector when we deal with tokens from a websocket message.

The less boring part of it is the new StringVector class, which is a
wrapper around std::vector<std::string>, and provides the same API,
except that operator[] returns a string, not a string&, and this allows
returning an empty string in case that prevents reading past the end of
the underlying array.

This means in case client code forgets to check size() before invoking
operator[], we don't crash. (See the ~3 previous commits which fixed
such crashes.)

Later the ctor could be changed to take a single underlying string to
avoid lots of tiny allocations, that's not yet done in this commit.

Change-Id: I8a6082143a8ac0b65824f574b32104d7889c184f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89687
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-02-28 16:07:56 +01:00
Jan Holesovsky
fd3e6fb722 android: Even with debug, the loolkitconfig.xcu path is the same.
Change-Id: I28d72ce2776fb7640944a75d65586cf862fcbdbe
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89213
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-02-21 16:46:01 +01:00
Michael Meeks
6bdf561049 Share the Kit environment setup code.
Particularly configuration layers so we can tweak mobile config
easily.

Add core source files from configmgr for breakpointing convenience in
the iOS project. Add loolkitconfig.xcu to the iOS app bundle. Use
${BRAND_BASE_DIR} instead of a compile-time LOOLWSD_CONFIGDIR literal
on iOS (because there is no compile-time constant path to the app
bundle). No "registry" directory directly in the app bundle any longer
on iOS, a corresponding change in core.git moved that stuff to be
under "share", like on other platforms.

Change-Id: I6672efc0505abf27297c4758118a20992b10ceb3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88765
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-17 14:49:06 +01:00
Michael Meeks
c187f414c5 kit: show the correct documentLoad URL when a template is used.
Change-Id: Ib9b3ac3e166dfbece8c7212fc239d517ce1c0bba
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87140
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-21 16:07:31 +01:00
Ashod Nakashian
4619ac73ff wsd: minor cleanup
Change-Id: I2c062e1f7d309c8d1c54e6d0e8ca4c40f288d09d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86723
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-14 13:01:05 +01:00
Michael Meeks
28acde16e6 Mention the nodev mount flag on failed mknod.
Change-Id: Iafd034149c0c2859a6705f33557d61b0b24a927a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86372
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-07 21:25:56 +01:00
Michael Meeks
873110de88 android: don't use std::vector allocation for large pixel buffers.
Amazingly more time was spent allocating, wiping and freeing these
vectors on Android than the actual rendering of pixels in a profile.

Change-Id: I49ea093816eba0f4187613ab6c8dc24d8dcba75b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86335
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-07 19:22:01 +01:00
Michael Meeks
8522cbdb9f android: pick a good value for threads.
Change-Id: I2a550257a6a9cb176c67a888b7838855db06fe4b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86334
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-07 12:43:47 +01:00
Michael Meeks
9cef0f385d watermarking: create SessionMap template to canonicalize views.
Use a fully reliable uniqueness check, rather than a hash, and get
simpler ids as a bonus. Fetch view data from the session itself
rather than passing it in too.

Change-Id: Ibcd625156b5a98eb280e35d6537b5c8c026d0197
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86150
Reviewed-by: Mert Tümer <mert.tumer@collabora.com>
Tested-by: Mert Tümer <mert.tumer@collabora.com>
2020-01-06 13:52:29 +01:00
Miklos Vajna
d0fee8c6ad These can be made const
Change-Id: I952a7566176bda727f8c2e9618d41bfb7bb1240f
Reviewed-on: https://gerrit.libreoffice.org/85197
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-16 09:24:08 +01:00
Michael Meeks
1c1989ad77 insert image needs fps_office component these days.
Change-Id: I29a5d5a5c9c180f7cab3b008874f9f2a7ea323f0
2019-11-30 22:47:01 +00:00
Ashod Nakashian
b74306acd5 wsd: replace mutex in signal handler
There are a few things acceptable/safe in a
signal handler, and taking locks is not one of them.

This replaces the logic with a simple counter that
serves the purpose just as well.

If we get a double signal, we log and ignore.

Change-Id: If589c18492468c120d00c213805467bcbba05d27
Reviewed-on: https://gerrit.libreoffice.org/83150
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-19 16:12:29 +01:00
Jan Holesovsky
efa293290c killpoco: Remove trivial StringTokenizer uses from some files.
Particularly those used on Android...

Change-Id: I47bf9692f5e99ba30140d698558472201168a198
Reviewed-on: https://gerrit.libreoffice.org/82302
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-08 22:21:31 +01:00
Jan Holesovsky
5d0d3a4869 killpoco: Get rid of Poco/Thread.h from the rest of the Android-related files.
Change-Id: I724230a4428cab3cc26245ac4aa43a91af2e09ce
Reviewed-on: https://gerrit.libreoffice.org/82204
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-07 12:24:26 +01:00
Jan Holesovsky
5b5e29b430 killpoco: Don't use POCO for app exit values.
Change-Id: I2948ac45a7b4243f7afde08d5245530fdbf9a070
Reviewed-on: https://gerrit.libreoffice.org/82125
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-11-07 12:23:47 +01:00
Ashod Nakashian
7a976488f0 wsd: cleanup the global flag accessors
The following flags are affected:
ShutdownRequestFlag
TerminationFlag
DumpGlobalState

Since it's common to grep for all places
that set or reset these global flags, it
makes more sense to have explicit functions
for each operation. Now we have set and reset
accessors where appropriate and get is reserved
for read-only access.

This changes the getters to only return
the boolean value of these flags rather than
a reference to the atomic object, now that
they are read-only.

Also, a few Mobile-specific cases were folded
either with other Mobile-specific sections, or
they were now identical to the non-Mobile case
and therefore deduplicated, making the code
cleaner and more readable.

Change-Id: Icc852aa43e86695d4e7d5962040a9b5086d9d08c
Reviewed-on: https://gerrit.libreoffice.org/81978
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-06 03:43:45 +01:00
Tor Lillqvist
9d6c174462 tdf#128577: Close an already open document when asked to open a new one
Add a "singleton" class method to DocumentViewController to return the
(as for now) singleton DocumentViewController.

Change-Id: I0b8a8def558cfe7f9469b6062a86311dfa63f549
Reviewed-on: https://gerrit.libreoffice.org/82007
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 2807f907d947549a17c5bae586b85d412d552a09)
Reviewed-on: https://gerrit.libreoffice.org/82021
2019-11-04 15:25:54 +01:00
Ashod Nakashian
d110f4cc58 test: improve TileCacheTests
Sometimes core renderes with sub-pixel differences
(the crosshair at the corners of the Writer pages
show line anti-aliasing differences). This causes
failure of the tests that count the tile deduplication.

We now tolerate when we get an unchanged tile twice,
assuming it was due to such a rendering difference,
but we re-trigger another change and this time we
don't expect any extra tiles, no more than two
variations of the anti-aliased crosshair was
observed.

We also move some duplicate code into utility
functions to improve readability and reuse.

Reviewed-on: https://gerrit.libreoffice.org/81196
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 9603597fd1aaecb27893792cfd2d243e450b58b8)

Change-Id: I1a66732dd3443bfbd770d8dc65721571dfa08615
Reviewed-on: https://gerrit.libreoffice.org/81572
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-10-29 02:32:05 +01:00
Ashod Nakashian
a4a4d65632 wsd: logging improvements
Always log when we set the termination flag
so we can trace how (and implicitly why) we
terminated. In practice trace logging is not
enabled, so a key event such as termination
should be logged at info level.

Reviewed-on: https://gerrit.libreoffice.org/80324
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 3f8d516e1399df687c2935fc551b171cbd850b7b)

Change-Id: Id6615181c81ea56777f44b551b39925065b0e578
Reviewed-on: https://gerrit.libreoffice.org/81562
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-28 10:48:01 +01:00
Tor Lillqvist
07986199ad Just call lok_init_2() and LibreOfficeKit::setLanguageTag() once on iOS
... when the app starts.

Change-Id: Icac4a9e1074fb6c5f3c9b5282e20a4513717a323
Reviewed-on: https://gerrit.libreoffice.org/80881
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-10-16 13:16:42 +02:00
mert
86489d3dcd Include normalizedViewId to TileCache
Change-Id: Ib23afa023d79189f7fd7aca8b5b0e198c3011fbc
2019-10-15 18:13:03 +03:00
Ashod Nakashian
77e7cae689 wsd: fix password-protect file loading from multiple views
With password-protected files, the first loading attempt
always fails due to missing password. At that point the
client is notified of the missing password and the user
is prompted. The second attempt includes a (hopefully)
correct password and the document loading commences.

Due to the fact that an exception is raised when
the loading fails, this left the loading latch
triggered, which blocked subsequent attempts.

Change-Id: I7cc257a36eb1cc080f460aac8cdb7030783a5914
2019-10-14 21:35:27 +01:00
Tor Lillqvist
e51d0a642d Fix build for MOBILEAPP where we don't have Log::shutdown()
(Because a mobile app is not supposed to ever exit voluntarily and
cleanly anyway.)

Perhaps we should call abort() in thse cases, though, and not just
continue as if nothing is wrong?

Change-Id: Iceb10cc767522c1fee587624ea6e810c62586207
Reviewed-on: https://gerrit.libreoffice.org/80446
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-08 14:08:23 +02:00
Andras Timar
d1ae1b36c2 typo fixes in comments and code
Change-Id: Idd98516d30d98dea18eda9bbec8ac9777063b553
2019-10-08 11:49:45 +02:00
Michael Meeks
5e0e6006e3 Fatal exceptions need to take the kit process down.
Otherwise the Kit main-loop continues while its event processing thread
is dead, leaving the client stalled.

Change-Id: I7089ed5b5bd8499623624ffdb84c22cedd80cc7e
2019-10-03 18:52:29 +01:00
Tor Lillqvist
908240741d tdf#125575: Must reset the "kit" callback to null when closing document
As we register the global "kit" callback with the Document object
pointer as callback data, we must unregister it when the document is
being "unloaded" and the Document object will destruct shortly.
Otherwise the callback might be called for the next document with a
stale pointer.

Relevant only for the iOS app, and presumably the Android one. In
web-based Online, the kit process will exit anyway after the document
is closed. But in an app there is just one process that keeps running
for a long time handling all documents that are edited.

For some reason the crash only showed up when a document was created
from a template, closed, and another document was created from a
template.

Change-Id: Ieb47838a597c5bcab89c1a33d9bc2f2adb57b3b3
Reviewed-on: https://gerrit.libreoffice.org/79633
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit ee497b873eadfa3ab4ba77793748e83ff649dacf)
Reviewed-on: https://gerrit.libreoffice.org/79650
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-29 13:23:25 +02:00
DarkByt31
ef90709ad1 tdf#107038 Poco::Timestamp replacement with std::chrono
Change-Id: I55ba23fb104a90c882bc2af068b835e30877bc1e
Reviewed-on: https://gerrit.libreoffice.org/78925
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-09-28 12:51:18 +02:00
Ashod Nakashian
720c26176a wsd: improved kit thread naming
Now the wsd docbroker thread and its peer kit
thread are trivial to match, since they are called
docbroker_xxx and kitbroker_xxx (where xxx is the
instance ID) respectively.

Also, label spare kit instances as kit_spare_xxx
to differentiate from ones with actual documents,
where xxx is a running counter to differentiate
spare instances from one another.

Now we are able to easily see (and count) the number
of spare kit instances, and match wsd and kit threads
handling a given document.

Unit-test logic updated to reflect the new thread
naming scheme.

Change-Id: I154dc8f200fbe0e65f3f5984e6dad2cef1b52e22
Reviewed-on: https://gerrit.libreoffice.org/79328
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-22 20:23:27 +02:00
Ashod Nakashian
30c3de53f7 wsd: support resizing of the sidebar
(cherry picked from commit d3a900d3484e4e6690d8c625f1edc73289baba4d)

Change-Id: If7d7b356563f503dfedfb0686c1d1b5be9b7b221
2019-09-03 01:53:12 -04:00
Ashod Nakashian
36b5109d21 wsd: cosmetic formatting
Change-Id: I552b2468432ce6ed52c50e22b6f19d8055c5dbb1
2019-09-03 01:53:12 -04:00
Michael Meeks
f384b8a414 Add watermark opacity setting.
Change-Id: I839e8aef91acfed40d4afd8c1b50176ed54c670a
2019-08-26 16:29:12 -04:00
Michael Meeks
327869fffe re-factor childsession onLoad callback to cleanup parameter clutter.
Change-Id: I0665db05845a910abf1cc56e13d2f9845cc5c373
2019-08-26 16:29:12 -04:00
Ashod Nakashian
d45ecd586c wsd: leaflet: track multi-selection
Change-Id: I17c092e950fb4d7a0cb4129c537d60a8e5edd06a
Reviewed-on: https://gerrit.libreoffice.org/69636
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/71100
2019-08-17 04:41:36 +02:00
Ashod Nakashian
919a93cd4b wsd: improved anonymization algorithm
Better hashing algorithm based on FNV-1a.
Adds support for salting the hash, and
for providing salt via configuration.

More unit-tests added, and better formatting.

Change-Id: I2be42675d0cdbaa73c3d7faed99e07631a9c20fc
Reviewed-on: https://gerrit.libreoffice.org/70034
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/71091
2019-08-17 04:26:35 +02:00
Ashod Nakashian
226c2fe71c wsd: unify anonymization flags under one
This simplifies the anonymization configuration
as virtually always they are all either enabled
together, or not at all.

Change-Id: I6fe60f5287fc5d71cd7a6ac3268eac67e5e6e9fb
Reviewed-on: https://gerrit.libreoffice.org/70033
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/71090
2019-08-17 03:42:19 +02:00
Ashod Nakashian
32007cbb32 Update LOK headers and reuse callback-type-to-string helper
Also, avoid repeatedly converting INT_MAX to string.
It's an arbitrary large number, so use 1 billion,
which is probably more easily recognizable as an
arbitrary large number.

Change-Id: Ie6f898d6e8978efa29c355f3cb50b60114870f0d
Reviewed-on: https://gerrit.libreoffice.org/77593
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-08-17 03:38:08 +02:00
Miklos Vajna
85dbb4a9af kit: fix UB in ChildSession::disconnect()
Finally unit-copy-paste passes under sanitizers with this. Details:

==8988==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d0005e6de0 at pc 0x000000988e85 bp 0x7fff753316d0 sp 0x7fff753316c8
READ of size 4 at 0x60d0005e6de0 thread T0 (loolkit)
    #0 0x988e84 in std::pair<int const, UserInfo>::pair(std::pair<int const, UserInfo> const&) /home/vmiklos/git/libreoffice/lode/opt_private/gcc-7.3.0/lib64/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_pair.h:292:17
...
    #12 0x9322af in Document::notifyViewInfo() /home/vmiklos/git/libreoffice/online-san/kit/Kit.cpp:1600:53
    #13 0x9303f9 in Document::onUnload(ChildSession const&) /home/vmiklos/git/libreoffice/online-san/kit/Kit.cpp:1566:13
    #14 0x616dcd in ChildSession::disconnect() /home/vmiklos/git/libreoffice/online-san/kit/ChildSession.cpp:96:25
    #15 0x616535 in ChildSession::~ChildSession() /home/vmiklos/git/libreoffice/online-san/kit/ChildSession.cpp:85:5

freed by thread T0 (loolkit) here:
    #0 0x60f9b0 in operator delete(void*) _asan_rtl_:0
...
    #8 0x939292 in Document::~Document() /home/vmiklos/git/libreoffice/online-san/kit/Kit.cpp:913:5

I.e. when the Document dtor clears Document::_sessions, the ChildSession
dtor may be called. But ChildSession expected that it has a valid
Document during its lifetime, which is not a promise we can hold, see
the above trace.

Fix the problem by having a pointer (and not a reference) to a Document
in ChildSession and then:

1) Clear that Document pointer in ChildSessions at the end of the
Document dtor using a new resetDocManager()

2) Check if the Document is nullptr in ChildSession::disconnect()
instead of dereferencing it unconditionally.

Change-Id: I19d3d6bfe9e142a52c199f49aaa347d1a2edbf87
2019-08-16 09:05:54 +02:00
Miklos Vajna
9a7768b420 common: wrap SigHandlerTrap in a getter function to avoid ODR violation
Otherwise both loolwsd and unit-copy-paste.so would have a
SigHandlerTrap:

==26186==ERROR: AddressSanitizer: odr-violation (0x000002090ae0):
  [1] size=40 'SigHandlerTrap' ../common/SigUtil.cpp:76:12
  [2] size=40 'SigHandlerTrap' common/SigUtil.cpp:76:12
These globals were registered at these points:
  [1]:
    #0 0x5f9a28 in __asan_register_globals.part.13 /home/vmiklos/git/libreoffice/lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0x7f8f537f1d8b in asan.module_ctor (/home/vmiklos/git/libreoffice/online-san/test/../test/.libs/unit-copy-paste.so+0x60ad8b)

  [2]:
    #0 0x5f9a28 in __asan_register_globals.part.13 /home/vmiklos/git/libreoffice/lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0xe2bcfe in asan.module_ctor (/home/vmiklos/git/libreoffice/online-san/loolwsd+0xe2bcfe)

Change-Id: I54d5f6d4298848cacd437d302cff0e8c5003fb8c
2019-08-13 09:08:32 +02:00
Miklos Vajna
bd4d72d41f common: wrap TerminationFlag in a getter function to avoid ODR violation
Otherwise both loolwsd and unit-copy-paste.so would have a
TerminationFlag:

==11732==ERROR: AddressSanitizer: odr-violation (0x00000208f4a0):
  [1] size=1 'TerminationFlag' ../common/SigUtil.cpp:41:19
  [2] size=1 'TerminationFlag' common/SigUtil.cpp:41:19
These globals were registered at these points:
  [1]:
    #0 0x5f9988 in __asan_register_globals.part.13 /home/vmiklos/git/libreoffice/lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0x7f5df9cf18cb in asan.module_ctor (/home/vmiklos/git/libreoffice/online-san/test/../test/.libs/unit-copy-paste.so+0x60a8cb)

  [2]:
    #0 0x5f9988 in __asan_register_globals.part.13 /home/vmiklos/git/libreoffice/lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0xe2b4fe in asan.module_ctor (/home/vmiklos/git/libreoffice/online-san/loolwsd+0xe2b4fe)

Change-Id: Ic620b143ecb77699f40676ff39d0fa7abceb34d5
2019-08-08 09:10:59 +02:00
Michael Meeks
9e791fb0d4 clipboard: persist selections for a while after a view closes.
re-factor ClientSession state to be a simpler state machine.
Have a nice disconnect / disconnected handshake on view close.

Change-Id: Ie933cc5c7dfab46c66f4d38a4d75c459aa1cff87
2019-08-05 22:21:54 -04:00
Michael Meeks
f2c6facb29 Don't combine tiles a long way from each other.
We currently combine only horizontally, but ctrl-right arrow in
calc can throw us to the other side of the sheet, creating a very
large area to re-render.

Change-Id: I7125ab815e3de1296b3af32632626005eeee0ec9
2019-07-26 10:12:00 +01:00
Henry Castro
760864870f wsd: introduce "TemplateSource" WOPI property
Change-Id: I9df1d5d0d4be7fe10ee15c40c36195c86ccf857e
Reviewed-on: https://gerrit.libreoffice.org/76190
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-07-24 12:10:15 +02:00
Tor Lillqvist
f7a70ba9d3 tdf#125681: Get rid of ChildSession::getDocumentMutex() and associated code
Now with the "Unipoll" concept all this locking is unnecessary as the
kit process is single-threaded, and actually it is harmful as the bug
shows.

Michael explains in chat:

But in fact - we should be a single threaded kit process there now. We
are protected by the solar-mutex (which is recursive) while our
locking is not. This was the whole point of the Unipoll refactor: to
remove the extra threads, complex queues, etc. etc. I just left the
mutexes. Even a recursive mutex won't work there; since it needs to be
drop-able and transferable to another (LOK internal thread) in Yield,
so - we should remove them.

Change-Id: I7d1e1dfb0e20f14134be5f81da057539b0f86ab9
Reviewed-on: https://gerrit.libreoffice.org/75849
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-07-24 12:09:24 +02:00
Jan Holesovsky
92f83a84b0 android: Don't re-initialize LibreOfficeKit over and over again.
LOK is designed to be initialized just once, so avoid the
re-initialization here.

Change-Id: I7ad9235c36d5a4dee85437a95f358d13ca25a2a9
2019-06-20 14:11:13 +02:00
Jan Holesovsky
b2b3ccdee5 gtkapp: Avoid warning.
The gtkapp is to test functionality, not performance.

Change-Id: I357777f7bd5609af1e8b6658607c73b23b78e857
2019-06-20 14:09:37 +02:00
Miklos Vajna
54e5a1000b kit: mark Document as final
Document has to be final: its constructor calls sendTextFrame(), which
calls the virtual sendFrame(). So the only situation where this code
works correctly is when Document is never subclassed.

Change-Id: I7c13abdae57d9e1ba3416ec1963b58bce0d42e6f
2019-06-04 09:15:38 +02:00
Miklos Vajna
a4fd83794e Remove unused using declarations
Change-Id: I0d4336fc8f85a18b2c41de233166e725166385f6
2019-06-03 09:06:11 +02:00
Jan Holesovsky
ea2b77ce07 android: Make the LOK document accessible from the JNI.
For some operations like printing to PDF, we need to have access to the
LOK API to perform eg. saveAs().  iOS is using an extern for that, but
given that it is needed for Android too, let's introduce a proper getter
for that.

Change-Id: Ie2340a4ee0bdf9dc46e799e2567a828172d9a67d
2019-05-31 09:20:34 +02:00
Tor Lillqvist
d59956aa3d Use consistent terminology in LOG_INF() calls around runLoop() call
Change-Id: I46d954250447dea6ffa60c6e0e341f23a9ad4ff9
2019-05-16 11:41:56 +03:00