Commit graph

2888 commits

Author SHA1 Message Date
Pranav Kant
ffd230e1f9 loleaflet: Use same font-family wherever possible
"Segoe UI", Tahoma, Arial, Helvetica, sans-serif; 12px

Change-Id: I8927c31ca4641eaa3181e4f76bac2e112893fcd8
2016-05-23 13:41:38 +05:30
Pranav Kant
3d266a4d60 loleaflet: More consistent styling to match LO desktop
Selection background color is now consistent across context menu
and menubars.

Don't change the cursor to 'pointer' in context menus on hover.

Change-Id: I25d1fcba113f2c27a8ab6d028244afd75c28cd59
2016-05-23 13:41:38 +05:30
Pranav Kant
461d88e38d loleaflet: Fix errors in new draggable table grid toolbar button
Change-Id: Ic5c1ecbe0753017ad4b4c57ef74ae28d724c00a4
2016-05-23 13:41:38 +05:30
Faruk Uzun
5846748e2a loleaflet: add draggable table grid button to toolbar
You can insert tables to text documents and
it is working same as the desktop version.

Change-Id: I5d516e31c8b7453ca7f8306df3b9c17764e94098
2016-05-23 13:41:38 +05:30
Pranav Kant
acfb9922d5 loleaflet: menubar: Decrease separator height
Change-Id: I3c96bbc227ba911861e5d13902ad4f8dbb414549
2016-05-23 13:41:38 +05:30
Pranav Kant
8717b0417e loleaflet: Change 'Table' menubar structure to match LO
... useful for translation.

Change-Id: If3116351ea5b29c2cae866a7ac417c074ac35043
2016-05-23 13:41:38 +05:30
Pranav Kant
033ec74523 loleaflet: Disable menubar items according to context
Change-Id: I9c2918827eebfa033a3745a57299ba556015a2bb
2016-05-23 13:41:38 +05:30
Pranav Kant
17b3748a52 loleaflet: Dont change cursor on disabled items
Change-Id: If709e58a426be3d0f0bdbf52ae81a04c87790518
2016-05-23 13:41:38 +05:30
Pranav Kant
5b30e5f9d4 Document 'statechanged' event
Change-Id: Ibfad6ae98e525af69e855d588152a9a9eaf953fe
2016-05-23 13:41:38 +05:30
Pranav Kant
887f6314ab loleaflet: Prevent user from selecting menubar items
... and don't change the cursor while hovering over items

Change-Id: I221048451fdda2ac66c1f2e500732836ed66fe03
2016-05-23 13:41:38 +05:30
Pranav Kant
6b773910d3 loleaflet: Don't move text when highlighted
Change-Id: I69602c4b1b4256733506983d53d289627771f291
2016-05-23 13:41:38 +05:30
Pranav Kant
93ef7aae3f loleaflet: Align toolbar to the left
Change-Id: I07650734b3c4a771d8fc3b9f0d968dc5df700045
2016-05-23 13:41:38 +05:30
Pranav Kant
a662755658 loleaflet: More styling; merge white backgrounds
Merge highlighted white background of top-level menuitems with
white background of dropdown.

Change-Id: Id6671a923420b5bc0be96597f7777872df6d8332
2016-05-23 13:41:38 +05:30
Pranav Kant
7f8d7bf07e loleaflet: Style changes
* Center the label on top-level menubar items
* Remove padding off the top of menubar
* Little more padding-top to menubar

Change-Id: I70adc72bb93d7388f59f670ad76b1b4ac6741f68
2016-05-23 13:41:38 +05:30
Pranav Kant
2c0a1cb53f loleaflet: remove single item menus from writer
Change-Id: I477149793351fe225d94107bad7ce4c79678530e
2016-05-23 13:41:38 +05:30
Pranav Kant
da69451afe loleaflet: Kill old filemenu as we have whole menubar now
Change-Id: Idec0f41fa5ce94cf152535772d9c7ea822f1ac1e
2016-05-23 13:41:38 +05:30
Pranav Kant
7f453bc90a loleaflet: Functionality in menubar for presentation and spreadsheets
Change-Id: I5c235922dccdf2b6f28574a4791a6c93845f7fe7
2016-05-23 13:41:38 +05:30
Pranav Kant
71510a75f5 Kill common menu category
Change-Id: I17d6a704912fbdeb6238b838a250d4155a6ff40f
2016-05-23 13:41:38 +05:30
Pranav Kant
cc7b2b00cf loleaflet: menubar: Make menuitems in writer functional
1. Prune out all other items that are not possible now.
2. Add a seperator CSS class and use it between menuitems.

... and other minor functional/UI changes.

Change-Id: I037e2b6f751824c973072c52905d46b0fd4be38b
2016-05-23 13:41:38 +05:30
Pranav Kant
2d18ec899d loleaflet: We do not want to switch to mobile mode anyhow
If we do, uncommenting the appropriate code pieces would make it
work again.

Change-Id: Ib4729033b2cf6c3bcafc6ac59f09f42bf02e34ca
2016-05-23 13:41:38 +05:30
Pranav Kant
9c1a2a9dd3 loleaflet: And we have a menubar now
... with some CSS tweaks in sm-simple.css to make it look more
like LO menubar in desktop application.

Change-Id: I62c88d5876da752fb487e89a3613698c463d9f32
2016-05-23 13:41:34 +05:30
Pranav Kant
2c3964be1d loleaflet: Setup infrastructure for top menubar
Change-Id: Ib48c2b3219b74da15bc2898044ad9b3c01f8a203
2016-05-23 13:27:48 +05:30
Pranav Kant
36d5191b4d loleaflet: Add jquery smartmenus plugin
License: MIT

Additionally, the sm-simple.css file is indented appropriately as
we would need to modify it to our needs later.

Change-Id: Iab909d2e06af342b22ebeffc86b3efdc1bacb73e
2016-05-23 13:27:48 +05:30
Pranav Kant
c641a2da8c loleaflet: Shift everything 25px down for filemenu toolbar
Change-Id: Ibf03dd066ea5c97a054dbda575daa3cb5d5f708c
2016-05-23 13:27:44 +05:30
Miklos Vajna
d8b8a9b58b PrisonerSession: fix -Werror,-Wshadow
Change-Id: I9ea5533708941080620cdb18751d82904c6e660a
2016-05-23 09:09:11 +02:00
Miklos Vajna
ffc8e591ee UnitPrefork: fix -Werror,-Winconsistent-missing-override
Change-Id: I16780cb0a15b662f735ee5ea17a4991e4bf460de
2016-05-23 09:07:52 +02:00
Ashod Nakashian
9dbc213337 loolwsd: log tile rendering rountrip time
Change-Id: Ib97e196d6de053e6b79ea448296003f30a5949b5
Reviewed-on: https://gerrit.libreoffice.org/25347
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:58:25 +00:00
Ashod Nakashian
dcfa259b4e loolwsd: formatting
Change-Id: Id71a073c026ddea484fcb7da7d674109f3778c7c
Reviewed-on: https://gerrit.libreoffice.org/25346
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:57:56 +00:00
Ashod Nakashian
157386e3bc loolwsd: process tiles under the cursor with priority
Change-Id: I7993ee049c5c0835cae588ff54163f135c4f8b02
Reviewed-on: https://gerrit.libreoffice.org/25345
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:57:16 +00:00
Ashod Nakashian
6e54fd05f9 loolwsd: merge saveTile and notifyAndRemoveSubscribers
Change-Id: I8282604c02a9fd1a7a1e2a5df29e2f84fca151a6
Reviewed-on: https://gerrit.libreoffice.org/25344
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:54:55 +00:00
Ashod Nakashian
1f8f5da885 loolwsd: localize lock around painting tiles
Change-Id: I727f719fc22643d32d9fb5e4a89048a9991bb250
Reviewed-on: https://gerrit.libreoffice.org/25343
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:53:19 +00:00
Ashod Nakashian
ecaf45f9d3 loolwsd: tests should request tiles after invalidatetile
Change-Id: I32637d7e34a80577e99b764705bddf104df0278a
Reviewed-on: https://gerrit.libreoffice.org/25342
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:53:00 +00:00
Ashod Nakashian
e5aaac7631 loolwsd: Tile versioning and fix to race conditions
Tile invalidation and painting can race with one another.

A race when the user types two characters in quick succession:
1. After the first key press, the tile is invalidated.
2. The client request the tile on receiving the invalidate.
3. TileCache doesn't find it, and adds subscription.
 A. Sometime before rendering, the second key press is received.
 B. This invalidates the very same tile.
 C. The client request the same tile.
 D. TileCache finds a subscription and ignores the new one.
4. The tile is rendered and sent back.
5. Subscription is found and the tile is forwarded to clients.
6. Subcription is removed as the request is fullfilled.
 E. The second tile is rendered and sent back.
 F. TileCache finds no subscription and the tile is dropped.

End result: Only the first character appears on the screen.

Versioning fixes the above situation by making sure that in
step 5 the subscription will show to belong to a different
(and newer version) and so the tile will be ignored.
Instead, at F the TileCache will find both subscription
and a matching version and the lastest version will always
be sent back to the client.

Change-Id: I7d7fe1407cda1908d794683c3ce4c2fd18609a2f
Reviewed-on: https://gerrit.libreoffice.org/25341
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:52:36 +00:00
Ashod Nakashian
55df9b85e1 loolwsd: support versioning in tile requests
Usage and rationale to follow.

Change-Id: Ife4c12481e87f1b4b23d8ba6a6da66797b2be2a5
Reviewed-on: https://gerrit.libreoffice.org/25340
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:50:16 +00:00
Ashod Nakashian
114a6bc373 loolwsd: combined tile rendering
Tiles can be rendered in large batches and sent back
as combined payloads, all reduce latency and overhead
significantly.

Initial tests show a reduction in total latency by 2x.
This without sending tiles back to the client in combined
form, which will reduce latency further.

Change-Id: Iee06503f2a6c741fadb2c890266ea514c809c0dc
Reviewed-on: https://gerrit.libreoffice.org/25339
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:49:54 +00:00
Ashod Nakashian
f5bf8aa64a loolwsd: support for imgsize field in tile and tilecombine messages
When sending back response of tile or tilecombine type the
payload of the PNG image is implicitly the remainder of
the WS message. While this works fine for single-tile cases
it prevents us from combining tile responses into one to
reduce latency and overheads.

Change-Id: Iefeeed7e1a46be322c973ccf74f2bdb668d7cf30
Reviewed-on: https://gerrit.libreoffice.org/25338
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:46:01 +00:00
Ashod Nakashian
126060fd7f loolwsd: TileCombined class to parse, serialize, represent tilecombine
Change-Id: I00457fc0f2cd9d987972a1d5b9a17c204d42984c
Reviewed-on: https://gerrit.libreoffice.org/25337
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:45:40 +00:00
Ashod Nakashian
f4fc6d0c29 loolwsd: new name=value pair parser for strings
Change-Id: I01c56f9c452fe0ac75b3d9f2aa67787c5bb4d8c6
Reviewed-on: https://gerrit.libreoffice.org/25336
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:45:18 +00:00
Ashod Nakashian
65ed424199 loolwsd: new tile performance test
Change-Id: I08d477ec5f04de9f82c49263f35ebbf38a968f31
Reviewed-on: https://gerrit.libreoffice.org/25335
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:44:36 +00:00
Ashod Nakashian
1134b17e96 loolwsd: logging
Change-Id: Ic08b32104db1154573b9e0774cda23167a5cddf3
Reviewed-on: https://gerrit.libreoffice.org/25334
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:42:55 +00:00
Ashod Nakashian
5d9140c3bb loolwsd: simplify checkBlackTiles test
Black tiles are returned when rendering fails.
This happened due to bccu#1610 where internally
core collected cell info on the first 1024 rows
only. Anything beyond that always failed.

This limitation is now removed using dynamic
array to collect the cell info.

Regardless, the test here needs only check that
the last tile (really, anything beyond the 1024th row)
doesn't return a black tile.

This single tile still takes over 10 seconds to render,
which is the other issue that Core suffers from when
collecting cell info on a huge tab.

Change-Id: I7a1a5b7c2b2ed2cc4399160e096be5e57895af77
Reviewed-on: https://gerrit.libreoffice.org/25333
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-23 01:39:20 +00:00
Henry Castro
22db071689 loolwsd: test: add checkBlackTiles 2016-05-22 19:53:24 -04:00
Henry Castro
166edb66eb loolwsd: test: move getDocSize to helpers 2016-05-22 18:52:36 -04:00
Ashod Nakashian
74304fc08e loolwsd: ChildSession error propegation and cleanup
Change-Id: I8e5c87b6989fd090c98ca35e2584a7dd6d1c6a60
Reviewed-on: https://gerrit.libreoffice.org/25267
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 16:34:54 +00:00
Ashod Nakashian
3f03860a79 loolwsd: moved and localized png bits to Png.hpp
Change-Id: I4f27143bc2e5f638c8e84c32616b2820136a20e5
Reviewed-on: https://gerrit.libreoffice.org/25266
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 15:57:57 +00:00
Ashod Nakashian
6e033a4c25 loolwsd: use TileDesc in LOOLKit
Change-Id: I8800cc5625db4b333933ec056649c3efbd486f68
Reviewed-on: https://gerrit.libreoffice.org/25265
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 15:56:14 +00:00
Ashod Nakashian
56ae463bea loolwsd: minor TileDesc comment fix
Change-Id: I35b11797151a26a1c420afa5296c67ca54a5bdc9
Reviewed-on: https://gerrit.libreoffice.org/25264
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 15:55:49 +00:00
Ashod Nakashian
44a0e5785e loolwsd: cout -> cerr
Change-Id: I80ee313621ce093d75f2c331f3fef6125a187a42
Reviewed-on: https://gerrit.libreoffice.org/25263
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 15:53:11 +00:00
Ashod Nakashian
fae850189d loolwsd: include cleanup and organization
A source file (.cpp) must include its own header first.
This insures that the header is self-contained and
doesn't depend on arbitrary (and accidental) includes
before it to compile.

Furthermore, system headers should go next, followed by
C then C++ headers, then libraries (Poco, etc) and, finally,
project headers come last.

This makes sure that headers and included in the same dependency
order to avoid side-effects. For example, Poco should never rely on
anything from our project in the same way that a C header should
never rely on anything in C++, Poco, or project headers.

Also, includes ought to be sorted where possible, to improve
readability and avoid accidental duplicates (of which there
were a few).

Change-Id: I62cc1343e4a091d69195e37ed659dba20cfcb1ef
Reviewed-on: https://gerrit.libreoffice.org/25262
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 15:52:54 +00:00
Ashod Nakashian
b2fa9d6f2e loolwsd: moved TileDesc into own file
Change-Id: I54162f7ebaaca51f9c52a30af1e278db212562fa
Reviewed-on: https://gerrit.libreoffice.org/25261
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-21 15:49:10 +00:00