Commit graph

23645 commits

Author SHA1 Message Date
Skyler Grey
f8f15a139a Fix broken frozen columns mid-pinch-zoom
Previously the following issues were present when columns were frozen
- The frozen column was allowed to move, this was exacurbated when I
  made it easier to move in my 'calc: pinch-zoom:' commits,
  (3ba8257c64 to
  b378a0fd77). This is now fixed
- A regression was also introduced in that range where the selected cell
  marker would become offset if you placed it in a frozen section then
  pinched to zoom. This is also fixed

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I07f70a32e5cb68aeb759fd6cad626b2d4c0eed72
2024-04-19 09:42:52 +00:00
Caolán McNamara
f02be4aa25 compile check of -D_FORTIFY_SOURCE=2 not failing with CFLAGS=-O0
need to include some typical headers to get it to issue a failure
diagnostic

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I37d6e0f342698507952a8006b88d56e55060270e
2024-04-19 10:40:11 +01:00
Pranam Lashkari
0cd7498e64 notebookbar: event prevent default for theme toggle button
problem:
if calc->view tab-> dark theme button is clicked,
if button is clicked from icon it works fine,
but if button is clicked on label event is triggered twice,
which means theme would be restored to first

reproducible only in firefox

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ie645df86651a7507582de44147885a2b62384ddb
2024-04-19 11:17:42 +02:00
Miklos Vajna
1dc4bae0c9 cool#8648 clipboard: fix mobile/impress/insertion_wizard_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I640d913d7ed5069c002b0a9376b6208ac42908a2
2024-04-19 09:42:39 +01:00
Miklos Vajna
ad737657c6 cool#8648 clipboard: fix mobile/impress/impress_focus_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I62b809a1326c0516120076acd2dbaca8469a11bc
2024-04-19 09:42:39 +01:00
Miklos Vajna
027a87157b cool#8648 clipboard: fix mobile/impress/delete_objects_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I8ba49faa7eb5926993111d03a961f750174d3bea
2024-04-19 09:42:39 +01:00
Miklos Vajna
283b5a1637 cool#8648 clipboard: fix mobile/calc/spellchecking_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I8cc3d77a42d66c80882e44f5cd09ac88f53dfa9c
2024-04-19 09:42:39 +01:00
Miklos Vajna
9ea5add217 cool#8648 clipboard: fix mobile/calc/searchbar_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I74f253bb7df509c731a6b3bb22a077e1142e4580
2024-04-19 09:42:39 +01:00
Pranam Lashkari
35aa8572c1 annotation: enable comment insertion from context menu
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: If5b949c36851664d5720042d3ff5c8394b2d3961
2024-04-18 22:03:11 +01:00
Pranam Lashkari
17a1db2005 annotation: fixed comments not inserted in calc
problem:
could not insert more than one comment in calc

regression from fcb6367

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I30b52569a48d5f1d0bb2a3fe9f6f6e7c6bd43c80
2024-04-18 22:03:11 +01:00
Caolán McNamara
94fed86c35 default to using available compiler hardening flags
can be disabled with --disable-hardening-flags, defaults on except
for wasm and sanitizer cases

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id3ccb7492b73dfa6c7bbd5dd0419927032fc9bdf
2024-04-18 21:21:04 +01:00
Caolán McNamara
aba11a6d73 fix test failure with hardening flags enabled
constexpr std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = char; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I182678a1b4fcdf9e9481779f4cd1cf0ec55b2cb1
2024-04-18 21:21:04 +01:00
Michael Meeks
7f7d901726 bgsave: default to background save off on upgrade for now.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I7cfceb1288dc2e05438653f3cedc9b7d32bc5fb8
2024-04-18 20:18:07 +01:00
Michael Meeks
5f1387b6db bgsave: various documentation cleanups & a missing const.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I55636718815adc1b294219304e7fd060f88f9c15
2024-04-18 19:48:35 +01:00
Michael Meeks
33037c3a65 bgsave: don't try to save twice in the same background process.
Get the polarity of the check on whether we succeeded to spawn a
background save process right, so we don't spawn two saves
concurrently, and block input processing in the wrong place.

Also a few obvious sillies fixed, and some more assertions for
good measure; was not good:

[ kitbgsv_001_001 ] TRC  ToMaster-002: Finished synchronous background saving ...| kit/ChildSession.cpp:882
[ kitbgsv_001_001 ] TRC  ToMaster-002: saveDocumentBackground returns succesful start.| kit/ChildSession.cpp:887
[ kitbgsv_001_001 ] TRC  Document - input processing now: disabled was enabled| kit/Kit.cpp:2095
[ kitbgsv_001_001 ] TRC  ToMaster-002: uno command .uno:Save {... notify: true| kit/ChildSession.cpp:1944

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ie06a74a538bdd5038ca9c94b422f27cff9e4a82e
2024-04-18 19:48:35 +01:00
Michael Meeks
f845ac08af bgsave: have a single source for InputProcessing enable & disable.
Somehow this state can get confused in a bgsave process:

   Kit Document:
         ...
         inputProcessingEnabled: false
         ...
   SocketPoll:
     Poll [kit] with 1 socket - wakeup rfd: 39 wfd: 45
             fd        events        rbuffered        wbuffered        rtotal        wtotal
             52        0x1        process             0             0         r:    825

'process' should read 'ignore' for disabled input.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I787eebe6fda3ae1b527d7605b8813fa764e81890
2024-04-18 17:19:19 +01:00
Pedro Pinto Silva
bd6d48b022 Add missing icons for accept and reject change and go to the next
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic64c6e640209c150891c7f677d05af2151a6ba06
2024-04-18 17:13:40 +01:00
Darshan-upadhyay1110
4690d8ec28 Hide outline format button for mobile
- Hide `Set outline format` uno button
- we will add this option again after fixing the dialog issue on mobile view for Outline option in `Bullets and numbering`
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I270b78b7b9f00fd7b0f12c348794e3d3da3e653e
2024-04-18 16:35:47 +01:00
Caolán McNamara
b95395434e if a sheet is removed or moved, re-request comment positions
a problem since:

commit 72b2ce4bb6
Author: Caolán McNamara <caolan.mcnamara@collabora.com>
Date:   Wed Oct 25 19:19:08 2023 +0100
    we don't need to round-trip through core to reposition notes

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: If00ae17a8e80ca3f8d2a530efa6cdba90207be56
2024-04-18 17:08:28 +02:00
Caolán McNamara
06a6059235 move these common calc annotation test blocks to calcHelper
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ia67e29e447b333f4dfdfe25ec717cbdfc6dce043
2024-04-18 17:08:28 +02:00
Ashod Nakashian
1e206ac001 wsd: allow for recovering from unloading document
When the last connection is closed, we flag the
document for unloading, until we save and
unload and have nothing further to do. However,
if during that time a new client joins the
document, we reset the unloading state and
recover.

A previously failing and disabled test is now
re-enabled and passes.

Change-Id: I425a9286ec5df56064132e5e4227227761c65830
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-18 10:05:06 -04:00
Gökay Şatır
9eeed4d950 Add splitCoordinate to global variables.
Fix getViewRectangles function - it's used now.
Remove "_cellCursor" usage from CalcTileLayer.
Modify tests for the new changes.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ia5ec5a6e89d7d64df2041112936a16ec06c4da93
2024-04-18 16:30:27 +03:00
Gökay Şatır
ce36339b35 Turn _cellcursorTwips into a local variable.
Remove an unused function.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ic60d088cceb67c836ead24b84d94064272516d37
2024-04-18 16:30:27 +03:00
Gökay Şatır
05e231b93c Improve geometry classes.
Add CellCursorSection - not used yet.
Start using app.canvasSize variable.
Use simpleRectangle more.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I2cd4e23897c918679a0a385e1ca2d04117fd71c6
2024-04-18 16:30:27 +03:00
Neil Guertin
908e766282 Fix failing test desktop/calc/top_toolbar_spec.js
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I02944fb4c72bfd19fdeedb944e235633c33021b8
2024-04-18 08:51:42 -04:00
Michael Meeks
d1fe734ed2 bgsave: Don't busy-spin when input processing is blocked.
It seems we've had input processing turned off more than expected
recently, if we have an event or callback in the queue, it seems
we set our timeout to zero.

Since we would not be processing input this would never change,
and we would just busy spin indefinitely; just lots of:

[ kitbgsv_001_001 ] TRC  ppoll start, timeoutMicroS: 0 size 1| net/Socket.cpp:404

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ib374c6ce12d467eba602c7eaee99cc3940ffe681
2024-04-18 13:49:27 +01:00
Michael Meeks
8b0b0239ae bgsave: improve input processing trace debugging.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I53ff0809248f010b5a569ef83d8d02f3287a77b5
2024-04-18 13:49:27 +01:00
Miklos Vajna
3a1dd02dd1 cool#8648 clipboard: fix mobile/calc/insertion_wizard_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I6d8f5429fafa77cc4e3019878c0791555225abd0
2024-04-18 10:14:36 +01:00
Miklos Vajna
a12bcd3fb0 cool#8648 clipboard: fix mobile/calc/delete_objects_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Id6e1e2099273d22f9ae9718e18c70afbc27e64e7
2024-04-18 10:14:36 +01:00
Miklos Vajna
2b37f2113f cool#8648 clipboard: fix mobile/calc/cell_appearance_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I72fca080c13b4d0954ba3fff67faaa6a4927ba3e
2024-04-18 10:14:36 +01:00
Miklos Vajna
a5d05f2364 cool#8648 clipboard: fix mobile/calc/bottom_toolbar_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ie60c7a27d88a47f00c9b793a48d4c8e533ac32d2
2024-04-18 10:14:36 +01:00
Miklos Vajna
0c21b6e833 cool#8648 clipboard: fix mobile/calc/autofilter_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: If5ecd80c5b16f8f5f3f1154de6d42ca0cd803773
2024-04-18 10:14:36 +01:00
Pranam Lashkari
50963aadf2 uno: .uno:SetDocumentProperties: add file path parameter
problem:
in LOK/online to support async save, files in jails may have
different extensions (ie: .upload, .uploading)
this caused problem to detect files as original file name may not exist.
As result property like file size were always set to 0

chronology of events:
1. File is saved normally with existing name
2. After saved we make it ready for upload and add extension .upload in "renameForUpload"(kit/ChildSession.cpp)
3  We change to .uploading extension when we are uploading (DocumentBroker::handleSaveResponse, DocumentBroker::uploadAfterLoadingTemplate)

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ibda40b0c134ef6baef9edb0427b3c56340924858
2024-04-18 10:07:13 +01:00
Aron Budea
a4671ba059 browser: Convert MobileTopBar.js to TypeScript
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: Ibced15ed3ebec2c7a7b07539f25270b19d615a1f
2024-04-18 08:35:25 +00:00
Bayram Çiçek
99cb267661 Calc: fix drop zone indicator regression
with cbf452b03d drop
indicator was not shown if the cursor is over the <div> elements
that inside the tabs

- fix by using e.currentTarget instead of e.target
and do some checks while on _handleDragLeave

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: Iec8e246f18e553487b0eb0d9264cff8bb37b6305
2024-04-18 09:25:39 +01:00
Szymon Kłos
b878363899 statusbar: use ui-badge for items
Statusbar items which are not active previously were grey.
Recover that styling and do cleanup to not specify CSS in the
JS code.

We use that only for items which are active/inactive - not
for just labels

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic5beb7b2fa398d594cfa035d4cbcfe6f40cae787
2024-04-18 08:00:15 +01:00
Szymon Kłos
c7dd10a877 statusbar: better strings formatting
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7c5d5cbd2e36e6391610f8d4b18a87bf32c9dde2
2024-04-18 08:00:15 +01:00
Pranam Lashkari
81b00e7376 annotation: scroll to comment after resize comment list section
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Icbabf5dcdb6f1e01ca0271b2898df28f11810f35
2024-04-18 07:57:22 +01:00
Pranam Lashkari
bac4161583 annotation: resize comment list section on view size change
problem:
in writer when comment is added at the end of document,
it may go out of view and covered by the status bar and can't scroll any further

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ia40ea128cd36a904ee5030bb7399da183e21f44d
2024-04-18 07:57:22 +01:00
Caolán McNamara
ec9c6babcb on joining an existing session calc/writer can use new users spell preferences
but impress/draw should continue to use the existing document
preference. Writer and Calc have spell as a pre-view feature, while
impress/draw still has it per document.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ieb8c307b13f2ee010e09058a1ba63c7808637487
2024-04-18 08:46:46 +02:00
Skyler Grey
d5f902de9f comments: fix avatar when author is not in document
In e855aa6114bda90fdd64fbcbb32a77adcf7938f4 a regression was introduced
where a comment avatar was set to your avatar if the user was not in the
document

This commit returns it to the previous behavior, which had a "default"
avatar instead. It might instead be nice to embed avatars in the
document to avoid the avatars being missing, however the previous
behavior is far less confusing than the regressed behavior and is far
easier to get to than embedding avatars in the document

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I82834089062b1e7c2570d9fd78c7e1a3077f4c96
2024-04-17 15:02:38 +00:00
Rashesh Padia
9202365fc6 fix: duplicate You on reconnect
- it might happen viewinfo message arrives before status message,
viewinfo message update view list with old _viewId because new _viewId
after reconnection is not avaialable yet
- this patch fixes this by reseting the _viewId on socket close and call
updateviewlist event after client gets new _viewId from status message

Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: I88a6ade574faa1368b1635db891fe87f89fa080e
2024-04-17 11:09:43 +01:00
Rashesh Padia
1aead601b3 fix: bogus cellviewcursor on reconnect
- also might fix the duplicate user on reconnect

Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: Id302d79dd664d2e4efd6b4ba49972b3634b19569
2024-04-17 11:09:43 +01:00
Neil Guertin
422df9d8ef Remove extra timeout for closing document
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I4c92893fb55c8884d0b0f417806686c0a6b9bbae
2024-04-17 11:08:56 +02:00
Neil Guertin
cb5528c01c Remove noise from logs in closeDocument
Query included the header of the table, which was then
printed in the logs including lots of whitespace noise

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I361f60c9b42972f580ccb10986dd4b3b9400ca0c
2024-04-17 11:08:56 +02:00
Neil Guertin
4e9bb9eba4 Remove wait and skip of close document for failed tests
The bug referenced has been fixed for a long time
so the workaround is no longer necessary

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ifac6555c711a0f142dd5d00ba4f4133dd4aece9f
2024-04-17 11:08:56 +02:00
Gökay Şatır
a25a8e0ee0 Rename forgotten variable.
In PR https://github.com/CollaboraOnline/online/pull/8700

We renamed some variables and removed usages of cellCursorXY.
One was forgotten and causing null ptr reference.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I840cc711076e4473dee8b6a1b823a362e0eecd84
2024-04-17 11:26:36 +03:00
Ashod Nakashian
e690a739da wsd: support synchronous CheckFileInfo
In certain scenarios, such as with Proxy.php,
we don't have CheckFileInfo in advance and
need to request it before proceeding further.

This adds a wrapper to wait for the
CheckFileInfo request to complete.

Change-Id: I8afa955f841899eb667c02168a29a68c1dffb21b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-17 10:18:33 +02:00
Miklos Vajna
4c5adb70e6 cool#8648 clipboard: fix mobile/calc/apply_font_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created. This was the first mobile suite that needed fixing.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Iad772d878d20d76bcf3770b7acc6abafa74859b2
2024-04-17 09:43:04 +02:00
Miklos Vajna
fdb1f8c7fc cool#8648 clipboard: fix desktop/calc/cell_appearance_spec.js
To work even if we don't automatically fetch HTML when a text selection
is created. This was the last desktop suite that needed fixing.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I428153c89c9ff46dc41541713c13fe19455e0c14
2024-04-17 09:43:04 +02:00