Commit graph

21173 commits

Author SHA1 Message Date
Ashod Nakashian
87bce5dc5d wsd: test: merge UnitWopiUnlock into UnitWOPILock.cpp
Change-Id: If051032e2ed9d7a0ab345bdad710ba1eafe92d96
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
4453175348 wsd: improved socket dump state
Change-Id: I5b59461b17a8d94d955cdeff5b6ebbf1573db0bf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
d50b4e4b1c wsd: test: dump state on test failure
Seems a useful thing to capture the internal
state when a test fails, as it might help
understand what was going on.

Change-Id: I591a88662ab86ab4dc7f39dafcc4d7d279a4d9c4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
aabe6cba8d wsd: clang-tidy warning fix
Change-Id: Id8b6d9987c03d33286c7b2f819776bd571329f3f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
8ef57dd2ec wsd: better newChild unit-test event
Change-Id: I8403e14780ad0bf971625934b7011fba1f24f07c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
13b6f64d59 wsd: unmount the test mount directory too
We test if mounting is possible by mounting
a test directory. This can leak in crashes
and failed tests, therefore it needs to be
cleaned up too.

Change-Id: I2638cc0863f3f5575f697bece9801d42cd321ed1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Caolán McNamara
c224a44ead TileSectionManager::_oscCtxs is unused
unlike TilesSection::oscCtxs which is

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iaad8dd61cd0e4432abcc50ca3ca71cdcb96a66db
2023-07-07 20:20:57 +01:00
Andras Timar
1f0013e811 docker: remove obsolete fix
The domain resolution problem from jails was properly solved by
bc8da0cb33
This hack is not necessary in docker.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I59664b895d187b2a8930a34b096305e0b7c384e3
2023-07-07 19:11:01 +02:00
Gökay Şatır
df9c669c34 Activate the focused tab immediately when navigating with arrow keys.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I76f2db4340a3c832979215c18e06af3e61042a15
2023-07-07 19:12:46 +03:00
Szymon Kłos
1d7be47f03 jsdialog: share code for widget update
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ifd348b62f8ca6b6b23836772c5e26d728ad8c9af
2023-07-07 11:58:38 +02:00
Darshan-upadhyay1110
66d42b7a91 Focus back to document when Escape key pressed
* Focus back to document when escape key pressed on any element in Notebookbar
 * Exception: When drop down is already open then focus back to element.
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I4b34ae795465ecc402c5228478b7797298acc5a7
2023-07-07 10:52:54 +03:00
Gökay Şatır
27ec5a26ab Add missing accelerator keys for the writer notebookbar.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Iaedb0b365a6671b685f1c7600503b533976f82ad
2023-07-07 10:33:19 +03:00
Gökay Şatır
15cde8c880 Sometimes Cypress doesn't try multiple times when commands are chained.
Breaking the chain may be useful in this case, in order to benefit from timeout.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I4242df23698b2019028cb4e8a3c6206499b80083
2023-07-07 01:27:27 +03:00
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