Commit graph

13764 commits

Author SHA1 Message Date
Ashod Nakashian
6713c2a8d5 wsd: avoid reading the config entry more than once
This code is executed regularly, at every poll.
The config getter internally throws exceptions,
catches and handles, before returning. While
this isn't performance sensitive, it is noisy
to have such poor-behaving code executed
frequently and regularly.

But the real motivation is the pain this exception
causes when debugging an exception. GDB ends up
catching this rogue exception, which is hardly
useful or helpful.

At any rate, we don't need to get a config entry
more than once, as they can't change during the
lifetime of the process.

Change-Id: Ic69fb94674b74b298987131d44d9baa27e9fa4aa
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 16:24:29 -05:00
Michael Meeks
673c3cfb98 Remove un-used _isLoading and ScopeGuard.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I0f7536023cbbef52087c3110565d046dd1ab8835
2021-01-13 16:55:35 +00:00
Shubham Goyal
3a3867e1c6 Resolve #805 : Remove Mutex lock
Signed-off-by: Shubham Goyal <22shubh22@gmail.com>
Change-Id: I80da9d085590e67c0998ce971225a8c9903c0bb7
2021-01-13 16:55:35 +00:00
Pedro Pinto Silva
ad87fb854d Fontwork: layout improvements
- iconview fix layout without using hard-coded margins
- fontwork: make sure the elements start at the same left position as the title and that they occupy the dialog evenly
- hide unnecessary label
- space-around when on mobile

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia92acf1cbf09a3e7c6e996f9a846163835b115af
2021-01-13 16:57:16 +01:00
Tamás Zolnai
db0e7e9973 cypress: simplify typeIntoDocument() method.
cy.click() will grab the focus to the textarea.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I20f0df2fd8a31d3ff4b85ba38fdc503c10987dbb
2021-01-13 16:43:35 +01:00
Ashod Nakashian
06c5c90dd5 wsd: test: support SSL in classic tests
Add support for configuring the SSL certificates
when running the test binary as well as setting
up the SSL context.

Also adds the SSL socket headers with proper
compile-time guards for when SSL is disabled.

Change-Id: I99992639a66a64871f8ff8a2b2105279ead63ca1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
feac95ab77 wsd: test: shorter poll interval during tests
Technically, the poll interval should be
irrelevant because the tests should wakeupWorld
when they need to break the poll. However, it
turns out that many tests implicitly rely on
the poll interval to be large, and if for
any reason the poll wakes up, the tests either
advance their phase too soon, or assert, causing
random failures and reliability issues.

As the tests should now be more robust (at
least the ones that were non-deterministic
in this way), we can now lower the interval
to catch other cases (either extant or in the
future).

Change-Id: Id0d472e70875db8669bb21c6582b0d5052b19bfb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
95a9c5aaee wsd: test: simplify sending commands
This introduces a new macro, WSD_CMD,
used in tests only, to send a command
while logging it and its file/line of
origin.

Makes the tests more readable and the
logs more informative.

Only a handful of tests updated.

Change-Id: I55a38b35d7140a1f31f20c3c904d7eff6b19346f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
3b8058d7ac wsd: test: make Version Restore test robust and simpler
This makes the test more deterministic and simpler.

We should only modify the document after it's fully
loaded. After that, we can immediately restore the
version. So we really only need three phases and
the onDocumentLoaded callback.

Change-Id: Ic59c9d4c8e03edb8e80853daf482a6c065e7c015
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
6db0d213bc wsd: test: make owner-termination test robust and simpler
We only modify the document after it has fully loaded.

Otherwise, we risk intermittent failures due to timing
issues with when the modify commands are processed.

It's also more readable this way.

Notice that we do close the document right after
sending the modify commands. This is to test that
the modification is actually registered and is
visible when the close command is processed.
This is the whole point of this test in the first place.

Change-Id: Id3bd598b9416be901a73d6cf804563d81a245ebb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
24f443ccf4 wsd: test: make UnitWOPI test robust and simpler
We avoid relying on poll timing for the different
phases, instead we use the document events callbacks
to trigger the different phases of the test.

This improves the reliability of the test and makes
it more readable.

Change-Id: Ief3374acf823a89dca1412ff808cc09095f8e2e5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
ae9cc18212 wsd: test: make DocumentConflict test robus and simpler
This makes the test less reliable on the timing of the
poll that pumps the phases by using the proper callbacks
for the different document events.

We need to wait until the document is fully loaded before
we modify it. Here we do that in onDocumentLoaded.

Change-Id: Ibf4a5b5601449b729b1e62b621f82c1957eb8a65
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
15b6ddccd0 wsd: test: move inherited filterSendMessage to onFilterSendMessage
This allows the UnitBase class to handle the messages
and dispatch to convenient handlers. This simplifies
the implementation of unit-tests and makes the
parsing more centralized than it is now.

Change-Id: Ice8f169ecfd12d49ee7cbd4fb9021a163b14f4ba
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Ashod Nakashian
1fb968ac08 wsd: test: remove redundant wakeupWorld and log the exit status
And introduce passTest and failTest to log a reason
and be more informative when reading logs.

Change-Id: I5090793b802a29135de8ea3783a457e189cc7df3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-13 08:07:06 -05:00
Miklos Vajna
f6bf6f49ed wsd: disable ssl by default, enable ssl termination by default
The intention is to have defaults which are close to how people
typically use Online in production.

However, keep using ssl for 'make run', so that the https environment in
the browser is unchanged.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I7fd725a83b0e9ca1012f2c0e0c3bf038e5fa0059
2021-01-13 13:33:44 +01:00
Pedro Pinto Silva
04ca03925d Notebookbar: disable command: easier to scan its status
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5f89c40f65a111de1a08d6e55eaaa68499449ed3
2021-01-13 11:35:28 +01:00
Andreas-Kainz
1f5feb1534 Notebookbar: disable commands without gray background
Signed-off-by: Andreas-Kainz <andreas_k@abwesend.de>
Change-Id: I539d70ab1ba07d27cf34b61a8bf1a333e0bc4531
2021-01-13 11:35:28 +01:00
Szymon Kłos
ddcc45860c jsdialog: TreeView doubleclick to activate row
Change-Id: I312770470bf05c07c85c7962ce97132558c031f6
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
5aed87e10b Add fontwork dialog to the ui
Change-Id: I3c66f2e6db4fbfa5dd42484e260113e6233d62fd
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
bfc91864c0 jsdialog: implemented IconView
Change-Id: Ifb27b008396cba9c4695058096ae4f1757fa0a26
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
8e6ea69206 jsdialog: draggable only using titlebar
Change-Id: I7ee2cf4f1bc0d39a13b8689e3ab1db395665d201
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
08d49d9e9a Mark current linespacing setting in menu
Change-Id: I283082d7d78359861a7920290e99f90393ef6588
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
33ab7bdc6f autofilter: don't allow to place outside screen
Change-Id: If4a0583e4160726bd0801a029161ba09442ab4f3
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
1088e59a0c Initialize menubar only once
readonly for some reason is fired twice

Change-Id: I04db49decb810f3cc5238b50bf377f38b22a97c1
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Szymon Kłos
220c93ce2f notebookbar: clear timeout on remove
Change-Id: I8d7290e48a0c0235cdfb6c96f15205da0c220aa6
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-13 09:46:22 +01:00
Tamás Zolnai
6352574018 cypress: remove duplicate selectFirstColumn() helper method.
Now we have it in the general calc helper file.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Id7f12441b9612a630f6b348a9e6db6235f4b6c45
2021-01-13 05:00:19 +01:00
Andras Timar
2dc31a7648 check if we run in a container
* and fix error reporting: we do not abort every time when loolforkit
  is invoked with incorrect user name

* and better readability of the conditions

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Idc9db40c00d41c95160db130eb324c487f14de17
2021-01-12 22:24:28 +01:00
Andreas-Kainz
e50a2d8ce4 Writer NB: Layout tab fix icon size of align commands
Signed-off-by: Andreas-Kainz <andreas_k@abwesend.de>
Change-Id: I96b21a616756d79ebb45a1d12e8bdeb4dfabc80d
2021-01-12 18:36:15 +01:00
Pedro Pinto Silva
393bc9e810 NotebookBar: Promote saveas to bigtoolitem
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I357b0959458cf3ca72ec7cc0d8b10ee9fad2bdaf
2021-01-12 16:52:57 +01:00
Pedro Pinto Silva
e0cadd813c NotebookBar: Promote shareas to bigtoolitem
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6526ec70eac50d9295f9a53687e4ba41613205ec
2021-01-12 16:52:57 +01:00
Szymon Kłos
33e9d0de53 notebookbar: share revhistory and print with menubar
Change-Id: I27166ab6ff97901945a55f1eb75297875090f5ff
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-12 16:52:57 +01:00
Pedro Pinto Silva
0e84320d7e NotebookBar: Promote Revision History to bigtoolitem
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I33c8a6ced4b502aae4aac8dfcb745c5b46c88556
2021-01-12 16:52:57 +01:00
Pedro Pinto Silva
4091145598 Notebookbar: Promote Print to bigtoolitem
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic100b0857d9617c5fcdf3d2ea8a992206cd0cf5d
2021-01-12 16:52:57 +01:00
Ezinne Nnamani
74f14cccdf Created Cypress test for Merge cells in Desktop Calc
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
Change-Id: Iba89ea0a2bc5b788c9202247d5cada801fc6d5f6
Signed-off-by: Ezinne Nnamani <nnamani.ezinne@collabora.com>
2021-01-12 13:44:07 +01:00
Szymon Kłos
bbecabed82 mobilewizard: refresh sidebar after border change
Change-Id: If4ef31d47c3831cbc4918b2cf168cae9acd542e0
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-12 10:04:04 +01:00
Szymon Kłos
8e25f04e8b mobilewizard: add disabled state for toolbox children
Change-Id: I5fb30e63b05a32f986c6eab587bea089ba5f2294
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-12 10:04:04 +01:00
Szymon Kłos
702f3b3036 mobilewizard: send XLineColor data properly
Change-Id: I79a53f23a7efdc6f404192baedc0ac4bf50c2bb3
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-12 10:04:04 +01:00
Ashod Nakashian
07cf0d52ef wsd: default UserFriendlyName if missing
While UserFriendlyName is an optional field
in the WOPI protocol, Core needs it for
the Author of the document. When it's blank
the Author is not set and the document fails
to load.

By default we are at least able to load the
document with a sensible placeholder for the
Author. Meanwhile, we log a warning to let
the integrators know of the issue.

Documentation updated.

Change-Id: I4dd2c9d164b4d889f85701a4a27ee8d395bff220
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-11 22:07:21 -05:00
Pedro Pinto Silva
41728bd630 JSDialog: force checkbox style
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I2770137acb9c64bca79c21f0e99dfaabb2701217
2021-01-11 17:12:03 +01:00
Michael Meeks
7094331d89 Add pixel-testing image for interpolation avoidance.
Change-Id: I8d6da1e35f4c0a8dfcead884ea3ad3a078c96157
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-01-11 14:16:47 +00:00
Henry Castro
722a152caa wsd: disable setting "SAL_LOG" in "DEBUG" mode
The development environment is necessary analyse
the logs, so disable setting SAL_LOG instead to
add a parameter to already a long list of options

Change-Id: Id8e4a66e1dcb32c636806e47e1d69270af4c53f5
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-01-11 08:15:39 -04:00
Tamás Zolnai
0a0d185258 cypress: NC: disable failing spellchecking tests.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I3d48a5069eb0bfad8168826b6ab79ccd7f207b32
2021-01-11 12:28:48 +01:00
Andras Timar
289a51db58 Fix #895: build poco from source, link poco statically, add openSUSE target, and other fixes
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I525ee004771ad335e41e4602e044d4fd8d8a19bc
2021-01-11 11:46:52 +01:00
Szymon Kłos
a47a5b324d jsdialog: radiobutton updates
jsdialog updates require main container for control to have
id equal to the widget id. In case of radiobutton it wasn't true.
Fix it for desktop for now and leave for mobile as is (used
in cypress tests - so needs reworking)

Change-Id: I9220b289185ff6a72ea08360f0fa0570db40f95b
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-10 19:19:19 +01:00
Szymon Kłos
b00e903030 jsdialog: support radio groups
Change-Id: I8a56ccfe5d38ea451713d732c11131b8ee3d3db6
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-10 19:19:19 +01:00
Szymon Kłos
ca51113955 jsdialog: apply updates using new message
- use jsdialog: message instead commandresult:
- add updates handling also for autofilter dropdown

Change-Id: Iab909c9f119625784c6efcd14e8d0fdf38302ce4
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-01-10 19:19:19 +01:00
Ashod Nakashian
e8a5b4843c wsd: UploadResult cleanup
A minor cleanup of UploadResult to make tidy
it up a little bit and make it less specific.

Single-argument constructors should be explicit
to avoid unexpected conversion and other surprises.

Change-Id: I57599805743dffddac620f501dc6ca79c2217f89
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-10 11:13:27 -05:00
Ashod Nakashian
81d794bf9d wsd: chrono type-safe usage
Change-Id: I1e6bc4724672d3e86ad997d7b13ff9db87aade1e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-01-10 11:13:08 -05:00
Andreas-Kainz
c4c30ecc03 add clone and clear to ContextMenu
Signed-off-by: Andreas-Kainz <andreas_k@abwesend.de>
Change-Id: Idd963d2f5789dbec4e1fb182d5e96925b64fabaa
2021-01-10 13:14:59 +01:00
Szymon Kłos
5268b8c5fb notebookbar: select correct tab for cached ones
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7b3ff02f3e2e6ee444edb5d11fb08c1171141d90
2021-01-09 16:22:56 +01:00