Commit graph

74 commits

Author SHA1 Message Date
Ashod Nakashian
b6333ada8d wsd: anonymization improvements and unittests
Also support anonymization of downloadas documents
and renaming of documents.

Reviewed-on: https://gerrit.libreoffice.org/57541
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 78248a542c9ca31bf9ad4cad9b55d78690384395)

Change-Id: I81a80e6290217659987d73f625e5f0fb81cb7ef2
2018-10-16 20:12:23 -04:00
Ashod Nakashian
a483d7ddef wsd: anonymize saveas
Change-Id: I58e349781952a97c3251b0e52e26abb34d44e9c0
2018-10-16 20:12:23 -04:00
Ashod Nakashian
f8ec98c144 wsd: anonymize downloadas
Change-Id: I6dff7189d78d339f1f5db7afef2b62da4df23759
2018-10-16 20:12:23 -04:00
Ashod Nakashian
6c18aa7e88 kit: anonymize usernames and filenames in Kit
Change-Id: Id7928136db71ded7bf6b1a5e8e387db7251f8a35
2018-10-16 20:12:23 -04:00
Ashod Nakashian
a7a03c3c5d wsd: send copied text to client upon .uno:Copy
Change-Id: I39181a0e29e00a0eae389fbab6ee253cf2f23f84
2018-10-16 20:12:23 -04:00
Tor Lillqvist
95eb849217 Still more iOS app and related Online C++ code hacking
Re-think the plumbing between the different parts of the C++ Online
code. Do try to have it work more like in real Online on all but the
lowest socket level. Except that we don't have multiple processes, but
threads inside the same process. And instead of using actual system
sockets for WebSocket traffic between the threads, we use our own
FakeSocket things, with no WebSocket framing of messages.

Reduce the amount of #ifdef MOBILEAPP a bit also by compiling in the
UnitFoo things. Hardcode that so that no unit testing is ever
attempted, though. We don't try to dlopen any library.

Corresponding changes in the app Objective-C code. Plus fixes and
functionality improvements.

Now it gets so far that the JavaScript code thinks it has the document
tiles presented, and doesn't crash. But it hangs occasionally. And all
tiles show up blank.

Anyway, progress.

Change-Id: I769497c9a46ddb74984bc7af36d132b7b43895d4
2018-09-19 11:31:18 +03:00
Tor Lillqvist
87b85ff8f0 Be consistent in how we name "interface" abstract classes
We already use a suffix "Interface" for SocketHandlerInterface, so
rename IDocumentManager to DocumentManagerInterface.

Naming "interface" classes with an "I" prefix is C# and COM style.
Sure, that is a convention as good as any other, but let's try to be
consistent within this rather small code-base.

Change-Id: I9c356df327debd780f23ed2b2e6d6e630328861e
2018-09-12 19:27:23 +03:00
Tor Lillqvist
b59d160a08 Intermediate commit of work in progress on an iOS app
The app is unimaginatively called "Mobile" for now.

Runs but crashes pretty quickly after loading the document by the LO
core. Will need some heavy changes to get a ClientSession object
created in there, too, to handle the (emulated) WebSocket messages
from the JavaScript. It would then handle some of these messages
itself, and forwards some to the ChildSession, which in this case is
in the same process. Now the messsages from the JavaScript go to a
ChildSession, which is wrong. As the assertion says, "Tile traffic
should go through the DocumentBroker-LoKit WS"
2018-09-12 18:32:05 +03:00
Tor Lillqvist
a8b41b0cbb Log also when retrying the saveAs
Although, at least for me, after calling LOK's saveAs with an
intentionally bogus file extension 'file:///user/docs/u0.frobozz'
retrying with 'file:///user/docs/u0.frobozz.odt' does not work either.

Actually, I am not sure how useful this retry feature is as it is now.
If the user tries to save as some unsupported format, why can we
assume that maybe they want to save in some other format instead, and
possibly overwrite an existing file? Maybe the retry should be done
only if the file name to saveAs was without extension? But that was
already discussed in gerrit, I see.

Change-Id: I8bd4fbf241cb492d9654ae893af4baaf28b6b3a0
2018-07-11 12:15:26 +03:00
Jan Holesovsky
62df2c114f Revert "ChildSession: use NoFileSync as default during convert-to as well"
This reverts commit 684d730221.

Change-Id: I4500e09f678f889ee5ea35cb0f36896de1e11824
2018-05-10 09:51:38 +02:00
Jan Holesovsky
7f3c4b9dd8 Revert "kit: use NoFileSync flag for save"
Turned out this might corrupt .ods files...

This reverts commit d0d87401c1.

Change-Id: I251de8c7d450fffb3b13a3c8eccf3921eddb9f80
2018-05-10 09:51:36 +02:00
Miklos Vajna
7e9ba2e8c6 tdf#117077 kit: opt-in to embed images in HTML export
Changing the default in core.git has various up and downsides, so just
opt in for embedding here.

Change-Id: I3f8013800e3fdf759fcb09bce848e8754c8aa44c
2018-04-27 14:32:32 +02:00
Marco Cecchetti
89f37b5dd5 calc: drop down button marker
Change-Id: Ic069ad40e6749f43709760e7f4f0d96b39d5a4ce
Reviewed-on: https://gerrit.libreoffice.org/51598
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2018-04-03 21:42:27 +02:00
Tor Lillqvist
630d8d736c We want notifications from vnd.sun.star.script: thingies, too
Change-Id: Ic407bcc1a2534854812c2732cc262f859d4adfe5
2018-03-28 12:28:13 +03:00
Miklos Vajna
684d730221 ChildSession: use NoFileSync as default during convert-to as well
This already worked for normal save, but not for convert-to.

Depends on core.git commit 0518bb5c3a98d973c3675fdd4cb8c52a669a3507
(desktop lok: handle NoFileSync in saveAs(), 2018-03-26).

Change-Id: Iec1a92fba2094f3954cc1a4ed6ee3372076fddc5
2018-03-27 09:20:50 +02:00
Pranav Kant
c73026cdf9 postExtTextInputEvent -> postWindowExtTextInputEvent
Change-Id: If5612bffac612ca7f52c8eec242e5ad9984cd669
2018-02-27 19:16:17 +05:30
Ashod Nakashian
1c4b458158 wsd: send valid empty JSON response
Change-Id: I066c22dd0ccc64cb6a40b1ff260269b1bac2de37
Reviewed-on: https://gerrit.libreoffice.org/50149
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-23 16:55:23 +01:00
Pranav Kant
fc4d6aeeb9 ime: Don't eat space
Encode/decode so that ' ' as payload of compositionupdate event doesn't
get lost.

Change-Id: Ia31abe85f1cf19f8f286c9069097bdc72297e664
2018-02-21 21:29:50 +05:30
Pranav Kant
6d4f02ac2a Adapt to IME API changes; better reuse of Map's key handler
Change-Id: I670243ea155ac698c694531d3fc16a574f418bf4
2018-02-14 23:50:51 +05:30
Ashod Nakashian
2562d8919a ut: log the test name for easier traceability
Change-Id: Icbcbb36857b748c2ac2d0d36a5c4c23609f5453a
Reviewed-on: https://gerrit.libreoffice.org/49568
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-11 19:22:14 +01:00
Pranav Kant
ad1da235d3 IME support
Dialogs still need to be adapted to this. Only works for documents as of
now.

Change-Id: I0fb1114e279a9e563943f3f65dd5a577523e9841
2018-02-08 14:16:34 +05:30
Miklos Vajna
e76485d8b9 kit: spell out non-trivial autos to improve readability
Change-Id: I69b025b08a69c8780d40b39074d7d7abb12cc3af
2018-02-07 10:18:12 +01:00
Tor Lillqvist
eb2e62ebcd Fix misleading trace output: There is nothing called CallbackWorker::callback
Change-Id: I951d4a7706e0009b5a7266c86ea5b66a29242448
2018-01-17 12:35:38 +02:00
Miklos Vajna
d0d87401c1 kit: use NoFileSync flag for save
What LibreOffice sees as a save destination is just a temporary output
from the outside, so there is no point in doing fsync for that file.

This depends on core.git e90a16d71cdcfbd785401613a2e5a29cb1167acf (sfx2
store: handle NoFileSync for Save (not SaveAs), 2018-01-15).
2018-01-16 09:59:27 +01:00
Pranav Kant
f63858433b loplugin:includeform
Change-Id: Ib62a7aa61062f00698aa3e8a144438de5c57e53d
2017-12-20 21:21:05 +05:30
Jan Holesovsky
2ef04a6446 lokdialog: Fix RGBA vs. BGRA confusion.
Change-Id: I42ce8f46ab09e9b6684ace0627323a013831c571
Reviewed-on: https://gerrit.libreoffice.org/46564
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-12-15 17:11:05 +01:00
Pranav Kant
a5d4c3bb90 lokdialog: Set view id before posting to LOK dialog api
Change-Id: I53925a71718f1acfc2337f86f97f4f5526546383
2017-12-05 02:39:26 +05:30
Pranav Kant
53fc694a3c lokdialog: Use dialog close LOK API when user clicks 'X'
Change-Id: I3a90eb8b83688eed7db8228763633e31f82e58d1
2017-12-05 00:41:19 +05:30
Pranav Kant
849eb0d500 lokdialog: Adapt to LOK dialog API changes
Change-Id: I653304e71573eb253e09a72bc87d54b8554ba7ff
2017-12-04 22:13:50 +05:30
Marco Cecchetti
29a233e5a9 calc: set outline state
use a specific message from the client for set the visibility state of
a group instead of hijacking the update row/column header message

Change-Id: I69d66b30db0b4d8a0082cbd2524120491d4f97cb
Reviewed-on: https://gerrit.libreoffice.org/45446
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2017-12-01 01:10:43 +01:00
Pranav Kant
a91f022e42 lokdialog: Remove getDialogInfo call; ncorrect dialog size handling
Change-Id: Ieff59baa984982bd8126102dafc5a97f673a4150
2017-11-29 13:35:12 +05:30
Pranav Kant
a19121bbbc Adapt to dialog API changes in LOK
... and bypass some unncessary DocumentBroker handling of dialog
messages.

Change-Id: I378dff7a9786479baaa43f5fde9d30f35bc7f948
2017-11-28 22:18:21 +05:30
Jan Holesovsky
676b6ca610 Save As: If the LOK's saveAs failed, try under a different name.
This helps when the caller omitted the extension...

Change-Id: Ib7602ce8fa88bc867198dbba36b2582145bd0994
Reviewed-on: https://gerrit.libreoffice.org/44405
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-11-10 11:08:53 +01:00
Jan Holesovsky
b20faa8bdc Save As: Advertise the correct size when uploading the new file.
Change-Id: I9b20c4bdb7ddc848437edceae1a77ddb49d55133
Reviewed-on: https://gerrit.libreoffice.org/44357
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2017-11-10 11:08:53 +01:00
Jan Holesovsky
6745464c70 tdf#99744 SaveAs: Report back to loleaflet that the saveas succeeded.
Change-Id: I670c8b4503c1a4c0a88001a1343f6dec2974e044
2017-10-26 11:11:38 +02:00
Jan Holesovsky
7ff432a370 tdf#99744 SaveAs: Reimplementation of the PutRelativeFile going through Kit.
This is necessary so that changing of the file type works.

Includes a unit test.

Change-Id: Id01d44e555b6bac1002ff950de461fd330602f63
2017-10-26 11:11:38 +02:00
Pranav Kant
e9e162b35e lokdialog: Mouse/key events, canvas use & child window impl.
Change-Id: If8ae5c284e7166d4a01bd664644134f11197f988
2017-10-25 00:39:03 -07:00
Pranav Kant
55de8e6c1b lokdialog: Add dialog related callbacks
Change-Id: I5dc54c4bdbaf066b3b089a00fbc89b943e73caae
2017-10-02 15:40:23 +05:30
Marco Cecchetti
dee39a562c support for rendering a watermark on each tile
Change-Id: I3edccac49a3bcd3d2493d8d7ef3a1ae29307e727
Reviewed-on: https://gerrit.libreoffice.org/41898
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-09-07 17:28:44 +02:00
Aditya Dewan
8ef4d33e15 Adding ruler to loleaflet
Change-Id: I585850a7111eb5ab70bc5b51a508eb29317b92ca
Reviewed-on: https://gerrit.libreoffice.org/40461
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-08-28 10:45:33 +02:00
Pranav Kant
ef54b6ea16 wsd: Ignore useractive, userinactive when doc is not loaded
Sometimes client sends a userinactive message while the document is
already being loaded, which leads to the kit process skipping sending
the result of LOK callbacks to the client.

Handling this in child session is futile in the case when userinactive
message is sent when the document is being loaded, since kit process
handles the 'userinactive' message only after document is loaded (i.e
isLoaded() returns true). Moving this handling to DocumentBroker will
take care of both the cases - when 'userinactive' is sent before load
starts, and during load of the document.

Change-Id: I4ea3ac7b184d2ca373eb3ff4fb7b4ae394d454df
2017-08-11 23:27:17 +05:30
Aditya Dewan
3a43f69116 tdf#108341 automatic editor switch and follow added
Change-Id: I5129256a0633916a3ca2cb05ccba39a5f4a5d398
Reviewed-on: https://gerrit.libreoffice.org/39299
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-07-06 09:46:49 +02:00
Ashod Nakashian
8a2c60e5b6 wsd: avoid race during viewinfo notification
Change-Id: If2d8adc67337a5529cb6898808a84727ff1df38e
Reviewed-on: https://gerrit.libreoffice.org/38123
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-29 06:47:42 +02:00
Ashod Nakashian
da2d3cbc92 wsd: support per-user links and commands
userextrainfo is a json array that contains
extra user-specific links.

Currently 'avatar' is assumed to hold the
image url for the user's avatar.

'mail' and other links can also be added.

Change-Id: I37c4c68bfa0b7ee659e017b4867dcb8cf5c2ca2f
Reviewed-on: https://gerrit.libreoffice.org/38120
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-29 06:45:18 +02:00
Ashod Nakashian
873cbcbe91 wsd: logging corrections
Change-Id: I35c52494137ea174c218bf936bc2440634036e3e
Reviewed-on: https://gerrit.libreoffice.org/37889
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-05-22 07:03:47 +02:00
Marco Cecchetti
024e786e85 calc: added an address input field
Change-Id: Ic030724e392693847a195b5e53866b40ebad7435
Reviewed-on: https://gerrit.libreoffice.org/37359
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2017-05-11 17:55:23 +02:00
Jan Holesovsky
04bf59060d inactive: Record also the change tracking and comments.
Unfortunately we need to record the entire sequences of what was happening.

Change-Id: I6c52f187e881dd3eadaea6958c0d49ed8f6942cb
Reviewed-on: https://gerrit.libreoffice.org/36960
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-04-25 18:20:03 +02:00
Jan Holesovsky
c36e619d24 inactive: Invalidate tiles when we return back to the active state.
Change-Id: Ib97d6463c52ecf153d3c19ab7efc47d99b71ce9b
2017-04-24 19:24:28 +02:00
Jan Holesovsky
e78c862c47 inactive: Replay the state payload, not the only the value.
We need to replay 'client-0054 statechanged: .uno:StateWordCount=5 words, 30 characters',
not 'client-0054 statechanged: 5 words, 30 characters'.

Change-Id: Ifd1fc7d6d567bcf209dffdd826400f5a5248aa7e
2017-04-24 19:24:15 +02:00
Marco Cecchetti
1e0deae3df Calc: changed the way header are updated on row/col insertion/deletion
Now when a row/col is inserted/removed or resized is the core to
notify the client that current header is no more valid and a new
header should be requested by the client to core.

In this way core can notify the header invalidation to all views.

Change-Id: Ia3c1872b73cfb3458cd0d35907291a9fc9eebd11
Reviewed-on: https://gerrit.libreoffice.org/36729
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-04-21 15:45:15 +02:00