Replace KeyboardEvent.keyCode with KeyboardEvent.key for detection of "Delete" and
"Insert" keys. keyCode misbehaves when using an AZERTY/DVORAK keyboard layout, e.g.
the keyCode for "Delete" in QWERTY is the same as "." in AZERTY.
This works on all major browsers, the only outlier being MSIE8:
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key#Browser_compatibility
Change-Id: I5cbfa18ef59ab4989a866fdf4b5708610beccaad
Reviewed-on: https://gerrit.libreoffice.org/71657
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
for next patch I require to modify the contextMenu
to trigger on touch start event.
I should do updating archived-packages, but ...
Change-Id: I20f1fbda1e7e60f97cd790c055599edcf8da9d1a
Dump the SVG we actually get as a .new file for easy upgrade and
comparison on mismatch.
Change-Id: I607a97ff27a9bf480524efc31877e46d74c5ee3d
Reviewed-on: https://gerrit.libreoffice.org/71681
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Cleaning up the thread variable with the shared string stream is
something of a nightmare, for a rather marginal gain.
==9296== Invalid write of size 1
...
==9296== by 0x738C092: str (sstream:195)
==9296== by 0x738C092: std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::str(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (sstream:649)
==9296== by 0x65383A: Log::beginLog[abi:cxx11](char const*) (Log.cpp:141)
==9296== by 0x551823: Admin::~Admin() (Admin.cpp:381)
==9296== by 0x7D9ECF7: __run_exit_handlers (exit.c:83)
==9296== by 0x7D9ED49: exit (exit.c:105)
==9296== by 0x7D86F50: (below main) (libc-start.c:342)
==9296== Address 0x8ba41c0 is 0 bytes inside a block of size 513 free'd
==9296== at 0x4C2FA1D: operator delete(void*) (vg_replace_malloc.c:576)
...
==9296== by 0x738784A: ~basic_stringbuf (sstream:65)
==9296== by 0x738784A: std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_ostringstream() (sstream:591)
==9296== by 0x7D9F27E: __call_tls_dtors (cxa_thread_atexit_impl.c:155)
==9296== by 0x7D9EC0A: __run_exit_handlers (exit.c:41)
==9296== by 0x7D9ED49: exit (exit.c:105)
==9296== by 0x7D86F50: (below main) (libc-start.c:342)
Good to log during shutdown / exit.
This reverts commit c315d219d5967f23fb1769e78021f61b8f9da6ec.
This reverts commit ce78fec310.
Change-Id: Ia4a15be336d89d8d883530943724d48e4b0ec9fe
Reviewed-on: https://gerrit.libreoffice.org/71444
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Avoids some N^2 log-line explosion; also make the method name
more findable.
Change-Id: I3ee8c521f1ac98a939cd4d758c720b577d3bfa57
Reviewed-on: https://gerrit.libreoffice.org/71443
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
The pointer to the DocumentViewController object in the Document class
can be a weak property. This avoids a circular reference.
When the DocumentViewController is being dismissed, remove the script
message handlers and remove the view from its superview. Also, set the
webView property to nil.
Only when the user taps in the document, or selects some text in it,
is it obvious that they want to be able to type into it.
This is just one of the instances where the on-screen keyboard popped
up for no good reason.
When Online was embodied in the nextcloud app (Android)
the progressbar was moved into top-left corner.
During a loading all functions to get container
or browser size were returning (0,0).
This hack assumed that webview size is almost equal
to the mobile screen size.
Change-Id: I0fff53639a3baa88b57d91bf671e00ad8c71180d
Reviewed-on: https://gerrit.libreoffice.org/71117
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
When blank the help button is hidden from
all dialogs.
Change-Id: Ibd43411bed496bfd3bc81056ebc8657fb77fb8fe
Reviewed-on: https://gerrit.libreoffice.org/69072
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/71086
This uses the new createViewWithOptions API to
set the language of the user at the point of
creating a new view.
Change-Id: Ibf3e0af1b0cc300126388c1217692d8d969be0f3
Reviewed-on: https://gerrit.libreoffice.org/67501
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
These are very frequent and not very useful without
the ability to trace them across the system, which
are all done at trace level. So it's highly unlikely
that these would be used at debug.
Change-Id: I479f2ead1bbd2996b9972082e00ebf984072f785
Reviewed-on: https://gerrit.libreoffice.org/71073
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
The 'tile:' message is the most common and most
latency sensitive message, so give it priority.
Change-Id: Id5790369cd493423a47acab8a3d5107ce91b0d39
Reviewed-on: https://gerrit.libreoffice.org/71071
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Moves appending tokens into the serializer and
avoids making extra copies of itself.
Change-Id: I62d374e69d9c4a55643ea20cb5f8c2b9c75c88c5
Reviewed-on: https://gerrit.libreoffice.org/71022
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
This is faster and reduces memory fragmentation.
Also, cleans up the logging macros and implementation.
Change-Id: I7fb00da041d1261c694c4b48b67a3c66ad0cbf8d
Reviewed-on: https://gerrit.libreoffice.org/71020
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
The former is the standard C++ approach
and is reportedly faster than __thread
(at least with gcc).
Change-Id: Ibdefd32172774a280637f73dd062282b7bf62025
Reviewed-on: https://gerrit.libreoffice.org/71019
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
The default deflate level of 6 is quite slow
and the benefits are hardly worth the high
latency that users experience.
Tested on a writer document with some small
images and a few pages of text:
Level 4 gives virtually identical compression
ratio to level 6, but is between 5-10% faster.
Level 3 runs almost twice as fast as level 6,
but the output is typically 2-3x larger.
Perhaps this should be exposed via config
so it would be possible to reduce latency
due to compression when CPU is scarce but
network bandwidth ample, and vice versa.
Change-Id: Iba88eea8f180d11458b33c68389e797234df1a60
Reviewed-on: https://gerrit.libreoffice.org/71018
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Unfortunately processing multiple events from the Kit socket
is causing massive document invalidations, for unknown
reasons. As such, for now we have to process one event
at a time, until the source of the invalidations is found
and fixed.
Without the invalidation, the average tile rendering
roundtrip is about 3x faster than with the invalidations
and the maximum roundrip is at least 2x faster.
Change-Id: Iafbf9ccc2b80656cb71c208b598080f72d201ca2
Reviewed-on: https://gerrit.libreoffice.org/70906
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
The localisation is handled differently on iOS, see the
L10N_IOS_ALL_JS stuff in loleaflet/Makefile.am and the script
loleaflet/util/create-l10n-all-js.pl.
That part of loleaflet.html is not needed in the iOS app. Whether it
will be needed in the Android app remains to be seen. Possibly we will
want to handle localisation in that the same way as in the iOS app. Or
not. So for now, do this change only for iOS.
A configure argument, --with-iosapp-branding, should point to a
directory containing a branding.css file and possibly other files that
branding.css references, to be bundled and used by the iOS app. The
directory structure ends upp in the app bundle as Branding. The
generated loleaflet.html for the iOS app references
Branding/branding.css unconditionally.
Remove redundant _id member from TileCombined, add constructor
from TileDesc, and use it to shrink the code.
Change-Id: Idc0ded63166ed350ab81b07e191b7a60d4407cd4