Commit graph

3113 commits

Author SHA1 Message Date
Ashod Nakashian
b7e0766fea loolwsd: removed lo_jail_subpath
Really unused setting that caused deployment complications.

Change-Id: If837fca4c904e82b23babd4a1f0f3f15b5ef57f4
Reviewed-on: https://gerrit.libreoffice.org/26705
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-27 12:29:55 +00:00
Pranav Kant
1106c0a5ac loleaflet: Simplify enable/disable logic in menubar
There is still one problem though, that if already opened
document is opened in a different browser window, it doesn't
receive any command states which shows enable/disable states of
menubar items incorrectly.

Change-Id: Ib03f1becfb6585fed075bb5f1bf9c587063323a6
2016-06-27 16:50:13 +05:30
Pranav Kant
f0812c14f0 Use new event doclayerinit in menubar init for menubar
This event was introduced in
c39045b1e4ece3eabbf9a9dbf24d8d4df7651e87

Change-Id: Icacb6584ac9e3ab7aaaef55c2c7f7cf2ea2393a7
2016-06-27 16:50:13 +05:30
Pranav Kant
8e023584ea loleaflet: Ask my host to show revision-history
Change-Id: If1ed5fc03c6504e22c565b0278983bb168bb6fc8
2016-06-27 16:50:13 +05:30
Pranav Kant
b2acd1cfbc Remove invalid placeholder
This is no longer valid since context menus are implemented in
loleaflet already.

Change-Id: Ic2e21a92c5fdd87a2f3c34a3ff16628337184e1d
2016-06-27 16:50:13 +05:30
Pranav Kant
454999fa57 loleaflet: Resurrect loleaflet permission model for readonly mode
Remove direct usage of editlock; instead change loleaflet
permission from view to edit when editlock message is received.
By default, map would be in 'view' mode and only get to 'edit'
when server asks it to switch to.

Use a new event 'doclayerinit' for actions that are directly
dependent on intialization of doclayer.

Change-Id: Iaceb95ad85721ddcd675c75cfeb1504ab2759ad4
2016-06-27 16:50:13 +05:30
Pranav Kant
29f2f3ec54 loleaflet: Lint before building
Change-Id: I5e38373959574b3a72fbfe0715a8758de9765438
2016-06-27 16:50:13 +05:30
Andras Timar
6620502229 loolwsd: fix run_valgrind target with new command line options 2016-06-27 09:45:29 +02:00
Andras Timar
f540fb087c loolwsd: document new command line options in READMEs 2016-06-27 09:41:41 +02:00
Andras Timar
93e1104505 loolwsd: use the new command line options in spec file for default admin 2016-06-27 09:27:25 +02:00
Andras Timar
c3db6d719e reserve version 2.0.0 for actual release... 2016-06-27 09:20:09 +02:00
Andras Timar
e85179e0f8 loolwsd: let loolwsd.service use the new command line options 2016-06-27 09:15:40 +02:00
Andras Timar
8b07403629 loolwsd: use LOOLWSD_CONFIGDIR and LOOLWSD_CACHEDIR in default config 2016-06-27 07:37:04 +02:00
Ashod Nakashian
e8cd9e35d3 bccu#1909 - loolwsd command line options vs. config file and package upgrades
Unit tests updated with new command-line arguments.

Change-Id: I1a391255c44d4d22b8304129634ef7d16b606bce
Reviewed-on: https://gerrit.libreoffice.org/26683
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-26 20:45:12 +00:00
Ashod Nakashian
d281813c06 bccu#1909 - loolwsd command line options vs. config file and package upgrades
Removed admin-console creds and allow-local-storage.

Change-Id: If281b6320caee5d28007063591325eb98ba8e01b
Reviewed-on: https://gerrit.libreoffice.org/26670
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-26 00:31:00 +00:00
Ashod Nakashian
6501a21114 bccu#1909 - loolwsd command line options vs. config file and package upgrades
Remove command-line arguments in favor of the config file.

Settings can be overridden using the command-line flag
--override (or --o) followed by the full XML path=value.

Change-Id: I902a145f4d2bd0256e31a3e70b0382c0261aecc8
Reviewed-on: https://gerrit.libreoffice.org/26669
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-26 00:29:28 +00:00
Ashod Nakashian
8798943f08 bccu#1909 - loolwsd command line options vs. config file and package upgrades
Support overriding config settings via the command-line.

By using --o:name=value (or --override:name=value) the
setting called 'name' can be replaced by 'value'.

Ex. --o:per_document.max_concurrency=12

The above will override the max_concurrency to 12,
regardless of what the XML has set.

Change-Id: If7ffa5dcdc9ce2a8d1a89c8203b8ba870cb624ac
Reviewed-on: https://gerrit.libreoffice.org/26668
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-26 00:27:57 +00:00
Ashod Nakashian
7d4d7f47ac bccu#1909 - loolwsd command line options vs. config file and package upgrades
Default config entries and values are now set before loading
the config file from disk. This ensures that an upgrade
to the server with new config entries will not break the
server when the XML is not upgrade, rather, the server
will fallback to the defaults when it fails to find the
entry in the XML.

This, of course, requires adding new entries to the
default entries every time config entries are changed.

Change-Id: Iac849dc41fc7410a3c9093b0d6e91d96182b86fd
Reviewed-on: https://gerrit.libreoffice.org/26667
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-26 00:27:21 +00:00
Ashod Nakashian
0832453649 loolwsd: disable webdav in config and add defaulting comment
Change-Id: Id79263c8a9190d294868249e61c747d1454cddf5
Reviewed-on: https://gerrit.libreoffice.org/26666
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-26 00:26:45 +00:00
Pranav Kant
ce6866b0e5 loleaflet: Allow 'about', 'keyboard-shortcuts' in non-edit modes
Change-Id: I2def7a17d05ec7834290b94a51edfd589f6187ed
2016-06-24 23:33:42 +05:30
Andras Timar
95684540ea loleaflet: avoid ReferenceError exception when brandProductName is undefined 2016-06-22 23:46:39 +02:00
Andras Timar
80a81abc46 loleaflet: remove extra dist/ from URL 2016-06-22 23:38:06 +02:00
Andras Timar
17abf005a8 loleaflet: Collabora Office version x.y-z style in About box
LibreOffice is unaffected
2016-06-22 23:35:10 +02:00
Pranav Kant
10a5f8c08b loleaflet: l10n: Placeholder for product name
Change-Id: I883ff7e42cf37cd457b6cfcc065fff47b3dc469d
Reviewed-on: https://gerrit.libreoffice.org/26573
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-06-22 20:36:36 +00:00
Pranav Kant
55ead88236 loleaflet: Kill simplemodal library
Its use has been superceded by vex now

Change-Id: I4b032dd6e5de61548b76b56e946ced6fc86734d3
2016-06-22 20:09:35 +05:30
Pranav Kant
a789cff8e8 loleaflet: Migrate about dialog to vex
Change-Id: Id853ec14d817b2f4312dee70a087a4ac526e951b
2016-06-22 20:09:32 +05:30
Pranav Kant
1a46db62bd loleaflet: Workaround for an upstream bug in vex
https://github.com/HubSpot/vex/issues/43

Change-Id: Id26be54a3a1120119bddad442e30b5f71f1e2605
2016-06-22 20:00:26 +05:30
Pranav Kant
c632cf5716 loleaflet: Migrate keyboard-shortcuts dialog to vex
Change-Id: I82324405ee1205becea00fc1de97c248988ab378
2016-06-22 20:00:23 +05:30
Pranav Kant
42ebabb3a9 Update bundled headers
Change-Id: Ifa69fec15df328d97d5d2c207dcd47c0d3ff660d
2016-06-22 14:52:07 +05:30
Pranav Kant
e48a36816e loleaflet: Remove Help button from toolbar
... as we have this as 'Keyboard shortcuts' in menubar now.

Change-Id: I01f3735c6b1ac07d8bced2f98fc9dd514a178ce0
2016-06-22 14:43:47 +05:30
Mike Kaganski
47a17fa8d0 testCloseAfterClose: don't hang on bytes==0 && flags==0
At least in some versions of Poco (namely, 1.7.3),
WebSocketImpl::receiveBytes may return both bytes and flags equal
to zero. It makes the HTTPWSTest::testCloseAfterClose() loop
exit condition to never happen, thus test hangs.

According to WebSoket.h, "A return value of 0 means that the peer
has shut down or closed the connection".
Thus, this modification makes this loop robust.

Change-Id: I5dd4f30936dd8246c966f094f2fdae9a45b89ff9
Reviewed-on: https://gerrit.libreoffice.org/26547
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-21 23:07:35 +00:00
Pranav Kant
8bba9da761 Make new version string as a JSON string
... easy to differentiate on client side among various version
info parts, especially for LOKit version information.

Change-Id: I4ba18c60367fb9166462b535bc46953a82a8435d
2016-06-21 22:12:48 +05:30
Andras Timar
9e7b978f9f loleaflet: bccu#1901 Control.RowHeader.js and Control.ColumnHeader.js for l10n 2016-06-21 16:44:20 +02:00
Andras Timar
bc4633a2a1 loolwsd: avoid NotFoundException when per_document.max_concurrency is missing (old config) 2016-06-21 16:15:53 +02:00
Pranav Kant
b460769eed loleaflet: 'Keyboard shortcuts' in new 'Help' menubar item
Change-Id: I0a924505970e9ed13ea45ebc85ef14a618646b2d
2016-06-21 19:16:20 +05:30
Pranav Kant
31009fa9c1 loolwsd: Handle document URIs with spaces
DocumentBroker stores encoded docKey, when child answers with
dockey in its query params, Poco::URI::getQueryParameter gives
decoded docKey -> mismatch -> document load failed.

Change-Id: I53d7cf9d932b9193f15f56ec74db24e279cf3b94
2016-06-21 16:06:12 +05:30
Pranav Kant
90aee41c70 loleaflet: Dialog to show loolwsd, lokit version information
Change-Id: Ie05f0597d3464b5e7705bd1d1ff4ab5c03af013f
2016-06-21 15:05:11 +05:30
Pranav Kant
b83ac269fa loolwsd: Send LOKit version information to clients
Send as a response to 'loolclient' message received from the
client

Change-Id: I3d33f9fd087489aa9bf5a94f591ab04e208cbf13
2016-06-21 00:30:36 +05:30
Pranav Kant
e271995ed2 loolwsd: Restructure version information functions
... so that version information can be sent to clients.

Change-Id: Icc90f31fabb501f816ff1dca0c618a73660c88bc
2016-06-21 00:29:41 +05:30
Pranav Kant
7701de1e48 bccu#1894: Don't show any outline for menubar selection
Change-Id: Ifa3095247a0c18c599c2c294a473add8f6d48104
2016-06-20 14:11:52 +05:30
Pranav Kant
76178f22e5 loleaflet: bccu#1887: Enable keyevents on menubar
Make it focusable. This also enables ESC key to reset the opened
menu.

Change-Id: Ia7be49af45b25ae7d29a5ba95b83591af0d82dca
2016-06-17 09:10:12 +05:30
Pranav Kant
3de264c3fd loleaflet: Hide its submenu when clicked over highlighted menu
Change-Id: Id1249e5d4a0d2013e1dd2a5f8833b3b787b1a137
2016-06-17 09:10:12 +05:30
Pranav Kant
50a237dd29 loleaflet: bccu#1867: Do not scroll first time after doc resizes
This was removed in c7588f0e8c in
an effort to fix calc row/col offset where it must not be ignored to
have aligned row/col offset without any side-effects that one can
have in single-part documents like writer.

Earlier approach using a timer of 200 ms for 'scroll ignore' also
doesn't seem very effective, so change it to: ignoring the first
'whileScrolling' invocation.

Change-Id: Ic3a6868a279fc200b8f9fee74bb40aebad5d9646
2016-06-17 09:10:12 +05:30
Pranav Kant
be6acfcd4e loleaflet: Remove superfluous call
Option 'updateOnContentResize' is true by default, which means
this method is called automatically when scroll container is
resized, so no need to manually call it again.

Change-Id: Ie80e90239752acb119e3a92c09a1f77dd61b2ad4
2016-06-17 09:10:12 +05:30
Andras Timar
69924630cf loleaflet: Pull translations from Pootle 2016-06-18 13:38:31 +02:00
Ashod Nakashian
d1d9ec6168 loolwsd: max_concurrency setting added
Change-Id: Iae3789d26ed2e1aba3806a6f99511fa6c7097988
Reviewed-on: https://gerrit.libreoffice.org/26449
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-17 23:59:47 +00:00
Ashod Nakashian
bf66f7a908 loolwsd: Calc tile rendering test with editing
Change-Id: Ib02a079bf1e4e90c7dfb65b6038b3ca1423a673c
Reviewed-on: https://gerrit.libreoffice.org/26448
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-17 23:56:26 +00:00
Miklos Vajna
5e1b210891 Util: pass by const ref 2016-06-17 09:18:26 +02:00
Miklos Vajna
75db2dd33b loolwsd: disable unit-fonts for now as it's unstable 2016-06-16 13:45:20 +02:00
Miklos Vajna
3c32bc1724 LOOLKit: fix loss of callback during initializeForRendering()
Impress deletes the current view and creates a new one during that call,
so make sure at the end our registered callback is not lost. With this,
the order matches how it's done in gtktiledviewer.

This fixes the HTTPWSTest::testInsertDelete() test when per-view
callbacks are enabled.

Also remove the assert from TileCacheTests::testTileInvalidateWriter()
that would assume something is invalidated right after load: the hope is
that it's possible to load a document without invalidating anything...
:-)
2016-06-16 12:15:11 +02:00