Commit graph

9330 commits

Author SHA1 Message Date
Michael Weghorn
c1e04e4069 scripts/unocommands.py: Switch to python3
Files not explicitly opened in binary mode are text files and thus
expect a 'str' arg for their write() method.

Python 2 is nearing its EOL and e.g. Debian has already
removed the python2-based 'python-polib' package previously
used here from its testing distribution.

I checked that running the commands

    ./scripts/unocommands.py --update . ../libreoffice
    ./scripts/unocommands.py --translate . ../libreoffice/translations
    ./scripts/unocommands.py --check .

still yields the same results as previously.

Change-Id: I39e1785d3c78416009420dd4c2be58bd1c3647c3
Reviewed-on: https://gerrit.libreoffice.org/81422
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Tested-by: Michael Stahl <michael.stahl@cib.de>
2019-10-24 14:07:47 +02:00
Pedro
411c5d79b1 mobilewizard: add style to selected vs unselected items in item-list
Change-Id: I520fed4f732ff77cf5d597de438051faa1279557
Reviewed-on: https://gerrit.libreoffice.org/81447
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-24 13:40:05 +02:00
Pedro
dfc2eebe54 Add mobile-ready vertical scroll and disable horizontal scroll
Change-Id: I7504b9c9fbba19a5bfe79f137df79df1f9e9431a
Reviewed-on: https://gerrit.libreoffice.org/81378
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-24 12:56:18 +02:00
Pedro
9e790e53fc Style color-picker and add icons; move rules to mobilewizard.css
Change-Id: Icc8261c9ef138ea5ea4869296a156c0b860e983b
Reviewed-on: https://gerrit.libreoffice.org/81335
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-24 12:55:20 +02:00
Szymon Kłos
30b0749051 jsdialogs: add class for selected combobox entry
Change-Id: Ie3f49ae983d0aef8a821f5dc52094c07c902e436
2019-10-24 11:42:39 +02:00
Szymon Kłos
75d6cdbf9c jsdliaogs: girds reorder & combobox icons
Change-Id: I29855a3ec5367c01675bb40da2fde92d2b402ab2
2019-10-24 11:32:22 +02:00
Henry Castro
298cffd6b6 loleaflet: apply a border style when the "valueset" item is selected
When the user selects an item (touch), the LO server updates and send
selected data to apply border styles.

Change-Id: Ic6f877712514806b822d70342738ee04ae2ea0a8
Reviewed-on: https://gerrit.libreoffice.org/81419
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2019-10-24 02:10:22 +02:00
Henry Castro
3d576a07de lolefalet: send command when the user touches an item on the layout menu
sidebar of the impress document

The client side sends the JSON string:

{
  id: "sd::LayoutMenu",   // control id in sidebar LayoutMenu
  cmd: "selected",  // Selection action
  data: "3"  // item id,
}

The LO core server receives the data and execute actions to the
correspond control child.

Change-Id: I066b804a63f48fe04e9c691da928e186b573f8c2
Reviewed-on: https://gerrit.libreoffice.org/81168
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2019-10-23 19:35:38 +02:00
Marco Cecchetti
4c80e125f2 loleaflet: color picker: add a specific class for selected basic color
Change-Id: I6af2cf744db0dd33e1c604fd88972434e244d48d
2019-10-22 14:27:18 +02:00
Szymon Kłos
ec2cd78bcb jsdialogs: change event message to JSON
- also differentiate set(editfield) from change (checkbox) event type

Change-Id: I76d69f29cbe84368770d308f7cfd15c828bd8a89
Reviewed-on: https://gerrit.libreoffice.org/81312
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-22 14:19:54 +02:00
Pedro
23e71b56ac Fix how formula input looks on Firefox and Firefox mobile
Change-Id: Idb362dde1872f2ed934f67d349eb1693c6c9c074
Reviewed-on: https://gerrit.libreoffice.org/81257
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-22 14:04:24 +02:00
Pedro
837e72e7ab Hamburger menu: Add missing icons and optimize svg
Change-Id: I17aad9d0ceb6d37eb99992b7f21f701a74257609
Reviewed-on: https://gerrit.libreoffice.org/81317
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-22 14:01:49 +02:00
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