Commit graph

22867 commits

Author SHA1 Message Date
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
Ashod Nakashian
a3dcf28bed wsd: rvs: better logging
Change-Id: I56df3835d74502590a5e0104c5dcbee6ad26d827
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00
Ashod Nakashian
6fe96901c9 wsd: rvs: support redirection of CheckFileInfo
CheckFileInfo requests can now redirect
to a new URL.

Change-Id: I7579ac37235b1a2ac1d7091366f0046cf889ce15
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00
Ashod Nakashian
1f3441cc42 wsd: rvs: refactor CheckFileInfo
This breaks the CheckFileInfo fetching
code in RVS into its own function to
allow for redirection.

Change-Id: I8bfa3a71705c77af8f6e75ed1af75e710767cf19
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00
Ashod Nakashian
1164cb90fa wsd: rvs: pass wopiFileInfo around
Change-Id: I52ef794d758a06d66cb91cc7bdb272bd2167b05c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00
Ashod Nakashian
2063b1ba50 wsd: rvs: handle StorageSpaceLowException
Change-Id: I036c577716cc0ba38c9585e6d1009c7ba82a87a3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00
Ashod Nakashian
91029b0efd wsd: rvs: refactor createDocBroker
Change-Id: Iaff50d505aa054a1f13c71a60a247feaede54172
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00
Ashod Nakashian
5c5c4559f9 wsd: rvs: add RequestVettingStation
RequestVettingStation is designed to
vet requests before allocating further
resources. Specifically, it is to be
used to verify whether the resource
requested exists and whether or not
the request is allowed and authenticated.

All of this is designed to be done
asynchronously, for performance reasons.

Change-Id: I399fa7bc91741ffee065a6d41acca0756eedc939
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00
Ashod Nakashian
d1ac610b50 wsd: new setupTransfer into DocBroker
Will be used for parallel loading, when we
transfer thread ownership to DocBroker.

Change-Id: I99dea58afc6c86d7937e32c8b3313676cc46d3b7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00
Ashod Nakashian
733883fb11 wsd: make findOrCreateDocBroker non-static
Needed to reference from ourside COOLWSD.

Change-Id: Ib8a160d912c6d3a2d972cc1fcf231e862f2fe24b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00
Ashod Nakashian
8afdc40aca wsd: pass WopiFileInfo optionally to addSession
This is to allow for having gotten the WopiFileInfo
before creating DocBroker at all.

Change-Id: I0f21442860e09385e504b9a98049af286cc5b404
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-18 18:59:18 +00:00
Darshan-upadhyay1110
fdf43d682a Modify freeze cloumns and row style for better user experience
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I40f716a5989ffb370eb87d34bd9ab0fee5df9dbb
2024-01-18 19:57:52 +01:00
Neil Guertin
ae918ea449 Enable Idle test
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I109e8c1b4e14be096741ceea5285456b77a38d04
2024-01-18 11:11:33 -05:00
Neil Guertin
b168aac5f3 Randomize user settings
Sets dark mode, zoom, spell check, sidebar, and moves around the sheet
in calc

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I56adcc425e3d7472f811f6e1e904186554dd432f
2024-01-18 15:45:18 +00:00
Andras Timar
1ac2492bcd Bump version to 23.05.7.3
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I21ff26ef0dfb4f782ccf517dc47239832bc2ef57
2024-01-18 13:08:35 +01:00