Commit graph

18300 commits

Author SHA1 Message Date
Ashod Nakashian
0d027a9a56 wsd: test: disable verifySignature test with openssl 3
This is a temprorary patch until we can properly
migrate the verification code to openSSL 3.x.

Change-Id: I676ae3b5a1e0d27ef1d253dba2275f7de5fc08ff
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-26 14:08:48 +02:00
Tor Lillqvist
97a18768d7 Avoid using only "real" paths for the tmpfont thing
If I have used a path with symlinks in it when changing directory to
my build directory, what gets put in config.status as ac_pwd is that
path, not a realpath version. That then propagates to
ac_abs_to_builddir and to SYSTEMPLATE_PATH, which is what Makefile.am
passes for the --o:sys_template_path option to coolwsd.

To be on the safe side, do the tmpfonts dance both for the systemplate
path that might include symlinks and for one that has been realpathed.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I7575120090986e6207497c5ce740aedd6075e48f
2022-04-26 13:59:29 +03:00
Pranam Lashkari
45c119ff21 draw: make sure page settings do not use term "slide"
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I8831f0a1edcbbe8e8ea08ad691f86c7a422a89aa
2022-04-26 15:58:09 +05:30
Pranam Lashkari
138a98385a wsd: do not set default close reason
we preserve original reason,
so setting default reason means always using default reason
and ignoring any other reason

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I837a13a129aa759a319406affc6e89425bf31361
2022-04-26 15:57:51 +05:30
Szymon Kłos
618c53de7a Remember last UI mode
This also makes us sure we are in sync due to
single point of knowledge about UI Mode

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ifefeee90666db7c341da52a7190ef09749b8e3ab
2022-04-26 11:05:47 +02:00
Ashod Nakashian
fac6c01725 wsd: replace strrchr with constexpr
This avoids the runtime overhead of strrchr used
in logged filenames on iOS, which is unnecessary
on string literals, and adds unit-tests.

We also strip leading './' and '../' in other builds.

Change-Id: I56ec722d1400fad9165eb046d1bd8d4438241ca3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-26 11:13:44 +03:00
Ashod Nakashian
14d96957cd wsd: log macro cleanup
* Simplify log macros.
* Reduce expanded lines (faster compilation).
* Avoid flushing (since we always use ostringstream).

Change-Id: Id10c1a75b5af5d8cdba62d768192ab0a6a9e0aca
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-26 11:13:44 +03:00
Ashod Nakashian
777463d9c5 wsd: automatically include a log prefix if provided
Change-Id: Ic542ec83ffa9c76478a4f1121caf3edf078f40a7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-26 11:13:44 +03:00
Tor Lillqvist
c3b76b4311 Define ENABLE_DEBUG in the iOS app Xcode project, not DEBUG
We don't have any ifdefs on DEBUG.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I76b4fe8ebbce235e967d8b5275fea663d3fb8f9d
2022-04-26 11:13:14 +03:00
Andras Timar
ac60989af5 Update l10n files for Weblate
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I54b671950843ea600aff7073e68e2636d51d02f9
2022-04-25 20:43:49 +02:00
Martin Srebotnjak
66738557ab Translated using Weblate (Slovenian)
Currently translated at 100.0% (441 of 441 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: I18acf3ab6b281567209b1fe2462a8c11af540ed7
2022-04-25 20:29:50 +02:00
Максим Белозеров
dc77f4fbfb Translated using Weblate (Russian)
Currently translated at 55.5% (254 of 457 strings)

Co-authored-by: Максим Белозеров <mxite@ya.ru>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/ru/
Translation: Collabora Online/Help
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I86cad90016a81adda4d414eadc17d7ef6c9aecd8
2022-04-25 20:29:50 +02:00
Sveinn í Felli
d2b7db240b Translated using Weblate (Icelandic)
Currently translated at 100.0% (441 of 441 strings)

Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/is/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I1d7905ab8e434ad3517316940abc6d830727ce13
2022-04-25 20:29:50 +02:00
Adolfo Jayme Barrientos
a5858c70fe Translated using Weblate (Spanish)
Currently translated at 100.0% (457 of 457 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (441 of 441 strings)

Translated using Weblate (Catalan)

Currently translated at 100.0% (441 of 441 strings)

Translated using Weblate (Asturian)

Currently translated at 49.2% (217 of 441 strings)

Co-authored-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/es/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/ast/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/ca/
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: I9dcfd9e019d8fad2e5e178d30450cc89e60c7465
2022-04-25 20:29:50 +02:00
Pedro Pinto Silva
ddb19199d9 Add tooltip to close document button
Normally these kind of button wouldn't need a tooltip but:
1. Doesn't hurt to add it
2. It helps the user with understanding what that btn does:
  - The button doesn't remove the current opened document
  - The button doesn't save and close
  - The button closes the document

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I45e63c4c7f42d314743702e6ff50b777527c4367
2022-04-25 20:24:45 +02:00
Pedro Pinto Silva
35cd9bcc5d Notebookbar: Fix rev-history Id, Capitalize Each Word
All NB items ids have EachWordCapitalized and are successfully target by
users/partners/users to change image for example, and expect them to be
have EachWordCapitalized:
- Notebookbar: Make rev-history -> Rev-History so it also can be
- Classic: Id remains "rev-history" in the case integrator rely on that
specific lowercase id
- Allow rev-history and Rev-History when checking id (Menubar.js)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I7a5a31f78713fe43e1855021652500d0306c5ac4
2022-04-25 18:30:56 +02:00
Pedro Pinto Silva
b93c47178b Notebookbar: Fix SaveAs Id, Capitalize Each Word
All NB items ids have EachWordCapitalized and are successfully target by
users/partners/users to change image for example, and expect them to be
have EachWordCapitalized:
- Notebookbar: Make saveas -> SaveAs so it also can be
- Classic: Id remains "saveas" in the case integrator rely on that
specific lowercase id
- Allow saveas and SaveAs when checking id (Menubar.js)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia92a442eadb34c4b4ae374e54835d7866f70df7a
2022-04-25 18:30:56 +02:00
Pedro Pinto Silva
e5e7b34075 Fix leaflet-control alignment
context: https://archive.org/download/repair-doc-close-misaligned/repair-doc-close-misaligned.png

line-height, if the hard-coded px is needed, then it should be the
same value as the width and height so not 28px but 32px
as it's the values used in a.leaflet-popup-close-button.

But better to just rely on the unitless value that line-height can
accept then it will fit whatever the font-size and width the anchor has:
- Fix it by letting the web browsers align the content for us. Web
browser multiplies our number by the font-size value (1 times font-size)
, so no need to depend on specific px values for that.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4145231241a9acc540c684971e3bde46adb2304b
2022-04-25 17:48:07 +02:00
Pedro Pinto Silva
f3fd524396 Revert "Fix leaflet-control alignment"
The commit message of this commit was correct but it seems I end up not
git adding the latest change which obviously is not initial but 1.

This reverts commit c80d4ca62e.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I999e7e51ee36e4c162cc8d0a15bc9850fdd9c1fd
2022-04-25 17:48:07 +02:00
Pedro Pinto Silva
c80d4ca62e Fix leaflet-control alignment
context: https://archive.org/download/repair-doc-close-misaligned/repair-doc-close-misaligned.png

line-height, if the hard-coded px is needed, then it should be the
same value as the width and height so not 28px but 32px
as it's the values used in a.leaflet-popup-close-button.

But better to just rely on the unitless value that line-height can
accept then it will fit whatever the font-size and width the anchor has:
- Fix it by letting the web browsers align the content for us. Web
browser multiplies our number by the font-size value (1 times font-size)
, so no need to depend on specific px values for that.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4145231241a9acc540c684971e3bde46adb2304b
2022-04-25 16:02:09 +02:00
Szymon Kłos
5aa5f6256b jsdialog: don't build iconview like container
Fixes not working iconview eg. in Fontwork dialog (selection)
regression from:
commit 496256a96b
jsdialog: remove table- prefix hack

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I53e85ebd281e2fd705bcb4848c1dfc3c776903f6
2022-04-25 15:59:23 +02:00
Szymon Kłos
8a7ed0b987 jsdialog: remove jquery and warn when not found iconview entry
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I006a8419a60606cbdd2199f876b7260c1f58cae3
2022-04-25 15:59:23 +02:00
Szymon Kłos
df690019dd notebookbar: fix help items
regression from:
commit e8d759f18a
jsdialog: postprocess toolitems

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0205184c4cfcb4cd9b571c8e346e94e108c4a519
2022-04-25 15:35:04 +02:00
William Gathoye
81847a87c3 README: correct URL to build machine
Signed-off-by: William Gathoye <william.gathoye@collabora.com>
Change-Id: If0baef05db6daa3c8bcd4908128481261ec30f41
2022-04-25 12:02:46 +02:00
Pranam Lashkari
bad251d183 calc header: avoid reselecting selected row/col range
if right clicked on already selected row/column range,
don't reselect the right clicked row/column

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I718a0a727913c38bc506fd2b808fba8feaebb0c8
2022-04-25 15:18:16 +05:30
Rash419
0945c4d48b config,UI: change classic -> compact and notebookbar -> tabbed
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I633a13927245ee6b4d750cd84c2b4577dca06d68
2022-04-25 13:56:10 +05:30
Szymon Kłos
cc5b4441b3 formulabar: remove old tunneled dialog code
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ife5a13dad04794be5cab667e075676013f09d6d8
2022-04-25 09:59:56 +02:00
Szymon Kłos
52018664f4 autofilter: remove old jsdialog code
starting with co-22.05 core we don't need old
autofilter code as it is now unified with popups
handled in Control.JSDialog.js

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I613d76950c9c9d727be958607d25793a3a69c28a
2022-04-25 09:59:56 +02:00
Pedro Pinto Silva
5f7189d2cb Fix repair document item on notebookbar writer
Context:
Repair document on the Notebookbar is currently always a small item

https://archive.org/download/repairdoc-writer-smallitem/repairdoc-writer-smallitem.png

,it should be a bigtooltiem when the extra additional/optional item
Sign document is not available:
- Set it to small item and vertically stacked when hasSigning is true
- Set it to bigmenubartoolitem when hasSigning is false
Note: Make use of the newly added bigmenubartoolitem in
8d149d31db

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I26a8e1b721bf2550127eff1ccfdc44ab4876db52
2022-04-25 09:20:40 +02:00
Szymon Kłos
acb0ed3bbd jsdialog: use only one handler for selection
this will allow us to avoid doubled messaged
and ugly bugs, setting selection in JS works as
async call and it's hard to not trigger own handler...

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ibeae30c04374116776413b19ebd8efca043e9c0e
2022-04-23 10:58:55 +02:00
Szymon Kłos
abe204adc7 jsdialog: apply selection in textarea
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I9856002b7f72ce8db9f6d2116871804fc4763f3b
2022-04-23 10:58:55 +02:00
Szymon Kłos
256b50e926 cypress: fix after formulabar conversion to jsdialogs
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0792e2b1e044220dc44ae8155ac7b30b47a7ea8d
2022-04-23 10:58:55 +02:00
Szymon Kłos
cbde6f324a cypress: tunneled formulabar was removed
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I040bbc8c9a5c76a367de046acf2a05e6dfb88920
2022-04-23 10:58:55 +02:00
Szymon Kłos
fc84a979ee formulabar: keep correct focus state
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I045bb301e0554803c8586d4b5bee97824a5670f4
2022-04-23 10:58:55 +02:00
Szymon Kłos
47c9040ca8 jsdialog: send special keys for rawKeyEvents mode in textarea
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic4e6169315e5d0936158f0621869784b48153add
2022-04-23 10:58:55 +02:00
Szymon Kłos
c4f5d2735f formulabar: move buttons to jsdialog implementation
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I2ad2c345435453456ad69c036b7d7e5a73a27550
2022-04-23 10:58:55 +02:00
Szymon Kłos
3ef60a9cab jsdialogs: formulabar
this patch handles formulabar generated with jsdialogs
for core version which supports that (>=co-22.05)
- jsdialog formulabar is implemented in Control.FormulaBarJSDialog.js

it does translation so instead of drawingarea we got input field,
later it sends events with modified type so core doesn't know about
any change in widget type

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I690409ec2e83e803ed9dfe3544e68b6521ae768d
2022-04-23 10:58:55 +02:00
Szymon Kłos
3144a9f8e0 Introduce map.dispatch(action) to share code in UI handlers
This will allow us to improve code sharing between jsdialogs
and menubar / toolbars.

In the future could be used instead of special buttons which trigger
actions from menubar in jsdialog (what creates temp Menubar instance...).

in jsdialogs toolitem which will trigger shared action from map.dispatch
is a type 'customtoolitem'

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: If528e8eb142b76d24cb9145cb265a505e7e9a5df
2022-04-23 10:58:55 +02:00
Szymon Kłos
4d9976becb jsdialog: a11y: ignore containers while traversing using keyboard
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0c8006bbf63c4b33fe29387d5346d1044a2563ab
2022-04-23 10:58:55 +02:00
Szymon Kłos
496256a96b jsdialog: remove table- prefix hack
so we will not have problem with updates not catching
widgets with modified name - not needed not

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ifa29d3971120482c3dae4ede3db5bcf31ea1af95
2022-04-23 10:58:55 +02:00
Szymon Kłos
e8d759f18a jsdialog: postprocess toolitems
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib1a92486fea207b19476873bd30cb08845a5494d
2022-04-23 10:58:55 +02:00
Szymon Kłos
c3cd6c902d jsdialog: don't interpret all strings as uno commands
example: toolitem without uno command but id

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I198fa3838e714251936de90f11e1d8d857025eef
2022-04-23 10:58:55 +02:00
Szymon Kłos
a5e5a77950 jsdialog: create empty drawingarea
- we need to create all widgets
- later we receive update events...

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I766f28e012c7b9ce3cb33478cdc3e55cd44eaa83
2022-04-23 10:58:55 +02:00
Szymon Kłos
55b64dbb8e jsdialog: add symbols support for buttons
- symbols are standard images for buttons
- are shown as images: "symbol_<SYMBOL_NAME>.svg"

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I034c07ad299376837f65726f7ec1bceabb50ba01
2022-04-23 10:58:55 +02:00
Andras Timar
f9e727ccf5 Fix 'Insert Comment' invoked by keyboard shortcut (fixes #4109)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib0f008d25ed9b508a3fbc002816b4729b5743314
2022-04-22 20:22:16 +02:00
Ashod Nakashian
89234116dc wsd: delay uploading if the last attempt had failed
Change-Id: I1c251fdeadf355b003a71408fba31d1ac975822f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-22 17:23:34 +01:00
Ashod Nakashian
9e7a4ad3d0 wsd: needToSaveToDisk helper and improved autoSaveAndStop
Change-Id: I149a624a8acb005f441d79e0c1f4776e7a2d49c0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-22 17:23:34 +01:00
Ashod Nakashian
e3045b513c wsd: add canSaveToDisk helper
Change-Id: I8ad6c91ac05d60e29726a20d67799aa11714226a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-22 17:23:34 +01:00
Ashod Nakashian
83e96e58bd wsd: add canUploadToStorage helper
Change-Id: Ieba59e3cfc5d26c78a118f8d4fae8a151ac62ef3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-22 17:23:34 +01:00
Ashod Nakashian
8db2dc86fe wsd: do not prevent saving when storage is missing
Since we have the ability to quarantine documents,
we should save to disk even (or especially) when
we don't have a storage instance. This way we
can at least recover the document.

Although it's not clear when we will not have
a storage instance, if at all, separating saving
from the storage state is reasonable.

Change-Id: Ifa51ed3229424b567df8218b201ef914226db947
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-22 17:23:34 +01:00