Commit graph

18272 commits

Author SHA1 Message Date
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
Pedro Pinto Silva
c43055f9f8 Remove toggle prefix from status bar and ruler
No need to indicate that those components are toggles since they
visually communicate there. Plus we are not using that prefix for
other toggles like "sidebar"

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Idb99d1e8505feb3adaa9378f0f96309cd3cf7158
2022-04-22 16:52:51 +02:00
Szymon Kłos
ca57bb5b07 notebookbar: be sure it is initialized early
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I2820a09a478538d93512a760a9fb9ca0bcb8d49f
2022-04-22 15:14:04 +02:00
Szymon Kłos
6a5500aa8d Fix overflow for main-nav on UI mode swotch
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0d88f16f5f9b1bd15ae7fe555934b049d142d6a1
2022-04-22 15:14:04 +02:00
Szymon Kłos
8d149d31db notebookbar: introduce bigmenubartoolitem
bigmenubartoolitem and inlinemenubartoolitem are items
which are able to execute actions defined in Menubar code
to help sharing the code

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0f16320fb1f2bcb14b16e79f89b92617c8f9117e
2022-04-22 15:14:04 +02:00
Julius Härtl
04187501c1 Unify ui switcher naming
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Change-Id: I6ec55bee2a04501ba7df50cb4abd677bc45b0c33
2022-04-22 15:14:04 +02:00
Szymon Kłos
a3e191be53 Be sure that notebookbar is initialized correctly
- retry if we didn't receive confirmation from core
- required by core which sometimes have to ignore our
  request to activate notebookbar

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I1954ebf832772014c2c3caae25d84646f1734260
2022-04-22 15:14:04 +02:00
andreas kainz
e7e7d5fd0c add collibre toggleuimode.svg icon
Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: I16cbd880e4fb00c589b47a7d92c20d48a93c623a
2022-04-22 15:14:04 +02:00
Julius Härtl
e8a9ec10e2 Add ui mode toggle to menu/notebookbar
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Change-Id: I2ff96dfae4ba0b13f8842f81e795dff1680ecf79
2022-04-22 15:14:04 +02:00
Ashod Nakashian
e9b26cdf53 wsd: use the default DH parameters in SSL
OpenSSL 3 deprecated the manual DH parameter
functions. Instead, it encourages the use
of the built-in parameters. Since this
API also works on the 1.1 version, we only
need the manual parameters for older versions.

Change-Id: I900cc11c3ca09f1d85b7d88cfbf537d802f69846
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-22 09:47:19 +02:00
Tor Lillqvist
551c3d96e5 Enable avoiding use of ETag for remote font files
Change the syntax of the remote font configuration JSON file. Now for
each font we can also have a "stamp" property that can be a time stamp
or whatever other random string that gets changed (by some automated
mechanism provided by system integrators) whenever the corresponding
font file has changed. If a such is provided we don't poll the ETag of
the font file but re-download it whenever its stamp in the JSON file
has changed.

The remote font configuration file now should look like this:

{
    "kind": "fontconfiguration",
    "server": "My pretty server name for admin console",
    "fonts": [
	{
	    "uri": "http://localhost/tml/MS33558.ttf"
	},
	{
	    "uri": "http://localhost/tml/SmoochSans-VariableFont_wght.ttf",
	    "stamp": "foo0"
	},
	{
	    "uri": "http://localhost/tml/B612-Regular.ttf",
	    "stamp": "foo3"
	},
	{
	    "uri": "http://localhost/tml/xxx.ttf"
	}
    ]
}

Where the value of the "stamp" properties can be any non-empty
string. The JSON file is checked once a minute. If it has changed it
is re-downloaded, and if the stamp of some font has changed, that font
file is re-downloaded.

When a font file is re-downloaded it is stored in a new file each
time. The old file is not removed as that will cause problems in
ForKit and Kit processes.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ib04b77e0fb9e1d9c33afdc14a5fed3ad0b12a409
2022-04-21 19:10:10 +01:00
Andras Timar
96262f58d4 Do not display About button on notebookbar when About box is removed (fixes #3528)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I202a78806db3102c84bcf1dc33c19e8f186c5d42
2022-04-21 17:05:37 +02:00
Andras Timar
74816141cc We do not use tunneled sidebar any more
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: If3dc1dae35250c54d62e69396aea7df51873d4cb
2022-04-21 17:05:18 +02:00
Andras Timar
4c7332f44f Fix cypress test after InsertZWNBSP->InsertWJ
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia21c27e80507d7be4b44935e0a7dc225ad0f7776
2022-04-21 15:01:57 +02:00
Andras Timar
920eef1c37 co-22.05: updated UNO command translations
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: If95d98abe786bfaa0481ffad61aadd470ad139b0
2022-04-21 10:33:56 +02:00
Andras Timar
36ae202f0d the correct command name is: .uno:PrintRangesMenu
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Idbf5216702e8cdbf47b9b2c184a98c5bba02aaad
2022-04-21 10:29:38 +02:00
Szymon Kłos
d4d3f7e4bc Revert "co-22.05: mobile writer/insert_formatting_mark_spec.js"
This reverts commit 7e6f3d5590.
Because we have split online into branches, doesn't need to support
both cores and this fixes translation generation

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib0f3dff74f5006321bd80e43100d58093f43b4d5
2022-04-21 10:16:05 +02:00
Szymon Kłos
feb8b5824c 22.05 doesn't have InsertZWNBSP command
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I420dce5a86f679a08d2bc9cbcad07e0800871ae8
2022-04-21 10:16:05 +02:00
Ashod Nakashian
59a59f6de5 browser: make: remove duplicate .ts files from makefile
Change-Id: Iff5c26df9757f9dec18a4fcd3da464475f40e6a4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
2bf6f419a3 make: fail the build when the whitebox unittests fail
Change-Id: I2e4b483740eac67efffa96449347cc1453798b87
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
b7b7801d8a wsd: remove identical simulateSocketError override
Since both implementations are identical, there
really is no benefit to having two version.

Change-Id: I4a5288243291c0d5706df8e8870b918fab425317
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
92c6428e4b wsd: minor log improvements
Change-Id: Iea317ac1a04163d9eb45b8ac2b6d1c4f9f77009c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
b4e8975fbe wsd: minor cleanup of send-frame members
Change-Id: Ic2268780ea815611bf978c0c779ef737facc73fb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
16617bee2d wsd: fallback only when COOLStatusCode is missing
Since the json parser logs an error when the
entry isn't found, parsing both LOOLStatusCode
and COOLStatusCode almost guarantees at least
one ERR log entry. We should only fallback
when COOLStatusCode isn't found and avoid
erroring when we got what we wanted.

Change-Id: Icace964820c250f4ceba98281e57cb7c29fbd118
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
4c1a168757 wsd: remove argument default-value
Single-use default argument.

Change-Id: I1085465c0dbdf6cbda934277feca61781b67f45c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
96adaa15d1 wsd: kill coolwsd_fuzzer
coolwsd_fuzzer predates actual fuzzing
with libfuzzer and is currently unsused.

Change-Id: Id095b165943ba14dbf525ddc607ad329f5d952d4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 07:12:03 -04:00
Ashod Nakashian
6bc2d70dcb configure: choose the correct sanitizer library when fuzzing
We use -fsanitize=fuzzer-no-link when fuzzing is enabled,
but we fail to consider if other sanitizers are enabled.
It is usually the case that asan and ubsan are enabled
when fuzzing.

The fuzzing check is now done before the sanitizers
and the result is combined.

C++17 check is now improved and so are a few messages.

Change-Id: I44e36d19d77a47c21245b5fe9e690d860f91e84c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 07:12:03 -04:00
Ashod Nakashian
827d9518c0 wsd: make: build the fuzzer binaries only configured with fuzzing
This reduces the build time significantly while also
minimizing the disk-space requirements for builds.

When configured with --enable-fuzzers the fuzzing
target binaries are built.

Change-Id: Ia8560d876f548d04ac085503e55a3a5dca90f590
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 07:12:03 -04:00
Dennis Francis
e6f973e3e4 mocha-tests: fix build for CPointSet.test.ts
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I8853995544c56c9a3bd522bacbf572bc1084cb17
2022-04-20 10:56:31 +05:30