Commit graph

16304 commits

Author SHA1 Message Date
Dennis Francis
5830137075 add cypress test for sheet-switch view area fix
Conflicts:
	cypress_test/integration_tests/common/helper.js
	loleaflet/src/layer/tile/CanvasSectionContainer.ts

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I9aeb06f1b137ec15061dfa18c40e54a2324703d8
(cherry picked from commit cea7112d29775c4c7c42876a4c3638aad524fe24)
2021-10-12 12:29:09 +05:30
Dennis Francis
974437d810 sheet-switch: show view area with the cell cursor
Issue fixed
===========
* In a spreadsheet with at least two sheets, on the first sheet, select A1,
* Switch to the second sheet, and select a cell way down, eg. A100, Switch back to the first sheet.
=> The view on the first sheet jumps, and will show a range of cells much lower than the originally shown A1.

Fix description
===============
We already have logic in place to switch view area based on the cell
cursor position. But in L.CanvasTileLayer._updateOnChangePart() it sets
the view area to hardcoded (0, 0) using 'updatescrolloffset',
map.scrollTop(0) and map.scrollLeft(0) which does not update the UI
(which is a different problem).  So when the cursor message for A1
arrives, the view shift logic does not do anything because the view area
is already covering A1 even though the UI area is not.  Removing this
arbitrary "scroll to (0, 0)" code enables the "view shift based on cell
cursor" logic work correctly.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I42e89691338403e60a82b5a535eff50c1c18ea12
(cherry picked from commit 9bc49385ddac7f1dc28b27c4e77539c2e14f4341)
2021-10-12 12:29:09 +05:30
Pranam Lashkari
8dd0b1e2db make theme specifying possible through richdocuments
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I3e6e837464069330975cb377ec0126c5d61477ef
2021-10-11 19:45:20 +05:30
Michael Meeks
b043b6213d Move LOOLWebSocket into test/ - where it can be slowly removed.
Change-Id: I388690261d323377648a1502b927e73f862ad802
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-10-11 13:40:20 +01:00
Michael Meeks
a2055d2023 Move StressSocketHandler into Replay.hpp and share with wsd's fuzzing.
Change-Id: I01e0fd0b666651101055b1e78ec6c10e721d114b
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-10-11 13:40:20 +01:00
Michael Meeks
2cf4466d56 trace: hard filter out tileprocessed.
This makes up most of the trace, and we have to simulate it anyway.

Change-Id: I3820e1d2281e696c119edb9ce989fda5ca4170e6
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-10-11 13:40:20 +01:00
Rash419
21f795b840 loleaflet: hidecursor when document becomes idle
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I38b157c75f95345dbf8f3ac4d1ef163cc714ca73
2021-10-11 17:31:48 +05:30
Rash419
78e619e976 loleaflet: close comment dailog on ESC
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I8b50a889542193591eb2ed97924e4f6a07a4aba2
2021-10-11 17:31:48 +05:30
Rash419
0535e21a7c cypress: increase the stability of delete table, save comment tests
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I6e4d467224a9d7f1565fe9d895c4a40fda331824
2021-10-11 17:31:48 +05:30
Rash419
793bb33044 Fix: CI failing so added individual files
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Id9043f3e56e56457448f9362727d8b4f7facfbd4
2021-10-11 17:31:48 +05:30
Dennis Francis
ecec0dbd07 ctrl+wheelscroll: preserve mouse docpos when possible
From co-2021, we have information about page-area coordinates for writer
from core.  Use them to conditionally allow preservation of document
position where the mouse is.

* Preserve the y coordinate (unconditionally).
* Preserve x coordinate if the current view does not have margins. This
  is neccesary to avoid a jump at the end as writer will eventually
  re-adjust the page to the view's center after setting map zoom.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I9540d176198f1853de4051c5c3d7a964806f7c1b
2021-10-11 16:10:39 +05:30
Dennis Francis
1a822ada3b zoom animation for ctrl+wheelScroll
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I4e736bad0d43b5bf09dd9b336c4761312ab7ce1c
2021-10-11 16:10:39 +05:30
Szymon Kłos
c2e459edcf jsdialog: don't interrupt editing when focused input field
example: when chart editing mode is active and in sidebar
Title of a chart is typed. Before this patch focus was lost
after typing was started.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I26fd1bc5be2798edc671aed9a546e5bbeb17108e
2021-10-11 12:36:52 +02:00
Szymon Kłos
839f881f51 impress: show table move marker only if functional
when user enters edit mode with cursor visible inside table
we cannot drag the table

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iff44d6b67015638f7e65bc18cdc53e5ff666d023
2021-10-11 11:35:08 +02:00
Pranam Lashkari
68f5efb8d9 leaflet: remove annotation remnant on comment resolve
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I84f1dd0d75a6cf4ef002cc7d2dad31975594a319
2021-10-10 16:26:09 +05:30
Pranam Lashkari
f76207d85c leaflet: avoid console error for user avatar
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Iadc2659b4b020921976f6f2b1600c714ae7b2b1d
2021-10-10 16:26:09 +05:30
Gökay ŞATIR
433712531b Calc: Don't autoscroll to a negative value.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I425299b58929ac17621df85c8497e7e148ebcc0a
2021-10-09 18:25:56 +03:00
Gökay ŞATIR
1461471016 PDF View: Add a redraw after setting the selected part.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I9f1397fd568da31c4071014725c8171946fc434e
2021-10-09 17:10:13 +03:00
Gökay ŞATIR
962abf106a Mouse.js: Take outside of map into account while dragging.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Icdb0ab8bd7bae8bf81d22f09cfeeddf92b7d1436
2021-10-09 15:22:49 +03:00
Gökay ŞATIR
eff77c75ad PDF View: Improve _getMostVisiblePart function.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I877a2f5bac09bb81088b1aae9539cb0847f0fc50
2021-10-09 15:22:38 +03:00
Gökay ŞATIR
87b98a4b59 Add viewedRectangle global variable.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Id0f2afe8cc750d867a33dada7134f7b7d93a11c3
2021-10-09 14:19:49 +03:00
Gökay ŞATIR
60c2c3091b LOUtil: Add simple rectangle functions.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Id759647b5ea0ccca2e8bd652d72b857a950c8274
2021-10-09 13:55:24 +03:00
Gökay ŞATIR
95deee99a3 PDF View: Modify coordsIntersectVisible function for the feature.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I41fd740448efd5bb7fbc04bdc6aecbfaa7b2ecdc
2021-10-09 12:46:43 +03:00
Gökay ŞATIR
00af6ffe98 TilesSection: Add a function for manual testing.
Commented out code. Uncomment it when needed.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I825e26dbea52b5d5168b9bc18686c102a47fb967
2021-10-09 11:56:50 +03:00
Gökay ŞATIR
8bbfcc68ae PDF View: Improve "update" function.
There was a latency at loading the tiles.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Iec8bd6cf07e41b99f08b782dc3884c1e2a954eb7
2021-10-09 11:56:33 +03:00
Gökay ŞATIR
7472bffff9 Comment: Set a variable while focused.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I4c9cbfcd4762e15c8716881fba776e77dbc195c0
2021-10-09 11:07:54 +03:00
Gökay ŞATIR
2f03959700 CanvasSectionContainer: Add "targetBoundSectionListContains" function for window sections.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I73aedad90200a9adf5a8a24fbfe3593ccf593383
2021-10-09 11:07:40 +03:00
Gökay ŞATIR
beb21116c7 Calc: Handle cell selections while mouse is outside the map element.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Ie69fba81ddb3355a04b196bf6b81457ce7620819
2021-10-08 22:51:29 +03:00
Gökay ŞATIR
cd51e6dfa1 OnScrollBy: Fix bug.
Code from old implementation was forgotten to update.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I4d5090ebf6ac5fa0e9746e542c47c0e682160ba5
2021-10-08 20:36:37 +03:00
Szymon Kłos
74e302a99f Fix loop condition for detecting existing calc comments
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I805a7a0614f6c92935dc08d1e8a94c697769f276
2021-10-08 09:26:10 +02:00
Dennis Francis
e930675217 remove debug logs
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I64681e6e53516994f8fc296a59bb27b0153be1d3
2021-10-08 12:30:31 +05:30
Dennis Francis
04d708b951 zoomframe: use sheetGeometry to draw frames
Use sheetGeometry to transform the view coordinates for the chosen
zoom-level for the frame. However this is not done for the indivdual
tiles. As a result there could be small alignment descrepancies between
tiles and other stuff we draw using sheetGeometry such as grids and
overlays.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: If839997dda012f48e2c524643b5fd860e075320d
2021-10-08 12:30:31 +05:30
Dennis Francis
a9cd795f38 sheetgeometry: add methods to convert b/w core-pixels between zooms
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Id97d94f52aed00c8124e6604a5e14a5e350e0180
2021-10-08 12:30:31 +05:30
Dennis Francis
4da441528f zoomframe: use a score of available tiles than...
...missing to reduce error due to page-margins.
The error in score calculation can be made accurate if we use page
margins data into account. This is currently unavailable for
impress/draw apps.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I1a324766dddbd93b4a4f60089a81638357d242e8
2021-10-08 12:30:31 +05:30
Dennis Francis
2101424d22 zoomframe: best-zoom finder: special casing needed for draw/pdf
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Id04cdbc4abcb770dc0620d6480bca537beb88f15
2021-10-08 12:30:31 +05:30
Dennis Francis
60a909c3cc zoomframe: reduce jump: high zoom margin-less to low zoom with margins
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I51781ecc6234d6ded159900503ebb1f582609f40
2021-10-08 12:30:31 +05:30
Dennis Francis
383d612eb7 zoom-frame: source tiles of zoom level with max content
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I4b73bbb323f1b5b959ea624002d6abe0ededbea7
2021-10-08 12:30:31 +05:30
Dennis Francis
5a75148eba draw/pdf-zoomframe: needs special treatment of y coordinates
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ideee741be034e81e6632642667e55c50bad30a51
2021-10-08 12:30:31 +05:30
Dennis Francis
1ac50dadd8 zoomframe: draw grids before drawing tiles
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I0ec0cad30c6e9742fa3e0df08a34edb4b2d877ab
2021-10-08 12:30:31 +05:30
Dennis Francis
1f3d5e0a3e zoomframe: directly use tiles to draw zoom-frames
Move the zoom frame painting to tile-section.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I12590809fe80b32d3630b7fdbaeeb9d8f703f041
2021-10-08 12:30:31 +05:30
Rash419
a76680c24b cypress: fix: writer/annotation_spec.js failing for NB
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ibf80c954036cd98c0da09f45b3ff9ce13acc9e44
2021-10-08 10:50:56 +05:30
Pedro Pinto Silva
20e17bf757 Annotations: bubble: on hover change pointer
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I650e0fffee0a5d0767ca909e193b6f0086149b1a
2021-10-07 17:41:42 +02:00
Pedro Pinto Silva
242f00c8be Welcome dialog: mobile css class is always added
Be sure to only do that when on mobile

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I0a4f803ce50ceb950b4d9f0bbc38f5629218393b
2021-10-07 17:40:54 +02:00
Szymon Kłos
540a20675b First create UI then propagate permissions change
Our permissions change callback modifies the UI so
first we have to create the UI when reconnecting.

This fixes the bug when on pdf renaming notebookbar appeared
above menubar.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I37e462e240fe7dc7eba349c9f9fbcf01679b8fe9
2021-10-07 12:50:22 +02:00
Szymon Kłos
66ce15ddf8 canvas: refresh when view size modified
When on mobile we hide keyboard it was visible that
content "under the keyboard" wasn't refreshed.
So be sure we draw everything after we detected resized view
and we did all the view position setup keeping cursor on the screen.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: If9dc449415b14f5d71035bae190a16d85b3118c1
2021-10-07 12:50:22 +02:00
Dennis Francis
c288c92b2d eslint-ts: fix errors in TileSection.ts
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ibcbc9c5895df2ca5e43e25fb01af295d75238f45
2021-10-07 15:18:12 +05:30
Dennis Francis
46e7c3ade3 eslint-ts: fix errors in CanvasOverlay.ts
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I83a7bbdf2e7fb78e037ddc1a2ae99d8b9c5cff34
2021-10-07 15:18:12 +05:30
Dennis Francis
6d6b180638 eslint-ts: fix errors in CPointSet.ts
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ibe55ef2b73130dec0019883c9417dc5899f1cd35
2021-10-07 15:18:12 +05:30
Dennis Francis
0f1094fb38 eslint-ts: remove disable in CPolyUtil.ts and CSplitterLine.ts
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I0f6efe0be6b652afa2d9320db19219f831bb37be
2021-10-07 15:18:12 +05:30
Dennis Francis
3da2a527a4 eslint-ts: fix errors in CEventsHandler.ts
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I6eef30cbbf39f8e3edc4d1a81fa98798dd98d968
2021-10-07 15:18:12 +05:30