Commit graph

21160 commits

Author SHA1 Message Date
Caolán McNamara
da10eb9996 return failure early in case of oversized tiles
it shouldn't happen, but return early if it does

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I1733d346ff370827fd882caacebca111f790bbe1
2023-07-06 14:25:31 +01:00
Gökay Şatır
7e9a3d0f7c Allow up and down arrow keys to focus on the tab button or the content of it.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I8c79e674852ba73b98308095bd296dabe1152c4a
2023-07-06 15:48:21 +03:00
Szymon Kłos
063feae9b3 comments: don't allow to collapse active draft
This fixes bug when we opened 2 sessions and
- user A created comment draft but didn't save it yet
- user B then created comment and saved it
Result: comment of user A dissapeared and it wasn't possible
        to insert new comment

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Idf1be61dca5e0aabdd885b7bd36a18a4a60507e9
2023-07-06 14:45:02 +02:00
Pranam Lashkari
51d19dd60e annotation: avoid saving comments on losing focus
problem:
resolves: #5995
it was just annoying for user when he goes to some other tab or clicks somewhere,
and the comment is saved automatically while they may want to still edit

also this solved another problem where in multiple users case,
if another user switches tab comments were saved even if user was editing it

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Iee32f21803d6a0dbc164bbf9a9bee803228aad7a
2023-07-06 14:45:02 +02:00
Pedro Pinto Silva
f7c3f62d2d Add missing img alt attribute to unoToolButton
Without this commit screenreader will spit some non identified image
blurb

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Idf2cbede00127027e7a1162fc8e182728055936e
2023-07-06 13:52:51 +02:00
Pedro Pinto Silva
bcbee8d5c7 Fix unoToolButton unlocalized alt attribute and avoid digits
Before this commit id was being used directly making:
- Always an English string no matter the language
- Sometimes that alt text was picking digits coming from the
id. Example: Save1

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: If4b4ee550b2d787b30557915015e173859d657a1
2023-07-06 13:52:51 +02:00
Caolán McNamara
7833e8ce02 asan error seen in testRleComplex
=============== START DeltaTests::testRleComplex
../kit/Delta.hpp:98:23: runtime error: index 4 out of bounds for type 'const uint64_t[4]' (aka 'const unsigned long[4]')
    #0 0x55d29dacd21b in DeltaGenerator::DeltaBitmapRow::PixIterator::next() libreoffice/online-san/test/../kit/Delta.hpp:98:23
    #1 0x55d29da8d514 in DeltaTests::testRleComplex() libreoffice/online-san/test/DeltaTests.cpp:316:16
    #2 0x55d29daf7a87 in void std::__invoke_impl<void, void (DeltaTests::*&)(), DeltaTests*&>(std::__invoke_memfun_deref, void (DeltaTests::*&)(), DeltaTests*&) /usr/bin/../lib64/gcc/x86_64-suse-linux/9/../../../../include/c++/9/bits/invoke.h:73:14

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ib6e13eaf0fb89ad086a99251d5b8edcdcedd6800
2023-07-06 11:40:48 +01:00
Pedro Pinto Silva
2948e5206e Gray out empty treeview
So user understands the component is empty.
We cannot add disabled attribute here because we have some cases such
as pivot table where the initial state is empty.

Note:
Ideally we would distinguish from static and dynamic
treeview (static=read only list VS dynamic=list you can remove and add
items). Only after this distinction we can properly add disabled
attribute to the static one

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ide4fb7589b5be611975de4a704b458bb626be0e0
2023-07-06 10:59:15 +02:00
Caolán McNamara
aa00f92b99 don't try and reselect graphic on previous tab on switching to new tab
When switching tabs, the client calls _handleSheetGeometryDataMsg which
seems to replay various messages received earlier. And one of those
replays a "graphicselection" attempt, but the new tab doesn't have a
graphic to select and so things go downhill from there.

To reproduce have a shape in one tab, select it, switch to another
tab and without this we get: 'failure error while parsing ExportAs command'

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I735509b14872dc6c74d7092db0083217954ad988
2023-07-06 09:20:33 +01:00
Caolán McNamara
0231a4d2a2 impress slide previews are not 256x256 so triggers assert
but they don't go through the delta mechanism, so move the assert
to the delta path, the other path is ok wrt gt 256x256

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I2ba4d8affb7645349540f3a5de31d1802f04c53d
2023-07-06 09:13:45 +01:00
Rash419
75dbc5ed79 add RouteToken in admintemplate
- websocket uri, admin-bundle.js uri, href links

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I84a484938191e2f62b9d262ee922e8b04de74a44
2023-07-06 13:27:23 +05:30
Pedro Pinto Silva
6f34565aee Tabbed view: Writer: layout tab: Reorder elements
Better to reorder these so we have higher probably to meet user's
expectations and fix the priority in which the elements are placed
- Move "Columns" (.uno:FormatColumns) to a higher priority place
- Demote "Title page" (.uno:TitlePageDialog) to a toolitem: This
Button is already present in the insert tab and so we don't need to
have it as a bigtoolitem here
- Move Hyphenate and LineNumbering to be right after breaks

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6cba0ad920e9ee9ec836f9e06e201f0ff9264f84
2023-07-05 17:41:13 +02:00
Caolán McNamara
b44a2b71b9 cid#318946 Argument cannot be negative
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I83716319a797ffb5e49c4b98676bfe864a75dec5
2023-07-05 14:49:59 +02:00
Caolán McNamara
d078354eb7 cid#318955 Uninitialized scalar field
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I2df245ffa6bf45536ebe4383033dcdd87f280bc2
2023-07-05 14:49:59 +02:00
Caolán McNamara
bc4a699735 cid#318871 Unintentional integer overflow
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I6af42166c495032a6e76532cc2e919a8d01a63c7
2023-07-05 14:49:59 +02:00
Caolán McNamara
d75f3ffb6e cid#318901 Untrusted loop bound
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ic3455b21f9c2b7c8928c6d3b64f8790a203e3379
2023-07-05 14:49:59 +02:00
Caolán McNamara
28f5273ad7 cid#318876 Wrapper object use after free
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: If80119af29ffde7ca437047da4646c0876d98014
2023-07-05 14:49:59 +02:00
Gökay Şatır
f713d4e2df Focus back to map when there is no match.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ia05c25ea98000788529a83d8229095b3b99fbb9f
2023-07-05 15:23:34 +03:00
Gökay Şatır
3ca8b6044e Assign space key as accelerator action trigger.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I26c645ef58c7aacfb33499fc7f806c288e1a5a3b
2023-07-05 15:23:34 +03:00
Gökay Şatır
69ba37032d Don't use space symbol as part of access key combination.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ica9f8709d8c29bcbb8610f37d933fd34b7bca8e0
2023-07-05 15:23:34 +03:00
Caolán McNamara
76a5a9baff transport in rgba order
so if core is compiled with a cairo using rgba the pixels can
be sent without need to reorder in server or client

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iaf0410f1eaa605b9ce2716625f6c968bca523ccb
2023-07-05 11:58:54 +01:00
Caolán McNamara
01165fbe1f On a cache hit for a tile the result typically had a wireId of 0
And tile::needsFetch on that result will always return true given the
default of invalidFrom of 0 and the comparison of
  return this.invalidFrom >= this.wireId || ...
so the tile return from the cache is unusable.

It is typical for a request not to have a wireId, if we don't use the
cache then doRender will send a timecombine result with wireIds set. But
if we use the cache here we send a response using the wireId of the
request.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I586406af86b0f503dfc204e20120cc8acebf5b8e
2023-07-05 11:49:34 +01:00
Caolán McNamara
2fd50d8965 cid#318897 Using invalid iterator
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I977f65bbd11060fecf4db31e7e25e068771c17b7
2023-07-05 11:49:03 +02:00
Pedro Pinto Silva
0b3bc8d3b8 Use consistent download PDF as... labeling
Better to use Download -> 'PDF Document (.pdf) as... both for compact
and tabbed view

it's:
- Less scary
- More meaningful (you can download the pdf as hybrid document etc
- It also signifies that the action of pressing the button is just one
step for more options

Exception:
For when the group_download_as is false (by default is true). In this
case and since we don't allow '...' in button labels on tabbed view
better to fallback to '- Expert'

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ifda092ae3d685d7de3e5f065659733c5af2e2d41
2023-07-05 10:28:43 +02:00
luigiiucci
5626268f9b Add new "download as" PDF option - part 2
refs commit 2572f011da9a3cb688a33b2360b741805bf31a9f
Added functionality:
 - for draw, calc and impress with "download
   group" toolbar buttom
 - for all the applications with single
   download toolbar buttons
 - for all the applications in compact
   mode (menu)

This is a port from 22.05 + with conflicts solved and the removal of
legacy hasSigning and related

Change-Id: Ibab9d831f1da07cbf38db29a26eeb5b712c4842c
Signed-off-by: luigiiucci <luigi.iucci@collabora.com>
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
2023-07-05 10:28:43 +02:00
Gökay Şatır
63b4847562 Notebookbar accelerators, 2 step approach: Select tab first, then pick command.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Idde0cd3401beb89c999b698af5ecb5a9348b5d8c
2023-07-05 10:11:57 +02:00
Darshan-upadhyay1110
31bf98adb1 Fix odd looking textarea width.
Fixed hyper link textarea dialog box's width
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ica7977c8d334bbb8bcb3bfd3c8aca8d4876c0571
2023-07-05 08:31:29 +02:00
Caolán McNamara
2c99a097b2 fail make check early in typical dev setup if core not built using --without-system-nss
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Idcf86a7b488e08d59a944a96f17072a7a7a72b3f
2023-07-04 21:30:34 +01:00
Caolán McNamara
a94b7d8f8e draw a checkerboard for missing tiles when debugging
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I27cef6d9903e93fe4f87a8627c4fab84257129ef
(cherry picked from commit 308f367ffa6daec90f24603cca07bf7f26d37825)
2023-07-04 21:26:31 +01:00
Federico Rispo
39b991fa68 fix: Control.LanguageDialog to force the LanguageStatus command
Signed-off-by: Federico Rispo <federico.rispo@zextras.com>
Change-Id: Ib27b1af4c62c1ead673ec59c83dcb632b58a6143
2023-07-04 18:24:35 +02:00
Federico Rispo
6620815786 fix: Language selection in More... dialog is not applied
When a user selects a different language for the document using
the More... dialog, the system does not apply the selection.
This patch allows the system to send the LanguageStatus command even
when the jsdialog is opened.

refs: #6808

Signed-off-by: Federico Rispo <federico.rispo@zextras.com>
Change-Id: I7a1a39b31db59f1bc5f980d63f3040ffa9b311e5
2023-07-04 18:24:35 +02:00
Rash419
24c83b9e85 refactor: consolidate mentions-related code in TextInput.js
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I47b104de283f001ec5d0486d94e88336ceba87e0
2023-07-04 17:42:58 +02:00
Gökay Şatır
cf54fe17a0 Add multi-language support for Notebookbar accelerators.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I993477f280b0483e04193e671d6cd588f792764e
2023-07-04 12:25:07 +03:00
Andras Timar
1fb4954fe6 Android: bump compileSdkVersion targetSdkVersion to 33 #6788
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Id2199c0e43bae0cf3edbdf9b1c012bebb6d544fd
2023-07-04 10:01:32 +02:00
luigiiucci
78558fe9af Avoid crash when pasting image in debug mode
If COOL is running in debug mode ther is a
check that incoming messages are UTF-8.
We skip this tests if the message refers
to an image pasted.

Signed-off-by: luigiiucci <luigi.iucci@collabora.com>
Change-Id: I4f7e4a647deb22ec2a032d4d6347d910184c0701
2023-07-04 09:57:52 +02:00
Michael Meeks
61aa932d30 Send an 'update' message for an un-changed tile when rendered.
Change-Id: Iefe666f9953195af0001626a9e8d7d080a7fe201
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-03 20:27:07 +01:00
Michael Meeks
9a16d3fc54 cleanup lastKeyframe setting.
Change-Id: I967e444fb4160a63e3eda66152c02aee114f71f2
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-03 20:27:07 +01:00
Michael Meeks
023a243982 De-confuse two different sendTiles.
Change-Id: Ib67093b9cb61ff7e856db5c8d98178c0afbdf555
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-03 20:27:07 +01:00
Michael Meeks
36818e9153 tiles: track invalidation by monotonic timestamp.
We want to keep pre-loaded, and invalidated tiles around so that
we have something to render in lots of cases, particularly for
other parts, and slides. However - we need to know that it is
invalid so we can on-demand fetch something better.

It is very important that this invalid state doesn't race with
tile arrivals ie. in a banal way:

	invalidate, req, invalidate, req, tile, invalidate, req, tile

it is unclear whether the latest tile is still invalid; similarly,
if we request(req) a tile and there is no change to it we get no
response.

To disambiguate this, use the monotonic wid to check we are in-sync.

Re-factor:
	setup debug tile layer more pro-active.y
	rename HasContent to NeedsFetch to be more explicit.

Remove:
	previous _invalidCount that was perhaps a similar idea.
	previous .loaded concept.
	previous _pruneTiles concept - now it seems we can be
	confident in cached tiles from other slides and sheets.

Change-Id: Ibc6d3b6050e756ace91a9bd53d3e4efe12b023cf
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-03 20:27:07 +01:00
Michael Meeks
4676b10765 privilege new tiles not to get GC'd before they are rendered.
If we just got a new tile from coolwsd - it must be for a reason,
even if it is a pre-fetched tile, lets keep it around if we can
in preference to less recently rendered tiles.

Change-Id: I87eaba7ccca0d6cf22777043e047dd2874da5bca
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-03 20:27:07 +01:00
Michael Meeks
9e22f3e830 tiles: tag current tiles and garbage collect during _pruneTiles.
Change-Id: Ia47b80ed6fb800e32153ef29895ed07a40607162
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-03 20:27:07 +01:00
Michael Meeks
0a4a9e3972 Remove obsolete tile.active code paths.
It appears that tile.active has been un-conditionally true for a
good while, and that the tile.retain handling for zoom levels has
not been used for a while.

New tile garbage-collection should give us scope to keep and/or
pre-load tiles for zooming more helpfully if necessary.

Change-Id: I4d493a5eea34bf9dfd84744696303d0ae37bf883
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-03 20:27:07 +01:00
Pedro Pinto Silva
5a04df5b76 Tablet: Add "Read-only" label only for users with no writing access
Before this the read-only label was being added to the status bar even
if the user has writing access but is currently in that transient
read-only mode state (pencil icon is visible)

Don't show read-only label for those cases. We already have the pencil
icon/btn that signifies that.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5295564244977388034c7a7930840cb45dfdd629
2023-07-03 15:45:46 +02:00
Andras Timar
7c68347c68 add dark mode settings to coolkitconfig-mobile.xcu
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib5b33596b5c312ecdcea3df2649a28fb4c3300c7
2023-07-03 11:01:07 +02:00
Parth Raiyani
872228b6a8 Updated copyVersionInfoToClipboard to work when navigator.clipboard is undefined
Signed-off-by: Parth Raiyani <pmr642001@gmail.com>
Change-Id: I3ed071f49c1008f15f6eb1e5b97dfd6c2c78c1d4
2023-07-03 13:35:10 +05:30
Szymon Kłos
7af3dc1946 jsdialog: fix checkboxes in treeview
entries are a tree structure so we need to iterate
through it using a special function

this fixes eg. date filtering in autofilter
where checkboxes didn't work

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I8a263264b2338d8955e0611f267f382768f1153c
2023-07-03 09:07:23 +02:00
Szymon Kłos
37fc7428e0 formulabar: mobile: allow to set cursor in the middle of word
make every character separate node to make this possible
also take not selection but node based on event's point

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I561a57e8d6284d8cbb567494dfd51c3470286af6
2023-07-02 18:55:12 -04:00
Szymon Kłos
beb0a9689a Element #formulaInput no longer exists
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I72b16bfe0c3e25844c25e8297a428d7790b48ba0
2023-07-02 18:55:12 -04:00
Szymon Kłos
c94be3e5f8 formulabar: use IME with new contenteditable
It converts textarea into contenteditable div.
Input is handled by TextInput.js used for document
and already in the past for formulabar. Replaces
usage of keyevents which are not triggered with
eg. Japanese.

Fixes also #6737
Fixes on mobile #6767 requires: https://gerrit.libreoffice.org/c/core/+/153717

New widget consists of text layer with visible content
and cursor layer with selections and cursor. When clicked
it focuses TextInput.js field for typing.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ieb7cf148a5aba80ab790e0b53c3a5ba27f166b73
2023-07-02 18:55:12 -04:00
Andi Chandler
558eb6ba39 Translated using Weblate (English (United Kingdom))
Currently translated at 100.0% (507 of 507 strings)

Co-authored-by: Andi Chandler <andi@gowling.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/en_GB/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I4c277190ce01d240f88f67211ad60289cf329ebd
2023-07-02 18:24:21 +02:00