Commit graph

22310 commits

Author SHA1 Message Date
Hubert Figuière
abf7b2bd70 postmessage: Add a show/hide command
New postmessage `Show_Command` and `Hide_Command`.
Pass a command name (uno or otherwise) in `Values.id`.

Will hide the corresponding toolbar, menu and notebookbar items.

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Idaa86f7a936a282c636fa0532ab165c6977db873
2023-12-04 10:45:19 -05:00
Andras Timar
e29934b944 Bump version to 23.05.6.1
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: If3f6bd3a6b1418d0d1f96308a9356549922ba972
2023-12-04 16:39:02 +01:00
Sebastiaan Veld
4a8974d107 Translated using Weblate (Dutch)
Currently translated at 100.0% (539 of 539 strings)

Co-authored-by: Sebastiaan Veld <sebastiaan.veld@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/nl/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I1139d90d5a2a293631a14ba7fdf94997c4542c8e
2023-12-04 08:27:10 +01:00
bittin1ddc447d824349b2
ca8374c050 Translated using Weblate (Swedish)
Currently translated at 100.0% (539 of 539 strings)

Co-authored-by: bittin1ddc447d824349b2 <bittin@reimu.nl>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/sv/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ic90ceedfe9c21323adea5ef16f3cb22abc29a7cc
2023-12-04 08:27:10 +01:00
Sveinn í Felli
1ce9f18975 Translated using Weblate (Icelandic)
Currently translated at 99.6% (537 of 539 strings)

Translated using Weblate (Icelandic)

Currently translated at 71.0% (332 of 467 strings)

Translated using Weblate (Icelandic)

Currently translated at 99.2% (535 of 539 strings)

Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/is/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/is/
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib8efb2ada68af1b958b2b72f023dcc2ff5900bb1
2023-12-04 08:27:10 +01:00
Stanislav Horáček
82a6f0cc82 Translated using Weblate (Czech)
Currently translated at 100.0% (539 of 539 strings)

Co-authored-by: Stanislav Horáček <stanislav.horacek@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/cs/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: If0bfe9c40255da91d5a3836ed2f14de89ce07208
2023-12-04 08:27:10 +01:00
Martin Srebotnjak
8f14c0cde5 Translated using Weblate (Slovenian)
Currently translated at 100.0% (539 of 539 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/sl/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I5510fc92a6875782d125a42d4ae9785f5c9a1710
2023-12-04 08:27:10 +01:00
Matthaiks
abfd0238ab Translated using Weblate (Polish)
Currently translated at 100.0% (539 of 539 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: I4278cbbd92f2e3913e740de53eaf0d2bc0c6fa64
2023-12-04 08:27:10 +01:00
Andras Timar
5c5a96af82 Translated using Weblate (Hungarian)
Currently translated at 100.0% (539 of 539 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: I94026e1da64b38026e455e79b911575d965282f8
2023-12-04 08:27:10 +01:00
gallegonovato
0534e1ce3a Translated using Weblate (Spanish)
Currently translated at 100.0% (539 of 539 strings)

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/es/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I6ef9cddb30aab347175e0a4ae45a94ff57bef13c
2023-12-04 08:27:10 +01:00
Rash419
d118874bee wsd: fix: failed to load passwordprotected and csv files
- send blockingcommandstatus after document is loaded
- also fix odd nodocloaded dialog

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I8f0ae405ffa77b47e09c01caf51ddc4fd5e1d862
2023-12-04 11:23:32 +05:30
Michael Meeks
39f95d3a56 calc: split pane mis-rendering.
Invalidations were not cropped to the split pane, such that large
invalidations that crossed from the mane pane over another top/left
split pane, would cause partial re-render, flicker and other problems.

Regression from: 0453140f61

Potential fix is to have a complex multi-rectangle clip region, or
to only do this for simple cases, which are common: of invalidation
within a single split pane, doing a complete re-render elsewhere.

Change-Id: I255806286f6c80a233d4c6ade2bcb4e12f2bf753
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-12-02 11:14:15 +00:00
Caolán McNamara
c33a372876 wasm attempt to download file that doesn't exist with reverse proxy enabled
Handling request: /wasm/https:%252F%252Fwhatever%252Fnextcloud%252Findex.php%252Fapps%252Frichdocuments%252Fwopi%252Ffiles%252Fwhatever%3Faccess_token=ozxpkBByLTd9XnWaWHdrTVhMp3Exf1mt&access_token_ttl=0| wsd/COOLWSD.cpp:4093
[ websrv_poll ] INF  #22: Starting GET request handler for session [032] on url [https:%252F%252Fwhatever%252Fnextcloud%252Findex.php%252Fapps%252Frichdocuments%252Fwopi%252Ffiles%252Fwhatever%3Faccess_token=ozxpkBByLTd9XnWaWHdrTVhMp3Exf1mt&access_token_ttl=0].| wsd/WopiProxy.cpp:37
[ websrv_poll ] DBG  #22: Getting info for wopi uri [https://whatever/nextcloud/index.php/apps/richdocuments/wopi/files/212272_ocbizrjb36ht?access_token=whatever&access_token_ttl=0]| wsd/WopiProxy.cpp:120
[ websrv_poll ] ERR  Invalid URI [] to http::Session::create| net/HttpRequest.cpp:664

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I8471ee4247ecab62284e06330bd157aa126b9cd8
2023-12-01 21:02:35 +00:00
Miklos Vajna
89f080ba45 wsd: check for nullptr channel in AdminSocketHandler
This can happen like this:

    #8 0x7f14fdf4ec86 in std::terminate() (/usr/lib64/libstdc++.so.6+0xb7c86) (BuildId: c74eca671e2dd0f063706372d103f8acef88f1e3)
    #9 0x7f14fdf4eee7 in __cxa_throw (/usr/lib64/libstdc++.so.6+0xb7ee7) (BuildId: c74eca671e2dd0f063706372d103f8acef88f1e3)
    #10 0x55ddc5b906d2 in Poco::AutoPtr<Poco::Channel>::operator->() /usr/include/Poco/AutoPtr.h:232:4
    #11 0x55ddc5b7eb07 in AdminSocketHandler::handleMessage(std::vector<char, std::allocator<char>> const&) /home/vmiklos/git/collaboraonline/online-fuzz/wsd/Admin.cpp:236:13

Note how LOG_ANY() assumes that Log::logger().getChannel() is not
nullptr (so the caller has to check for it), while the more typical
variants with a log level like LOG_TRC() already do a similar check via
LOG_CONDITIONAL().

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I5e1379f33e6640fd07de673ef0d07b1d4d611c89
2023-12-01 15:35:39 +00:00
Szymon Kłos
a243bc9f49 Add list of allowed data sources
- uses new lok_allow setting to provide such list
- for backward compatibility uses also all post_allow and storage.wopi
  entries
- Used for example in: PostMessage Action_InsertGraphics,
  =WEBSERVICE() function, external reference in the cell

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib930e0119d4ea124b9cd565f6b3683310b1b3ced
2023-12-01 15:25:47 +00:00
Darshan-upadhyay1110
f798be095c modified the setImage method for icon
- now setImage method will handle the refresh of icons when theme change to Light/Dark
- added listner to setImage method
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I0529588487c2436d53585e63a2467fe0a917adee
2023-12-01 13:32:37 +01:00
Darshan-upadhyay1110
9769a0f97d Make icon structure consistent
- All Icon HTML structure shoulb be same as other icons
- Most of the places we have this way to add icon in DOM
  - <Button> <img/> <Button>
- This patch is to change for some icon with drop down which is not consistent with above structure
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>

Change-Id: I1a82bc4b3dfbca15f62bfe111e36804c754da539
2023-12-01 13:32:37 +01:00
Pedro Pinto Silva
414b8b5f09 menuItemHandler: add additional identifier as css class to ui-header
Before it was impossible to correctly target one dimensional menu
entries such as Help, About, Feedback and Latest updates.

This affects places such as Mobile: hamburger menu where now menu entries
get automatically assign an additional css class based on its data.id.

Note: we could also employ the same thing within explorableEntry if
needed. But that's outside of the scope of this change.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ib50cf1e29f4fae072b8739c76e7facaa540c0ad5
2023-12-01 13:24:57 +01:00
Szymon Kłos
30ccc1ef2e Avoid duplicated / in paths
Also use some allowed path for HOME and XDG_CONFIG_HOME so we start correctly.
Setup Work path for pdf/epub export.
Enable osl allowed paths for nocap only.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4fa058fe5fabc5eafdff7630dfcc72dedfe22e4a
2023-12-01 12:31:33 +01:00
Michael Meeks
f11cad502b Use the OSL sandbox as well: belt + braces.
Also move the nocaps TMPDIR into the jail folder, to sandbox better.

Change-Id: I161695b4585a2c6003779caa88152b744d36266b
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-12-01 12:31:33 +01:00
Miklos Vajna
dc149702ae doc broker: handle no _storage in uploadToStorageInternal()
Similar to commit eb5c86a4d3
(DocumentBroker::saveToStorage: guard against nullptr _storage,
2020-10-26), with the same input.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I17ac2bc12ba086d16ccbf3d5c758e081a32cbf5a
2023-12-01 09:17:36 +01:00
Rash419
67aac9424b indirection: change request interval from 10s -> 3s
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I43c3bc5e1725f9d364c44638364f836e94f38290
2023-12-01 13:04:40 +05:30
Gülşah Köse
aa6fdeaa55 Fix the thickness dialog is shown cut
Thickness dialog has an image in. When the image render is delayed we
are getting image size 0x0. That wrong size caused wrong resizing of the
parent containers. To show better result, we need to get image's actual
size from core.

Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: I207fd2fcca63deee21f51ef34c1ad670e15afd87
2023-11-30 20:04:23 +01:00
Hubert Figuière
44b92e18af postmessage: don't send ready message unecessarily
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Ia57d19298615fe4cd5b95c60c6b097631d54e4b4
2023-11-30 11:49:39 -05:00
Rash419
2c78023630 Revert "wsd: disable ctrl+s when HideSaveOption is true"
- fix: disabled 'Action_Save' postmessage when HideSaveOption is true

This reverts commit 34f3dd4a62.

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I5e6425621550153547278a61a936ba9dc7e4aad1
2023-11-30 14:00:03 +01:00
Caolán McNamara
48002c5d40 allow testing wasm in non-debug mode
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I583a8104f590e26a76837bef00814684e2015c7a
2023-11-30 12:58:42 +00:00
Gökay Şatır
bb2df24d1b Initialize parent for red lines.
Lack of "parent" property was causing inconsistent behaviour for redlines.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Iaa2424aeee160a9b28d6b0a29b456ddbc3a1b620
2023-11-30 17:16:19 +05:30
Gökay Şatır
13db34021d Refactor some parts in commentListSection.
Use new functions for querying the properties of comments.

Added new functions like setAsRootComment, getChildrenLength etc.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I9b655f0e6d50050f9e509ba4f822e1d8681a4a69
2023-11-30 17:15:38 +05:30
Gökay Şatır
25b01762fa When a parent comment is removed, child comment is disabled.
* When a parent comment is removed, the children of that comment are not informed.
* We have adjustParentRemove function.
** Function wasn't handling the "parent is removed" case.
** Function was handling the "child is removed" case in a wrong way. Children list has pointers, not indexes.

* When a parent is removed, child wasn't shown. Now we re-set the display property in case it was set to 'none' before.

* getSubRootIndexOf function was trying to continue with index=-1.

On mobile, a reply was added twice, fixed.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Id8f95bbe1cb78bf93bf35fe73a6e86203455691c
2023-11-30 17:15:38 +05:30
Miklos Vajna
07db53bb6e wsd: handle Poco::URISyntaxException in AdminSocketHandler::handleMessage()
terminate called after throwing an instance of 'Poco::URISyntaxException'
    #8 0x7f014e70dc86 in std::terminate() (/usr/lib64/libstdc++.so.6+0xb7c86) (BuildId: c74eca671e2dd0f063706372d103f8acef88f1e3)
    #9 0x7f014e70dee7 in __cxa_throw (/usr/lib64/libstdc++.so.6+0xb7ee7) (BuildId: c74eca671e2dd0f063706372d103f8acef88f1e3)
    #10 0x7f014dcea45b in Poco::URI::decode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, bool) (/usr/lib64/libPocoFoundation.so.92+0x15145b) (BuildId: 32601204eb877c998d0122c4bef1c7c08c8d0285)
    #11 0x56496c48320b in Util::decodeURIComponent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) /home/vmiklos/git/collaboraonline/online-fuzz/common/Util.cpp:800:9
    #12 0x56496bb21ec0 in AdminSocketHandler::handleMessage(std::vector<char, std::allocator<char>> const&) /home/vmiklos/git/collaboraonline/online-fuzz/wsd/Admin.cpp:84:20

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I07551d92be5ae677d1cf63f0f0092fb838583337
2023-11-29 15:41:00 +00:00
Miklos Vajna
1e125c7bdc Fix fuzzers build
- the HttpEcho build broke with commit
  08d9081280 (net: don't try to set
  TCP_NODELAY on local Unix sockets., 2023-10-30)

- fix an unused variable error from commit
  0631593c96 (wasm: proxy wopi documents,
  2023-11-06).

- the undefined reference to COOLWSD::ForKitProcId probably went wrong
  in commit 3f46c1db44 (kit-in-process:
  pure re-factor to a run-time function to flag this., 2023-11-20)

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I0cf06d188860bdb2f795485a91c7634b596255aa
2023-11-29 15:41:00 +00:00
Hubert Figuière
2afa6db0ca postmessage: Added Show_StatusBar and Hide_StatusBar
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I86d507f6aad7f3acbc69e82f366e14b4ea78824a
2023-11-29 09:27:52 +00:00
Hubert Figuière
c1f9da92a1 framed.doc postmessage: Hide/Show the ruler
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I1b2f7c4ee0e4faebad4050167ce7aabb6adce275
2023-11-29 09:27:52 +00:00
Henry Castro
60e4552ca4 cypress: add unit test to check slide pane height
Change-Id: I9aacf3dcf123348e9e2b6308695a44bd14cd079b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2023-11-29 09:22:47 +00:00
Henry Castro
439ed9ee14 browser: fix slide pane height container
The container '#presentation-controls-wrapper' element should
adjust height value when '#presentation-toolbar' is shown.

Change-Id: Ia44006e5b99f0ec08632cc171a8e23e9b6f67614
Signed-off-by: Henry Castro <hcastro@collabora.com>
2023-11-29 09:22:47 +00:00
Hubert Figuière
1ef0ffeb76 framed.doc postmessage: Hide/Show Save work with the notebookbar
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Ie0b58528d1545948fbf50d095093fd837ef913cd
2023-11-28 16:03:33 +00:00
Hubert Figuière
79e33ab76c framed.doc: Relayout the post message test harness
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Idbd1b5d89ea53d4f9925b727e8db2854ac23b17f
2023-11-28 16:03:33 +00:00
Skyler Grey
fbb756075c Unrevert "Stop onscreen keyboard when panning calc on tablet"
This reverts commit 9b3e115fb5. It was
meant to have been dropped without being merged, but #7619 was merged
with it in

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I698c7a0aa680a1b8155c08c8d292f609522fe347
2023-11-27 13:00:55 +00:00
Szymon Kłos
a0f36adf41 jsdialog: close dropdown properly
Make sure we don't expect response from server for online-only component: dropdown which doesn't have corresponding widget in the core

fixes regression on close from:
commit a23adac78c
browser: fix undefined property 'isPopup'

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I005647c77da3a866cec88a78f03dd409a098a469
2023-11-27 12:53:39 +01:00
Caolán McNamara
74b9c72814 need this even if we want to not serve wasm if the headers exist in richdocuments
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I310894e5a72002406eff77b07af76c2b048ffacc
2023-11-27 10:48:44 +00:00
Caolán McNamara
afc28b9e69 we want %ACCESS_TOKEN%, etc to exist for wasm
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I58f187c28c158e80fbe97290bb802b3481a44de9
2023-11-27 10:48:44 +00:00
Caolán McNamara
5232e3d735 hack to get this up and working
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I6d3d273f59f58a0c3b2027039dcc7de95ad971b9
2023-11-27 10:48:44 +00:00
Ashod Nakashian
0631593c96 wasm: proxy wopi documents
Change-Id: I3104ac9a6fd180f11aef06b9d4f516a392e021a9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-11-27 10:48:44 +00:00
Ashod Nakashian
7abeb96cd1 wsd: add StorageConnectionManager::createHttpRequest
Change-Id: Ie690e9c4ea33ae8cea8355d414ed137e7d5130ba
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-11-27 10:48:44 +00:00
Ashod Nakashian
a624a704ac wsd: add StorageConnectionManager
StorageConnectionManager centralizes the
connection creation and management of
Storage sockets and related bits.
This is needed as we move to a more async
model of communicating with the Storage.

Change-Id: I7a44c95c113bbc536e922b5aa3f7cf9b71917c22
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-11-27 10:48:44 +00:00
Ashod Nakashian
a7d6d1debc wasm: pass the docURL to the wasm app
Change-Id: Ie0933d2def50370cfd43cb7e7b70d9408bedb25a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-11-27 10:48:44 +00:00
Ashod Nakashian
94d213c39e wsd: cache files that need no compression separately
Change-Id: I7b46becd330a7a09a05b7973b18c92679104f597
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-11-27 10:48:44 +00:00
Skyler Grey
9b3e115fb5 non-calc: Revert "Stop onscreen keyboard when panning calc on tablet"
This ignores the hints from commit
f62f365a0ed26b21e1f86b0e028cf80fc6b2b9df when not using calc. This is
because they were causing an undefined reference in WASM.
(window.keyboard.guessOnscreenKeyboard). To me, this looks like a bug in
our WASM implementation, as I think WASM should get window globals, but
as it's blocking us we're partially rolling this commit back.

I expect to revert this revert as soon as it no longer breaks WASM.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I91bab273d400bf7925e338631e74dabc8a01e529
2023-11-27 10:48:44 +00:00
Ashod Nakashian
c2c0fe6f51 wasm: accept url as command-line argument
Change-Id: I005cd45ed0c6bfbf20bf74c84c670d2f9a0b289e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-11-27 10:48:44 +00:00
Ashod Nakashian
3a0a4c1225 wasm: readme update
Change-Id: Ie3f1fb3800597f719f2764ec1ee2cad0ba48e62f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-11-27 10:48:44 +00:00