Commit graph

6707 commits

Author SHA1 Message Date
Szymon Kłos
168871e579 mobilewizard: hide cancel and help buttons
Change-Id: I6d9d42f5f31f19b6a0cd00803cc350fcac32d505
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 09:19:27 +01:00
Szymon Kłos
c9c7e90e33 mobilewizard: show all elements from previous level
When going back to the root level show not only headers.

Change-Id: I86d91f03b6f9aaa1ce14fb9ccbb567a62fb4fb15
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 09:19:27 +01:00
Szymon Kłos
34aed8e94c notebookbar: don't switch if context is the same
avoid unwanted switch to home tab

Change-Id: Ie58ac122233a638d3b7743f4e4de433d960b7e1d
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 09:19:27 +01:00
Szymon Kłos
2a8e4e5f99 notebookbar: alignment fixes
Change-Id: If7f775806720af6e3221f4b90d32b4386c58beb2
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 09:19:27 +01:00
Szymon Kłos
d81758206d notebookbar: keep insert annotation in insert tab
Change-Id: I03415aaafabc626204583ffd5cddd76998a41ef4
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 09:19:27 +01:00
Szymon Kłos
5c6481d86d styles preview: use flex layout
with inline-block with many styles there were
empty spaces

Change-Id: I5752b26694b630e871b26a1fd7044db58808ccfe
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-15 09:19:27 +01:00
Gökay Şatır
477e40f065 CanvasSectionContainer: Improve dragging feature.
Allow dragging event even when the mouse is outside the document.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I2b871e9a7556b465d55aa0d1b50ac9f489246d17
2021-03-13 19:29:14 +03:00
Dennis Francis
3df4ac53fe avoid branches for manual vs transform()/translate() APIs
In commit 64dc25f70 a new branch of coordinate transformation was
introduced to avoid breaching the coordinate limits supported by
canvasRenderingContext2D.transform(). But this caused additional burden
on testers by forcing them to test all branches and made the code harder
to maintain.

It is straighforward to implement the features of
transform()/translate() that we need and use them always and not rely on
those apis. This is what the patch implements.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: If690a254b44fb4e6ca9a5536785de6f3310413d8
2021-03-12 18:10:48 +05:30
Dennis Francis
a35b137d9d zoomanim: do not draw overlays on headers when...
there are no freezes active and view is anchored on A1.

Description of the fixed issue:
Open a blank sheet in mobile Calc. Make sure the cell A1 is
full visible, place cell cursor on A1 and zoom in a bit. The cursor
rectangle now is drawn incorrectly over the headers for every zoom
animation frame.

Description of the fix:
The root cause is that the clip area in this situation is incorrectly
set since the conditional assumes that the pane is a fixed one as its
top left is (0, 0) which is not correct when there are no active
freeze.So set the clip area to the correct rectangle derived from the
computed transformation like it is done for any free-pane.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I827e7992acaa56e60e1938fc83b566d7adb8a30c
2021-03-12 18:10:48 +05:30
Pranam Lashkari
4bc6e2e900 leaflet: annotation: wizard: added insert comments options
added insert comment option in comment wizard titlebar
added option to add comment from empty wizard state

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I2d30483d586ce798bc3d77b3b47c7ab26eebe684
2021-03-12 12:32:27 +01:00
Pedro Pinto Silva
d7c1c388d2 leaflet: annotation: wizard: no comments: improve layout and style
- Add proper html structure
- Add style to communicate that his is a empty state and thus different
  from the regular mobilewizard view
- Add icon
- Fix alignments and sizes
- Add suggestion as action (insert comment)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I9815efe1a5b96862dba9d0e4c5863b5975132596
2021-03-12 12:32:27 +01:00
Pedro Pinto Silva
a4ca812257 leaflet: annotation: wizard: style context menu for mobile
- Bigger targets
- Add existent icon or create for better mobile scanning
- Improve layout

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iccfdfb3d02e3c4ee148fdcfa05ba3c0a320a6c78
2021-03-11 14:33:18 +01:00
Dennis Francis
b51cc9ce62 fixes: ghost pages/tiles in writer
The issue is: On creating a page break on a empty writer file and
hitting backspace, the deleted page or parts of it is still rendered.

We get a 'status' message containing the document size every time it
changes. So avoid the issue do not draw tiles that are not within the
document area.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I88d1715e861f068326d28d2930d01e3b5355be02
2021-03-11 18:16:40 +05:30
Gökay Şatır
38ca7df677 CanvasSectionContainer: Improve mouse wheel handling.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Idd57b97f75e7f5732617b9d2e96927317498d699
2021-03-11 15:38:42 +03:00
Dennis Francis
8896f06411 avoid incorrect overlay painting due to big document coordinates
canvasRenderingContext2D.translate() and friends only seem to function
with numbers < 2^24, at least on Chrome 89.

So when the pane being drawn where this limit is hit, lets do the
translation ourselves.

But in the case of zoom-animation more complicated transformations are
needed. Till we implement the manual matrix transformations correctly,
lets not animate overlay objects when the view area has hit this limit.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ib48d6029ba1c6f1d7ade35060baf4ebe3e0a5fd3
2021-03-11 15:10:04 +05:30
Pranam Lashkari
fa92410c1d leaflet: annotation: wizard: indicate in wizard if there are no comments
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I312dd93cce463293c1a237c96d0d18c10f6d4a84
2021-03-11 10:05:28 +01:00
Pranam Lashkari
e3fa8bafcd annotation: fixed error on annotation insertion in impress
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Id12b3e422fcb7970241535345f3e90271ede42eb
2021-03-11 08:45:28 +05:30
Pedro Pinto Silva
a1134c8cd9 Mobile: Comment (annotation) layout improvements with grid
- Position the number of replies near to the chevron to indicate what
that is supposed to do.
- Reply counter gets the same color as its icon

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Idd692f40f5f3420d7577147e8ca7bcf306e59899
2021-03-10 16:44:36 +01:00
Dennis Francis
5e33750de5 clear canvas before painting async non-calc tiles
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I642c0efdbe2c5d0492406b0e180ba5c15578d36f
2021-03-10 17:14:50 +05:30
Dennis Francis
0c8e11b7d3 redefine desktop calc view position on zoom
The view area after zoom is computed by the following rules:

1. If there are not edit cursors or it is out of view, anchor on the
   top left cell.

2. Else, compute the new view area w.r.t top left cell, but if the edit
   cursor is not in that resulting area, translate it such that edit cursor
   is just inside the closest edge of the final view rectangle.

Notes:

As part of the implementation the default behaviour of view scrolling on
cursor msg was disabled while the new view area is being set.

If there was an active edit cursor to start with, ensure it remains the
same way. This is acheived by replaying the last print twips cursor
messages after the new view area is set.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Iaada6ec1f4a06f7ad05dec759e702bd37240dff8
2021-03-10 17:14:50 +05:30
Dennis Francis
78cec95d77 calc: call refreshViewData() on section initiated map scroll
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: If1383f4d845f4b3a77e0a21b8af5f5d8378bfc8e
2021-03-10 17:14:50 +05:30
Dennis Francis
2577342e1b avoid body/tilepane bg implicitly setting the border of toolbar
by setting a top padding of right amount.

Before the patch the top border of toolbar "appear" white on the part that
intersects with row-headers and it was gray where it intersects with the
document content(tiles). These were due to the background of body and
tile-pane div respectively.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ia3b95d41ea150d815469498e3e2044d7e1d36a4d
(cherry picked from commit 66416be43980205dea1a2addefbf5954e013c3cc)
2021-03-10 17:14:50 +05:30
Dennis Francis
51c178d060 overlay: translate mousepos to doc coordinates
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Iae9222a6704a2f8fdb2c1dc2347bc5106d458bff
2021-03-10 17:14:50 +05:30
Dennis Francis
ce70646b61 factor out and generalize latlng->layerpoint computation
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Ie983003dfd8cb7e7093fcfe5374bb31ed2f5995b
2021-03-10 17:14:50 +05:30
Dennis Francis
a186f4ea90 include dpiScale for viewcursor and references
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I99b12cd6a1500136dca9c339c4a5cf8624aebe41
2021-03-10 17:14:50 +05:30
Dennis Francis
743ccdd370 set pen position for all path initiated drawings
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Iab1c9defa417b03232a53024eaa6f52232244d87
2021-03-10 17:14:50 +05:30
Gökay Şatır
46aa9ed6cc ScrollSection: Improve scrolling with touchpad.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I831df582ec21aa040f6af2df7b5e6c4f8883c988
2021-03-10 12:27:19 +03:00
Pedro Pinto Silva
36ecadffe7 Add missing image for connectortoolbox
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ib3a7a99ccab6b5ad70234cf56e6573fea1eb56e7
2021-03-09 15:16:20 +01:00
Szymon Kłos
051460559d Don't steal focus from inputs in calc
Change-Id: I03647e328949c30f132a6f88af2e302743ef606f
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-09 14:08:25 +01:00
Szymon Kłos
0a5c8011e9 Don't steal focus from annotation in calc
When CellCursor command result arrives we focused
the document what caused annotation closing.

Change-Id: Idf2eb8c5b3b0049dd0aeb7c82cca80083b304698
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-09 14:08:25 +01:00
mert
a63a08223f Hide selection handlers when cursor is active
Dragging is impossible when cursor is active so
displaying them only leads to confusion

Change-Id: Ib0586ce6ac38354b84076972e01be136f7ec66f9
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-09 09:59:20 +03:00
Michael Meeks
07885e2f2b copy/paste dialogs: stop propagation to avoid confusing the document.
Previously a 'click' on 'start download' - also resulted in a pair
of mouse down/up events getting sent to the map, the TileLayer, and
thus the core - resetting the object selection during the download,
and causing nasty issues in the second 'Confirm copy to clipboard'
which had a different & random selection depending what was under
that popup.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I7f6510494500dd36beb232e4720a66f2d9e09f27
2021-03-08 22:16:22 +00:00
Szymon Kłos
864b761684 jsdialog: don't scroll whole page
scrollIntoView scrolled whole page inside iframe
when selection in the fontwork dialog was changed

Change-Id: I40f59c1821d1327aaf6ce910e07587f0dcb5af31
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-08 17:40:24 +01:00
Henry Castro
fe3135e49c jsdialog: fix line breaks for 'multiline' control
Change-Id: Id3213519a9224ee0287b5dfdd0251230e4c5f00e
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-03-08 16:32:12 +01:00
Szymon Kłos
486152f400 notebookbar: draw file tab
show only .odg and .pdf formats in file tab

Change-Id: If95d871d0ec546569a3ccb0334b9acbd971a9f86
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-08 16:24:23 +01:00
Pedro Pinto Silva
a00e20ad50 Vex input field: ensure box-sizing
to avoid padding affecting otter size anywhere

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I45122bbb27d37de3bfb15f201c10a4888f2ff5c2
2021-03-08 14:41:56 +01:00
Pedro Pinto Silva
c9ff69c2f5 Mobile: Fontwork: Shape: Fix alignment and make it more dynamic..
- center main div
- set minimum size for children in %
- make sure everything is centered

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iab199dca2a4907ca7292cc8b56cf6535b3013c0d
2021-03-08 14:41:56 +01:00
Pedro Pinto Silva
52d2b02297 Mobile: Fontwork: treat 'Same Letter Heights' as a main btn
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I20f44fb6b653073226cfe13be0b3c70bdfd77ba2
2021-03-08 14:41:56 +01:00
Tor Lillqvist
e20db7c18b Guard against JS error when there is no "children" in the notebookbar JSON
I saw that happening now and then when experimenting with the Insert >
Comment functionnality in the iOS app. The message in those cases
seemed to be 'jsdialog: { "id": "0", "jsontype": "notebookbar",
"action": "close" }'.

Change-Id: Ia8e07f849f88bb46cedd95f7c38534232c388efe
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-03-08 14:36:09 +02:00
Tor Lillqvist
e142d26a2f Don't use CollaboraOnlineWebViewKeyboardManager after all
Unclear whether it is actually useful or not any longer. Quite
possibly cross-platform changes in the JavaScript since
CollaboraOnlineWebViewKeyboardManager was introduced have fixed the
problems that it was solving.

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

Change-Id: Ifa000d0a7d0a3dc87527536719063b368266f038
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-03-08 14:00:38 +02:00
Szymon Kłos
0d2578a66d notebookbar: border style dropdown
Change-Id: I3cc064410fad613984c8e2e531b0e77f2810adaf
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-08 10:19:06 +01:00
mert
c6e4b260da Hide presentation button for Draw
Change-Id: Iaef6f2a405e0e55b082e303447fa9377a0ec96d0
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-08 11:19:21 +03:00
mert
dda2550eb4 Draw: Display Presentationbar for Insert/Duplicate/Delete Pages
We have these on the Top toolbar but in notebookbar case
We have only insert and duplicate options and they are
located in Insert tab. So deletion is not possible
with notebookbar. This patch re-enables presentationbar
with the correct hints of these items according to the doctype

Change-Id: I885b6353bce82232cfdfb5577f8cfbee16b219c7
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-08 11:19:21 +03:00
mert
1546799bfe Fix Slide Sorter does not update on Draw
Change-Id: Id8612ebbcb725b3c03ff6c2262c48c0f42544754
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-08 11:19:09 +03:00
Szymon Kłos
74cc7d0278 Don't show blinking cursor when no focus on document
Change-Id: I6dd2ba0a88eff71870dc608ba6d961c9d0f7a67f
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-08 07:34:51 +01:00
Andras Timar
f939aef0ba typo fix
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib43f1112170ca4d66e8127644e22e3f7c17f10e4
2021-03-07 20:25:32 +01:00
Pranam Lashkari
2482fde532 leaflet: cursor: avoid first character not updating cursor position
problem:
In the android keyboard when you try to erase in an empty area
and then enter some character,
The first character will likely travel with the cursor,
And that is caused because after entering the first character
cursor position is never updated by keyboard (I know it is strange)
so here we manually correct the position

steps to reproduce:
1. type "=sum" in formula bar or an empty odt (or even just "=s" is okay)
2. now tap on backspace for total character +1 times (in this case 5 or 3 times)
3. now type "=s" it will become "s="
but this can be reproduced with any special characters (i.e: }, + etc...)

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I9cc00e5d50d21384155b16b60318090e4de70ac2
2021-03-06 15:43:34 +00:00
Michael Meeks
ea4d208636 calc: double click on sheet tab to rename.
Change-Id: I13833ac5c6292dbf1b7589ae390125ae02be4e05
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-03-06 08:51:22 +00:00
Szymon Kłos
4d8c4451bb Don't allow to switch ui mode on mobile
Changing ui mode on mobile causes problems eg. after save as
or reloading the document.
We don't support notebookbar on mobile also

Change-Id: Iaa8d80dbdd139833c0505354be870f33b4f95413
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-05 15:19:43 +01:00
Andras Timar
dc12fc8c11 add Vietnamese l10n
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ie8958f58422f6553ba15230c2fbc80ea25962d4b
2021-03-05 12:39:05 +01:00