Sometimes the text content comes with the first recieve,
sometimes we need a second recieve to get that.
Don't fail when we get the content for the first recieve.
Change-Id: I3078995cae3c0cfefdd5f2b8eae8bad4003ec2fd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89347
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
After:
11b7270acd
Default zoom changed -> shape is insert to different
position -> geometry changed.
Change-Id: Ibeed3a57b3b64962951f11054f6aa3410a0e673d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89345
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Hides the toolbar nicely when scrolling the content & the scrolling is
smoother with it too.
Change-Id: I618fece423749c3eb99c949e6f8d456ee9cf3c38
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89251
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Focus is not consistent around double taping.
Enable this check again when something is improved here.
Change-Id: I448d57a9fd053d1680352b6d6175f38f3dda33d9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89331
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I914b64d07e6f249914e3aad1d000589bd3e9f779
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89330
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Change-Id: I116b680bf203bd836f42e2dfe14507a9833589d5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89325
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
When double-tapping (or tripple) the user is almost
always going to place their finger at different
coordinates for each of the taps. There is a default
threshold of 10 units between the taps in Hammer
to tolerate for this error when detecting multiple
taps, rather than individual taps.
This threshold of 10 is really small and unrealistic
for our needs, as in most cases double-tapping (which
we use very often to select words and begin editing
in Impress) is not detected (single-taps are issued
instead). This makes interaction/usability very hard.
Here we increase the threshold to a comfortable 100.
If this causes any other usability issues, we can
lower it acccordingly, but so far it only improved
the experience for me.
Change-Id: I3fee43c3efaa4507cae09b7c564cb4c0c1b5384e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89310
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Logs from test are now more atomic (less interleaving).
And each integration-test (old-style tests running from
new-style tests) will now print clearly when it begins
and when it fails, making it easier to find failures.
Misc other minor cleanups in test logging.
Change-Id: Iff664e42a04d1c6dbf1332b2884c35183ef85e21
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89309
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Termination flag is a very harsh way of exiting.
It works in most cases, but not when we have a
modified document. What happens is the following:
Unit-test flags for termination.
During session cleanup we have to save the modified doc.
Because save is in progress we don't 'disconnect' the view.
This leaves the view in loaded state until saving is done.
But because of the termination flag we don't wait for saving.
DocBroker sends 'exit' to child to forcefully exit.
This causes at least one assertion due to active LOKWindows (Sidebar).
Instead of the above, we flag for graceful shutdown from unittests,
and after we wait to cleanup all DocBrokers, we flag for termination.
This way, we get clean shutdown and all assertions/validations
pass, while we guarantee never to deadlock the unittests,
in case we end up waiting forever for shutdown to complete.
Change-Id: I7fc34137ea373e329795b1ed0090261c085e955a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89308
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
on a fresh openSUSE Leap 15.1 I got errors without this:
wsd/AdminModel.hpp:346:10: error: ‘list’ in namespace ‘std’ does not name a template type
std::list<unsigned> _memStats;
^~~~
etc.
Change-Id: I19c42bd48bbcc0787a3398d1882c974ebf5bdf81
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89298
Tested-by: Andras Timar <andras.timar@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
- target ClientSession::_handleInput(), since crashing there would bring
down the whole loolwsd (not just a kit process), and it deals with
input from untrusted users (browsers)
- add a --enable-fuzzers configure switch to build with
-fsanitize=fuzzer (compared to normal sanitizers build, this is the only
special flag needed)
- configuring other sanitizers is not done automatically, either use
--with-sanitizer=... or the environment variables from LODE's sanitizer
config
- run the actual fuzzer like this:
./clientsession_fuzzer -max_len=16384 fuzzer/data/
- note that at least openSUSE Leap 15.1 sadly ships with a clang with
libfuzzer static libs removed from the package, so you need a
self-built clang to run the fuzzer (either manual build or one from
LODE)
- <https://chromium.googlesource.com/chromium/src/testing/libfuzzer/+/refs/heads/master/efficient_fuzzing.md#execution-speed>
suggests that "You should aim for at least 1,000 exec/s from your fuzz
target locally" (i.e. one run should not take more than 1 ms), so try
this minimal approach first. The alternative would be to start from the
existing loolwsd_fuzzer binary, then step by step cut it down to not
fork(), not do any network traffic, etc -- till it's fast enough that
the fuzzer can find interesting input
- the various configurations start to be really complex (the matrix is
just very large), so try to use Util::isFuzzing() for fuzzer-specific
changes (this is what core.git does as well), and only resort to ifdefs
for the Util::isFuzzing() itself
Change-Id: I72dc1193b34c93eacb5d8e39cef42387d42bd72f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89226
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
==13901==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000904678 bp 0x7ffdb9e21580 sp 0x7ffdb9e21340 T0)
==13901==The signal is caused by a READ memory access.
==13901==Hint: address points to the zero page.
#0 0x904677 in LOOLProtocol::tokenize[abi:cxx11](char const*, unsigned long, char) common/Protocol.hpp:113:40
#1 0x898c52 in LOOLProtocol::tokenize(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char) common/Protocol.hpp:141:16
#2 0x18dc2d9 in LOOLProtocol::ParseVersion(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) common/Protocol.cpp:35:51
#3 0x1148824 in ClientSession::_handleInput(char const*, int) wsd/ClientSession.cpp:358:64
#4 0x18efcb8 in Session::handleMessage(bool, WSOpCode, std::vector<char, std::allocator<char> >&) common/Session.cpp:232:13
Next commit will add the actual simple fuzzer that found this.
Change-Id: I8623b4451a57390f6f84c11084c5a1120a11fcc5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89225
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Dynamic shortcuts == the long press on the app icon to edit recent
documents.
Also fixes crashing with too many recent documents.
Change-Id: I844e60de6523039889539cfe1e3c1bb70dc062bc
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89235
Tested-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
For incremental builds, it's not enough to check the node_modules
folder, we also need to check whether all used binaries are in
place.
Change-Id: I9c5f380f3845195bfa2dbfb03ab269ce4659c4ae
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89233
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
No idea if all the devices have this, and also it is API 26+, but at
least something; the default view is a mess.
Change-Id: Icd9aa588885e91bc7b35285044fdcfc335d426d9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89231
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
We are running make -j2 check with Jenkins now.
Which fails with these unit tests. Let's just
serialize all, so we can test cypress test
parallelization.
Change-Id: Ib1ed21581c88cd86cbd13ef5c6b8b98abaef1da5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89211
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I27be9917d5f0df77bfdde9a8aeac129c934d58de
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89212
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Change-Id: I542aca8c98312bf32209625cc9acce68abc5280c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89210
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
The Line-style listbox selector(shape properties) in mobile online
is missing a label, so to make it clear lets add a label for it.
Adding an invisible label for line-style listbox in core.git does
not work as invisible widgets are not dumped by core to generate
jsdialog messages. So the next option is to splice in a label
entry to the parsed jsdialog message at the appropriate place.
This also makes it easier for adding any missing labels, by just
needing to add the id of the control and the label text.
Change-Id: I45913ec25278e8566092a738c08cfdd8bc46e39f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88994
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
And so far disable the various sorting possibilities, they are not
working for the recent files (yet).
Change-Id: I233f6cd05d15cf0c3f9f2bf940a8233ee5300cb7
Change-Id: I8ddcb18570cdd5b92a09dced2a219abf110ecbcf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89201
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>