Commit graph

23715 commits

Author SHA1 Message Date
Michael Meeks
1b6af5e28d killpoco: remove lots of redundant JSON includes.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I976c5b8d6763cbbf0ee5cadfa2f7335ec719fe85
2024-04-25 09:06:13 +02:00
Neil Guertin
4f01c7e4de Cypress: Remove beforeAll and rewrite document loading helpers
New helpers setupDocument, loadDocument, reloadDocument
Clean up beforeEach functions
Replace most calls to beforeAll with setupAndLoadDocument
Replace calls to reload with reloadDocument

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I12307f93c8a418e6f55bb36b8afe340d7841b726
2024-04-25 07:37:56 +02:00
Neil Guertin
dfa13bfe62 Replace beforeAll with setupAndLoadDocument
Replace beforeAll in most tests with new helper function
Tests that need to close or reopen test files cannot use
the new function and will be updated later

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I372280e55993123fc26f83cb2e6e6e78665a6846
2024-04-25 07:37:56 +02:00
Neil Guertin
7cc0c1996e Cypress: Remove afterEach/afterAll
Cypress recommends NOT cleaning up after tests
  https://docs.cypress.io/guides/references/best-practices#Using-after-Or-afterEach-Hooks
Open documents should not affect other tests
Files will be closed automatically by the server anyways
Tests with more strict requirements can explicitly close
  documents before, during, or after those tests
This is necessary to support beforeAll cleanup
Half of tests were verifying the wrong filename was closed anyways

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Iab458963a3fbfe87f732dc97140704c2d0ef53d4
2024-04-25 07:37:56 +02:00
Skyler
8510db5560 iOS: stop keyboard pushing content offscreen
Previously using the onscreen keyboard would shrink the visual viewport
while leaving the elements at the same size, meaning some of the content
had to be offscreen. As we scrolled the page to have the cursor in view,
this would move the notebook bar offscreen.

To avoid the possibility of the cursor leaving the screen or the bottom
toolbar being offscren, we can use the VisualViewport API to force the
logical viewport to have the same size as the visual one

This won't have an effect in iframes as the logical and visual viewport
in iframes are always the same, and we already scale to 100% height by
default anyway

Signed-off-by: Skyler <skyler.grey@collabora.com>
Change-Id: I07726bee8b61334f6a32e873ab2d5428fa60dca3
2024-04-24 21:53:19 +02:00
Attila Szűcs
4566ee65d1 writer: fix annotation size regression
Hidden contentNodes (in annotation) may become visible during resize.
Looks like setting style.max-height also change style.display.

Now i set it only if style.display is not none.

Signed-off-by: Attila Szűcs <attila.szucs@collabora.com>
Change-Id: I30f2eb75cb3ccb5b43044cef856314b0e35b9300
2024-04-24 19:59:26 +01:00
Attila Szűcs
e02ae8be7a writer: resize comments based on space
Make comments window bigger, if needed, and possible.
Selected commits grow up to MAX size, even if there is no space for it.

There is 2 constant limitation:
MAX - --annotation-max-size this is the maximum size commentText window
can grow. If the comment have more text, than it will have scrollbar.

MIN - --annotation-min-size if there is not enought space, but comment
have more text, this is the minimum size of commentText window.

note: commentText window can be smaller then MIN, if it has less text.

During doLayout:
first, in resetCommentsSize comments size resets to default.
(max-height = MIN size.)

after comments positioned with loopUp / loopDown,
resizeComments check all comments (maybe it could be optimized)

If a comment have more text as its actual size, then
it check the space between this, and next comment..
and resize this comment.

If there is not enought space after the comment, then
it check for more space between this, and previous comment, and
resize + move up the comment as much as needed.

Signed-off-by: Attila Szűcs <attila.szucs@collabora.com>
Change-Id: Ie7b0971febd8c965b01ebe23125eac4eded1a742
Signed-off-by: Attila Szűcs <attila.szucs@collabora.com>
2024-04-24 19:59:26 +01:00
Henry Castro
97f82d0a72 browser: preview: change place hoder to svg
spinner pre-loading previews

Change-Id: Ib6316d58da60fb537e238f93981f0cc8294f6885
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-04-24 12:05:29 -04:00
Henry Castro
780b5a8e67 browser: preview: simplify "layoutPreview"
Change-Id: Ia7b478cd14901e877dece81b57f418e8bdf1668b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-04-24 12:05:29 -04:00
Henry Castro
7d96728081 browser: preview: remove more unused code
Change-Id: I6431ee0093c006d142c2c0d3561a36ec31ba94f0
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-04-24 12:05:29 -04:00
Gülşah Köse
1d84071fc5 Prevent opening multiple tooltip on drawing area widgets
We see multiple tooltip problem on drawing area widgets.
Example case:
    Add basic shape into a writer document
    Right click on shape and open Position and Size dialog
    Select the Rotation tab
    Hold the rotation angle widget and drag around itself
When you inspect the "Rotation Angle" tooltip, count may be 600
We expect only 1.

So we prevent to show another tooltip if we have already one.

Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: I2f548f8c7afce8095e83a6faa3722e164f990210
2024-04-24 17:07:03 +02:00
Gökay Şatır
dc7b6d93a3 Add HTMLObjectSection for using for icons.
Replace dropdownmarker with an instance of HTMLObjectSection, which doesn't use lat/lng.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I152ed3ea4120c0682d057b2beedd4e5d8910da17
2024-04-24 16:44:43 +03:00
Michael Meeks
2d1865a8f6 logging: remove now unused StreamLogger.
Change-Id: Ic8a28dcc97aa0b17d2cb8efa99c42f7791486a15
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-04-24 10:59:51 +01:00
Michael Meeks
884a841cde Logging: wrap poco and simplify logging.
Centralize more logging functionality in Log.cpp, simplify and
wrap underlying logging APIs better.

Code is much more generic, and hides implementation details
much more thoroughly, while keeping the same API / wrappers.

To do this we have to sub-class Poco::Logger to get access to
its generic 'log' method instead of a mess of in-line wrappers,
this lets us avoid lots of code.

Change-Id: I541d3aef49f99ce582655c5102a0041bf84cd56a
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-04-24 10:59:51 +01:00
Henry Castro
722a2e57d2 wsd: simplify LOG_MESSAGE to the logging framework
Change-Id: I997855e586783451a556cefe2860f9384585045a
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-04-24 10:59:51 +01:00
Henry Castro
1271ee3e7f wsd: remove "PRIO" parameter to the logging framework
remove POCO dependency enumerator value.

Change-Id: I2abccd591374db96be81932d25b59fb0b10bac69
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-04-24 10:59:51 +01:00
Henry Castro
335e29abf7 wsd: add 'name' parameter to the logging framework
Change-Id: Ic8cc82e06200d2c2c8f47e27fd5e3225ca7f6202
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-04-24 10:59:51 +01:00
Szymon Kłos
1bc804deda remove-w2ui: remove css
it is not used anymore: see commits with remove-w2ui prefix

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ifc0034dcb28455204e490d0d21e97af22d3c8ae8
2024-04-24 10:57:31 +01:00
Szymon Kłos
f00176aabe remove-w2ui: replace w2ui-scroll-wrapper
And add self made ui-scroll-reight/left items with
primary color tiangle. We should replace it at some
point with something more pretty.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I67530c6352b8356214399f324b55bbf9bc24f876
2024-04-24 10:57:31 +01:00
Michael Meeks
1516ca22cb bgsave: set state to unmodified on successful background save.
There is a race here, clearly if you type while a background
save is ongoing - but this is far better than leaving the
document apparently unmodified.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ie5e3e692294e48ad887481af2e0906092830f265
2024-04-24 09:24:34 +01:00
Michael Meeks
cd37cd8765 bgsave: improve auto-save tests.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ie08a68f79734e84218c9553ad3738f7b658cdc08
2024-04-24 09:24:34 +01:00
Michael Meeks
9085ff7580 Improve DocumentBroker state dumping.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I091c67d8b72bcaa3d82cd4de7be9d5ceb8d9720d
2024-04-24 09:24:34 +01:00
Miklos Vajna
28e51d58f4 cool#8648 clipboard: stop fetching the clipboard on text selection create in tests
This was just a workaround to keep tests working till they are fixed to
not assume we do an implicit 'copy' as soon as we have a text selection.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I37d16ee2841c41593a5af2fb6ceba025fe1c79e0
2024-04-23 14:17:10 +01:00
Caolán McNamara
843b286d8c cid#360695 Dereference after null check
<< precedence is higher than ?

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ie7a77ba949195b91df3b87059c0c458c57b2be94
2024-04-23 14:30:42 +02:00
Caolán McNamara
e6de6b9f93 cid#318937 Array compared against 0
this returns the same type as its 3rd arg, so using "false" returns
a const char* and not a bool

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ibd46ecea82ef4587e1a2083430981976457ab874
2024-04-23 14:30:42 +02:00
Szymon Kłos
01a30b03f1 Allow to embed the presentation in window
Similar like in:
commit d9d13d7092
wasm: support serving wasm files

add headers required when we use WASM so we are able to
embed presentation in window.

Without that we get:
not-set Cross-Origin-Embedder-Policy

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I03ca3717488a92fe405693764f3f18a964b23bf7
2024-04-23 11:52:48 +02:00
Aron Budea
1ff9451754 Browser: Duplicate Repair option in Impress tabbed bar
...and remove duplicate code.

Regression from c9ef8c3015

Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: Ib992d2c169d3e40f9cab670935696ab2899c639c
2024-04-23 10:40:19 +02:00
Andras Timar
d6244a5e66 docker: CODE 24.04
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I7f1d5bec60a342d1b3d0dee1534506a13f12a67b
2024-04-23 09:45:58 +02:00
Skyler Grey
f21031c998 mobile: Use SavedUIState=true
SavedUIState is a ui_defaults option to ignore any user preferences for
state when loading, it was added in
https://github.com/CollaboraOnline/online/pull/7575

We need to set SavedUIState explicitly on mobile, which the following
pulls do for iOS and Android respectively:
- https://github.com/CollaboraOnline/online/pull/7908
- https://github.com/CollaboraOnline/online/pull/7912

Unfortunately, setting it to false can cause some nasty bugs, such as
inability to change theme to light. It also intentionally ignores user
preferences when you reopen a document, but this isn't particularly
desirable on mobile.

I believe it to be an oversight that the option was set to `false`
rather than `true`, as `true` was the behavior before the ui_default
option was added and neither change gives a reason for it to be false
rather than true.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I30ce445db1b7e69a3b44eec3fb4689c463233b1f
2024-04-23 08:20:35 +01:00
Caolán McNamara
94341f0390 cid#360697 Ignoring number of bytes read
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I24c1bf9f103f3bf1325246a0223919ff1dbf62b4
2024-04-23 08:53:55 +02:00
Caolán McNamara
0db12d85bf includes should be in AC_LANG_PROGRAM preamble
no the body

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I9377142c676efc3f0d658efa01e06a91f3f0924d
2024-04-23 08:51:52 +02:00
Darshan-upadhyay1110
258c5c0ce6 Remove extra grid cell space from header in autofilter child popup
- we need to also consider `th` tag to make it display none
- it's a empty text span so do not that extra space.
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ib83d42f64a0115fdc4d17a8f7e952419a84cc9d5
2024-04-23 08:45:00 +02:00
Miklos Vajna
9b95bf829f cool#8648 clipboard: fix mobile/writer/table_properties_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: I359fa602523052940879ce749624ee63086554c1
2024-04-23 08:06:01 +02:00
Miklos Vajna
82dc3e1a46 cool#8648 clipboard: fix mobile/writer/track_changes_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: If9371a3d235a0ee6c006be72dabe40242fa46b2b
2024-04-23 08:06:01 +02:00
Parth Raiyani
0f749d45a8 Removed NBSP while coping info to clipboard
Signed-off-by: Parth Raiyani <pmr642001@gmail.com>
Change-Id: I2566a4902ed36e53ad2acfbe1c32efccb04bddda
2024-04-22 17:02:55 +02:00
Pranam Lashkari
5525ffab36 annotation: refectored reply node count code
now reply count node  multipurpose, it also indicates
if a comment which was being edited is collapsed

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I18a676885deea0afa30eb20505a76239e11c5493
2024-04-22 14:43:08 +01:00
Pranam Lashkari
9981260b68 cypress: added test for collapsed autosaved comment indication
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I4e6929a074e750041a1814629317baf0433eaab0
2024-04-22 14:43:08 +01:00
Pranam Lashkari
d663e4a6b3 annotation: indicate if comments are in edited state while collapsed
problem:
when in small window, comment was autosaved,
it wasn't collapsed but would hang on the edge of the screen half visible.
We can't collapse the comment directly as user will not be able to find again
which comment was being edited.

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I9393e7f2b53d8ea37273cc2290cc74636c514cb5
2024-04-22 14:43:08 +01:00
Gökay Şatır
f64a5c3310 Remove unused functions and notes, improve a comment.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ic62f276983614bfbc56b50e3b0f37b1ea82c4d1a
2024-04-22 16:38:32 +03:00
Gökay Şatır
cfeba70dab Lat / Lng Removal
Remove _cellCursor and use app.calc.cellCursorRectangle -> SimpleRectangle.
Turn _prevCellCursor,_cellCursorOnPgUp, _cellCursorOnPgDn into SimpleRectangle.
Remove horizontalDirection and verticalDirection calculations. They are not used. Also remove them from _onUpdateCellCursor function.
Use app.calc.cellCursorVisible instead of empty rectangle checks.
Set variables to null to re-init them instead of assigning them empty rectangles.
Push lat/lng usage through markers (leaflet things).

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I4b258a72f1ac3c94ccf25a07d0e7dab232165b90
2024-04-22 16:38:32 +03:00
Darshan-upadhyay1110
89a7742206 Add color image preview in autofilter dialog for filter by color option
- it's not user friendly to just see color code with a radio button.
- this patch will show color image preview for filter by color options according to the color code
- it will applied only for dialogs with filter using color codes in `Autofilter`

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ifc67a2692df5c9b5c332c8a15d5ad92cde4f4bf8
2024-04-22 14:14:58 +02:00
Pedro Pinto Silva
ce0536eae5 Use the same tooltip style and framework for doc name & close button
Before this commit, in both cases we were not using tooltip
method (which is used everywhere) thus, resulting in inconsistent
tooltip styles, sizes and no animation (these ones were just native
browser tooltips)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: If7f6213f507f5c439ceaaeb1c713c7680cf563d5
2024-04-22 12:23:17 +01:00
Pedro Pinto Silva
41063ceafb Fix unobutton's lack of pointer cursor
Before this commit buttons such as bold (in the notebookbar) or
sidebar button (in the top toolbar) would not change the cursor on hover

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ief075b4f4d187f6a5d87458d02077c0deaf69fe6
2024-04-22 12:23:17 +01:00
Henry Castro
f17bdc679f browser: preview: remove unused code
The code is old and it is not used anymore by
new changes did it.

..

Change-Id: Id163cba7f586e3a083bff4cbb169a5d16e4b0cce
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-04-22 11:10:47 +01:00
Michael Meeks
3c6d158615 A more plausible default for _isWriteable.
In all WOPI cases this is overridden by CheckFileInfo etc. but for
legacy direct file:/// usage this state can still be seen from
unit tests it seems.

cf. commit 115b9cf2ab

dump_state() output:

 Document broker sessions [1]
		id: 001
		name: ToClient-001
...
		isWritable: false
		isReadOnly: false

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I19792b1dfdb6f5126a4d119a4d001a06bc507fb7
2024-04-22 08:50:38 +01:00
Michael Meeks
a355e9b4ee remove random static mutex guard.
Presumably originally introduced to protect the static FileDeleter,
which has internal protection of its own now; cf. commit

1ae9ce8ad2

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Id3266d7f08a9f7bd620df49850242a250fc73903
2024-04-22 08:50:38 +01:00
Miklos Vajna
a91036247b 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: I01a3ac4e843c69f6e91f650f33b8066161e73e68
2024-04-22 08:43:40 +01:00
Miklos Vajna
ad22a9f017 cool#8648 clipboard: fix mobile/writer/insert_formatting_mark_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: I302edb920801895f1a728313b5e9a9405ec7d396
2024-04-22 08:43:40 +01:00
Miklos Vajna
9cca40deda cool#8648 clipboard: fix mobile/writer/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: Ic4a57aede4f0bca397868a80303df8d124e31ba4
2024-04-22 08:43:40 +01:00
Miklos Vajna
a2db31f437 cool#8648 clipboard: fix mobile/writer/apply_font_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: I7cfe6a9245f0397a580cd4375836ff042a5751db
2024-04-22 08:43:40 +01:00