Commit graph

21291 commits

Author SHA1 Message Date
Michael Meeks
24d033fd4c tile rendering: pure refactor.
Take all canvas tile rendering through the same function.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I68f1a53d01b1dff9ed9f5d62e4538171e1cfafc1
2023-07-08 13:08:59 +01:00
Michael Meeks
052fbf01a1 Remove obsolete tile grid debugging.
We now have CSections.Debug.TilePixelGrid.name to debug mis-aligned
CSS that doesn't pixel align our canvas.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I9f087cae60b757a67eae5dd6f464c16f1f66f20b
2023-07-08 13:08:59 +01:00
Michael Meeks
48afa99f1c remove unused method.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: If3239be4b4255e5f8b0731c4ecc4d65cceb7b853
2023-07-08 13:08:59 +01:00
Michael Meeks
58659d6ada Ensure that tile.coords.mode is not undefined.
Otherwise tile-cache invalidation fails in impress as we compare.

Change-Id: Ifcf4acbeebe0f384c4fe0de337402c93cb0337f9
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-08 13:08:59 +01:00
Caolán McNamara
4ca9ff6ab9 parse invalidatetiles with optional wid token and preserve it on forward
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I01820d9f74bb12dc75314fc6006666cecdf08da3
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-08 13:08:59 +01:00
Michael Meeks
789dd2963c Append the wid properly to invalidatetiles and parse it too.
also re-work parseInvalidateMsg to not use std::pair<> returns.

Change-Id: I724783b7050a1ee251dfbe9b2f1e0ea02e7d45f2
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-08 13:08:59 +01:00
Michael Meeks
6d697de175 tilecache: update the wireId on the last keyframe/delta if necessary.
A zero size delta means we're effectively up-to-date for this new
wireId.

Change-Id: I96abdf00648f7c2f833ffd56bd43980265b8d490
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-08 13:08:59 +01:00
Michael Meeks
3203db2be2 Cleanup includes.
Change-Id: I062579fc7dee2283e6ac62e67c844cf89c3a3188
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-08 13:08:59 +01:00
Ashod Nakashian
1cac1f1698 wsd: test: do not advance to next test on failure
Change-Id: I2831c90e088064f5a254ef8a9809796e8320ed04
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
7fdc33b916 wsd: no default parameters for DocumentBroker::autoSave
Change-Id: Id343cc36886c2768b4af7ee61d9524678c83dc69
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
12bae02ad0 wsd: separate out canSaveToDisk from needToSaveToDisk
Suppressing needToSaveToDisk silently when we cannot
save, because there is no Kit f.e., is unhelpful.

Now we have these two states separated out and
we log appropriate information in each case.

Change-Id: If38798578a7b88600e3f07c88e0bcbf833ae53f0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
037099fe32 wsd: cosmetic improvements to ClipboardCache
Change-Id: Ie3ccc015203463fcd9f4a9a26826e0d894f9ec50
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
b1d68e4b3a wsd: better context logging for clipboard activity
Change-Id: I83935df41492e0267b924893594002e6665a671d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
e2b8388dfa wsd: test: logging in UnitWOPIFailUpload
Change-Id: I4c51e6a56e5cf28b11a5652b5849ca54c25ee53b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
3fef73a33f wsd: DocumentBroker logging improvements
Change-Id: I9c6f32c087275f48ac559c2fbb05d04da4e00a08
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
22292d630f wsd: test: minor improvements to UnitCopyPaste
Change-Id: I0fe2390806ee736f44d76ab128e911b66b5e059b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
7650d5e175 wsd: remove redundant cast
Change-Id: I0cac85728cd4ade5d78b2a4cb715d0fdde17c832
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
Ashod Nakashian
5e343d9ffb wsd: serialize the http status-code numerically too
Change-Id: Ia5d67f295ce0426b160b64b72399950cc3723d7b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-08 04:19:00 -04:00
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