Commit graph

12488 commits

Author SHA1 Message Date
Tamás Zolnai
1d26d6513b cypress: disable multi-user tests for NC / php-proxy.
Change-Id: I3393a1fb0b998bd82295d6d566594ed05af50634
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103102
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-21 14:49:21 +02:00
Tamás Zolnai
4f41ac6096 Fix missing InputBar and sidebar in Calc.
_isReady() can be true even if the _docLayer is not
created yet and in this case we dropped the window
messages which should have triggered the input bar
and the sidebar creation.

cypress tests were failing because of this issue sometimes.

Change-Id: Ifda1d66c952c65c420db06bfd61918411426ae93
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103010
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-21 12:54:56 +02:00
Henry Castro
283e3951ce mobile: pre-condition if they are numbers
The hammer library sometimes or random when
consecutively pinch events, the center and scale
has infinity values

Change-Id: Ide6605bcbc0c7b4818fd27b7b44706fb8122d80a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100744
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 091eca0ae421ca436ba95ea1e478909f2a18d0a7)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103047
2020-09-21 11:21:50 +02:00
Andras Timar
40ade37918 Prefer Calibra/Carlito font for new documents
Change-Id: I132df2ceac2a20ace380fb09afe0d097207e3bdb
2020-09-21 10:55:26 +02:00
Michael Meeks
224526c967 calc grid: render during canvas 'clear' if we can.
Also re-render as soon as we have grid positions.

Change-Id: I57095683e662991badcb3a58832c81ebb3bc460d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103043
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-09-21 09:57:16 +02:00
Tamás Zolnai
95fbcdebed cypress: fix stopping test run in interactive test runner.
I reported the issue. Let's have a workaround until,
the bug fix is released.

Change-Id: I7d7719d311e0c0584b7d6e710286f28962d00a96
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103038
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-20 14:23:08 +02:00
Pedro Pinto Silva
f11ce477fb Readonly: fix styles and multiple document headers on notebookbar and classic
- Avoid having multiple document-header elements when on notebookbar
- Add classes to the main-nav element when in presence of Readonly

Change-Id: I82cb816fcfa28d790202c96484a7e8c99f3875f6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103004
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Pedro Silva <pedro.silva@collabora.com>
2020-09-18 15:16:25 +02:00
Tamás Zolnai
5b6c0b8e1c cypress: NC: update afterAll method for mobile.
Newly close button does not actually close the document,
but steps back to read only mode. So we need to push it
twice.

Change-Id: Ic38f1e658396d9afe49496cfb75aa68df1c4623f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102997
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-18 14:12:26 +02:00
Miklos Vajna
92543758a7 wsd: mark these functions as static
So that it's more obvious that they don't even read the state of the
object.

Change-Id: I71d39bf3a20989c8fbf3410c2f1d2a98661c49d5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102986
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-09-18 14:05:37 +02:00
Tamás Zolnai
5c2f5eac2e cypress: use built-in test retries.
It's more effective, since it reruns only the failing test,
not the whole test suite. Also it has a nicer output.

Change-Id: I8a50a20366b76a5cedb4e9383220c53f367c5a68
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102995
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-18 12:50:45 +02:00
Tamás Zolnai
ea8c2eef02 update wait-on: 4.0.0 -> 5.2.0
Change-Id: Ia9f9b1ef51bfb88879e2a66eca30282eb58c6eb4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102994
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-18 12:50:37 +02:00
Tamás Zolnai
1e6dcf05d8 update cypress-log-to-output: 1.0.8 -> 1.1.2
Change-Id: I2e69d0cc24a32f44be7767ceca1ffe0d42ee5285
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102993
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-18 12:50:29 +02:00
Tamás Zolnai
03a65ba7f1 update cypress-file-upload: 4.0.7 -> 4.1.1
Change-Id: I312aa63f0fe394032fe06e9248a5a4da9eec6de1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102992
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-18 12:50:04 +02:00
Tamás Zolnai
5b1b66ac51 update cypress: 4.12.1 -> 5.1.0
* Fixes random failures in interactive test runner.
* Introduces test retries, what we did with an own script so far.

Change-Id: Iab5c32e854618a694e7d10d3c92c1c6c32465983
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102991
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-18 12:49:59 +02:00
Michael Meeks
058835d0dc tilecombine: should pass back oldwid to save bandwidth.
Don't re-send un-changed tiles that we can detect easily.
Also avoids some PNG compression / CPU overhead server-side.

Change-Id: Ieca05680d9194e0bfc177b8db338010e5ffafe75
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102954
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-09-17 21:35:00 +02:00
Michael Meeks
869bee93cf calc canvas: use the right canvas size in core pixels to clear.
Change-Id: I058cabd4daa51eb7da1f1ee33e59464692f00331
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102953
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-09-17 21:34:51 +02:00
Michael Meeks
a5f44dfad8 calc grid: re-render the canvas when we get grid details.
Change-Id: I3d1d1485e561d8c807daa0dfe0a9f2cb5651d31b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102952
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-09-17 21:34:43 +02:00
Michael Meeks
b70d9f6c10 calc grid: fix this interleaving.
When the span starts in the middle of the view don't render backwards.

Change-Id: Icc97fef88a65c0ca83167ddb72c03bece9a8e047
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102951
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-09-17 21:34:35 +02:00
Jan Holesovsky
3a93ada13f grid lines: Setup renderBackground only after _painter exists.
This fixes setup of many cypress tests.

Change-Id: I4eb626050d2d4202104ab01a6aa0b01248ae4eb5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102965
Tested-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-09-17 21:34:10 +02:00
Michael Meeks
8093b8941a calc canvas: start of direct grid rendering.
Change-Id: If471fc4ff94b3cb8e2897ac76e712aa3958fc7d2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102950
Tested-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-09-17 21:33:22 +02:00
Tamás Zolnai
011efb4ac4 cypress: improve moveCursor() helper method.
Change-Id: I41b781a2cd2f413b4daea979478351d29588fda3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102966
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-09-17 19:10:54 +02:00
Henry Castro
6a70aeaad8 loleaflet: Hide the visibility of the cursor by default
When loading a spreadsheet document, the server should send a message
to show the cursor appropriately

Change-Id: I520a2b21fab903fc6b17ea612bbe1691ef311dbd
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102692
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Henry Castro <hcastro@collabora.com>
2020-09-17 17:58:58 +02:00
Ashod Nakashian
4c95497327 wsd: allow pings from clients
Per the rfc (https://tools.ietf.org/html/rfc6455#section-5.5.2):
"An endpoint MAY send a Ping frame any time after the connection
is established and before the connection is closed."

And "Upon receipt of a Ping frame, an endpoint MUST send a Pong
frame in response, unless it already received a Close frame."

Here we allow for pings to come from clients and we respond
to them by pongs, as required by rfc 6455.

Change-Id: I8e285f095526e4b67373ecb3ae1efc9c8717d756
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102948
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-09-17 15:37:21 +02:00
Tamás Zolnai
d29ad2b57f cypress: update tile / marker positions.
It seems the tile container was moved to right with one
pixel. Update the test accordingly.

Change-Id: Ie8c370419e0b19abaafda379e95f405eea27b64f
2020-09-17 15:03:54 +02:00
Jan Holesovsky
49cdd8cafd split panes: Don't expose the freeze panes buttons in the toolbar.
The split panes are not modified that often, no need to have buttons to
set that up in the toolbar.

Change-Id: I9c7920f6dd57de5f507450e15fcde615ad941f1c
2020-09-17 15:03:54 +02:00
Pranam Lashkari
fb0deb2a13 leaflet: added freeze pan buttons to view menu
Change-Id: I9ba7a0982b15d097e21d93a6e18289455f0f8139
2020-09-17 15:03:54 +02:00
Pranam Lashkari
4eab08e62b leaflet: added freeze pan buttons to toolbar
Change-Id: Ifb9ae58deef77397a5d5eb7c0bfd85625f1a4e74
2020-09-17 15:03:54 +02:00
Pranam Lashkari
b7e5604bc3 notebookbar: added freeze pan buttons in calc
added icons too

Change-Id: I913f315c2e5bfcfbf6f82677ecffe76eaf86ea2a
2020-09-17 15:03:54 +02:00
Jan Holesovsky
ed0c1e3477 split panes: No dragging of the split lines currently.
It is too buggy, let's instead allow only setting of that via the menu,
similarly to what the desktop LO does.

Change-Id: I219b2535e0cbd5310fe2a3a9ebf2098536d5c175
2020-09-17 15:03:51 +02:00
Jan Holesovsky
f0b63eb765 split panes: No split lines at all when they are at 0 position.
Change-Id: I9fee28f32acdabd4768b095a471f26e5e8e9a378
2020-09-17 15:03:01 +02:00
Jan Holesovsky
f668b59001 calc canvas: More reliable check for the desktop / mobile / tablet.
Change-Id: I7b1ea581051608e020fd6e4615be9bc9b919c01f
2020-09-17 15:03:01 +02:00
Michael Meeks
0176bbeb6a calc canvas: get the right core px size of the canvas across.
Change-Id: Ib079097b9d5caf707bd95b286d675791b5df9255
2020-09-17 15:03:01 +02:00
Szymon Kłos
f9cfed47d4 Adjust splitline thickness according to zoom level
Change-Id: I33c398f1545860fb2f77d9d8dcdd8f632c2603ca
2020-09-17 15:03:01 +02:00
Szymon Kłos
284e8ce308 Don't block handling of touch events
This is partial revert of 901ecca313.
Handles (Markers) 'down' handler disabled
main TouchGesture handler what caused
taps to be ignored. Eg. double click didn't
enter edit mode for a Calc cell.

Change-Id: Id7097e9ad513e56a71423a6d6a8ac5105c373f77
2020-09-17 15:03:01 +02:00
Michael Meeks
26e87932ae calc tiles: clarify some magic.
Change-Id: I2d95dd09b5640a5216e72366493ddf77541c8b73
2020-09-17 15:03:01 +02:00
Michael Meeks
d1971d3a7d calc canvas: avoid repeated setTransform; build the right offset.
Change-Id: Iab153b25fa38f27742a052ad0892e3d55c2c04cc
2020-09-17 15:03:01 +02:00
Michael Meeks
5367d18d3d calc canvas: use sub image blitting instead of clipping.
Avoids thrashing the canvas rendering context / clip state.

Change-Id: I547ce22a171874cd7be3a0fac50b4afc56faf084
2020-09-17 15:03:01 +02:00
Michael Meeks
cee264f971 calc canvas: round view co-ordinates to the real pixels we need.
Change-Id: I768cd9015da1f1301f3ddad242130d4eddb426d1
2020-09-17 15:03:01 +02:00
Michael Meeks
fdfb7fd9d0 calc canvas: avoid lots of canvas context save/restores.
Change-Id: Ib813686ef7d495e660ad8fa3b545391180b9e019
2020-09-17 15:03:01 +02:00
Szymon Kłos
69ccdb6b4b Split lines only in the corner when set to 0
Change-Id: I6192219cede2d0888ecd77236f72ff734d99d778
2020-09-17 15:03:01 +02:00
Jan Holesovsky
c1ac22da32 calc canvas: Preserving of the top left cell should be desktop-only.
On mobile, the center of the zooming has to be according to the center
of the pinch-to-zoom, ie. the center has to be taken into account.

Change-Id: I3ba2ea90b7bac9bc1ba27f8068ea7ed6bbb4910d
2020-09-17 15:03:01 +02:00
Michael Meeks
367a0b75fb calc canvas: paint invalid tiles until their replacement arrives.
This avoids display corruption when panning, whereby stale/old
canvas content would continue to be rendered in the 'holes'
where invalid tiles were not rendered.

Change-Id: Ic886c0924c5a930116b1437c8e0cf35726ab76a5
2020-09-17 15:03:01 +02:00
Michael Meeks
0184833ace calc tiles: don't send un-necessary zoom / visible area changes.
Lots of redundant zoom messages seem unhelpful.

Change-Id: I944a3202739adfc89aab81902b467a4e34977202
2020-09-17 15:03:01 +02:00
Michael Meeks
3b75957011 calc canvas: ensure that the fraction width rounds to the pixel width.
Slave CSS geometry from integral canvas pixels, don't attempt the
reverse.

Change-Id: I369ed1bea3c4a5a199192aa1e84bb4e03dcb2e94
2020-09-17 15:03:01 +02:00
Jan Holesovsky
1be56e18a5 calc canvas: Fix occasional off-by-one error that results in a blurry canvas.
The core of the fix is in _getNewPixelOrigin() where the round() behaves
non-predictably / inconsistently with the rest of the code, causing
random off-by-one error that shows (or not) depending on the window
size.

The biggest problem of this is that this off-by-one is then multiplied
somewhere by the zoom factor, causing the canvas being completely
blurry; but eventually when the user clicked into the sheet, it
'magically' fixed itself.

The rest of the changes (in setZoom()) should actually do the same thing
as the previous code, but using existing methods, instead of computing
the shifts manually.

Change-Id: If0ecb1301b7c1e65cfe8126385ef959c584c5d16
2020-09-17 15:03:01 +02:00
Michael Meeks
77599a9266 calc tiles: connect debug to global setting.
Change-Id: I0db008ac40020c9173d37969aa6c23b3a1696f79
2020-09-17 15:03:01 +02:00
Jan Holesovsky
c82d14af52 calc canvas: Keep the document zoom separate from the browser zoom.
With this, if you increase or decrease the browser zoom, the document
zoom still stays the same.

Before this, when you had eg. 100% document zoom and 150% browser zoom
and try to zoom out, it actually zooms in instead, because the browser's
zoom is added to the mix; and it displays the wrong value in the
dropdown.  Even worse, to get the 100% again, you have to choose 80% so
that the correction for the browser zoom is added, resulting in the
100%.

We should keep both the document and browser zoom separately.  The
questions is then whether to combine them later for the actual document
rendering; I believe we should not, but even if we should, we cannot do
it directly in the setZoom() method, but instead closer to the painting
itself.

Change-Id: Ib7f3d2ae8b4e6e6086f14e933b215c32326c6be6
2020-09-17 15:03:01 +02:00
Dennis Francis
74d71e870d specialize twips/core-pixels/css-pixels conversion methods
Change-Id: Ifb0a67b938fdd34a06bb7e75832498d566247010
2020-09-17 15:03:01 +02:00
Dennis Francis
75f662fbd7 detect change in dpi and update zoom
Change-Id: I034727a8fe8495445350648fea2422c56fda1875
2020-09-17 15:03:01 +02:00
Dennis Francis
baef4f78f4 use the main canvas dpiScale everywhere
Change-Id: I2bea44a000552ce8f2fee2b0ebb5a4d162d3576f
2020-09-17 15:03:01 +02:00