Commit graph

21040 commits

Author SHA1 Message Date
Caolán McNamara
52dbfd38be avoid calling getImageData if we can
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I02c27170b2aa96703fb6cb153cb2f7958fcdee21
2023-06-27 15:21:27 +01:00
Szymon Kłos
9102357ee5 color palette: send the theme data in compact mode
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib4d77cea3ec3759841fa9c9d5e70f1cfd852fc16
2023-06-27 15:12:56 +02:00
Tomaž Vajngerl
3c38d78a5e color palette: send the theme data through UNO (when present)
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I245d34e323681add3552e808eee471821bd72a0c
2023-06-27 15:12:56 +02:00
Szymon Kłos
713bd070eb color palette: trigger callback with theme data
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Icce3ca11e9224f2bd8920e5ce9ff92e6d5ef5536
2023-06-27 15:12:56 +02:00
Szymon Kłos
d26a78495a color palette: show selector only in Writer
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ifdf07cac131d4a1afdf758fd31af3d49b28ba3a6
2023-06-27 15:12:56 +02:00
Szymon Kłos
3372ea093c color palette: add palette selector
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ie09715afbdbc50d783d6e50ce27dac2e2a06596a
2023-06-27 15:12:56 +02:00
Szymon Kłos
b32e3f1c9c color palette: use always the latest data
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4fee6c3fc9e7e91d3e737f8ab93350cca8a2ecd0
2023-06-27 15:12:56 +02:00
Szymon Kłos
a44e2b1a37 color palette: convert core format to w2ui
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id8980b0f7d34c011cc051f682299169952467b43
2023-06-27 15:12:56 +02:00
Szymon Kłos
e21925c65f color palette: move w2ui colors to docstate
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I037dd353ee143ecd5fd6182fa7aa3441588c0eb5
2023-06-27 15:12:56 +02:00
Tomaž Vajngerl
761c3c51fa color palette: store color palette data from the callback
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I8d0dec4afd91bcdf66799f3afba1fd77cbc223db
2023-06-27 15:12:56 +02:00
Caolán McNamara
4f4fb39e85 optimize unpremultiply a little
use a Uint32Array view when we want to look back at, or copy, a whole
pixel

and seems to be then marginally better to align the input/output views
to be able to use the same index into arrays

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id3560cd1f40b5235d0115f82479b9091fcf798ad
2023-06-27 08:59:01 +01:00
Caolán McNamara
c7c2644b9b fix android ci
github_android_online_co-23.05/net/HttpRequest.hpp:1391:63: error: no matching function for call to 'min'
                      << Util::dumpHex(std::string(data.data(), std::min(data.size(), 256UL))));
                                                                ^~~~~~~~

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I5b81096c696565b9e4eb4f3ca39c16bc1e5b9182
2023-06-26 17:07:35 +01:00
Caolán McNamara
d900c3fc12 cid#318841 markup forcedExit as a fatal path
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I8825d8f2756c33d10efe9bc40129fbf4871e9de0
2023-06-26 07:08:46 -04:00
Caolán McNamara
08f28aa8af cid#318956 AUTO_CAUSES_COPY
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id2902a510e61c9ecf00f416908aa2a66f76547c0
2023-06-26 07:08:46 -04:00
Andras Timar
970291c6bf Bump version to 23.05.1.2
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ie6eb8f388d0724ef08a44e608d5c8c2265ce0f5e
2023-06-26 12:45:41 +02:00
Andras Timar
bdfeadf223
Update README.md (remove outdated build status links) 2023-06-26 10:28:13 +02:00
Milo Ivir
a4aad903c4 Translated using Weblate (Croatian)
Currently translated at 100.0% (503 of 503 strings)

Co-authored-by: Milo Ivir <mail@milotype.de>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/hr/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: If36d4267db672e27eb87361dc7c1eb747e18e531
2023-06-26 09:25:26 +02:00
Gökay Şatır
3e40f3fbe4 Add functionality for notebookbar accessibility keys.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I97476d05559444fe895cd6bf4e040f43350a6706
2023-06-23 20:06:35 +03:00
Andras Timar
d0149b1426 Bump version to 23.05.1.1
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I39740fe9b1c30c0a56056435d58eabd3121698bf
2023-06-23 18:55:31 +02:00
Marc Rodrigues
5081fdf442 Translated using Weblate (German)
Currently translated at 99.7% (462 of 463 strings)

Co-authored-by: Marc Rodrigues <marc.rodrigues@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/de/
Translation: Collabora Online/Help
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I5a36292a5d131215d26352811a34b6ad1b243673
2023-06-23 18:24:53 +02:00
Alexander Gabilondo
8250826d6a Translated using Weblate (Basque)
Currently translated at 99.0% (498 of 503 strings)

Co-authored-by: Alexander Gabilondo <alexgabi@openmailbox.org>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/eu/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9cef297d041ced4a21f5d6c4c50d6638ce277106
2023-06-23 18:24:53 +02:00
Stanislav Horáček
866edb4eea Translated using Weblate (Czech)
Currently translated at 100.0% (503 of 503 strings)

Co-authored-by: Stanislav Horáček <stanislav.horacek@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/cs/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I8a3b688f2b2d6f7ac5a49e254e456053a270a597
2023-06-23 18:24:53 +02:00
Nathan
701dc6dc92 Translated using Weblate (French)
Currently translated at 98.9% (458 of 463 strings)

Translated using Weblate (French)

Currently translated at 100.0% (503 of 503 strings)

Co-authored-by: Nathan <bonnemainsnathan@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/fr/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/fr/
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ie12f8c7129ab20e18f508582bf7311e4b975c3ad
2023-06-23 18:24:53 +02:00
Ihor Hordiichuk
69bbf1f411 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (503 of 503 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/uk/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I7ce63a3d16ceafb2bdfdd38c7f0c4c75ba94ca71
2023-06-23 18:24:53 +02:00
Sabri Ünal
273f72f435 Translated using Weblate (Turkish)
Currently translated at 100.0% (463 of 463 strings)

Co-authored-by: Sabri Ünal <libreajans@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/tr/
Translation: Collabora Online/Help
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibc50d88bfd078dd824718370b56e454727ca15ae
2023-06-23 18:24:53 +02:00
Jaume Pujantell
aceb8912fd Handle LOK_CALLBACK_DOCUMENT_PASSWORD_RESET
Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: Ibc2be5bc7676b1b67b7494c200011e4622a5b294
2023-06-23 18:17:14 +02:00
Pranam Lashkari
08a7a5b206 jsdialog: fixed dialog content being cut off
i.e: theme dialog(format->theme)

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I9a09d52cd2c0d95cfae18ae12995761985d8111d
2023-06-23 18:16:26 +02:00
Ashod Nakashian
9efc81a51b wsd: random device mounting
We now warn when we fail to use mknod
to create the random devices and have
stricter requirements to mounting
character-devices. Specifically,
we explicitly only allow mounting
the random devices.

Change-Id: Ib0dc300dedc40942ea52426af2b267f6a81fbeb8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-23 18:13:59 +02:00
Michael Meeks
455c377d29 wsd: double size of the delta cache.
Change-Id: I218c0fbdef6815a56bf8d4059bfcae186b32ebed
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-06-23 16:59:08 +01:00
Caolán McNamara
490b0c0d0d drop non-standard width=400 height=400 tile request in unit test
there since:

commit 232499f542
Date:   Thu Apr 21 12:34:30 2016 +0300

and

commit bf66f7a908
Date:   Mon Jun 13 20:31:14 2016 -0400

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I04745be0581a697bbc3b15ba1d8bb94207320a7a
2023-06-23 16:55:25 +01:00
Caolán McNamara
2e64ad700d push unpremultiply to client
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4aef21179a4ace084762f83f5235c7022d670752
2023-06-23 14:20:42 +01:00
Caolán McNamara
962ecba493 push bgra->rgba conversion to the client
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I425655bfd5e6fd9e1e3ca0b6bcc914511ba188b3
2023-06-23 14:20:42 +01:00
Caolán McNamara
30d088b9bb refactor to isolate where we extract pixels
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I0772a786fe67dfac8200f1b9ee75f2ba5d9a2e82
2023-06-23 14:20:42 +01:00
Caolán McNamara
9c780bec82 double delta cache
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4f06f9c4bd6f6fc41b6eed23eb2331daa26f0b5b
2023-06-23 14:07:31 +01:00
Pedro Pinto Silva
378f96433a Dialog: don't ignore label's padding (ui-text)
Before this 8a0c8c44a7 was not being
applied furthermore better to specifically set this to only affect
labels within dialog content (since jsdialog class is also in many
other places such as sidebar and widgets)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic1cb825d6c70858a4c49123243866eaf0a6a8e50
2023-06-23 12:56:55 +02:00
Pranam Lashkari
a9b66a0adc impress: mark multiple slides as hidden or show
when user hide or show multiple selected slide,
slides were actually hidden or shown but previews did not reflect that,
only first selected preview was marked as performed action

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ie0c2eea8442feb0a4340551a63d8d39932adad3c
2023-06-23 11:48:09 +02:00
Pranam Lashkari
b49adc9534 impress: do not start slide show if all slides are hidden
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I81ea189b143ce4ad60cac02bfce5898ce9bacd4a
2023-06-23 11:48:01 +02:00
Gülşah Köse
518fb36699 Show the context menu on click empty parts of slides pane
Show New Slide and Paste (if clipboard is not empty) on context menu
when the user cliked on the empty parts of the slides pane.

Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: I3d009499cc4400612f1246c28ce5478b80469428
2023-06-23 10:35:22 +02:00
Pedro Pinto Silva
9127173d83 Dark mode: Welcome dialog, use css vars and fix it for dark mode
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Id68a28615b0c245d7136eab50bbf0fc8b490ccc3
2023-06-23 08:15:35 +02:00
Szymon Kłos
722d538d15 Pass ui_theme to welcome dialog
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I19270ad653540b72f5606554848eed88bded8333
2023-06-23 08:15:35 +02:00
Pedro Pinto Silva
c51b63510f Welcome: Refactoring: fix indentations and quotes
Avoid linting problems
- Use tabs as indentations
- use single quotes

All per browser/.eslintrc and browser/.stylelintrc.json

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I1bbd425b7aaf39bca3f8d18da5092b7e27e41624
2023-06-23 08:15:35 +02:00
Patrick Luby
8e6a858904 Limit memory usage of internal log storage.
Otherwise it could grow without bound; now limited to 100 entries,
each of <128 characters.

Change-Id: I6a1b96a8cb6a67f991c3870f5b724989f65e0e74
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-06-22 09:28:43 -04:00
Caolán McNamara
69820d85e8 fix js/useless-assignment-to-local warning
tile = this._tiles[key];
 if (!tile)
   tile = this.createTile(coords, key);
   ^^^^
The value assigned to tile here is unused.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iaabaa6417bcbf385ff2bde139663f8bd2e90db49
2023-06-22 14:12:54 +01:00
Michael Meeks
bdf29a5365 Comment some more ...
Change-Id: I1bf5f638bc9b5fa1cb946dc7cd58be39cd6a6c5e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-06-22 09:35:22 +01:00
Caolán McNamara
9cab50049b this.hasContent -> tile.hasContent - #6369
Thanks to: Patrick Luby <patrick.luby@collabora.com>

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id58a276eade2ec3df3488ae70e1975f0f3ca527d
2023-06-22 09:35:22 +01:00
Michael Meeks
38b59a3f1c Handle canvas / tile memory more frugaly - #6369
Instead of spending time re-compressing canvases as pngs and
base64'ing these into URLs, lets just keep the nice, pre-compressed
zstd keyframe around and its associated deltas, in case we need them.

Move to a simple LRU time for cache eviction of all types: sorting
_tiles by last render time. Collect garbage regularly while working.
Enforce canvas count, compressed arrays and number of tiles limits
under a high watermark. We should have enough canvases around to
keep rendering snappy, while not jeopardising our ability to allocate
larger document canvases to render into.

Re-create canvases if/as/when we need to render them from our
cached compressed versions.

Re-factor and simplify createTile, pass section into foreachTileInArea.

  Includes parts of:

    Partial fix for issue #5876 discard excess canvas contexts

    WKWebView has a hardcoded memory limit for all canvas contexts
    so if canvas.getContext('2d') returns null, convert the canvas
    of other tiles to an image until canvas.getContext('2d') succeeds.

    Thanks to: Patrick Luby <patrick.luby@collabora.com>

Change-Id: I5117b0986aa46d2fffab6cd66d990de39dfcecea
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-06-22 09:35:22 +01:00
Michael Meeks
40ffe9ee03 Remove obsolete code from when tiles were Images.
We no longer need to track their loaded state, loading errors etc.

Change-Id: Icfa82807a800fc7a7406c130de22eb600324f61d
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-06-22 09:35:22 +01:00
Michael Meeks
12e0830b1b Kill canceltiles support completely.
This stopped working well a long time ago, and is already disabled
on the coolwsd side, so dung out the rest of the code & docs on this.

Change-Id: I2e0b73fe9780e16c3cc74ae3a38ae6b04434717a
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-06-22 09:35:22 +01:00
Caolán McNamara
d3ecb6c95f the tile is assumed to be 256 in width
but as seen with unit-tiletest that is not always the case

==24170==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x63400001e808 at pc 0x558a6f505973 bp 0x7ffc0670e7d0 sp 0x7ffc0670e7c8
READ of size 8 at 0x63400001e808 thread T0 (kitbroker_002)
    #0 0x558a6f505972 in DeltaGenerator::DeltaBitmapRow::initRow(unsigned int const*, unsigned int) Delta.hpp:129:36
    #1 0x558a6f4fc318 in DeltaGenerator::DeltaData::DeltaData(unsigned int, unsigned char*, unsigned long, unsigned long, int, int, TileLocation const&, int, int) Delta.hpp:233:21
    #2 0x558a6f4f8a22 in DeltaGenerator::createDelta(unsigned char*, unsigned long, unsigned long, int, int, int, int, TileLocation const&, std::vector<char, std::allocator<char> >&, unsigned int, bool) Delta.hpp:574:17
    #3 0x558a6f4f2a35 in DeltaGenerator::compressOrDelta(unsigned char*, unsigned long, unsigned long, int, int, int, int, TileLocation const&, std::vector<char, std::allocator<char> >&, unsigned int, bool, bool, LibreOfficeKitTileMode) Delta.hpp:669:14
    #4 0x558a6f41f300 in RenderTiles::doRender(std::shared_ptr<lok::Document>, DeltaGenerator&, TileCombined&, ThreadPool&, bool, std::function<void (unsigned char*, int, int, unsigned long, unsigned long, int, int, LibreOfficeKitTileMode)> const&, std::function<void (char const*, unsigned long)> const&, unsigned int, int, bool)::$_0::operator()() const /home/vmiklos/git/libreoffice/online-san/./common/RenderTiles.hpp:304:38

so just use the rle cache for the first 256 pixels

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I8d34ea53bd20b69184e100b56017dfc0a904eaab
2023-06-21 21:31:48 +01:00
Caolán McNamara
a06f31ec77 WaE: -Werror,-Winconsistent-missing-override
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I35bbc86924cfc1f9045d8168119d022f23edeac4
2023-06-21 16:40:47 +01:00