Commit graph

346 commits

Author SHA1 Message Date
Marco Cecchetti
2a86260988 hidpi dialogs: passing dpi scale value with the paintwindow msg
Change-Id: Icd0f48c98410af32e65bb44c413dfeb078ab8774
2018-11-19 13:38:20 +02:00
Miklos Vajna
cd08cbf385 Session: make members private 2018-11-13 09:04:19 +01: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
Miklos Vajna
c863e52001 RecordedEvent: make members private 2018-11-12 09:04:01 +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
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
Miklos Vajna
83bd75476e StateRecorder: make members private 2018-11-09 08:41:35 +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
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
adbcc28273 If we skipped all tiles, don't bother sending an empty tilecombine: message
It would just be ignored later anyway, and produce the warning "WRN
Dropping empty tilecombine response".

Change-Id: I6d92367262dc306369f2ca6c2e1964b5d151acc1
Reviewed-on: https://gerrit.libreoffice.org/63013
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-11-07 14:19:02 +01:00
Miklos Vajna
175ddd4c40 DeltaData: make members private 2018-11-07 09:09:12 +01:00
Miklos Vajna
af22ebbbc0 CacheEntry: make members private 2018-11-05 10:04:22 +01:00
Tor Lillqvist
b52456aeee Use non-empty dummy values of 'jailId' and 'pid'
Just in case some code checks them for being non-empty.

Change-Id: I6e595272f3fb6d3c2e57a31c291a89b0fb02563a
2018-11-01 18:34:14 +02:00
Jan Holesovsky
8c9e126a23 Insert graphic: Pass the remote url to the core for download & insertion.
Change-Id: I871de173c255dcb7b184582e486328d7f66a2fae
2018-10-31 18:12:07 +01:00
Miklos Vajna
4c423fad84 CallbackDescriptor: make members private 2018-10-31 09:02:15 +01:00
Tor Lillqvist
ffe66b3efc Avoid 'Unused variable' warnings in the MOBILEAPP casse
Change-Id: I30d631559379da4baa5a73712f002435b1a36360
2018-10-30 22:03:04 +02:00
Tor Lillqvist
888b529ffc For MOBILEAPP, call SocketPoll::wakeupWorld() when lokit_main() is dying
This wakes up the mainWait poll in LOOLWSD::innerMain(), causing the
process to get back to the clean idle state right away, without having
to wait for the mainWait poll to get a timeout.

Change-Id: Ifbe586d41661737be2864bedaddf9a40d23501f4
2018-10-30 21:09:43 +02:00
Miklos Vajna
54d788e69b UserInfo: make members private 2018-10-30 08:41:52 +01:00
Tor Lillqvist
f7ebab8902 Use Poco to convert from pathname to URI
(Yesterday I talked about GLib in a commit message, I meant Poco of
course, for this source file. It's gtk/mobile.cpp that uses GTK+.)
2018-10-26 10:22:33 +03:00
Tor Lillqvist
3b901020d2 Actually it's enough to pass instdir as the 2nd parameter to lok_init_2()
The "/user" will be tacked on by core code anyway. We don't need two
levels of "/user".
2018-10-25 16:02:45 +03:00
Tor Lillqvist
76ff3d5c2a The 2nd parameter to lok_init_2 should be a URL
Sure, there is some GLib API I could use to properly convert from a
pathname to a file: URL. But I am lazy, and this is not an end-user
program.
2018-10-25 16:02:45 +03:00
Tor Lillqvist
5b13757d4a Remove obsolete comment
"-1" was changed to "all" (the meaning of which is more obvious) over
a year ago.

Change-Id: I929cff2b35c7493efeb523bf30b6967b983bc068
2018-10-23 13:20:53 +03:00
Tor Lillqvist
fc2023723e Attempt to fix the thread problems in the GTK+ testbed app
Use g_idle_add() to make the webkit_web_view_run_javascript() call run
on the GTK+ thread. Correspondingly, need to use a separate
short-lived thread to do the fakeSocketWrite() calls from
handle_lool_message(), so that the GTK+ main loop is ready to run the
added lambda. Or something like that.

Now it gets a bit further, doesn't crash, but just sudddenly exits
before showing the document even.
2018-10-17 23:30:26 +03:00
Tor Lillqvist
d1e550f01e Reset the global 'document' variable to null when not needed any more
Doesn't matter in "real" Online where the kit process will die shortly
after that ayway, but matters a lot in the mobile app, where there is
just one process all the time that handles document after document.

Now I can successfully load another document after closing the first
in the iOS app.
2018-10-17 20:10:52 +03:00
Tor Lillqvist
fb8e6dd820 For MOBILEAPP, don't set TerminationFlag in KitWebSocketHandler::onDisconnect()
Helps in the struggle to get loading of another document after closing
the first to work.
2018-10-17 20:10:52 +03:00
Tor Lillqvist
bd8d612c9f In the MOBILEAPP case, don't set TerminationFlag when there are no sessions
The global TerminationFlag is an abomination that has caused lots of
trouble when developing the mobile app. The less we use it the better.
Here, it gets set elsewhere already when needed; just having no
sessions is not reason enough to set it.
2018-10-17 20:10:52 +03:00
Tor Lillqvist
9afe021b86 Move the non-namespaced anonymizeUrl() to build for MOBILEAPP, too
Also, initialise the AnonymizeFilenames and AnonymizeUsernames
variables to false in the MOBILEAPP case.
2018-10-17 12:35:34 +03:00
Tor Lillqvist
017df44f89 Bypass bTraceStartup thing on MOBILEAPP 2018-10-17 11:48:51 +03:00
Ashod Nakashian
4e186aca18 wsd: fixed remaining anonymization issues
(cherry picked from commit b7f5809a792e2a0b816d3cfd96511cdd93582d15)

Change-Id: I756ccd4b810fdc4dd62a83c1704c59c6a947e615
2018-10-16 20:12:23 -04:00
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
00a44d6e81 wsd: flush logs before existing
This is important for when we abort with some explanation.
Often said explanation doesn't show up anywhere to be useful.

Also, issue fatal logs for abnormal exist and use SFL to log errno.

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

Change-Id: Ic67064ef40ef6e93d26e5847ecd32bdd49c3cc8b
2018-10-16 20:12:23 -04:00
Ashod Nakashian
053161b3f5 wsd: move string utilities into Util
Reviewed-on: https://gerrit.libreoffice.org/57539
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit fb2671c4145edd4d4e359f0dcf5cc84835487cd4)

Change-Id: Idc578dff4e8ee5e48c1b7780d3feb2d21c6a9b13
2018-10-16 20:12:23 -04:00
Ashod Nakashian
4587dde56f wsd: anonymize filename by using the WOPI file ID
Reviewed-on: https://gerrit.libreoffice.org/57254
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 5e3568ff1029da948f05d1c0e0c56c6d0706690e)

Change-Id: I869cae3846c8630b192246bc68cc90e70c50d1fd
2018-10-16 20:12:23 -04:00
Ashod Nakashian
1d5b6ca20b wsd: use obfascated user id when provided by WOPI
Change-Id: I69a17dff0e5e6b27e4538d9fe9019e4d1eebb16f
Reviewed-on: https://gerrit.libreoffice.org/57171
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
(cherry picked from commit 62dadb8aaa5cf9ba8cbbe0bc7f84dfc1076104c1)
2018-10-16 20:12:23 -04:00
Jan Holesovsky
564fd6c621 anonymization: Anonymize urls in Kit.cpp
(cherry picked from commit 3a530d247496e577ed994c9cbece5faebd68e850)

Change-Id: I02c24e53664dbc971e8b5b4bdc3e607a53769bd0
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
380c55d9eb wsd: disable tracing after initialization
The first child had tracing enabled even after
initial startup is completed. This would leak
user details when anonymization is enabled.

Change-Id: I5325e02d1a1078bff6640af85f5672b556c00aeb
2018-10-16 20:12:23 -04:00
Ashod Nakashian
f3d02cb9e2 wsd: support polling on client thread
Previously SocketPoll expected to be
running its own thread for polling.
This is unnecessary when we have a
spare thread (e.g. main) that can
(and should, for efficiency) be used
for polling rather than starting
dedicated thread.

Not starting the SocketPoll's thread
and calling SocketPoll::poll() directly
worked, the warning logs on each activity
notwithstanding.

The warnings aren't just noisy, they are
a performance drain as well, and signal
that something is wrong. The new code
now makes the API cleaner and avoids
unnecessary warning logs, while being
faster.

Change-Id: Ibf9a223c59dae6522a5fc2e5d84a8ef191b577b1
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
ef3e09728f Revert "Drop one use of TerminationFlag"
Turns out not to be useful for the iOS app after all.

This reverts commit bff5c17693.

Change-Id: I93367e9de1b6e66b1cbb7587259f1136564e53a4
2018-10-16 01:03:47 +03:00
Tor Lillqvist
c05079d6d5 Mention TerminationFlag in a couple more log lines
Why log something vague like "Stop flagged" when we can log what we
actually do?

Also, the log lines already include the name of the thread, so no need
to prefix with "Kit:".

Change-Id: I5a05492aa4e8a26714889cc6341a26862c80e4d0
2018-10-16 00:08:44 +03:00
Tor Lillqvist
bff5c17693 Drop one use of TerminationFlag
Doesn't help my current issue in the iOS app, but the less use of
TerminationFlag the better, I think. (Doesn't break 'make check' on
Linux.)

Change-Id: I8fef271d6e0e81dea92e0da76ecb7211239adab6
2018-10-15 17:59:40 +03:00
Tor Lillqvist
8ead4af199 Say "TerminationFlag" in logging when that is what we mean
We already did in other places.
2018-10-15 15:36:51 +03:00
Tor Lillqvist
7073d4feca Don't call std::_Exit() in the mobile app
Instead we should just exit the thread(s) that serve the document that
was being edited, and the app should return to showing the document
browser. (Or whatever we eventually will have as its state when the
user is not editing or viewing a document.) Work in progress.
2018-10-15 15:36:51 +03:00
Tor Lillqvist
ab54f21a54 Adapt to change in core: paintTile() now takes a buffer pointer also on iOS
Makes the code here a little bit simpler.
2018-10-10 16:31:38 +03:00
Tor Lillqvist
1f6eabafce Bin leftover verbose dump of part of a tile 2018-10-09 15:54:46 +03:00
Tamás Zolnai
07e99ad336 Fix tilesBeingRendered tracking by client
I changed the code in this commit:
c2a5f6acb0

To make kit send a tilecombine message even if it does not
send actual tile data so we can track that the rendering was
done and so we can update the clients' _tilesBeingRendered
list. The issue is that tileBeingRendered object
belongs to not only one client, but more and so we don't
know which client gets the actual empty tile response.

So revert this method and rather use a smaller timeout for "waiting" the
arrival of the rendered tile.

Change-Id: I2dbbab1a62b81cbbb5314f2f37fdbc3415c69130
2018-09-29 09:27:06 +02:00
Tor Lillqvist
f3786f5cb7 Pass correct argument on iOS as pBuffer to lok::Document::paintTile()
On iOS it shouldn't actually be pointer to a pixel char buffer, but a
craphics context reference. (This is how it has been since the
experimental TiledLibreOffice app, maybe five years ago? Sadly it
wasn't documented in the LibreOfficeKit include file. But it is how
LibreOfficeLight used the API, too.)

In TiledLibreOffice we rendered tiles directly into the CALayer of the
view. In this Online-based app we of course do render tiles into pixel
char buffers, just like in real Online, but we need to create bitmap
graphics contexts for them and pass that to paintTile().

Now I get white tiles, not totally zero-filled ones. But still no
document contents rendered.

I don't yet want to change the pBuffer parameter to actually be a
buffer pointer on iOS, too, like on other platforms. Also, changing it
will mean the LibreOfficeLight app would need changing, too, and I
don't feel like doing that. But ideally, sure, that should be done.
2018-09-21 10:29:56 +03: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
7fd28d5676 Revert part of my iOS related commit, causes compilation warning with Clang
Won't actually be needed anyway, the way the code is going in my work
tree.

Change-Id: I4480ed59fe96ddcfad8483517f2a23452606f332
Reviewed-on: https://gerrit.libreoffice.org/60576
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-17 12:51:07 +02: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
290137c99b Bin unnecessary assert(loKit)
We already explicitly check earlier, after attempting to create it,
and log a fatal error and exit on failure.

Change-Id: Ia3fde4026839a255d4d19932300e16a05f9a33d2
2018-09-12 13:36:00 +03:00
Tor Lillqvist
d5f913486a Add a clarifying comment
Change-Id: Ia32b3ad65dd410e0f9f9d18c11be2d566ca0d6e0
2018-09-11 13:01:37 +03:00
Tor Lillqvist
3110bea2ea Add two missing values to kitCallbackTypeToString() 2018-09-10 19:55:29 +03:00
Tor Lillqvist
75438baa70 More mobile app stuff, very much early state of work in progress
Re-think Linux vs mobile ifdefs a bit. Use #ifdef __linux only to
surround code that actually is Linux-specific. Use #ifdef MOBILEAPP
for code that is for a mobile version (with no separste wsd, forkit,
and kit processes, and with no WebSocket protocol used).

Bypass UnitFoo for mobile. Possibly we do want the UnitFoo stuff after
all on mobile, to run in some special testing mode? Hard to say, let's
skipt it for now.
2018-09-10 15:13:43 +03:00
Miklos Vajna
9ed7c1065c common, kit, test, wsd: these parameters are copied for each invocation ...
... but passing by const ref is enough
2018-08-13 09:26:15 +02:00
Jan Holesovsky
ac7d67f43e Fix networking in the chroot.
The needed files were not copied, and consequently the hostname
resolution did not work in the chroot.

Change-Id: Id3dccc4f70cd1deeddb83c8e672f240e06748e34
2018-08-03 05:22:03 +02:00
Tamás Zolnai
c2a5f6acb0 Store number of tiles sent to kit for rendering
and use that info also to avoid sending to much tiles on the network.

Change-Id: Iab2d7af64693047a3c1cfe9f73de80a7100bbc13
2018-07-24 20:52:53 +02: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
Michael Meeks
7e6e81eb46 Implement client websocket masking.
Disable this for easy strace debugging and a bit of perf. to the forkit.

Change-Id: Ia330582817481410d26df50db5eb42b4692ad01c
2018-06-15 14:54:19 +01:00
Ashod Nakashian
b9db83518b wsd: warn when we have no kits and we are not exiting just yet
Change-Id: I8c19dcea3eb900a989aebac7ef96793af31bdce8
Reviewed-on: https://gerrit.libreoffice.org/55576
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-06-14 17:05:46 +02:00
Miklos Vajna
d718b1c054 kit: let alphaBlend() take an std::vector<char> instead of raw pointer
So that it's more obvious that the two for loops don't read past the end
of the vector.

Change-Id: I49752c1bc316b6d73568ab334b07727ef60bdce5
2018-05-28 09:12:30 +02:00
Miklos Vajna
8f4c348be3 kit: let getPixmap() return an std::vector<char> instead of raw pointer
So the callers can know not only the address of the pixmap, but also the
size of it.

Change-Id: I3aecc33cb354f5878364b11398c276fcabd3103e
2018-05-25 09:11:54 +02:00
Miklos Vajna
51631b4e22 kit: remove unused using declarations
Change-Id: Ide76d327b3b064180aa4eaa28f13827d665edaa5
2018-05-23 09:14:04 +02:00
Michael Meeks
c5cef26fb6 Shutdown kit process if connection dies.
Change-Id: I34e627a03a9859ccd3ae9f9925fe6ab080697b72
2018-05-18 16:06:03 +01:00
Jan Holesovsky
6c31b7793c Post the message to the poll thread.
Change-Id: Ibd28090a420b5396b64fdfe676bef8cf06991116
2018-05-18 15:16:40 +02:00
Jan Holesovsky
6996139e5f Use correct path in the client websockets.
Change-Id: Ie0bf6646ff3f6e6cf99b505143a416c86a3a33b8
2018-05-18 15:16:40 +02:00
Jan Holesovsky
98ed24257b Move the functionality from connectToMonitor() to SocketPoll.
Change-Id: Iab2ac09638323f5e59f7a2ea0d880f52989ad64d
2018-05-18 15:16:40 +02:00
Jan Holesovsky
35ec3649bb Change Kit to use the new client websocket code.
Change-Id: Ib4e62ea618da5bd8992b51165b0d7ee955c61637
2018-05-18 15:16:40 +02: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
Miklos Vajna
cb761748ed Avoid unnecessary copy-initialization
These are copy-constructed from a const reference but are only used as
const reference; make them a const reference.

Change-Id: Id193905b65224c2db4aab88999a92e60d3af3fdf
2018-04-17 09:13:54 +02:00
Michael Meeks
03bbe52665 Ensure the forkit does not have lingering threads after preinit.
Change-Id: I216a03a0ada628189355ebfd4016bf6033430eef
2018-04-16 20:04:23 +01:00
Tamás Zolnai
ffd7151443 Writer: View jumps to cursor position even if it is moved by an other view.
Need to get the viewid which moved our visible cursor, so we can check
whether it positioned changed by the owner of the cursor or not.

Change-Id: Ie7b1fafc8d8f11fba0c0b0d5f02d755e15284514
Reviewed-on: https://gerrit.libreoffice.org/52571
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-04-10 17:00:21 +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
Marco Cecchetti
d887b08d60 calc: added support for hidden sheets and validation of cell content
Change-Id: I5db971b8826de7d5be2f88354925cd107082da77
Reviewed-on: https://gerrit.libreoffice.org/49112
Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2018-04-03 21:41:22 +02:00
Tor Lillqvist
e9ea5e8bc7 Python is also a special snowflake
Change-Id: I1689f992494e1abe50c45b1ae975b76b00e1b080
2018-03-28 20:17:32 +03:00
Michael Meeks
ad21717498 Avoid copying most code into the chroot jail.
Last lingering bits are the xpdfimport import support and
some horrors required for NSS.

This requires a reasonably new core.

Change-Id: I2e08b841668722af0e3b947cf2b06687cca73b53
2018-03-28 16:38:10 +01: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
Tor Lillqvist
bb4c1a7fa7 Don't filter out all scripts, just Java and JavaScript ones
Change-Id: I3054a3f36ae1777b162fb5a1b9a456f1bce9248b
Reviewed-on: https://gerrit.libreoffice.org/51991
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2018-03-28 11:18:43 +02: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
Michael Meeks
8f134aa1a9 Allow running without seccomp and capabilities.
There are some significant security trade-offs here which are now
at least configurable.

Change-Id: I1d879d69e91392f4ccf5db250a2277f53df60db7
2018-03-19 20:46:17 +00:00
Michael Meeks
6803ee4087 Use a hard random /tmp directory for document intermediates.
Requires a lok tweak to reset the tmpdir globals on init.

Change-Id: I602705f20fa016ef415088be8d1ada6d465d2a8d
2018-03-15 11:01:51 +00:00
Miklos Vajna
b6e1a4e281 kit: avoid manual management for Watermark::_pixmap
A simple std::vector is enough here and results in simpler code.

Change-Id: I7e6ad268aca13c4efb445c7918a3afd14e0ed146
2018-03-14 09:04:36 +01: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
b834545e79 kit: makeRenderParams now static
Change-Id: I1c79991a73044a91ed9f8389e23ccffd8b2bcbce
Reviewed-on: https://gerrit.libreoffice.org/49572
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2018-02-11 22:17:02 +01:00
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
Samuel Mehrbrodt
00dc0658d3 Missing capabilities: Add hint to check mount options
Change-Id: I946df0082b385b2eaaad9c23b9e5e7ac508f64aa
2018-01-31 11:45:03 +01:00
Samuel Mehrbrodt
e89584f933 Show info instead of error when linking is not possible
we still try to copy the file after this and fail if that doesn't work.

Change-Id: Ie37022b2454e71f4b1a92217e01e56e58070448b
Reviewed-on: https://gerrit.libreoffice.org/48907
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-01-30 14:33:51 +01:00