Commit graph

7968 commits

Author SHA1 Message Date
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
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
Dennis Francis
540c013ce6 eslint-ts: fix errors in CPath.ts
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ie53e3011c7e1eaaa39b87e89f24034151ff0af39
2021-10-07 15:18:12 +05:30
Dennis Francis
1750c5d47d eslint-ts: fix errors in CPolygon.ts and CPolyline.ts
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Iaca1fdc6d6292ac972d988d6825c8b662e235d41
2021-10-07 15:18:12 +05:30
Dennis Francis
a3084b5998 eslinit-ts: fix errors in CRectangle.ts
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I110e04c060d91721e2da8abbf18319891e844be5
2021-10-07 15:18:12 +05:30
Szymon Kłos
f0e0407892 mobile: don't focus document when dialog opened
On mobile in hamburger menu > search when we focused input field
the focus was set to document so when user started typing we
received new characters in the document instead of input field.

Also it doesn't trigger showing the keyboard when 'next' button
is clicked in search dialog.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I89ee39ad99f7f250e04e20d7f297e16fd7c75dd4
2021-10-06 19:19:38 +02:00
Jan Holesovsky
92335ce71c Translated using Weblate (Czech)
Currently translated at 100.0% (457 of 457 strings)

Translated using Weblate (Czech)

Currently translated at 100.0% (457 of 457 strings)

Co-authored-by: Jan Holesovsky <kendy@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/cs/
Translation: Collabora Online/Help
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9b85bcc064738fdc70fa5ec33b2804d082600efc
2021-10-06 17:19:14 +02:00
Leif-Jöran Olsson
e393064bbd Translated using Weblate (Swedish)
Currently translated at 100.0% (457 of 457 strings)

Translated using Weblate (Swedish)

Currently translated at 74.6% (341 of 457 strings)

Translated using Weblate (Swedish)

Currently translated at 64.3% (294 of 457 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (5 of 5 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (110 of 110 strings)

Translated using Weblate (Swedish)

Currently translated at 54.0% (247 of 457 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (395 of 395 strings)

Co-authored-by: Leif-Jöran Olsson <info@friprogramvarusyndikatet.se>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-app/sv/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/code-welcome-text/sv/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/sv/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/sv/
Translation: Collabora Online/Android app
Translation: Collabora Online/CODE welcome text
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I3987e574f5adb7e7256c80d2eaf308d4cd05c2cb
2021-10-06 17:19:14 +02:00
Lars Kirschmann
6e4cb1428f Translated using Weblate (German)
Currently translated at 92.7% (424 of 457 strings)

Co-authored-by: Lars Kirschmann <lars.kirschmann@icloud.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/de/
Translation: Collabora Online/Help
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I1e561a550297410d4ed103ebdda4b8089a716c56
2021-10-06 17:19:14 +02:00
Joan Montané
bf99e8b615 Translated using Weblate (Catalan)
Currently translated at 100.0% (457 of 457 strings)

Translated using Weblate (Catalan)

Currently translated at 100.0% (395 of 395 strings)

Translated using Weblate (Catalan)

Currently translated at 99.3% (454 of 457 strings)

Co-authored-by: Joan Montané <joan@montane.cat>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/ca/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/ca/
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Iac55920d1fb5c986c8af88fab7f40e4b632c05b6
2021-10-06 17:19:14 +02:00
Adolfo Jayme Barrientos
23df34e536 Translated using Weblate (Spanish)
Currently translated at 99.5% (455 of 457 strings)

Translated using Weblate (Catalan)

Currently translated at 99.3% (454 of 457 strings)

Translated using Weblate (Asturian)

Currently translated at 10.2% (47 of 457 strings)

Translated using Weblate (Spanish)

Currently translated at 93.8% (429 of 457 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (395 of 395 strings)

Translated using Weblate (Catalan)

Currently translated at 100.0% (395 of 395 strings)

Translated using Weblate (Asturian)

Currently translated at 48.1% (190 of 395 strings)

Co-authored-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/ast/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/ca/
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: I816783c997b5a1ca85ece3493ac5ff838693a5c6
2021-10-06 17:19:14 +02:00
george kitsoukakis
a87b58e6b5 Translated using Weblate (Greek)
Currently translated at 100.0% (22 of 22 strings)

Translated using Weblate (Greek)

Currently translated at 93.2% (426 of 457 strings)

Translated using Weblate (Greek)

Currently translated at 99.4% (393 of 395 strings)

Translated using Weblate (Greek)

Currently translated at 95.4% (21 of 22 strings)

Translated using Weblate (Greek)

Currently translated at 100.0% (110 of 110 strings)

Translated using Weblate (Greek)

Currently translated at 98.1% (108 of 110 strings)

Co-authored-by: george kitsoukakis <norhorn@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-app/el/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-lib/el/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/el/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/el/
Translation: Collabora Online/Android app
Translation: Collabora Online/Android lib
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib59a0aa2d47cf0c0004703008ef46bdf9165f1e1
2021-10-06 17:19:14 +02:00
Sveinn í Felli
d1e3fd04fe Translated using Weblate (Icelandic)
Currently translated at 71.9% (329 of 457 strings)

Translated using Weblate (Icelandic)

Currently translated at 70.2% (321 of 457 strings)

Translated using Weblate (Icelandic)

Currently translated at 100.0% (395 of 395 strings)

Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/is/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/is/
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I04f69dab7edcfe7d13b1f617ef9e2c3bd12e014d
2021-10-06 17:19:14 +02:00
bruh
5a75c3f798 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (395 of 395 strings)

Co-authored-by: bruh <quangtrung02hn16@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/vi/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I597ad7d41a535d8c3978aaf02f43ecf272a14c39
2021-10-06 17:19:13 +02:00
Martin Srebotnjak
1b12bdb6e6 Translated using Weblate (Slovenian)
Currently translated at 100.0% (395 of 395 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: Iea31d59974db65490ed61f3f4971758518800631
2021-10-06 17:19:13 +02:00
SC
df6cc1bfca Translated using Weblate (Portuguese)
Currently translated at 100.0% (395 of 395 strings)

Co-authored-by: SC <lalocas@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/pt/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I5cba8cdc83b6443c76d6baf25415c1675ee0e3e6
2021-10-06 17:19:13 +02:00
Stanislav Horáček
2572dc2ed6 Translated using Weblate (Czech)
Currently translated at 100.0% (395 of 395 strings)

Co-authored-by: Stanislav Horáček <stanislav.horacek@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/cs/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I94312ce1ab9ff105c6bd97bc3cc934fe3f238c3f
2021-10-06 17:19:13 +02:00
Yaron Shahrabani
123b22deb6 Translated using Weblate (Hebrew)
Currently translated at 63.6% (291 of 457 strings)

Translated using Weblate (Hebrew)

Currently translated at 59.5% (272 of 457 strings)

Translated using Weblate (Hebrew)

Currently translated at 100.0% (395 of 395 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/he/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/he/
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I3086bc396e3610c151a89cb03918f14d921edd04
2021-10-06 17:19:13 +02:00
Pedro Pinto Silva
8e706399f6 Notebookbar: Do not set items at 32 px
Update bigtoolitem outdated CSS rule

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ie74c3a2d9226804eb9469cfa0d9cc25aa6bd2487
2021-10-06 11:05:48 +02:00
Dennis Francis
8ddfc39f41 sheetgeometry: do not ignore fields with empty strings
For instance groups field can be "" to indicate there are no groups and
ignoring this is a bug if there were some grouping in the previous
uno:sheetGeometry message. This also adds a Mocha test for this.

The issue was originally caught by the cypress group/ungroup tests.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ib64009e62d510772d5f523378b713a71cf9cccc6
2021-10-06 14:00:22 +05:30
Dennis Francis
3c1f19ac36 allow easier debugging of sheet-geometry tests
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I8cc71d663d5a44602389e63cf858ba9ca6d52e0c
2021-10-06 14:00:22 +05:30
Dennis Francis
3c046b6d3f sheetgeometry: minimize memory footprint for SpanData
Adding redundant data to the spanlist does not give us any speed
advantage and they can be provided via the public interface SpanViewData
whenever requested.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ifd402f4c2d20aa69c9dd34c2f73ba619f5a5d574
2021-10-06 14:00:22 +05:30
Dennis Francis
ecd2292c99 add Mocha tests for SheetGeometry data-structure
All public methods of SheetGeometry class now have tests.

TODO: Add tests for component classes of SheetGeometry. For instance
SheetDimension's interface are directly used in drawing headers, so we
need tests for them.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ifab2acea51cf30e6cf1437d9983e6678b4074c38
2021-10-06 14:00:22 +05:30
Dennis Francis
f42bc037f5 mocha: easier running of a specific test
While adding new mocha tests, it is helpful to run and debug just those
tests.

For instance to run the unit test file for SheetGeomtry, now this is possible by running:

$ make build-tests && npm run test-single -- mocha_tests/SheetGeometry.test.js

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I730f79409c05b5ea67fa42c5d0b58cc2f92e238a
2021-10-06 14:00:22 +05:30
Dennis Francis
9707f50331 migrate L.SheetGeometry and dependencies to typescript
(No functional changes)

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I11cddd6c0026ae0bc62ee7e0a93cd7b426971a55
2021-10-06 14:00:22 +05:30
Dennis Francis
358fdf174c replace redundant CPoint/CBounds with cool.Point/Bounds
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ifff10e41d8737907685939dca3c34dd855517c3b
2021-10-06 14:00:22 +05:30
Dennis Francis
8131b99573 Avoid L.Util usage in Point.ts and Bounds.ts
Without further TS migrations, this is necessary to tests these using
Mocha.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ia92bb0cd3e750d668790635e11935f49d8227ec6
2021-10-06 14:00:22 +05:30
Dennis Francis
918f8c922f migrate L.Point and L.Bounds to typescript
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I76966a5f1bc055fcaee4f45a0e11174c89f9bdd3
2021-10-06 14:00:22 +05:30
Henry Castro
0053cbb90e loleaflet: ensure to create doc previews when ..
Impress document layer is created

Change-Id: Ibeec49486f7d57bfb77c9dc7446f520487b5dcf4
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-10-05 14:41:47 +02:00
Szymon Kłos
56a07bad4d jsdialog: don't use uno command for split button
fixes#3323

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0ff73d33c833ec9670be35c8e1c685d44b94abe5
2021-10-05 09:32:10 +02:00
Tor Lillqvist
d47e8e7f2c Drop the "Full Screen" menu entry from the hamburger menu in mobile apps
The functonality is not implemented in the mobile apps, and it is hard
to say what it would do anyway.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ibf14c2018603c79a8297e0ffaf5e6450f9b97431
2021-10-05 10:27:32 +03:00
Tor Lillqvist
f8e25b80eb Do not show the "Full Screen" in the shortcuts bar in mobile apps
The functonality is not implemented in the mobile apps, and it is hard
to say what it would do anyway.

Fixes https://github.com/CollaboraOnline/online/issues/3294

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I7ec9df56c24d9c6486641e8feffca2350210d52e
2021-10-05 10:27:32 +03:00
Szymon Kłos
dc967ee426 jsdialog: avoid visible position change on start
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic6c63bb3b1381505b79632b83d2b1fd7b00e59e4
2021-10-04 13:45:33 +02:00
Henry Castro
2f4ba38aae loleaflet: show "Reconnecting..." indicator
Change-Id: I92dce54e9032695f00f27b0180a8ab46861fad8b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-10-04 10:08:58 +02:00