Commit graph

9518 commits

Author SHA1 Message Date
Marco Cecchetti
02fe006ead loleaflet: color picker: on open show the tint set with selected tint
Change-Id: Ia69b40aac7287a9472050733e032abc600175bd5
2019-10-22 13:50:57 +02:00
Aron Budea
443ed3274f lokit: fix order of functions
74ce4a9261 introduced a
different order than in core.

Change-Id: I4d601e1fcd3028c7bbe9d0119c15193fe1db1f35
Reviewed-on: https://gerrit.libreoffice.org/81270
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Tested-by: Aron Budea <aron.budea@collabora.com>
2019-10-21 20:20:45 +02:00
Marco Cecchetti
202de19585 loleaflet: use an svg icon as selection marker for sample tints
Change-Id: I2e94f0f65a8e7fc0e4883bca855ab23b77c96df8
2019-10-21 18:31:15 +02:00
Marco Cecchetti
e5035a3911 loleaflet: color-picker: selected basic color handled through css only
Change-Id: Ie23513a7f8246f92be08f7fde2d6b74ee3547a09
2019-10-21 18:31:15 +02:00
Pedro
7684aa029e Fix and style Follow editor overlay when on mobile
Change-Id: I30acf95f7cc8a7f274b031cc77cdace8b73e9918
Reviewed-on: https://gerrit.libreoffice.org/81233
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-21 15:13:39 +02:00
Pedro
d7b4a92550 Disable tooltips when on touch devices
Change-Id: I2a87a275b361fc2b81722bd25f09fd0f1baffcda
Reviewed-on: https://gerrit.libreoffice.org/81044
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-21 14:39:44 +02:00
Pedro
5618561d30 Add more icons to the hamburger menu
Change-Id: I2c85a67c80edd4c00222a1a1725cd07a4abb7fb8
Reviewed-on: https://gerrit.libreoffice.org/81051
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-21 14:39:18 +02:00
Szymon Kłos
ac15c8616a jsdialogs: setup spinfields events
Change-Id: I5597b8d981e25a79eb6eb6ee7e2595d06a7eb0e9
2019-10-21 13:34:53 +02:00
Marco Cecchetti
4b6807f6b9 loleaflet: comments layout improvements
This patch fixes the following problems:

1)
- create a document with several comments
- pan so that the comments are visible and the commented text is not
- tap on a comment box: no scroll action is performed for getting the
commented text visible

2)
Writer: in a document with a single page and a few comments,
clicking/tapping on a comment box doesn't align it with the commented
text since it is not possible to scroll the document (it is already
fully visible - it's made by a single page) and the comments are not
scrolled up/down.

Change-Id: Iaedbe9a89b5f45c322c5f9405960017cd7054e8e
2019-10-21 12:41:05 +02:00
Marco Cecchetti
91a8eccd27 loleaflet: update comments layout on pinch to zoom end
This patch mitigates but does not solve completely a problem that
seems to affect especially iOS devices when the user performs a pinch
to zoom the comments layout is not updated.

Change-Id: I04a0e91c11d07744653b6a25ffb553d22249bcb3
2019-10-21 12:41:05 +02:00
Marco Cecchetti
144089e639 loleaflet: not forward mouse events to core when user tap on a comment
For instance on Writer that causes the text cursor to be moved to a
new position.

Change-Id: I92082b7d0a3b512e0ceaabcea8592d09d0da27be
2019-10-21 12:41:05 +02:00
Marco Cecchetti
62e1d9ad82 loleaflet: writer: comments layout: comments overlaps
The selected comment can be placed far away from not selected comments
so the intersection could be empty, better to check for the y
coordinate only.

Change-Id: I2f649521bc5de44c89cbb61f76e6930aa5ccfe96
2019-10-21 12:41:05 +02:00
merttumer
271889bf05 Fix screen jumps away when inserting comments
Signed-off-by: merttumer <mert.tumer@collabora.com>
2019-10-21 12:41:05 +02:00
Szymon Kłos
721b9ad7d6 Avoid errors on non existing objects
Change-Id: Iacf082eb356dcd0f1e52bf5c7f024d7143990655
2019-10-21 12:41:05 +02:00
Szymon Kłos
6ed4f372f9 Don't jump to the previous pages when inserting a comment
Change-Id: I4d1573cd42b10388ee0265177a4c477c3a9b347d
2019-10-21 12:41:05 +02:00
Ashod Nakashian
7eba8628b5 leaflet: scroll to bring the selected comment in view
Change-Id: I15888b55cd3fef266e5a7f2bedf04bdf153b6d4d
2019-10-21 12:41:05 +02:00
Ashod Nakashian
d35508a38a leaflet: the comments area is never scaled
extraSize is fixed because the comments are never
scaled themselves, so we shouldn't scale the extraSize.

This fixes the issue with not being able to see the
comment boxes fully, even when scrolling to the far right,
when the screen width is too small.

What happened with small screens is that the document
zoom factor (and hence the dimensions scaling) kicked
in and zoomed the document out (< 1 scaling factor).
So when we scaled the extraSize needed by the comments,
we reduced their available width and since the
comment boxes aren't scaled they were left outside
the document and outside the reach of the user.

Change-Id: I57df55963b6119d5dde878bf3e1c3ffe984b7c43
2019-10-21 12:41:05 +02:00
Ashod Nakashian
cb520986e7 leaflet: misc minor improvements
* map may not have hasLayer defined during
initialization, so we protect against it.

* Show the inner html elements of the comment
boxes before showing the comment itself (smoother
UI experience).

* Reorder getBounds call first to short-circuit
early.

Change-Id: I0235d43d19c1b712df266d6e39738b1415c5d048
2019-10-21 12:41:05 +02:00
Ashod Nakashian
3a6f66817b leaflet: corrections
Get the coordinates from the first visible
annotation box, not the 0th.

Change-Id: I134369ed69653f34c365dca3acd84e8fc2ccbc13
2019-10-21 12:41:05 +02:00
Ashod Nakashian
db0d017051 leaflet: correct floating-point equality comparison
The ieee 754 supports multiple representations
for the same mathematical value (such as 0 and -0).
Worse, because not all numbers can be represented
exactly, mathematically identical numbers will
not be equal (such as 0.1+0.2 != 0.3).

The proper way to compare floating-point numbers
is, therefore, to use the epsilon.

It was observed through debugging that often
we triggered layouting of comments even though
their coordinates hadn't changed, because the naive
!= comparison returned true. Also was observed
that when checking for (0,0) coordinates, sometimes
our value would be -0, which again the naive ==
comparison yields false.

Change-Id: I246fe02d3db4132bd1d7e7a1761d8a9ae1686fb2
2019-10-21 12:41:05 +02:00
Tamás Zolnai
ff07323154 Not possible to unselect a comment by tapping on the document (mobile)
Copy-pasted the code used for desktop case. See _handleDOMEvent()
method.

Change-Id: I9e6c160dab74c7b837fa775e69e3ac0684faad69
2019-10-21 12:41:05 +02:00
Tamás Zolnai
c17ffdf327 Writer: Adding comment doesn't focus popup, typing adds text to document
Call focus on the input field of the comment dialog after everything is
set. This focus call is also made by vex.dialog.open() method, but
the focus is lost by the modifications done after the open method.
Mobile only.

Change-Id: I6a8b9105a0682141d9cad12e3aeb41fd0efeecc5
2019-10-21 12:41:05 +02:00
Marco Cecchetti
9a1cdfbd41 loleaflet: check that the file object is reliable
Change-Id: Id46910c92e3e128295735ed6bd78ee2bf29c2617
2019-10-21 12:41:05 +02:00
Marco Cecchetti
8d55ef0675 make user aware about the cause of insert file failure
Change-Id: Ia6079e09d084ef1722a1852f56d5be44b6ed0b31
2019-10-21 12:41:05 +02:00
Marco Cecchetti
26a2f552c0 loleaflet: handling server errors when uploading a file to server fails
Change-Id: I910833e23cf448697f20cb8e8173c151a11d65bf
2019-10-21 12:41:05 +02:00
Marco Cecchetti
8a9502a98c loleaflet: re-enable date localization for calc
It seems it causes issues on IE11 but I can't see any problem after
performing some tests

Change-Id: I6da24a97f55aee3a41a05cb835fff0f04abd4036
2019-10-21 12:41:05 +02:00
Marco Cecchetti
84bc57c4d3 loleaflet: headers/scrolling can become messed up on adding a new sheet
scroll up to 200, enter some text, add a new sheet, headers, grid
lines are wrong, swicth back to the previous sheet, now headers and
document position are wrong too

Change-Id: If9d59b5509584e92491bbce4b8db54ec5308b211
2019-10-21 12:41:05 +02:00
Marco Cecchetti
dcbf91b597 loleaflet: calc: wrong index passed on appending a new tab/sheet
The wrong index prevented the execution of the code in Map.setPart
since `part < docLayer._parts` check failed.

Change-Id: I3077ffb68decc464e19ff7d54468ba5582bdc21e
2019-10-21 12:41:05 +02:00
Marco Cecchetti
96136d6111 loleaflet: timeout for triggering 'press' event increased to 500 ms
That has been done in order to avoid to trigger the context menu too
early; so the user can start panning in a relaxed way.

Change-Id: I64657efd55649584be74c96a31fbe2199a25f91a
2019-10-21 12:41:05 +02:00
Marco Cecchetti
fce665f604 get spelling context menu on long press
This patch handles a new flag attached to the invalidate view cursor
message for informing the client when the text cursor is inside a
mispelled word.
This information is used for popping up the spelling context menu on a
long press event instead of the standard context menu for a selected
word.

Change-Id: Idf5994c022d66369f05f13b8549994155c9fad18
2019-10-21 12:41:05 +02:00
Marco Cecchetti
ac4173d8e1 loleaflet: lowering the minimum zoom level
...  so that slide are visible on smartphones

Change-Id: I73d9ed8f74a8e88fa1f6a93ee58897511ef1daa5
2019-10-21 12:41:05 +02:00
Marco Cecchetti
b6edfc5421 loleaflet: fix redundant press events generation
Selection handlers dragging is not handled through hammer so the event
handlers registered for hammer need to be disabled on dragging start
and enabled on dragging end: this is done by invoking
TouchGesture.removeHooks and TouchGesture.addHooks, anyway
TouchGesture.removeHooks didn't remove the 'press' event, while
TouchGesture.addHooks was adding a new 'press' event handler every
time the selection handler dragging ended.

Change-Id: I557beae1ac66fd2095b996e08dcf2eac611d216a
2019-10-21 12:41:05 +02:00
Marco Cecchetti
115264c765 loleaflet: select long touched object before triggering the context menu
for selecting text we need to simulate a double click, anyway for a
graphic object a single click is enough, while a double click can lead
to switch to edit mode (not only for an embedded ole object, even for
entering text inside a shape);
a similar problem regards spreadsheet cell: a single click moves the
cell cursor, while a double click enables text input;
in order to avoid these cases, we send a single click and wait for a
few milliseconds before checking if we received a possible selection
message; if no such message is received we simulate a double click for
trying to select text and finally, in any case, we trigger the context
menu by sending a right click;

Change-Id: I16722b5f1208b9bb22c613a8417c9c34ac310033
2019-10-21 12:41:05 +02:00
Marco Cecchetti
5ce03e8d1b loleaflet: avoid to have jquery context-menu in a dirty state
sometimes online receives several messages from core for the same
context menu: that probably leaves the jquery context-menu in a dirty
state, causing to not update it correctly with the new menu entries

Change-Id: I45356670978a8e8eb2c1ef5e32276b08d5042c41
2019-10-21 12:41:05 +02:00
Marco Cecchetti
9c60354fda loleaflet: hard coded product name substitution
Change-Id: I408531859503322e3dd8d73a84c0546f369aa4dc
2019-10-21 12:41:05 +02:00
Marco Cecchetti
8913d1bf2c loleaflet: mobile: avoid cursors/handlers aren't made visible after zoom
So in same case pinch event is triggered even on a single tap. In that
cases the _onPinchEnd animation fails causing to not change
cursors/handlers opacity back to 1, for that reason I pushed a patch
which move the animation stuff to the end of _onPinchEnd and moreover
I even check that the center parameter is really defined.

Change-Id: I1f1c98fb3ad056aa14ee5657e2f5f1cf489789eb
2019-10-21 12:41:05 +02:00
Marco Cecchetti
5800eaa66e loleaflet: hide text cursors and handlers on pinch to zoom
Change-Id: I8592d7d2bcd249cda26f769d232f17f977dc78cd
2019-10-21 12:41:05 +02:00
Marco Cecchetti
ceb3dc8785 loleaflet: mobile: search bar improvements
Change-Id: I64882620c99beadef6acfa6647083a12d96b1e9f
2019-10-21 12:41:05 +02:00
Marco Cecchetti
1309cdea7d loleaflet: search-bar for mobile device
Change-Id: I5acb79d5bb81470aa76ce51b3e81c44909ae80e5
2019-10-21 12:41:05 +02:00
Marco Cecchetti
c4075298fb loleaflet: limit mouseout event to constrained dragging
When drag a shape or image very quickly, the mouse pointer can get out
of the dragged object causing an unexpected drag action end.
So better to limit the mouseout event only where it is really needed.

Change-Id: I68fa596c17be0c80112ea755f446e6705e07f81a
2019-10-21 12:41:05 +02:00
Marco Cecchetti
d0fb7d1f4f Revert "suppress mouseout even when dragging a graphic selection"
This reverts commit 1e044a40aa.

The mouseout issue is going to be fixed by a cheery-picked commit:

"loleaflet: limit mouseout event to constrained dragging"
2019-10-21 12:41:05 +02:00
Marco Cecchetti
df7e77415f loleaflet: change-annotation navigation through prev/next command
Change-Id: I4ea33e38a947d3b93b716d5f9080c91db1daf7fa
2019-10-21 12:41:05 +02:00
Marco Cecchetti
0ee3bc5c70 loleaflet: fix: redline annotations are not displayed
Change-Id: I8aaa330667f1e06506f74ee9de1611aa32f45a82
2019-10-21 12:41:05 +02:00
Marco Cecchetti
eca2a7ce4d loleaflet: fix: can't drag images between pages
The problem seems to be that the preview arrives with a not so small
delay, when the user has already started to perform a new dragging:

1) the drag starts using the transparent rectangle to which is
attached (on drag start) the _onDragEnd handler
2) the user sees moving only the selection rectangle
3) the svg preview arrives in the middle of dragging overwriting the
transparent rectangle element
4) when dragging ends _onDragEnd is not invoked since the transparent
rectangle has been discarded in favor of the svg preview

It is possible to avoid the step (3) to occur by checking if the
dragging is already started. In this case _onDragEnd is invoked and
the TransformDialog UNO command is sent. So, even with a delay the
image position will be finally updated.

Change-Id: Ifefd46f470b090089385083e4e2d643eb8e7017c
2019-10-21 12:41:05 +02:00
Miklos Vajna
1bff9e7bf8 Convert load torture testcase to a new-style one
So that they are in-process, which means it's easier to debug when they
fail.

Change-Id: I6b33887fbe8dd6071ee767f24d4776a694fb62f7
2019-10-21 09:04:12 +02:00
Andras Timar
03ee39a082 add kit/Watermark.hpp to dist tarball
Change-Id: I40eda4254657f0c92fa9bc5038416d2d3359ba6b
Reviewed-on: https://gerrit.libreoffice.org/81097
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-10-18 21:52:53 +02:00
Henry Castro
bbeebfc0aa loleaflet: remove unused loleaflet/src/images directory
All the images that WSD serves are located in loleaflet/images.
I forgot to remove the directory loleaflet/src/images that it is not
used now.

Change-Id: Idc7fcd62666f4120e97f25ad305a555a358e89e2
Reviewed-on: https://gerrit.libreoffice.org/81066
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2019-10-18 17:46:24 +02:00
Henry Castro
389f05af1c jsdialogs: add valueset control handler
The LO Core server sends data items of the valueset control.
For Example Layouts items of the Sidebar in Impress Document,
this item need to be transformed into an element inside of
mobile wizard dialog.

Change-Id: I2ce166aee62ebd075edde5b91f62c0591ee5a0a1
Reviewed-on: https://gerrit.libreoffice.org/81054
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2019-10-18 16:49:16 +02:00
Szymon Kłos
22a16ebfd9 jsdialogs: go to the same place on refresh
Change-Id: Ie10c66e114c661af38ce8b85a308e2abde96d6b4
2019-10-18 16:23:36 +02:00
Grzegorz Araminowicz
a9f8c321a2 hyperlink dialog div class
Change-Id: Iee2c260c940b15c9729eca37e9f04060bfbaa2e9
Reviewed-on: https://gerrit.libreoffice.org/81043
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-18 15:06:19 +02:00