Commit graph

7255 commits

Author SHA1 Message Date
Miklos Vajna
596f3d14db test: fix HTTPWSTest::testInactiveClient() 2018-11-13 09:12:03 +01:00
Miklos Vajna
cd08cbf385 Session: make members private 2018-11-13 09:04:19 +01:00
Tor Lillqvist
aea3d28fed Bump CFBundleVersion to 5
Change-Id: I5566ff9e1f4aafa303f35482cb2e30ad4866813c
2018-11-12 23:13:48 +02:00
Tor Lillqvist
d4553d6a9a Add CFBundleLocalizations
Change-Id: I16d63860f63fd52cbaf574ac555654fecc273e8a
2018-11-12 23:13:48 +02:00
Tor Lillqvist
6d2a60643b Make l10n of the messages from our JS code work in the mobile app
The l10n-for-node code does not work in the app. Instead of loading
the required JSON files at run-time, include all those translations
that seem complete enough as JavaScript code in the bundle.js. Use a
manaully curated list of translations, in a Perl script that generates
the JavaScript code in question.

Change-Id: I45d5cda477140ee63bb3fc8d9f1f4260bcdb97a7
2018-11-12 22:55:03 +02:00
Andras Timar
2c1639750d pass extra loolwsd command line parameter via environment variable
docker run .... -e "extra_params=....." .....

For example it makes sense to start loolwsd without SSL, when you test
or develop. In this case the syntax is: -e "extra_params=--o:ssl.enable=false"

Change-Id: Iaa9eafc1e1d3f2d24009321760d1b7d6a9998450
2018-11-12 21:22:51 +01:00
Tor Lillqvist
705bf6e8dc What we want is [[NSLocale preferredLanguages] firstObject]
Not [NSLocale currentLocale]. See
https://stackoverflow.com/questions/3910244/getting-current-device-language-in-ios .

Change-Id: I14490f6b8c910c3fc1a0b7780bcfdd6b53553678
2018-11-12 20:14:10 +02:00
Tor Lillqvist
139809286f Add two source files from i18nlangtag
Change-Id: Ic0b24d395dd8f74ce7d18a6e16cd5f61da4b4c01
2018-11-12 20:14:10 +02:00
Jan Holesovsky
efe291c320 Notify about the editing context.
And also:

* Hint the compiler to warn about the missing callbacks.
* Add few missing ones.
* Update the bundled headers.

Change-Id: I8d31363eaaea289e8a517c0b9b1142b33ce3027e
2018-11-12 18:10:57 +01:00
Tor Lillqvist
94f491f295 Call comphelper::LibreOfficeKit::setLanguageTag() to avoid assertion failure
The locale / language tag dance is a bit confusing. Let's hope it now
works sanely.

Without this change, if I as a test in Xcode set the LANG environment
variable when running the app to "de", to match the case where the
user is using their device in a German locale, and then open a
non-trivial .odt document, close it, and open it again, I get an
assertion failure in sw, in SwXPageStyle::GetPropertyValues_Impl().

(Note that the LANG environment variable is not set by the system on
iOS; in this app LANG is just an arbitrary (but familiar) name for an
environment variable used only when debugging in Xcode. Maybe I should
have called it something else to avoid confusing code readers who
might think it has the same meaning as in POSIX systems.)

The above assertion failure does not happen if I don't set LANG. I
don't really fully understand the convoluted mechanisms involved, but
explicitly re-setting the <comphelper/lok.hxx> concept of (global)
language tag each time before opening a document seems to help. Note
that if I set LANG to just "de", the code then later while handling
setView() calls in ChildSession::loadDocument(), sets it to "de-DE"
anyway. But that doesn't seem to harm.

Change-Id: Ic697ed44b4ace488782ebee3aa2e7610bb02e93c
2018-11-12 17:18:52 +02:00
Tor Lillqvist
653d24f913 Add lok.cxx from comphelper
Change-Id: If7627ecf4ca6771ecbba51ecde69160ab959be46
2018-11-12 17:18:52 +02:00
Miklos Vajna
a514abff88 document signing: fix disabled case for Calc/Impress
If the document-container has an explicit style attribute, then this
breaks Calc (only Writer was tested before). This restores the correct
Writer/Calc/Impress behavior when the setting is false and keeps correct
behavior with Writer when the setting is true.

Change-Id: I310660e88af4407e521529ec41b5dcb604108bd9
2018-11-12 11:53:42 +01:00
Miklos Vajna
c863e52001 RecordedEvent: make members private 2018-11-12 09:04:01 +01:00
Tor Lillqvist
273452d8c6 We don't need the l10n folder in the app bundle
I could not figure out any sane way to access the correct .json files,
or data constructed from them by the Objective-C code, at run-time in
the iOS app. The l10n-for-node stuff that gets used in a normal Online
is not suitable at all as it wants to use XMLHttpRequest.

Thus I am working on changes to loleaflet that will include the
translations in the bundle.js when building for iOS. (Or Android,
presumably, once we get there.) There won't be any need to load the
correct .json files separately.

Change-Id: Ifd72b4077f3634c34dd2c2d84c0a2554459c86b6
2018-11-10 01:34:37 +02:00
Tor Lillqvist
3fb87afb99 Make the debug messages from our JS stand out better
Change-Id: Id3ee1adf7bb2c4b2a04518243ca089288bc6b062
2018-11-10 01:34:37 +02:00
Tor Lillqvist
3cd9218355 Pass locale as query item to loleaflet.html for future use
Change-Id: I03eebebb3c1d7be223052b936d70b5a7e7c6b5f7
2018-11-10 01:34:37 +02:00
Tor Lillqvist
e0bfd8271b Fix MOBILEAPP fallout from c74c9e39c8
In the mobile app, we don't run loleaflet.html through any filter that
would replace strings like <!--%DOCUMENT_CONTAINER_TOP%-->. We need to
produce a proper loleaflet.html at build time, using m4 for MOBILEAPP
conditionals.

Without this small fix, the loleaflet.html page ended up looking
extremely weird (all white document area), with nothing working.
2018-11-10 00:04:28 +02:00
Tor Lillqvist
c3d0c295bc Bin leftover unused thing
Change-Id: Ic13ae925993ddc37f8f3d75476f0c3ab0f13222c
2018-11-09 23:34:33 +02:00
Tor Lillqvist
90dd9059be Bin commented-out line
Change-Id: Id8aa26f55c48cc62cd184e8b5079397365471943
2018-11-09 23:34:33 +02:00
Tor Lillqvist
118b43ee18 Add core source files from unotools/source/i18n for easier breakpointing
Change-Id: Idc23e231584963b9b49ed218b61065d4946967ed
2018-11-09 23:34:33 +02:00
Andras Timar
92f3d62882 escape double quotes when generating json files from po files
Change-Id: Iacddaf919161b6843dac2190a5072af8a25e8251
Reviewed-on: https://gerrit.libreoffice.org/63218
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2018-11-09 21:59:50 +01:00
Tor Lillqvist
2cbba9a6ab Fix JSON syntax error 2018-11-09 22:29:46 +02:00
Samuel Mehrbrodt
e050f925b1 Docker: Fix replacement of username and password
Change-Id: Ie757b1028712e7a6ceafdeeb50819afbc9829677
Reviewed-on: https://gerrit.libreoffice.org/63195
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2018-11-09 21:03:25 +01:00
Tor Lillqvist
58ee16d4ed Do generate the loleaflet/dist/l10n/*.json files for iOS
Not used yet by the app but I am working on figuring out some way.
2018-11-09 19:58:32 +02:00
Tor Lillqvist
4a6120d69b Bin dead code
In a script snippet that is inside an m4 ifdef for the non-MOBILEAPP
case the window.ThisIsTheiOSApp can never be true.
2018-11-09 19:05:33 +02:00
Tor Lillqvist
e58a28fe95 We don't need the admin stuff in the mobile app 2018-11-09 19:05:33 +02:00
Miklos Vajna
c74c9e39c8 Disable document signing via config setting
It's not too easy to customize CSS, so move the top position of the
document container to loleaflet.html, where it's convenient to handle
this.

JS can dynamically query if the menu item should be there, similar to
the about dialog.

Change-Id: I4b2799a41f8ad31e3a9b4983fd1947d2e0363a2b
2018-11-09 13:56:02 +01:00
Miklos Vajna
bf9df8d2bd Fix -Werror,-Wswitch warning
Change-Id: Id6d25955ee99d0c547d92cfbea407135a75ca47b
2018-11-09 09:20:44 +01:00
Miklos Vajna
24b4e7dd36 Fix -Werror,-Wstring-plus-int warning
Change-Id: I047ffbb93fc261a0c39670287a616550de249a9b
2018-11-09 09:19:40 +01:00
Tomaž Vajngerl
37e1e208c2 add "sign" function to infobar to sign with a one-time cert.
In addition:
- add methods to transport the certificate chain, signing
certificate and signing certificate to WSD
- add conversion of PEM cert. format to DER
- add transporting the certificate chain to the LO core
- run the signing function with the signing cert. and the
private key

Change-Id: I1a005e88cacbd81144df40d315197561401db427
Reviewed-on: https://gerrit.libreoffice.org/63156
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-09 09:06:51 +01:00
Tomaž Vajngerl
40442bfaa6 show current logged-in identity in signing infobar
Change-Id: I3d43d1b999de5d850fd5f6a21cc59931a299b874
Reviewed-on: https://gerrit.libreoffice.org/63155
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-09 09:06:41 +01:00
Tomaž Vajngerl
582e461fb2 vereign logging in and logging out
Change-Id: I33427c1451ae795e3692cb96a95488d85afb2db4
Reviewed-on: https://gerrit.libreoffice.org/63154
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-09 09:06:33 +01:00
Tomaž Vajngerl
1a954fa44d add sign infobar below the toolbar
Change-Id: I7def928b0cacf54f008c9402a9df229423042f48
Reviewed-on: https://gerrit.libreoffice.org/63153
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-09 09:06:23 +01:00
Tomaž Vajngerl
bcbabbaec6 add Signing.js to include all signing related code
Change-Id: I77d9016a6fe9969ffe8639265696754272d19b89
Reviewed-on: https://gerrit.libreoffice.org/63152
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-09 09:06:18 +01:00
Tomaž Vajngerl
dbe7e34f89 add javascript vcl (vereign client library) to loleaflet
Change-Id: I59ef8f6c0d0f5caf02210b12d0d6957f1944fee8
Reviewed-on: https://gerrit.libreoffice.org/63151
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-09 09:06:15 +01:00
Tomaž Vajngerl
d8140d545b add menu entry "Sign Document"
Change-Id: Ia1fd7bd47506d8ecf4b5f152e04e7dcabaf7c50b
Reviewed-on: https://gerrit.libreoffice.org/63150
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-09 09:06:11 +01:00
Tomaž Vajngerl
98f9064cbb show infobar for signature status (callback)
Change-Id: If3ba239e20475f25e370b9b836af913f91befd8e
Reviewed-on: https://gerrit.libreoffice.org/62534
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-09 09:06:06 +01:00
Tomaž Vajngerl
852ed5d981 handle signature status and prepare document signing in WSD
This adds handling of signature status (manually request for the
status or as a callback) in WSD.

In addition prepare support for signing of document, but don't yet
trigger the actual LOKit function (needs the JS building blocks
set up first to know how to handle the payload - certificate and
private key)

Change-Id: Ic76baa5847bb52adde616338187d5979e0093c6d
Reviewed-on: https://gerrit.libreoffice.org/62533
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-09 09:06:02 +01:00
Tomaž Vajngerl
0ff045609e update bundled LOKit headers with document signature functions
Change-Id: I30ef122fdba369a73742a4cb11b971deb21b2a01
Reviewed-on: https://gerrit.libreoffice.org/62532
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-09 09:03:20 +01:00
Miklos Vajna
83bd75476e StateRecorder: make members private 2018-11-09 08:41:35 +01:00
Andras Timar
bfce0038ae loleaflet: add 'insertgraphicremote' to Impress and Calc menu, too
Change-Id: I4c0104b19cd1d54684ce69f0cf4eb21fdb49f5e3
2018-11-09 00:16:15 +01:00
Andras Timar
ea9515ccf6 loleaflet: rename menu/toolbar items for Insert Image
Change-Id: I8cd04da84ab63e67353291acc5f9c9782cd7ea9d
2018-11-08 15:48:33 +01:00
Tor Lillqvist
1521685c81 Avoid assertion failure in the MOBILEAPP case
The dummy Unit thing is of type Wsd, not Kit, there. Just put this
into #ifndef.

Change-Id: Ic709472154fd17761a82df9814e5d3746f96f607
2018-11-08 15:01:45 +02:00
Miklos Vajna
df0b3835c5 DeltaBitmapRow: make members private 2018-11-08 09:16:57 +01:00
Michael Meeks
a0f83bd9b9 Convert-to - cleanup after ourselves.
Change-Id: I85de9721ac1b33d053b59fc36fc7c307206a0888
2018-11-08 02:36:08 +00:00
Michael Meeks
9f31063bd6 Don't sniff the inside of SSL sockets for SSL headers.
We might find a websocket we don't like.

Change-Id: Id13628252e01501d6cc209f4d572d8da16a7a658
2018-11-08 02:12:02 +00:00
Michael Meeks
fa74404019 Add a time limit for badly behaved / huge document load / conversions.
Also improve debug printing of load times in dumpstate.

Change-Id: Ib3fd70dffb57588cd90bd928c4be9890cee8bc65
2018-11-08 01:27:40 +00:00
Tor Lillqvist
802cb3bd24 Move initailisation of 'now' variable back after the poll where it should be
Was moved before the poll in my
75438baa70.

Change-Id: I0ec99c0c1433d2e5d631720f003905cbd18206aa
Reviewed-on: https://gerrit.libreoffice.org/63052
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2018-11-07 23:16:49 +01:00
Andras Timar
2bf384cac0 Convert wsd/reference.txt to Markdown format
Change-Id: I393a74337293e376b6458a9cc05ba1d8b748e0d3
2018-11-07 21:25:25 +01:00
Andras Timar
a9cf1ab45f Convert wsd/reference.txt to Markdown format
Change-Id: I93b36c7136a9ea77ecf381fb1c57913c283821b6
2018-11-07 21:22:33 +01:00