Commit graph

7403 commits

Author SHA1 Message Date
Andras Timar
0c76f3f1db loleaflet: updated pot files
Change-Id: I6a28078b2b9a45651d8f9cad559ab42ad744a183
2018-12-05 20:34:48 +01:00
Miklos Vajna
57a72ea4e9 document signing: inform user after upload
Change-Id: Ic84c64b1aea39e452b169b2e334f7a9ee3dca58f
2018-12-05 17:50:29 +01:00
Miklos Vajna
6e0d1ad707 document signing: whitelist CSP frame-src for doc sign endpoint URL
If document signing is enabled in loolwsd.xml, then explicitly whitelist
iframe creation towards the doc sign endpoint server, to avoid

> Refused to frame '...' because it violates the following Content Security Policy directive: "frame-src 'self' blob:".

Note that this happened only in non-debug builds, as we currently don't
send eny Content Security Policy headers in debug builds.

Change-Id: Iee2a0644d67d5803ab3f5c636b8e960fa619792f
2018-12-05 16:14:44 +01:00
Andras Timar
7c262f5e82 loleaflet: hide Vereign iframe
The insertion was:
g.setAttribute('style','display:none;');
after:
g=document.createElement("iframe");

Change-Id: I3e993e1c26657f3555f8bbf79772600e5551b2cd
2018-12-05 13:33:58 +01:00
Andras Timar
544aafe70a loleaflet: Hide spreadsheet-row-column-frame for text, presentation and draw documents
Change-Id: I5f47faf639dce2d972f219c31d52bfc686c112a9
2018-12-05 13:09:35 +01:00
Miklos Vajna
0b15bd381c loleaflet: completely hide document signing bar by default
This used to be mostly hidden by the document container, but a 1px
horizontal red line was still visible.

Also return early in adjustUIState() to silence errors when the feature
is not enabled in loolwsd.xml.

Change-Id: I140bc5a79bdb85790021f57dd0ab810587bb2529
2018-12-05 12:05:45 +01:00
Samuel Mehrbrodt
2e9af9da16 Add custom http header when saving before document is cleaned up from memory
Change-Id: I3ac417d83a79a665ae6575097835542f43d40cef
Reviewed-on: https://gerrit.libreoffice.org/64499
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-12-05 11:50:59 +01:00
Miklos Vajna
c04fd49d42 TileCacheTests: these writes are never read
They are written again inside the do { ... } while (...) which runs at
least once.

Change-Id: I9ff07d7cb68b73bccf1bd38490fcba615b87a6ba
2018-12-05 09:14:50 +01:00
Andras Timar
521f73fb3b loleaflet: updated translations from Pootle
Change-Id: Ibdb8b359ff215b22859fa2e4d0a551ba12611447
2018-12-04 22:47:50 +01:00
Tor Lillqvist
a3b44f2b8b Work in progress on document creation using templates in the iOS app
When the "Create Document" button in the document browser is pressed,
we scan a set of ODF templates in the Templates subfolder of the app
bundle, and we display that list as a collection view. (So far that
view is not interactive, i.e. once it is displayed, you are stuck
there.)

Eventually, when the user chooses one of the templates, we will open
that and immediately, before the user has done any edits, do a Save As
of it as a real (not template) document in the app's document folder.
What name to use for it is unclear yet. Further saves will thus don't
need any dialog to choose the document name.

More work will be needed on i18n of the template support. Should we
have localised templates? At least localised template names. Etc.

Change-Id: I5675779a5b16bc4c70a943109aa0dd53cf4bd903
2018-12-04 22:12:39 +02:00
Andras Timar
c85f149404 non-breaking space after colon in Sign toolbar
Change-Id: I91dd9642afb905d29eade9272cab257ffa0f97ad
2018-12-04 14:30:16 +01:00
Andras Timar
8347d2578d Enable l10n for most of strings in document sign feature
Change-Id: I5159051b2c42bee26e788766f29244bd2ca2f234
2018-12-04 11:54:20 +01:00
Miklos Vajna
da8785ed50 Log::StaticNameHelper: make members private
Change-Id: I7c46dc6757b98867c4893ee019b3fd6d903020fc
2018-12-04 09:06:58 +01:00
Tor Lillqvist
14cd0f4e2b Add source files from desktoi/source/lib for breakpointing convenience
Change-Id: I36408e7adcd30b1094c41b23254919df43e6542c
2018-12-04 00:58:53 +02:00
Tor Lillqvist
f01a73fa92 Work in progress: Add .ott
Still need to figure out how to ask the user where to save the
documemnt and under what name when closing it.

Or actually, should ask right away, as iOS apps are supposed to be
crash-proof, there shouldn't be any need for any separate "save" or
"close" operation by the user, right?

Change-Id: I6d6b9933f5e21f7793837c7ed65049b82853a183
2018-12-04 00:58:53 +02:00
Tor Lillqvist
191a471e2d Add source files from cppuhelper for breakpointing convenience
Change-Id: I2b61c4b870f944760171a85818f7ecd7883c3e19
2018-12-04 00:58:53 +02:00
Miklos Vajna
85f24ccb55 CRYPTO_dynlock_value: make members private
Change-Id: I5328bd272d4aaef1a445b9ddc5dd4c878d803777
2018-12-03 09:11:22 +01:00
Andras Timar
1dbc88a32b Fix domain name resolution from jail by adding required libs to systemplate
Originally all was good, then ad21717498
removed these files from jail, therefore name resolution broke, then
ac7d67f43e added back libnss_* libs from one location, which
happened to work on developer's computer, then 4e5528e5f8,
b4f15c714a, and 9c0ab72155
added back etc/hosts etc/nsswitch.conf etc/resolv.conf that were also needed for proper
name resolution, finally this patch adds some more possible locations of Name Service
Switch (NSS) libs, therefore it makes sure that the required libnss_* shared libs
are found e.g. on Debian based systems. Also, testing with libreoffice/online docker image
has shown that libresolv.so.2 is also required in systemplate for name resolution, although
on some other systems it was not needed (preload?).

This fixes two bugs:
1) Linked images in documents were not displayed on certain systems
2) Insert image from WOPI host did not work on certain systems

Change-Id: I5d09a65341050f0f729bdbc46977c0f686ac023c
Reviewed-on: https://gerrit.libreoffice.org/64426
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2018-12-02 18:32:34 +01:00
Andras Timar
25a177db93 typo: capabilties -> capabilities
Change-Id: I44c84d01a2ef6addf7efd5a6cd7fc1778a752c4b
2018-11-30 14:50:15 +01:00
Andras Timar
a41864e8a5 add the /hosting/capabilities endpoint to the example reverse proxy configs
Change-Id: Ia4c2e4a54549af89071752c631a9ae5fed678c63
Reviewed-on: https://gerrit.libreoffice.org/64286
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2018-11-30 13:46:33 +01:00
Andras Timar
321efe3eaa Depend on nodejs instead, Debian 9 does not have npm package, and node-jake is very old
Change-Id: Ia7ceed8dd38849575a63e96c6296c70e31509eec
2018-11-30 13:35:59 +01:00
Jan Holesovsky
9168040a4d capabilities: Don't rely on existence of the file, compose it completely.
Change-Id: I41588afa9f26b4a2575ee8cf7d9837cc79b31b3e
2018-11-30 13:34:46 +01:00
Tor Lillqvist
c57a1fbef0 Don't show the user indicator if there is nobody else
Especially in the mobile app it was silly to show it as there is by
definition always just one user editing a document, but it is a good
idea to simplify the UI in this case also for the web-based online.

Change-Id: I67533ffe62734dce6ca96e2a72d9ba4386fc9b74
Reviewed-on: https://gerrit.libreoffice.org/64330
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2018-11-30 11:34:24 +01:00
Tomaž Vajngerl
e82c2180d1 Show and check document status when log in into vereign
This shows what the current document status is in the signing
infobar.

When logging in into vereign we need to check the current document
as we have all the needed certificates avaliable.

Change-Id: I7fb4420d0b80a6d0fa553fca2f0be7b6dec6249f
Reviewed-on: https://gerrit.libreoffice.org/64333
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-30 11:29:34 +01:00
Miklos Vajna
84d224d995 test: no need to copy procEntry
Change-Id: Iac7bca9ebcf104975d01bcd1cdfe8e0f4d2a742e
2018-11-30 08:38:00 +01:00
Tor Lillqvist
637324354d Skip the signature uploading code for the mobile app case
Change-Id: If634c5b1ff77e6a56c9a195d9394c4d2906419cb
2018-11-29 23:46:16 +02:00
Tomaž Vajngerl
7a8c5c072f Add "close" function to the document signing info bar
Change-Id: I24e967de5c2a975ec2f1321c02712761c6d48de3
Reviewed-on: https://gerrit.libreoffice.org/64299
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 22:46:14 +01:00
Tomaž Vajngerl
2861299c77 make vereign server configurable, dynamically show sign. infobar
document_signing_url in loolwsd now accepts a vereign server URL
endpoint. If not provided, the signing functionallity won't be
available.

The document signing infobar is now shown dynamically so by
default it is not shown, but when the users clicks in menu the
"sign document", the infobar is shown (the document-content is
css "top" value is adjusted via JQuery).

Change-Id: I9d5f6b68ba3612eeeb9de28c9c0333b4d1bf41d8
Reviewed-on: https://gerrit.libreoffice.org/64298
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 22:46:07 +01:00
Tomaž Vajngerl
2645829f40 don't assert in this case, better to return
Change-Id: I38cef1185bef0de67bbb579c5c64e2697f953b0b
Reviewed-on: https://gerrit.libreoffice.org/64297
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 22:46:00 +01:00
Tomaž Vajngerl
9e61f831f0 Move toolbar click handling to Signing.js to keep func. together
Change-Id: I0c721a2b7b46f7fe59d7a70deffbdb0b4d96d1af
Reviewed-on: https://gerrit.libreoffice.org/64285
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 21:49:58 +01:00
Tomaž Vajngerl
5b22fac214 Upload document to Vereign
Save document to a input format (either PDF, ODT, DOCX) and send
the document to Vereign using WOPI protocol.

Change-Id: If9a7d88e91d07c7f1f831c01793f0f73d7a98131
Reviewed-on: https://gerrit.libreoffice.org/63839
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 21:49:51 +01:00
Tomaž Vajngerl
91218de5b0 extract vereign server URL
Change-Id: I11fb8b26a1919550817f07502bb3dca0541487be
Reviewed-on: https://gerrit.libreoffice.org/63838
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 21:47:31 +01:00
Tomaž Vajngerl
15b8f96009 Vereign login logic and dialogs
This adds various Vereign login dialogs:
- pin code dialog
- QR dialog
- email/sms dialog

Change-Id: I2400c76a7dbbb44ead10f6baaac561a71d3acd7f
Reviewed-on: https://gerrit.libreoffice.org/63837
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 21:47:23 +01:00
Tomaž Vajngerl
73c8fa9d09 Extract Authorization out of Auth and put it into common
This is needed so we can use this inside ChildSession.

Change-Id: I88f2cc767412fd52dbb242938f0f9897d4277639
Reviewed-on: https://gerrit.libreoffice.org/63836
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 21:47:13 +01:00
Tomaž Vajngerl
089e58880f Add passport selection to infobar
Change-Id: I9e997c22b3ecce249b33cc97acecc78fd34fae32
Reviewed-on: https://gerrit.libreoffice.org/63414
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 21:47:05 +01:00
Tomaž Vajngerl
77e67f44b9 separate lib. init. from login, show UI elements on state change
It is needed to separate initialization of the library and login
(the button) as you may already be logged in if you have
credentials in the local storage (already logged in through
vereign website for example). So behaviour now is either you get
logged in immediately or you get a login button.

There is a lot of state changes where various elements of the
infobar are show or hidden. To make it easier to track the changes
it is necessary to have showing/hiding at one function which is
triggered every time a state change may occur.

Change-Id: I0f36f342baaf80dc109f608e294b89a955a6572e
Reviewed-on: https://gerrit.libreoffice.org/63413
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 21:46:57 +01:00
Tomaž Vajngerl
8c298875d3 add login to vereign into signing infobar
Change-Id: I0904b9cea3d2248e35313d642da4d3805246232d
Reviewed-on: https://gerrit.libreoffice.org/63412
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-11-29 21:46:48 +01:00
Tor Lillqvist
e4ddfa313c Bump CFBundleVersion
Change-Id: Idee621d0fa41dd5a65157267da35e245405c125c
2018-11-29 21:13:21 +02:00
Tor Lillqvist
e7ef0c29f9 Fix a problem when taking a photo to insert in a document in the iOS app
It turns out that the view of the DocumentViewController object is
removed from the view hierarchy when the camera is displayed, and
re-added after you choose to use the taken photo. Thus the
viewWillAppear: method is called again at that stage. The Document
object is stil quite intact, though. We should not call the Document
object's openWithCompletionHandler: method again, as that will cause
horrible brokenness.

Change-Id: Ib79bd8f292b01a19866278c4d95a2e816dcd9235
2018-11-29 19:21:49 +02:00
Tor Lillqvist
ef18d2f493 Fix ofstream API used to write an inserted image in the mobile app case
Change-Id: I67f8a74376a46f0cfd01ee4236960b29d4bc6372
2018-11-29 15:07:50 +02:00
Tor Lillqvist
d564af04d6 Do pass Alt + non-printing keys through with the Alt modifier intact
Such commands are used for formatting functionality. (For instance,
Alt+Left or Alt+Right to shrink or grow a column in a spreadsheet, or
Alt+Enter to insert a paragraph just before a table in a text
document.)

All the uses of Alt in the meaning "alternate character input" on an
Apple keyboard are with keys for printing characters, like Alt+2 = @
on a Swedish/Finnish keyboard.

Change-Id: I6cfde57f540ac92c63420c8d7344102645050dd0
Reviewed-on: https://gerrit.libreoffice.org/64246
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2018-11-29 13:35:59 +01:00
Tor Lillqvist
9d8cc0b766 Initial attempt at C++ part of image insertion in the mobile app
Change-Id: I4b10f168f9283ba8a3f10dc272e24032af13b23b
2018-11-29 13:00:35 +02:00
Tor Lillqvist
af1bc0bfa5 Implement JavaScript parts of inserting an image in a mobile app
We must read the image file contents using a FileReader and then pass
on the data to the Online code in a message. Re-use the same
"insertfile" message used in web-based Online, but add a "data"
parameter that contains the base64-encoded image file contents.

Change-Id: I95c5668ac8da9d03dbcf19a921e5fba045d7a94f
2018-11-29 11:29:45 +02:00
Tor Lillqvist
d46854680c Also ios/config.h is generated at configure time
Change-Id: I285cadfe037f054a331d4513bf999f10c1ef1ed9
2018-11-29 11:01:50 +02:00
Samuel Mehrbrodt
c0d0ad7368 Add postMessage methods to show/hide toolbar buttons
Change-Id: Ib5ecde5a53aa0aae2346e360423e72025edade3a
2018-11-29 09:34:37 +01:00
Samuel Mehrbrodt
1d9a9e834a Always allow frame embedding in debug mode
Change-Id: I81c434cfd75c0732e8b6aaaba1392059b0637182
2018-11-29 09:34:37 +01:00
Samuel Mehrbrodt
40f80ea149 Change url to work in any version
Change-Id: Ie11c91d36d39b3a3ecc8eda01f556d25d3ef847a
2018-11-29 09:34:37 +01:00
Samuel Mehrbrodt
2e7f67f33b Show "Insert footnote" toolbar button only in Writer
Change-Id: I542a43b27f8d3beddad4c932a79812b404da63b8
2018-11-29 09:34:37 +01:00
Miklos Vajna
dc4712c3f9 wsd: limit_load_secs is not interesting for the mobile case, either
Change-Id: I92ad4bea80c261cc802ccdbebc1ce2990260853e
2018-11-29 08:52:57 +01:00
Miklos Vajna
0e312f9016 Fix gtk build: -Werror=unused-but-set-variable 2018-11-29 08:51:26 +01:00