Commit graph

4678 commits

Author SHA1 Message Date
Ashod Nakashian
0e5a75c46b wsd: exit the kit only when no more sessions exist
Change-Id: I26cd8876fd564f537dac4fb1748aee5b4dbdff04
Reviewed-on: https://gerrit.libreoffice.org/33114
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-16 01:43:08 +00:00
Ashod Nakashian
dea8c03912 wsd: no need to have the lock when notifying
Change-Id: If19aac3d52b45b0b0efc143885b933669d8a1198
Reviewed-on: https://gerrit.libreoffice.org/33113
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-16 01:36:00 +00:00
Ashod Nakashian
dcc0dc441e wsd: headers and formatting
Change-Id: I2bd62379cf1008a809638354b618bd2383a316c2
Reviewed-on: https://gerrit.libreoffice.org/33112
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-16 01:35:37 +00:00
Tomaž Vajngerl
724cac1d97 fix Chrome Android and Firefox Android text input
- Change from textarea to input (type="text") to prevent Firefox
to auto-capitalize.

- Clean the text input content after each word so that the soft
keyboard spellcheck suggestions are correct and that backspace
doesn't delete long IME suggestions before it has effect.

- Workaround on Chrome Android 'space' and applying spell-check
corrections.
2017-01-15 23:59:21 +01:00
Tor Lillqvist
3d18b6558d Revert "I assume these plus signs were accidental slips of the finger"
Thet are intentional.

This reverts commit c31425e4e2.
2017-01-13 17:47:49 +02:00
Jan Holesovsky
4416c836d0 Log the time in wall-clock time, instead of since the process start.
Otherwise we are getting completely confused times - various processes start
at various times, so for one process the epoch start can be eg. 20 minutes
later than for the other.

Change-Id: I6d87e98682a5fcd0348a584cf66f7ffa5813ca66
2017-01-13 16:14:13 +01:00
Pranav Kant
35e904ecf9 loleaflet: Don't focus on map if search is going on
... and part is changed.

Change-Id: Icebcfc9924a6891787d08476ba37a0174ae9b67d
2017-01-13 20:33:45 +05:30
Pranav Kant
64835bec90 loleaflet: Allow search expansion as you type
Change-Id: I648721a0ed9e4d66db45956657398a4834ac45ce
2017-01-13 20:33:45 +05:30
Pranav Kant
582bfbeb7f Update path
Change-Id: Ic0654f64ee5ba9e4678cca42ceea4a5958a01c66
2017-01-13 20:33:45 +05:30
Tor Lillqvist
c31425e4e2 I assume these plus signs were accidental slips of the finger
Change-Id: Ic227f40d1ba71cef388719ef10dfcf4d9f172caf
2017-01-13 16:23:18 +02:00
Tor Lillqvist
b8897ea295 Avoid pointless breaking up of the one same Util namespace in parts
Also, indent the nested rng consistently.

Change-Id: I551c8d0faa78446edf6cad746ca0f9193096f3aa
2017-01-13 14:55:01 +02:00
Tor Lillqvist
11ae90cfcb No Hungarian notation please
Change-Id: Ia624de45a792db7e39f2245aaea7d940b30b0db2
2017-01-13 14:52:08 +02:00
Tor Lillqvist
04bdf8d623 Bin unused code
Change-Id: I71b7a5f8d769e033b489ae5ea0fbd4425db2184e
2017-01-13 14:14:36 +02:00
Tor Lillqvist
40e5a66701 No double colon in English text;)
Change-Id: I3e25a5e1be8672a7796a71a28c2979a30ab326a3
2017-01-13 13:39:10 +02:00
Tor Lillqvist
591fc02384 No Hungarian notation please
Change-Id: I0701dfbecb0b6056c0453d83bac9e85a98eff366
2017-01-13 13:37:00 +02:00
Tor Lillqvist
ba733ffad7 Prevent accidentally having duplicate loolwsds on same port, new approach
Before setting up the socket where we listen for client requests, try
connecting to the same port. If that succeeds, another loolwsd process
is already running and listening on that port. That is obviously
undesirable.

Yes, there is a race condition if multiple loolwsd processes are
started simultaneously and do this check before any of them have
actually created the socket. Live with it. Multiple loolwsd processes
is a problem that happens accidentally for developers only anyway. In
a production environment systemd takes care of having just one, I
hope.

Thanks to Kendy for the idea.

Change-Id: Ifdde83472f9a56e592ec5dc7649dd7706efc2f7c
2017-01-13 13:32:10 +02:00
Pranav Kant
9a4aba717a loleaflet: Remove this hamburger <-> closebutton animation
Change-Id: I0c5a4ad2ee0b1d7041091d54c21f538c1a2912f8
2017-01-12 21:45:47 +05:30
Pranav Kant
456afb50bd loleaflet: Move closebutton to menu bar option in mobile mode
Change-Id: Ie6b9f507862e36ada44fda88acd96b1b495ae002
2017-01-12 21:38:13 +05:30
Pranav Kant
9b564af003 loleaflet: Set toolbar-up-more width to auto in low screen width
Change-Id: I10c41630da3a3003db1663bea211b42335f468c8
2017-01-12 21:38:13 +05:30
Pranav Kant
17e2d42e9e loleaflet: Remove useless rule
This seems to be superfluous. w2ui library automatically set the
width of the toolbar overriding this value always.

Change-Id: Ia87018533f99769ef1dc48463ac58d32cbf40d9d
2017-01-12 21:38:13 +05:30
Pranav Kant
21d3ef8c33 loleaflet: right padding for hamburger option menu
Change-Id: I1d946f537e66d637e82354ff3af80353a930d8eb
2017-01-12 21:38:09 +05:30
Pranav Kant
77b27255f1 loleaflet: No need of resizebreak now
... as we have a mobile mode now where we remove drop downs
anyways.

Change-Id: Ic08634d25d6a3ae272e50642f34d2124c0472bf5
2017-01-12 20:30:30 +05:30
Pranav Kant
54e2b237b6 Position row/col headers absolutely inside header frame
... so that its easy to move all of it when we switch from mobile
mode and vice versa.

Change-Id: If2db351aafc4a8fefa05bc88f73c0046a3f887b8
2017-01-12 19:41:04 +05:30
Pranav Kant
15ed828698 loleaflet: Put row column in a container
Change-Id: Ib271a690783c51d19e3fd6c1634620740051e3bc
2017-01-12 19:29:55 +05:30
Pranav Kant
c20ff7adda loleaflet: Collapse to a single row in mobile mode, more doc space
Change-Id: Ic6ad9dd78e8710497e33069cd7121f31f240f035
2017-01-12 19:29:55 +05:30
Pranav Kant
fb967d998b loleaflet: Use tab here, not space
otherwise our linting tool will shout.

Change-Id: Ia43b0a4bfc3a1d3406a89e9bb71b05f884cce2a2
2017-01-12 19:26:03 +05:30
Pranav Kant
8afcc582be loleaflet: Avoid a race condition
There was a race condition here between our toolbar doing its
stuff and loolwsd sending us websocket messages, noticeable on
slow networks.

Change-Id: I5ae174e94561dd427d22389e443c80b2a6be4ec4
2017-01-12 19:10:12 +05:30
Pranav Kant
fd619e969e loleaflet: Override fontsize in lo-menu class
We want to be consistent with our font in whole of the UI.

Change-Id: I102e66411e4fad8d2d49c1b113ac250807716a12
2017-01-12 17:07:07 +05:30
Tor Lillqvist
13fcb10f91 Do the oldhash thing for Impress documents, too
(Copy-pasta here, too.)

Change-Id: I0327889d05a8d7294499849cb0a2b2dcca60ecff
2017-01-12 13:14:55 +02:00
Tor Lillqvist
b35d708006 Bin superfluous semicolon
Change-Id: I2319ef9badfa50f645af3bedd2a589de61f6d2b3
2017-01-12 13:14:55 +02:00
Pranav Kant
fac3c3aafc loleaflet: Move this logic to updateCommandValues()
Change-Id: I64e96f87e56c1b14dd2085d552eebd40977cd7e9
2017-01-12 16:44:36 +05:30
Pranav Kant
1566ae634d loleaflet: Update dropdowns on refresh everytime
Change-Id: I39071f1c6249e6ecf71684d3b93cc88f1f859510
2017-01-12 16:37:31 +05:30
Pranav Kant
905b077243 loleaflet: Don't hide prev/next buttons for calc
Primary reason we are bringing it back is because in mobile mode
userlist icon goes to the right most edge of the screen which
leads to userlist popup not being shown (which seems to be the
bug in library we are using)

Change-Id: Ie5b93c41f54ffeeb8615f90fa0e71c74de5ed92c
2017-01-12 16:37:31 +05:30
Tor Lillqvist
e8f55142ef Do the oldhash thing for Calc documents, too
(Some serious copy-pasta here.)

Change-Id: Icb5a7b6783b75d67f00cfbdccbba8c402008ff99
2017-01-12 12:26:13 +02:00
Tor Lillqvist
6370143a4b Slight re-factoring: introduce getParameterValue() function
I started changing the cases for all the parameters to use similar
code as for the 'hash=' one: Check the parameter name with
startsWith() instead of fragile substring() function call where the
length parameter must match the length of a string literal that the
substring() result is compared to.

But then I got bored and gave up. It would be even better to not have
to tediously check for all defined parameter names, but instead just
parse each parameter using the same code that sets the property whose
name we found. Except that we have special cases where the parameter
name in the protocol doesn't match our coresponding property name, and
those that consist of a list of comma-separated values.

Maybe we indeed should just switch to JSON (or some binary
representation of JSON or somesuch).

Change-Id: Ibcdb26d7228b75f6f23c186f0b17cb46a12f3cec
2017-01-12 12:11:16 +02:00
Tor Lillqvist
23db565b5b Add Emacs mode lines
Change-Id: I208407f3017f71a4dfb2b86055a9bc639ee2f23c
2017-01-12 12:11:16 +02:00
Andras Timar
76d365651d Update translations from Pootle
Change-Id: I4e765cbf6793f2563230cd17d3d90ab4161d8ccd
2017-01-12 10:38:56 +01:00
Tor Lillqvist
bc19f90dd4 Don't send a tile that hasn't changed even if client asks for it
The server tells the client the hash of each tile it sends (calculated
from the contents of the tile, not its PNG encoding). When the client
asks for a tile to be refreshed, it tells the server what the hash of
the existing tile is. If the server notices that the tile contents
hasn't actually changed, it doesn't PNG encode it and doesn't send it
to the client.

The intent is that this will reduce load on the server and also avoid
unnecessary tile traffic.

Change-Id: Ia06ca68655ea984ed4319f24f4470afda322eccf
2017-01-11 23:25:21 +02:00
Tor Lillqvist
29fc49acf2 Bump the message first line abbreviation limit to 500 characters
If we are logging a message, we want to see the first line of it in
its entirety if possible. Especially now with more parameters being
added to tile messages, 120 was not enough to see the added
interesting ones.

Bin the silly test that used knowledge of what the limit is. We should
not test a coindidental arbitrary number that is not a documented part
of an API. If we want to test the default abbreviation functionality,
we need to at least make that default limit (now 500) public in
Protocol.hpp.

Change-Id: Iea59ba46e8331e2a839c792146f123fed9df2b82
2017-01-11 23:25:21 +02:00
Tor Lillqvist
d12a0258d8 Add Emacs mode line
Change-Id: I5ba2b8d5bc3c8b9b75fd357224422079f7ec91f9
2017-01-11 23:25:21 +02:00
Pranav Kant
3233ccee4c loleaflet: Mobilify the statusbar
Reduce userlist text to now only show the number of users in
mobile mode instead of 'x users' string. Drop the 'Document
saved' string notification.

Change-Id: Ife20a5fcea01301601912c734dae6c3d6504c4f5
2017-01-11 20:14:26 +05:30
Pranav Kant
11ed522806 loleaflet: Mobilify for less than 768, not less than equal
Change-Id: I3c499e847674e57ba33859459ace794ff1b97c57
2017-01-11 18:34:46 +05:30
Tor Lillqvist
7d7e5a4bfe Remove assert as this function can also be called with a non-empty output vector
Change-Id: Idff29a5bd298ada7b6d8fe3e76fd2e25d8f25c79
2017-01-11 14:02:40 +02:00
Tor Lillqvist
2eb40ab43c Drop an unneeded (and defaulted) parameter
Change-Id: I788080db53507604accd97dacc2d74e614b80641
2017-01-11 13:44:57 +02:00
Tor Lillqvist
3f7cca78eb Indentation fixes
Change-Id: I72010aeff7fb65f9dc18613d0cfc53b5154e07c1
2017-01-11 13:44:57 +02:00
Pranav Kant
d6af42eae0 loleaflet: Remove items from statusbar in mobile mode
Change-Id: I8dbc356a2968764c72edf401d33399c92f9f73e4
2017-01-11 17:05:38 +05:30
Pranav Kant
aa7ef0337c Fix specificity and hide slide sorter for smaller screen width
Using !important always is not a good idea. You can't override an
!important with another !important and we have started to face
such situations now where we want to adjust element's alignment
based on media-screen width. Instead lets fix the specificity to
make this work.

.parts-preview-document or .spreadsheet-document would be
0-0-1-0. Use #document-container.parts-preview-document to
increase its specificity to 0-1-1-0 so that we can do without the
!important flag and use !important flag for media-screen blocks.

Change-Id: I1d15df492cdc7cd1cd09c3b43c8ea84295a07205
2017-01-11 17:05:38 +05:30
Pranav Kant
b34f5a38a2 loleaflet: Wrap slide sorter and related refactoring
Slide sorter and presentation toolbar are now contained in a
presentation-controls-wrapper and alignment values are now
factored out and only present in the container now.

Also, position the presentation-toolbar absolutely outside of
container so that slidesorter scrollbar doesn't go behind the
toolbar hindering some view of the slide thumbnails.

This would also make the job of hiding/showing the whole control
easier.

Change-Id: I080e854906ef0635aba02cfeb687bf87463ef756
2017-01-11 17:05:38 +05:30
Pranav Kant
90d48ee3c4 loleaflet: Fix close button alignment
Change-Id: I0a63229f37e0ea1c8e3c770afac0527890c328e1
2017-01-11 17:05:38 +05:30
Pranav Kant
b8fae54184 loleaflet: On touch devices, don't disable dragging
Change-Id: I722070a7768d89b7b861df4afc37f68098ca9321
2017-01-11 17:05:38 +05:30