Commit graph

22881 commits

Author SHA1 Message Date
Andras Timar
15f49bbb7e Bump version to 23.05.7.5
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I7f842b8fa30191424e0b1cce6a14c4056518a54f
2024-01-19 17:45:30 +01:00
Andras Timar
b35aca88c0 Translated using Weblate (German)
Currently translated at 100.0% (573 of 573 strings)

Co-authored-by: Andras Timar <andras.timar@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/de/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I971289ee755819fb0445dfc64c315df5a7c9c681
2024-01-19 17:43:49 +01:00
Lily Logua
e684f1a291 Translated using Weblate (German)
Currently translated at 99.8% (572 of 573 strings)

Co-authored-by: Lily Logua <lily.logua@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/de/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibdb739b9aa086cc9e9816c63d2e5d8845fd334cd
2024-01-19 17:43:49 +01:00
Szymon Kłos
6546ab4501 Use once to call event handler just one time
Use dedicated option, don't do it manually.

https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#once

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I2bce09c496ca7dd3267514bbb30308b7f7afe4f9
2024-01-19 14:40:01 +01:00
Szymon Kłos
d331120059 Move document tooltip helper to UIManager
so it is with all other showXXXX helpers

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0f009a1e380c0c5fd4ac8b43d19af74c25e58b40
2024-01-19 14:40:01 +01:00
Henry Castro
1a31a7baa0 browser: add logging token to send to server side
Change-Id: I252665637a3c5079e0c433f0b1a6c8197105e45f
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
9344c8000b wsd: add logging token javascript errors
The "logging.html" end point was intended to capture
unhandled javascript exceptions from client side,
only corner cases, when websocket is disconnected or
very early errors before websocket is created.
So add a token to restrict access.

Change-Id: I64b7d7f3b3ddd83f044fea21dc07285b4465b3be
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
fc4a8efefe browser: move function "isLocalStorageAllowed"
The variable initialization does not depend on
the conditional M4 macro expansion.

Change-Id: I39f0079ea668768724e0ca3175070e66dc858b0b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
28236b2405 browser: move iOS app init event listeners
The iOS app add event listeners is not a
conditional M4 macro expansion, so
move into the global.js file.

Change-Id: I3adb767cc191a73f0d9197af692e22dd72c6ab46
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
26dd660681 browser: remove unused function "Base64ToArrayBuffer"
Change-Id: Ibcdaf6a9e06b7cb169a1e59e8efc952a1291a6e5
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
1d08877b01 browser: remove unused function "onSlideClick"
Change-Id: I90ef1fda39c52ac231d6407fb14d1bacde9d3a7e
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
1ca7a26b9b browser: simplify no implicit access to L object
Change-Id: I59668b527af914a339bb9799f25edfad5584ea31
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
e2beaab73a browser: simplifiy global === window
Change-Id: I90b6d1b9c36329736e4bdcb1c13180a2a76fab2d
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
8631d573e2 browser: catch exceptions should include the stack trace
Change-Id: Ie7229612b0b08927704155b269d4d2ae77040cad
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
ad0f65be4d browser: if 'console.error' is invoked also invoke ...
'logServer' to save logging data to server side.

Change-Id: I7e5fd0d0f3aefaade1f34b98f9004af2579ba2bd
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
a722687c11 browser: simplify getParameterByName
Use built-in URLSearchParams object

Change-Id: I99effedabf39902ccabfa34285d62fc5df2d2e01
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Henry Castro
91a5831636 browser: simplify logServer
Use "fetch()" function to save logging client data
to server side.

Change-Id: I8b6a94b7ad7ae02ca00666759e3695867df4d372
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-19 10:54:42 +00:00
Marco Cecchetti
9f6824a620 fix linking error for clang 17
CXXLD    unittest
/usr/bin/ld: ../kit/unittest-Kit.o: in function
`Document::updateEditorSpeeds(int, int)':
/opt/shared/work/libreoffice/repo-online/online-cl/test/../kit/Kit.cpp:1488:(.text._ZN8Document18updateEditorSpeedsEii[_ZN8Document18updateEditorSpeedsEii]+0x2d9):
undefined reference to `ChildSession::getSpeed()'

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: If95662647d33f80dd98013b6bc81be897dd6ffc5
2024-01-19 08:56:13 +01:00
Miklos Vajna
b5d81234e5 cool#8023 browser: make sure 'style' content doesn't affect plain text selection
cypress_test/integration_tests/desktop/writer/top_toolbar_spec.js's
'Insert hyperlink.' testcase failed with:

	assert	expected **<p>** to have text **text text1link**, but the text was **@page { size: 8.5in 11in; margin: 0.79in }\t\tp { line-height: 115%; margin-bottom: 0.1in; background: transparent }\ttext text1link**

We typically ignore styles on import (and keep the ones in the document
already), so fix the problem by extracting part of stripHTML() into a
new stripStyle() and use that in setTextSelectionHTML(), which restores
the old behavior when it comes to the plain text version of our current
selection.

The old clipboard marker didn't have this problem, but that got removed
entirely with the new clipboard read HTML sanitize, which is even worse.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Id07bf8bc7b1701e53415bde3cf8773411d830e9c
2024-01-19 08:24:57 +01:00
Miklos Vajna
5dd39010f8 cool#8023 browser: generate and interpret new-style clipboard marker
Seeing:

	short-circuit, internal paste, new style? true

on the console with this, which will work even after our HTML gets
stripped with the new-style clipboard API.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I74b14a4415fa026cf24909323d23f760997bd392
2024-01-19 08:24:57 +01:00
Miklos Vajna
141e1ce7d0 cool#8023 Remove HTML marker in unit-copy-paste
This really just passed by accident in the past:

	Clipboard with 19 entries:
		[0] - size 5689 type: 'application/x-openoffice-embed-source-xml;windows_formatname="Star Embed Source (XML)"'
		[1] - size 159 type: 'application/x-openoffice-objectdescriptor-xml;windows_formatname="Star Object Descriptor (XML)";classname="47BBB4CB-CE4C-4E80-a591-42d9ae74950f";typename="Collabora OfficeDev 23.05 Spreadsheet";displayname="file:///tmp/user/docs/jexG9292sB0PuaWL/UnitCopyPaste1d0fdba5_empty.ods";viewaspect="1";width="6783";height="2712";posx="0";posy="0"'
		[2] - size 388 type: 'application/x-openoffice-gdimetafile;windows_formatname="GDIMetaFile"'
		[3] - size 1812 type: 'application/x-openoffice-emf;windows_formatname="Image EMF"'
		[4] - size 2222 type: 'application/x-openoffice-wmf;windows_formatname="Image WMF"'
		[5] - size 1073 type: 'image/png'
		[6] - size 79158 type: 'application/x-openoffice-bitmap;windows_formatname="Bitmap"'
		[7] - size 79158 type: 'image/bmp'
		[8] - size 1493 type: 'text/html'
		[9] - size 0 type: '    </tr>'
		[10] - size 0 type: '           <td align="left"><br></td>'
		[11] - size 0 type: '</table>'
		[12] - size 49 type: 'application/x-openoffice-sylk;windows_formatname="Sylk"'
		[13] - size 98 type: 'application/x-openoffice-link;windows_formatname="Link"'
		[14] - size 246 type: 'application/x-openoffice-dif;windows_formatname="DIF"'
		[15] - size 6 type: 'text/plain;charset=utf-8'
		[16] - size 6 type: 'application/x-libreoffice-tsvc'
		[17] - size 977 type: 'text/rtf'
		[18] - size 977 type: 'text/richtext'

Remove the marker, then sizes will match again.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I1edea3d3a64b9a54cc1c0a0cea703ae66c2aba82
2024-01-19 08:24:57 +01:00
Miklos Vajna
da4a376d90 cool#8023 wsd, ClientSession: extend HTML clipboard marker removal
Tested with an extended version of unit-copy-paste, which will appear in
the next commit.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ib15b7918fe678c594e2c345cfca27ba2f1c8b516
2024-01-19 08:24:57 +01:00
Miklos Vajna
819dd9c682 cool#8023 wsd, ClientSession: add new style clipboard marker to our HTML output
The HTML we produce on copy has to go via a sanitize process on paste
once we start using the new clipboard API at
<https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/read>.

The trouble is that at least Chrome simply strips away all <meta> HTML
tags, we can no longer recognize our own HTML output, preventing us from
doing a better internal paste.

Fix this by switching to a markup with survives the cleanup: a <div>
around the <html>...</html> fragment.

This just introduces the new markup, doesn't replace the old markup yet.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I75b00d00064ce452a57185c62f4d99a6d052d867
2024-01-19 08:24:57 +01:00
Henry Castro
8a64290b3a browser: css: fix focus outline dialog container
Change-Id: Iae53fe60aadd17259cf2855c116b5ccbe036402b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-18 21:37:46 +01:00
Henry Castro
d24190e5b4 browser: simplifiy close feedback
Change-Id: I9230c8f673c636e79614c20f4feb4bb8d355e280
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-01-18 21:37:46 +01:00
Andras Timar
9863ea3a42 Bump version to 23.05.7.4
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Iacbdaa6db4ae40b0ae8abe30e4657848e2c4ff34
2024-01-18 21:33:36 +01:00
Matthaiks
e8aeb84d0f Translated using Weblate (Polish)
Currently translated at 100.0% (573 of 573 strings)

Co-authored-by: Matthaiks <kitynska@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/pl/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I8c0671f96d086fb642e69ae3cb9033a24cd74855
2024-01-18 21:26:42 +01:00
Andras Timar
c1d920c55a Translated using Weblate (Hungarian)
Currently translated at 100.0% (573 of 573 strings)

Co-authored-by: Andras Timar <andras.timar@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/hu/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I5ef51373b50ab9aad00ceec15ebe855fcbde2bea
2024-01-18 21:26:42 +01:00
gallegonovato
2610b3a34c Translated using Weblate (Spanish)
Currently translated at 100.0% (467 of 467 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (573 of 573 strings)

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/es/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/es/
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I243e150b28d073042b9292ecd835d6901b24b677
2024-01-18 21:26:42 +01:00
Lily Logua
dd697da7d1 Translated using Weblate (German)
Currently translated at 97.9% (561 of 573 strings)

Co-authored-by: Lily Logua <lily.logua@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/de/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibf984fe7847f061b6af8d04c50e6f8cc617c263a
2024-01-18 21:26:42 +01:00
Michael Meeks
f477e17d5e ChildSession - dump much more internal state.
Change-Id: I1441d88968040b6852bf6338e8a4dfcdf8e308f5
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-01-18 20:18:56 +00:00
Ashod Nakashian
765447caac wsd: buy url substitution
Change-Id: I38d2988680f5b383a2ada5515927631726ba5362
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
ca05b90d8f wsd: checkfileinfo_override substitution
Change-Id: I6339cb16917e73cfe45e59e42715e5cbc2ae8bb8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
77ecca5a54 wsd: branding theme substitution
Change-Id: I05679b894d784e28eebf35bcc0e34ef2fe15d3e5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
72ba5ce154 wsd: postmessage substitution
Change-Id: I3b40148f58bab1e39d95d9dc0ee415ebd2450e79
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
599d03390d wsd: css_variables substitution
Change-Id: I360b3c41fe453fec64ff0880f0e2aa8f627b136c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
3113970044 wsd: ui_defaults substitution
Change-Id: I6dc0e9ebf5a6f6dc49aced2671f5ee2453f94f16
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
0a924e1fe8 wsd: access_header substitution
Change-Id: Ib25228efc5fdf771be6c677604ed1131ca4bdfd1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
c62cb19dc9 wsd: access_token_ttl substitution
Change-Id: Ifcc2939124e061313cdb547985ec888aed9aa875
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
5e9fdc8ef8 wsd: access_token substitution
Change-Id: Id55dc5b074d80c3f10fe71e2e0abd90802fe10e9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
2bb765c48f wsd: new helper class UserRequestVars
Used to substitute user-request variables
in the files being served.

Change-Id: I7c0046328ec05f2feb7fcd9df9a21e415a1e2513
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
9555f3228b wsd: test: Sustitution of PreProcessedFile
Change-Id: I2d409f959d31f6a4037c925c9f1ef482d20a4406
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
f8944385fb wsd: new Substitute helper for PreProcessedFile
And enable the round-trip test.

Change-Id: If9a54959514a31f9459e8596b2a4e3847465f1b9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
d7cbe7488b wsd: improved PreProcessedFile with SegmentType
Change-Id: I34609ae855ebbef395d13c4f77885dd6012685f2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
74a8f61586 wsd: better PreProcessedFile and new disabled test
Change-Id: I30a7698c54913f8eeef9a1e02cabaebd907cb7e3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
78f5b70695 wsd: new PreProcessedFile class
This class will be responsible for faster
variable replacement to serve the templates.

Change-Id: Ic0d75b0a197c0db75c0988c3b6af400a5b1c35a2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 19:25:59 +00:00
Ashod Nakashian
84a0c1eec1 wsd: log cgroup memory and in GB
Change-Id: Ifda8891721228acf50e3348d43e902498e6d884d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00
Ashod Nakashian
3585e7ed83 wsd: rvs: copy the WS before passing it to docBroker
Change-Id: Ie1b995b551453e871da19b13888b1e80ff6643b0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00
Ashod Nakashian
8358fc2293 wsd: rvs: refactor send error and shutdown socket
Change-Id: I0a32dec86e3e9b9b5989da40a25af90ba9b82095
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00
Ashod Nakashian
37efb14d35 wsd: rvs: avoid exceptions when handled gracefully already
Throwing exceptions from an async processor does
nothing good. Instead, we handle the consequences of
the error in-place, instead of throwing.

Change-Id: I85c4cee7cc8231453498e4cb9cb07a07b2b417c9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00