Commit graph

9805 commits

Author SHA1 Message Date
Tor Lillqvist
7585789456 tdf#128468: Make dragging the margins in the ruler work better in iOS app
Note that in this branch it seems even harder to touch a margin handle
in the ruler exactly in the right spot to be able to drag it. You will
have to use your smallest finger and point very exactly. And still it
works only sometimes. (But I did get it to work once, honestly, so
ship it!) This obviously needs to be fixed, but cherry-picking this
commit as is for now.

Several changes:

On iOS, use touch events instead of mouse ones. One difference between
touch and mouse events is that the touchend event naturally does not
carry any position information (as the finger has been lifted from the
screen). So we need to keep track of where the last touchmove event
happened separately in _lastPosition.

Letting go of a margin handle after dragging it did not actually move
the coresponding margin in the document. The fix for this was to catch
the touchend event for the this._rFace element instead of for the
this._map element.

Once a margin had been moved, it could not be moved another time. The
reason for this was that because the document initially is readonly,
the this.options.interactive was set to false (see the
L.control.ruler() call in loleaflet/src/map/Map.js) and never changed
after that. This caused _updateBreakPoints() to pass {perm:'readonly'}
in the call to this._changeInteractions(). The fix was to set
this.options.interactive to true when turning on the interaction.

In theory this same problem probably would happen also in web-based
Online on "mobile" (i.e. phones), but we don't show the ruler there at
all, so the sitaution where a document would be initially read-only
and the ruler would show up doesn't happen.

Reviewed-on: https://gerrit.libreoffice.org/83807
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit caf37fb293a666b0a82ac8bd31df35b18b45fc01)

Change-Id: I0393704d02a2989b4ea3358dc4bee17e48c16ae6
Reviewed-on: https://gerrit.libreoffice.org/84047
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-12-10 05:45:30 +01:00
Ashod Nakashian
50211a1e14 leaflet: resize the document-content properly when toggling the sidebar
Change-Id: Ia0066effc2b73c2b6312e015bd67d0c7d08f5e61
Reviewed-on: https://gerrit.libreoffice.org/84795
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-12-10 03:11:22 +01:00
mert
ba8efa4b32 Fix shape context menu brings dialogs on mobile
Change-Id: I0101242ebd2bf582093545e3f3abf88b01a043af
Reviewed-on: https://gerrit.libreoffice.org/84746
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-09 17:56:34 +01:00
Michael Meeks
9f5374103b prefetch: disable interval timer when we've pre-fetched everything.
Change-Id: I9d3b3819b3d9a960aa31f729686315e9e5d6d8e1
2019-12-09 16:37:23 +00:00
Michael Meeks
a3319eef79 prefetch: cleanup, and avoid constant growth of pre-loading area.
We were inadvertently mutating and growing our copy of the bounds
to fetch here, causing a chunk of un-necessary rendering load,
particularly for spreadsheets.

Change-Id: Ia01565c043d1cb0172cabbec16d941dd8b66dd05
2019-12-09 16:31:45 +00:00
Michael Meeks
21e4a62e32 zoom: while we are in a zoom animation use the target zoom, follow-on.
addresses more cases missed by 9afbe35d0d
which affect selection rectangles among other items.

Change-Id: Ib4d93f765eb39f7acaa8bbf19a21a910b03e4bb3
2019-12-09 15:59:45 +00:00
Szymon Kłos
2476b76506 jsdialog: send gradient color porperties
Change-Id: I404f92c76402ede4b042e6d913900a7e1c453243
2019-12-09 16:00:04 +01:00
Pedro Pinto Silva
33af2f483d Fix Insert Shape Palette scrolling issues
Change-Id: I98c141edbe88a74cf14453972494f29882aed23e
Reviewed-on: https://gerrit.libreoffice.org/84748
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
2019-12-09 14:43:33 +01:00
Szymon Kłos
48ee020d76 jsdialog: fix gradient angle spinfield
Change-Id: Ibe1008e8bf9081c7fccfa865574cb3bfcecb74ba
2019-12-09 11:13:17 +01:00
Szymon Kłos
3809b9ab6f jsdialog: remember last opened tab when rebuilding
Change-Id: Ia1c06275fade580c559cd4a96bf649a65c028af4
2019-12-09 11:06:23 +01:00
Marco Cecchetti
1683bd31de loleaflet: insert local image inserts image twice
That was caused by a doubled code line due to a backporting merging
error

Change-Id: I32db4f44f2f36d9551aa7b65379a9864443c3c03
2019-12-09 10:35:59 +01:00
Szymon Kłos
fdb8ef87e1 jsdialog: don't close on widget actions
It will be closed always on tap on the document instead
of on 'cursor change'. This will prevent us from hiding
mobile wizard when user performed some action (eg. bold)
and invalidatecursor message was received.

Change-Id: I18faedb2a6c6317c547c1ed149923380cce4aa52
2019-12-09 10:28:57 +01:00
Ashod Nakashian
333a49b6f2 leaflet: no need to setup events on updates
Change-Id: Ie34907230377b6d0f2e0729403b435028aac16ae
Reviewed-on: https://gerrit.libreoffice.org/84714
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2019-12-08 22:39:24 +01:00
Ashod Nakashian
d1da3ac1a2 leaflet: sidebar scrolling improvements
The browser has to move the sidebar to accomodate
scrolling, and this movement makes the sidebar
overlap with the document (specifically, the
scrollbar of the document) and causes other visual
glitches.

We now display a scrollbar at all times to make
the sidebar width fixed and also to avoid flickering.
This is the only portable/reliable way of avoiding
flickering/jumping-around due to scrollbar showing
and hiding. (Previously we had extra space in the
parent, but at least in Chrome it now always pushes
the canvas left when showing the scrollbar anyway,
so we gain nothing but having a thin margin on the
right, and we still got shifted left/right when
the scrollbar show/hide.)

Change-Id: Icbec841ffa4cec255e59f547530728f076d2877e
Reviewed-on: https://gerrit.libreoffice.org/84713
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2019-12-08 22:39:13 +01:00
Ashod Nakashian
70b8939688 loolwsd.xml: improve the description of server_name
Change-Id: I002d09e8bcccdea64eec3c804615ce678e4bb0e4
Reviewed-on: https://gerrit.libreoffice.org/84712
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-12-08 21:14:54 +01:00
Michael Meeks
9afbe35d0d zoom: while we are in a zoom animation use the target zoom.
Avoid race-condition scaling twips co-ordinates during a zoom to
a level that fails to match the core's understanding.

Fixes a race with other view's cursor positioning being reported
fast in new view twips, before the animation completes to that zoom.

Also fixes a writer zoom issue whereby you could get tiles at multiple
different zoom levels overlayed for parts of the screen when using
scroll-wheel zoom and panning fast.

Change-Id: I865920aa13715b852e14ab23f96781e076096808
2019-12-07 19:41:51 +00:00
Jan Holesovsky
3ecc73d37f android: Set only English as the supported language for now.
Change-Id: I55a66b8e8f83252267fb9959cf563bc584fe682d
Reviewed-on: https://gerrit.libreoffice.org/84645
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2019-12-06 23:35:55 +01:00
Jan Holesovsky
4ca81d1b2c android: Change the sort icon to distinguish it from the other.
Recommended by Pedro - thank you!

Change-Id: Ic4e0f42566a8d565d14c359cd479edf5ddc62525
Reviewed-on: https://gerrit.libreoffice.org/84643
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2019-12-06 23:35:49 +01:00
Tamás Zolnai
a184b2b812 This is not needed anymore.
Change-Id: I61c1e8eada01491ccdf1a43e030ec8d7229d9680
Reviewed-on: https://gerrit.libreoffice.org/84663
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-12-06 19:36:56 +01:00
Tamás Zolnai
b36d56bf5b Context menu wizard: wait a small time before showing context menu.
Otherwise a cursor invalidation can close the wizard just after
it is opened.

Change-Id: I3e153ca05a0902b9b2225bbb6169062b79eebdd0
Reviewed-on: https://gerrit.libreoffice.org/84648
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-12-06 18:15:46 +01:00
Tamás Zolnai
05f6b9cabe Menu wizard: move checked style to css.
Change-Id: I090cbee4b57276c6722772a72515a1cd69cdef5f
Reviewed-on: https://gerrit.libreoffice.org/84647
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-12-06 18:15:41 +01:00
Tamás Zolnai
fb12f82269 Context menus: Better to handle missing icon automatically.
When image can not be loaded we remove the icon span and
change the titleSpan's class to the non icon one.
Removed existsIconForCommand's parts which are added for
conext menus.

Change-Id: I4c3130646b30aab06fb07415c08eea828eadf8db
Reviewed-on: https://gerrit.libreoffice.org/84646
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-12-06 18:15:34 +01:00
Jan Holesovsky
6f49366f3c android: Disable OTG and Remote server for the moment, it's totally untested.
Change-Id: I64b7a5ded00fc9dd481972a13a4c3b169802498a
Reviewed-on: https://gerrit.libreoffice.org/84640
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-06 15:49:38 +01:00
Jan Holesovsky
1c8a31b33e android: Brand also the shell's About dialog.
Change-Id: I63b668ad92c688ec69818c058a787dbd94b5cc8b
Reviewed-on: https://gerrit.libreoffice.org/84630
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2019-12-06 15:46:04 +01:00
Tor Lillqvist
99a6839cb2 tdf#128468: Make the ruler show up in the iOS app on iPad
(cherry picked from commit 0868d19bb7598d45c86aae1bb66dfe5394926d5b)

Change-Id: I54b3f8470c1e91005633de26d6e8bb4edc39287a
Reviewed-on: https://gerrit.libreoffice.org/84046
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-12-06 14:44:56 +01:00
Andras Timar
b83610704b remove bundled LOKit headers
It was a source of confusion that these bundled headers had to be
synced with core all the time, and when it did not happen, the builds
broke.

Change-Id: Id9d0a8a496b293d20c39e855176a00bcb85df640
Reviewed-on: https://gerrit.libreoffice.org/84358
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-12-06 13:40:09 +01:00
Szymon Kłos
eff3aa96a2 jsdialog: refresh sidebar just after started
Temporary fix to allow showing of all widgets updated.
In the initial JSON some values or controls are missing.
This patch requests new JSON after current one was already received
to get updated one.

Change-Id: I74d0de7952d8ae8b86d8f6f9e9173e0a5b41b1c9
2019-12-06 12:32:06 +01:00
Miklos Vajna
b580a1eaf2 wsd: fix a typo
And disable a test that passes for me locally but fails on Jenkins.

Change-Id: Ifcdcedbac259247d784ce66185f95bfbe634381f
Reviewed-on: https://gerrit.libreoffice.org/84603
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-12-06 12:12:43 +01:00
Szymon Kłos
d4ca657470 jsdialog: scroll to the last seen position
Change-Id: I13beffad08521fc8606631ea780bf2d37bd1923b
2019-12-06 11:50:03 +01:00
Pedro Pinto Silva
adc46c7ab1 Mobile: Toolbar-up: checked state: Add webkit-only rule to fix weird behavior on some webkit browsers
Change-Id: Ia29bce6ab4e26c63d7f3bf25bb3750d680e7c022
Reviewed-on: https://gerrit.libreoffice.org/84607
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
2019-12-06 11:03:03 +01:00
Szymon Kłos
c6c49d52cc jsdialog: dont animate while restoring the last path
Change-Id: Ia8fc4c69318a5644b77cfef47f7f540f9ac37026
2019-12-06 10:45:56 +01:00
Szymon Kłos
49e1103067 jsdialog: scroll to last used element
Change-Id: I58f88ced08263fb1cad75c60937ba4e90a424bfa
2019-12-06 10:13:19 +01:00
Tor Lillqvist
ec686a3d5f Don't show a link for the product name in Help>About on iOS
The app's WKWebView is not configured to allow opening web pages, so
it won't work anyway. When clicking the link the app will crash with
"Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'Returned WKWebView was
not created with the given configuration.'"

Change-Id: Iac05b74087331d6f3a0405e76f4323316af4729a
Reviewed-on: https://gerrit.libreoffice.org/84595
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-12-06 09:33:56 +01:00
Tor Lillqvist
b28b310e6e There is no "server" in a mobile app
Thus no "served by" information to display in Help>About.

Change-Id: Ia4f91431536f5261c6cb0ee26398b9c33c0d0ea3
Reviewed-on: https://gerrit.libreoffice.org/84596
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-12-06 09:32:52 +01:00
Jan Holesovsky
f2d017a74a android: Fix crash on the 2nd editing start.
The failing scenario was reproducible on my old phone:

* start editing the document from the shell
* add a word
* leave the editing using the '<' in the top left
* start editing the document again => boom!

In the normali, non-crashing case, the order of destruction is that
~ChildSession is called first (and calls ChildSession::disconnect() that
consequently calls Document::onUnload() via _docManager->onUnLoad(...).
The Document::onUnload() then deregisters callbacks and all is fine.

The in the above described crashing case, the Document is destroyed
before ChildSession and calls resetDocManager() for all sessions.
Before this patch, this meant that the _docManager was set to nullptr,
leading to situation that later, in the ~ChildSession, the call of
onUnload() was avoided, the callbacks were not unregistered, and later,
on the next document load, the app crashed because it called stale
callbacks.

I suspect the change might be useful even for the non-mobile case, but
not 100% sure, so rather do it MOBILEAPP-only.

Change-Id: I279a160ccaab3080e84fe0437ed72684331b6e13
Reviewed-on: https://gerrit.libreoffice.org/84588
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-06 09:30:04 +01:00
Miklos Vajna
b5f78fe73d Convert some Calc tests to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Also, in UnitLoad, give up on trying to avoid the sleep after
disconnecting, it seems the old condition was not reliable.

Change-Id: I972a3319887a70eeea2585104ed1e762830ca505
2019-12-06 08:51:51 +01:00
mert
c1788f94f8 Remove buttons that open popup menu on quickbar
Change-Id: I7fc0a633d1ba7488469caa486ff5f12d800bd6e7
Reviewed-on: https://gerrit.libreoffice.org/84400
Reviewed-by: Mert Tümer <mert.tumer@collabora.com>
Tested-by: Mert Tümer <mert.tumer@collabora.com>
2019-12-05 19:49:21 +01:00
Pedro Pinto Silva
1747d08974 Calc(desktop): Formula bar: Hide bottom blue line
Change-Id: If2547d8065d4158cffa8bee62ae78fc020e0b2b6
Reviewed-on: https://gerrit.libreoffice.org/84567
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
2019-12-05 15:02:04 +01:00
Marco Cecchetti
4c3ef4c504 move shapes palette from vex dialog to mobile wizard
Change-Id: I76e136140e9268706f53ffc799703bbc72f70099
2019-12-05 13:44:45 +01:00
Miklos Vajna
5bf3fc86be test: fix UnitLoad::testConnectNoLoad()
Depending on timing, this failed with the following error:

wsd-14400-14411 [ docbroker_001 ] WRN  Will not load document marked to destroy. DocKey: [/tmp/connectNoLoad_27c61e41_hello.odt].| wsd/DocumentBroker.cpp:520

Make sure we don't try to load the same document again when the cleanup
for the previous session is not done yet.

Change-Id: I354999fa934df665b48dca314d2b77ab95c84ec0
2019-12-05 08:48:32 +01:00
Szymon Kłos
709b81246d jsdialog: temp fix color picker
Before other content was still visible after user entered color picker.
But still we will need container with id for updates of colorpicker
later.

Change-Id: Id7cb9d3a77afa6e2a226250f10917fcd454d15dc
2019-12-04 17:07:28 +01:00
Pedro Pinto Silva
3aa715260d Toolbar: background color and text color: Color appears now as a bottom stripe
Change-Id: If338b10ce3e117a8f43b9bb920820c3d1de324af
Reviewed-on: https://gerrit.libreoffice.org/84415
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
2019-12-04 14:58:41 +01:00
mert
8af06d13fa Make quickbar color buttons open mobilewizard
Change-Id: I44f2f6d29b2d9830068cb37d6ab4975f8d971778
Reviewed-on: https://gerrit.libreoffice.org/84396
Reviewed-by: Mert Tümer <mert.tumer@collabora.com>
Tested-by: Mert Tümer <mert.tumer@collabora.com>
2019-12-04 12:07:52 +01:00
Michael Meeks
74af92df9d restore all zoom levels to the calc zoom pop-up.
Change-Id: Ib524d89c2059e23f5e42580141ee54b5fead0a33
2019-12-03 17:46:59 +00:00
Jan Holesovsky
e8b5f75ebe mobile: Don't show the user list in the native app.
Change-Id: I71df72e420f27e5bd10487a70545f24a5d93269b
Reviewed-on: https://gerrit.libreoffice.org/84365
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-03 17:22:00 +01:00
Ashod Nakashian
86a80a4cca wsd: handle http forbidden response from wopi put
Change-Id: I597e949cd1bea612400d623f30ea260036253e89
Reviewed-on: https://gerrit.libreoffice.org/84360
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-12-03 16:02:16 +01:00
Henry Castro
ca4fc29754 loleaflet: android: call a javascript interface, slideshow method
NextCloud Android Application is detected with the JavaScript Interface
"RichDocumentsMobileInterface" and the slideShow() is called when the
full screen slideshow is applied

Change-Id: I2559a1cdf452e77147892eddcde21ca472ef632e
Reviewed-on: https://gerrit.libreoffice.org/84118
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2019-12-03 15:00:27 +01:00
Jan Holesovsky
799cb25c06 android: When I want to quit, I mean it.
I hate when apps make it hard to exit them.

Change-Id: I31c73a70fff6a87512debc95cbd31ef0ba8c1f62
Reviewed-on: https://gerrit.libreoffice.org/84354
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-03 14:53:35 +01:00
Jan Holesovsky
d7fb42008c android: Don't crash in the shell's About dialog.
Change-Id: I12a7fcc789299f9b4efa035bb665afc6c89c04cc
Reviewed-on: https://gerrit.libreoffice.org/84353
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-03 14:52:49 +01:00
Jan Holesovsky
814a0c49ef android: Allow full version specification.
Change-Id: I2da4a7d1fc63cfd0df10a7e32f123af82e8be461
Reviewed-on: https://gerrit.libreoffice.org/84329
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-03 14:52:00 +01:00