Commit graph

23938 commits

Author SHA1 Message Date
Szymon Kłos
81722df0ab Add missing types in Mention.ts
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia3909dd8a1e55a4872e38d5b3d0e8493401d475b
2024-05-09 12:19:01 +02:00
Bayram Çiçek
368c2218ec more conversion of Control.Mention.js to ts
Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: Ida4be8f63b05aad9db80acd6eba7e8e403587ac7
2024-05-09 12:19:01 +02:00
Gülşah Köse
a46147588f Convert Control.Mention.js to Control.Mention.ts
Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: I575d9e14562b1a77f30d355024a2106d7955fe6a
2024-05-09 12:19:01 +02:00
Méven Car
dab5afac90 postMessage test page: Add messages from editor view
Add CloseSession button.
Also improve spacing of elements.

Signed-off-by: Méven Car <meven.car@collabora.com>
Change-Id: I9999654f9d53d44016eeb0ea587cf3f61b000471
2024-05-09 12:08:43 +02:00
Hubert Figuière
dbd3bc1482 calc: Properly handle the disable state
Doesn't hide the grid when the Function wizard is open anymore
when disabling the ToggleSheetGrid button.

Depends on https://gerrit.libreoffice.org/c/core/+/167370

This is a follow up for issue #8066.

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I79ba99716eb1103e7239fe5cc302c64827c9ef53
2024-05-09 05:46:49 -04:00
Michael Meeks
f4265ce8a7 KitQueue - move methods from header to source and simplify.
also rename and dissolve the previously virtual _impl methods.

Change-Id: Id77a5c3ce79b27406301ef336ac1c9a40ead15bf
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-05-09 09:50:08 +01:00
Michael Meeks
ebb4eda3df Move common/MessageQueue.cpp -> kit/KitQueue.cpp.
This is not common code, it's used only in the Kit.

Rename TileQueue -> KitQueue as well as unhelpful member variable naming.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: If158597f99f302cbc27e8eab139972f57a2fc3bb
2024-05-09 09:50:08 +01:00
Michael Meeks
aacc957f23 MessageQueue: squash into TileQueue.
Avoids unhelpful virtual methods which are not used anywhere, simplifies
several code-paths, improves readability, and perhaps performance.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I7528fab77698546545bf81d7ccacdda9a0002833
2024-05-09 09:50:08 +01:00
Michael Meeks
466c31d59a MessageQueue cleanup, and avoid accidental use in tests.
The MessageQueue is not a generic message queue, it has much more
un-anticipated functionality; so don't use it where we don't need to.

In particular unexpected re-writing and merging of messages
during tests is probably not a great idea.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I657738307e611be18f5f83e11c055bf8a88826da
2024-05-09 09:50:08 +01:00
Caolán McNamara
c1724983f7 cool#8744 ensureCanvas on preloading tiles
So we front load at time of request as much work as possible when we are
basically idle rather than do it when the tiles arrive.

https://github.com/CollaboraOnline/online/issues/8744

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ief643f1e98cf4a853d56a68d82b48ff092e5a963
2024-05-09 10:36:48 +02:00
Caolán McNamara
cfae2097b1 ensureCanvas takes two arguments, the 2nd the lastRendered time
make the current uses that just pass the 1st argument explictly
set null for the 2nd arg and retain the orig lastRendered time
in that case.

This lastRendered gets overwritten by _tileReady after calling
_applyDelta.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I237d34e8d1fde94c95eb778c054e4ac5985c2a50
2024-05-09 10:36:48 +02:00
Skyler
3dd2087bae Stop page scrolling
Sometimes an input we are focusing on is considered out of the viewport
by the browser. This is not always the case, and, even when it is, it's
not trivial to move it back in.

Instead, this change detects scrolling and re-scrolls the view to 0, 0.

Doing so is not without consequence, as there is a slight jitter before
we can scroll back, however this is substantially better than having the
controls off-the-page.

Signed-off-by: Skyler <skyler.grey@collabora.com>
Change-Id: Ie5003f9244ce1c0e8a183de5fdbcf3a880b13a13
2024-05-09 10:06:56 +02:00
Szymon Kłos
fcfb95638f jsdialog: css: use available aspace for ui-txtarea
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I824dd5addaa93a1ae779b0070de9d8971f7797ea
2024-05-09 08:47:39 +02:00
NickWingate
1bc78e8059 Expose object name and description dialogs
It can be used to apply name to an object so it will
be presented in the navigator as something unique

Signed-off-by: NickWingate <nick.wingate@collabora.com>
Change-Id: Ica06259dc3007d638a4998ccc2cce03ad1a5ca05
2024-05-09 08:47:39 +02:00
Caolán McNamara
70a89a4d43 allow a test to start without sidebar
instead of starting with sidebar and then removing it

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: If2ea433cd3d5fc18ad549bd3df095de15c126ad0
2024-05-08 21:04:48 +01:00
Caolán McNamara
399afd123f tile.canvas is always true after a successful _ensureContext(tile)
_applyDelta returns early if the initial "ensureContext" of the tile
fails.

i.e.

  var ctx = this._ensureContext(tile);
  if (!ctx) // out of canvas / texture memory.
    return;

and ensureContext already calls ensureCanvas, so tile.canvas is
always true in the remainder of this function.

The "defer constructing the image & applying these deltas until the tile
is rendered via ensureCanvas." implied a sort of deliberate optimization
to wait until render time to apply the delta which doesn't actually
exist.

Also move the stray "// 'Uint8Array' delta" comment back to where it
originally came from as documentation of the type of the param, as in

commit 4140bf8741
Date:   Sat Nov 6 11:11:13 2021 +0000

    Bring back the delta application JS from the 6.4 branch.

...

 _applyDelta: function(tile, delta) {
         // 'Uint8Array' delta

...

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: If15a897c3251f28639c9f1112687e543421e457d
2024-05-08 20:47:10 +01:00
Caolán McNamara
e40bcccc4f update impress/apply_font_shape_spec.js to pass
probably since merge of

commit 5140abd2c94b96f2a32f0f7416ae79239a2af187
Date:   Fri May 3 14:14:26 2024 +0500

    tdf#152906: use correct Y offset

or similar of that topic

change 3285 to 3286

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4bd3509313c7a5801d5284eebc3882bf3550eed9
2024-05-08 18:53:46 +02:00
Michael Meeks
5357b0e81f bgsave: update unit tests to exercise races in modified state.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I60d861f78b592fc39b88c23c0dece771ec8260a3
2024-05-08 16:42:29 +01:00
Michael Meeks
c66940cf9a bgsave: close race of typing while a background save completes.
We need to mark core unmodified so we can track modifications
to the core that date from after the background save process is
forked.

We avoid telling WSD about our new modification status until
we are sure the background save completed successfully, and only
in the case that we have not been subsequently modified.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I2c9fbce942ff0af2bb727c3685f4ec479e18fa27
2024-05-08 16:42:29 +01:00
Michael Meeks
7f6b59b180 bgsave: improve unit tests.
Force background saving in the config for this test.

Use stamp files to force sequencing between Unit test and Kit.

Change-Id: Ia2c60c3dcfdad87c9c9754e8f20a3c36dbcf74d5
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-05-08 16:42:29 +01:00
Aron Budea
80a6f97518 Bump version to 24.04.2.1
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: I56c4be6de327c7b678cc9a534b90f7fe2a916190
2024-05-08 17:13:49 +02:00
Gökay Şatır
396d835f53 Container is rendered on the server side.
It should always be visible when the function is called.
Rename the function to _setPreviewContainerTop for readability.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ib90da34574b0a5a44c9a2e7a2b2d64cdd2d59938
2024-05-08 16:00:23 +03:00
Pedro Pinto Silva
45c51c42de Slide sorter: presentation toolbar: Remove ui break
There is no need to add a visual break/divider between "Fullscreen
presentation" and the "Insert Slide" buttons:
1. They are visually very well distinctive so there seems to be not a
need for a division
2. There is not so much white space so the more we can reduce visually
the better

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I27b84782e5af987d9aec3734f7557c746a03667c
2024-05-08 13:18:23 +01:00
Neil Guertin
c54683f349 Fix failing test mobile/writer/table_properties_spec.js
Was failing in moveCursor after slowdown introduced by
https://git.libreoffice.org/core/+/ca31493a
Rewrote test to use the same select helper as all the other
tests in the file

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I5197a095d47e727526636b232df1f3be45e5bb52
2024-05-08 10:58:17 +02:00
Caolán McNamara
9b68218ffa _canonicalIdInitialized is a member of CanvasTileLayer not TilesPreFetcher
a problem since:

commit 04ac02b033
Date:   Sun Sep 3 17:37:49 2023 +0300

    Do not request tiles until we are sure a canonical id is set

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: If285a53c51b17a812a7387150f99f0f43486b9e3
2024-05-08 10:50:00 +02:00
Neil Guertin
ec83c14f3d Fix failing test desktop/writer/top_toolbar_spec.js
Follow up of be235b1386

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Idab5a5bac4ac15aa0e13a2d660271a305fad945a
2024-05-08 08:06:51 +02:00
Caolán McNamara
3e937ef83f check for _docLayer existence before deref of _docLayer
order is since:

commit 06e4722cc9
Date:   Fri Aug 7 18:37:11 2020 +0530

    loleaflet: rewrite tile-prefetcher for L.CanvasTileLayer...

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I69b7dd8974d2333cecbc38f94d4851bb0c5f44fc
2024-05-08 07:43:16 +02:00
Neil Guertin
be235b1386 Fix failing test desktop/writer/top_toolbar_spec.js
Remove scrolling to get to toolbar buttons
Add test specifically for scrolling

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I885d3ec33c8d570dfad45893c5d267b7fe8cc0b9
2024-05-07 16:00:44 -04:00
Henry Castro
913f684e30 browser: preview: simplify 'isPreviewVisible'
.

Change-Id: Iee73f2eb77d1fc20aa266f66fda314770bc666d0
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-05-07 14:09:54 -04:00
Henry Castro
94b25bce1f browser: preview: fix time out resize event
Change-Id: I5e3b49909fdbd46134aee359e8aa015f4672892d
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-05-07 14:09:54 -04:00
Rashesh Padia
7572af7486 fix: don't wait for migrate msg if indirection server closes the connection because deployment gets deleted
- if deployment gets deleted than there is no where to migrate the
documents in such cases indirection will close the monitor connection
but we need to set the _migrateMsgReceived flag so that docBroker don't
wait for the message and continue to cleanup the document

Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: Ia2732740927ea16e368f91bea7421576a3cf2beb
2024-05-07 20:26:46 +05:30
Rashesh Padia
c1f0fcf946 indirection_server: migrate document on shutdown
- when COOLWSD get SIGTERM admin sends a "shutdown_received" message to
indirection server
- indirection server sends back migration messages for each document to
migrate it other available COOL server
- there is timeout associated with migration message if COOLWSD doesn't
get message we move on and close the document
- added a new option in coolwsd.xml to change the migration timeout
default is 180s

Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: Id7d5eea94d1b03ea5905ca67a9dd8f6ca15952f3
2024-05-07 20:26:46 +05:30
Rashesh Padia
438985ab31 admin: fix gaps between cards when server/card gets removed
Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: If72d27b0b32a00e0105dce08292afa4c792d6cb5
2024-05-07 20:26:15 +05:30
Caolán McNamara
b440a86f73 get coolwsd log on failure
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I88545054c4a79dd0152d13699f80e7f1b235d267
2024-05-07 15:12:55 +01:00
Caolán McNamara
ca2ca25d07 try rm -f coolwsd instead of rm coolwsd
Making check in .
make[1]: Entering directory '/home/collabora/jenkins/workspace/github_online_master_debug_vs_co-24.04'
fatal: ref HEAD is not a symbolic ref
Cleaning up...
/bin/sh: ./coolwsd: No such file or directory
rm: cannot remove './coolwsd': No such file or directory
make[1]: *** [Makefile:7155: /home/collabora/jenkins/workspace/github_online_master_debug_vs_co-24.04/jails] Error 1
make[1]: *** Waiting for unfinished jobs....

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I31748354bb55f26a8a5b8475a4daa74b3ba5d729
2024-05-07 15:12:55 +01:00
Caolán McNamara
8a6b40200f cid#365219 silence Explicit null dereferenced
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I534f49e2ebe34e4518e7456ba200af9d76535832
2024-05-07 15:59:55 +02:00
Caolán McNamara
1385b0d086 cid#365222 COPY_INSTEAD_OF_MOVE
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Idf287528f5e17670bef3a7524e8cefc91ae23ffc
2024-05-07 15:59:55 +02:00
Caolán McNamara
ec8cc5aea8 cid#365225 COPY_INSTEAD_OF_MOVE
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I9c7e1b105d6cb10ef312b7a824de8cc922a83929
2024-05-07 15:59:55 +02:00
Caolán McNamara
cf01a0687b cid#365236 Dereference null return value
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I325404441747611985266bf51c53bf14423491fc
2024-05-07 15:59:55 +02:00
Hubert Figuière
22e789a420 impress: restrict presentation in readonly mode
When export is disabled or watermarks are enabled, presentation in readonly mode
is disabled.
This is checked in the frontend by the WOPI property `DisablePresentation`
that is synthesized in the wsd. Also check when calling the presentation
command.
WOPIFileInfo::getWatermarkText() is stubbed on mobile.

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I4f7aff9f670f7523dfcf396f6009a272df9d5af8
2024-05-07 13:21:04 +01:00
Michael Meeks
72bbc375be Add more comment warnings around security critical code.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I1ca4a54d076a8f95850f329168c941806bc56b16
2024-05-07 13:11:30 +01:00
Michael Meeks
9d67fe24d2 comments: remove obsolete thread related comments.
Change-Id: I9d31e2614c7ea6edf47b92f25edd60748dd17493
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-05-07 13:11:30 +01:00
Michael Meeks
bd524201d3 bgsave: use document name progress bar instead for saving.
Avoid the popup overlay and associated annoyance.

Also use a progress bar for loading in the normal overlay.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Icafdcc958d92f42cba44e3b213d6a0202566251a
2024-05-06 20:28:08 +01:00
Michael Meeks
90f387cdc5 bgsave: change statusindicator protocol message to 'progress' + JSON.
We need to get more helpful structure into this message, and add a
type=bg flag to handle background progress messages.

Add unit test for merging progress: setvalue commands.

Simplify ProtocolHandler sendTextMessage with a std::string wrapper.

Android code needs manual testing.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I54ce807e2fc5de80118905e68557a95e637fbd18
2024-05-06 20:28:08 +01:00
Pedro Pinto Silva
28cd22e792 Mobile: Formulabar: inherit more from desktop, remove negative value
- Inherit padding from #formulabar desktop, a single dimension instead
of placing different margins/padding across mobile
- Fix alignments
- Use css vars for buttons sizes

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I21110e43115576a212d29b1a55268fbeed6d52af
2024-05-06 15:39:59 +01:00
Pedro Pinto Silva
d526ee1031 Formulabar input, cell address input, AutoSum: Fix sizes discrepancies
- Remove individual sizes
- Rely on the same single size digit that comes from the parent
  container
- AutomSum button should not inherit buttons height
- Fix jumping buttons: Cancelformula (close btn) should be placed
  exactly where equal ("=") was before

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6c5a40709051ace3313195f4491798429eb5f6a0
2024-05-06 15:39:59 +01:00
Pedro Pinto Silva
7a83489abe Formulabar: Fix address input field not being targeted (css)
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ifdd449bcedb5049eae281b9b5e882b410290a7ee
2024-05-06 15:39:59 +01:00
Pedro Pinto Silva
30d3313342 Formulabar: Fix buttons jumping position
Before this commit the buttons would jump position between default
button group and cell edit mode button group (when acceptformula and
cancelformula buttons appear)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5411f145a9f4f4d2dd10a4278105447a52755815
2024-05-06 15:39:59 +01:00
Pedro Pinto Silva
23db285fa4 Formula bar: Fix alignment, avoid individual margin for each button
Better to rely on grid gap or somesuch

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I50e59d1b3464687a0bba76bf54a0ed2412dc3758
2024-05-06 15:39:59 +01:00
Pedro Pinto Silva
9e87e8ca70 Refactor: CSS: avoid generic formulabar rules
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Idfc850615026dcf06bb1f27c4adbe8f33b6f9bee
2024-05-06 15:39:59 +01:00