Commit graph

44 commits

Author SHA1 Message Date
Jaume Pujantell
8f178ef6cd extract some functions to extra files for in process mode
Extract some functions from ForKit.cpp and COOLWSD.cpp to new files
so we can do a kit in process mode without using ifdef directives.

Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: I7529f8f46a8026318244666b27d1ce72ed5ad4ca
2023-12-18 10:34:10 +00:00
Tor Lillqvist
410270fd14 Actually use the safer (escaped) string we construct
Also, no reason to append a null byte to it.

Don't know why this worked even when not escaping "dangerous"
characters. Does Webkit have a more relaxed lexical analyser?

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Idfedcbf11a9ee565b954ba972e7e3bc9b804a122
2023-01-06 16:09:52 +02:00
Andras Timar
a077c4288b Put all Zotero logic to browser
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib1b071b96322511b7f319ff6b851e902b3556fbb
2022-12-12 13:35:29 +01:00
Tor Lillqvist
81263e7540 Need Zotero.cpp here, too
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ic0aaf8c944fa10ec370a0b733d1f5c881ea349ce
2022-12-01 15:22:56 +02:00
Gökay Şatır
8bcdc9d975 Enable developer console for webkit debugging.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I544abda3744fc5415a4dfd935e0df864c5765ca3
2022-11-29 17:50:11 +03:00
Tor Lillqvist
5305f14a29 The gtk app needs PNG_LIBS
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I075e69a385ec508d72a5d6e4b775dd932bca5184
2022-11-29 13:56:26 +02:00
Tor Lillqvist
da0e05a7a1 Make the gtk app work again
Apparently using a debug=true query parameter breaks tile
rendering. So let's not use that then. Now tiles show up.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ia458a6bdf35b956bf2570801d132211f600513f6
2022-11-24 16:09:03 +02:00
Tor Lillqvist
81c7d3aa1b Seems that the lang and userinterfacemode query parameters are needed
Now some UI stuff shows up on the cool page. No document tiles yet,
though.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I5cc33cc8df3a700ee752a3ad437cdb3aabfbca86
2022-11-24 16:09:03 +02:00
Tor Lillqvist
8aab57ef0f It seems that the gtk app takes a pathname, not a file: URI
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Id0764d3097f2b9f0a4ba1b699b63e026749f802b
2022-11-24 16:09:03 +02:00
Tor Lillqvist
a0fabb543c Probably must check for arbitrary binary data here, too, like in the iOS app
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ic6834f5f5b57035831778305ece9228d14bed930
2022-11-24 16:09:03 +02:00
Tor Lillqvist
459bba8dc2 Make the gtk app build again
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I000fdcc059c39cf3c0c4a9ec066f4039c653cb70
2022-11-24 15:02:10 +02:00
Ashod Nakashian
85eaefd741 gtk: mobile: don't cleanup log when failing
Change-Id: Ibd8d3d65f5fffc0abbc410e3f265c3eea0af6c40
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-08-02 14:45:12 -04:00
Ashod Nakashian
4e9b836ea6 wsd: always use Util::forcedExit to properly cleanup
We need to flush and shutdown logging before exiting,
so we can't use _exit/_Exit directly.

In addition, with profiling (e.g. code-coverage) we
must flush the profile data, lest it's all for naught.

Change-Id: I726c5a2f4e699c17dd0d7d5b1c86d856e0118b3c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-08-02 07:51:52 -04:00
Andras Timar
f07ff8c7e0 rename: remaining lool->cool changes
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib7d4e804bebe52dead8d53b0e0bbaed0f08bf3d0
2021-11-18 14:14:11 +01:00
Henry Castro
a8b628ee43 mobile: rename 'lool' -> 'cool'
Change-Id: Icea136704eaf13c6da0ec455a9e6207b57e2a7f6
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-17 09:17:58 +01:00
Henry Castro
705968cef5 gtk: rename loleaflet -> browser
Change-Id: Ib46a667f6add8b52600074d10db459e69b836d04
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00
Henry Castro
e0fe47be5f rename loleaflet.html -> cool.html
Change-Id: Iaa28f1269f8192755ec323396ae4ff054529f412
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00
Ashod Nakashian
28815ac33e gtk: always include config.h first
Change-Id: I8e1f57e5dd2935d9b22d906acbb75e28f84016f5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-06-19 17:44:59 -04:00
Andras Timar
0002fdfd6c fix license headers
Change-Id: I8623770b32d278a45357dc7f757fabfadd2b4af7
2020-10-01 11:56:43 +02:00
Jan-Marek Glogowski
52eeae509b Fix gtk fake mobile application build
Just adds the missing source files to the automake file.

Still it seems unmaintained since a year and doesn't look that
mobile at all (from my expectations), but it still works AFAI
can tell.

While at it add the mobile binary to .gitignore.

Change-Id: I7db21041c6848f94fcb4058c730385b077048a9c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98553
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-07-14 16:20:38 +02:00
Ashod Nakashian
9f7f6dca6a wsd: cleanup realpath call
The new utility is safer and more readable.

Change-Id: I3a86675378d458cb004e5534dbf2b401936d0e57
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98183
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-06 13:54:54 +02:00
Miklos Vajna
fdc731a07d gtk: fix typo
Change-Id: Ib8bcf8b578f1d926f26a0ebae15cfa36e5d922d2
2019-04-23 09:10:18 +02:00
Jan Holesovsky
e170797710 gtkapp: Drop this warning, clang complains about it.
Change-Id: I4f6f27f28d55a6529eb89732a8562e6e27d376af
2019-04-19 11:07:31 +02:00
Tor Lillqvist
14113e2349 Edits 2019-04-19 12:07:25 +03:00
Tor Lillqvist
b15a098882 Need -DGTKAPP here 2019-04-19 12:05:28 +03:00
Jan Holesovsky
4f5e262344 Revert "android: Various fixes to make the sending from the core to JS..."
Lets leave this optimization for later, this is incomplete, and does not
fix the problem which it was originally supposed to address.

This reverts commit bce922e8fd.

Change-Id: I5d2ee19058261c7612d36014181f509604c8acde
2019-02-20 00:38:16 +01:00
Jan Holesovsky
bce922e8fd android: Various fixes to make the sending from the core to JS working.
Change-Id: Idc22ccbae1effac9e2db5293703a768e033fd7e9
2019-02-19 10:56:58 +01:00
Jan Holesovsky
f76b36193d android: #if(n)def MOBILEAPP -> #if (!)MOBILEAPP for better reliability.
Change-Id: I5f9c9420b6c83601db1c8fdba4ae5a10b17b2107
2019-02-12 12:20:11 +01:00
Michael Meeks
33ecef7791 cleanup and simplify.
Change-Id: If90f8ccef4f223ae783363e9fc3a3e9fed644c24
2018-11-02 16:19:54 +00:00
Michael Meeks
647150427e gtk: compile with older WebKit JS interface too.
Change-Id: I62ce96932b77ea8051cfb2862cb4f617d2804c1d
2018-11-01 21:23:12 +00:00
Michael Meeks
52dace9d29 Disable SSL when configuring for mobile.
Change-Id: Ia337cde9f183849088d3712dd339f21b7d290fd7
2018-11-01 21:23:08 +00:00
Tor Lillqvist
2d2e3cf531 Take path to document to edit on the command line
Sure, could add more and more options to specify what LibreOffice
installation to run against, etc, like gtktiledviewer. That is not a
priority though, this is just a very basic testbed for now.
2018-10-26 11:53:49 +03:00
Tor Lillqvist
81f56d6d78 SCNR: Avoid forward declarations, just move the functions before their use 2018-10-26 10:47:57 +03:00
Tor Lillqvist
9360beb97f hello-world.odt does not exist out of the box
Need to copy from hello.odt, like the Makefile.am does when you 'make
run'.
2018-10-25 22:30:11 +03:00
Tor Lillqvist
16a805e290 Fix some memory management foo 2018-10-25 21:28:13 +03:00
Tor Lillqvist
5750b17988 Minor improvements 2018-10-23 22:13:23 +03:00
Tor Lillqvist
0c998539f3 Typo 2018-10-17 23:50:15 +03:00
Tor Lillqvist
89c8754225 Add gtk/README 2018-10-17 23:44:21 +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
452a0a46c2 More work on the GTK+ testbed app
Add plumbing to send messages from the Online code to the JavaScript
code, and vice versa. Similar to what is done for iOS.

Sadly, it crashes. Multi-thread issues. Not surprisingly, it crashes
when I call webkit_web_view_run_javascript() in another thread than
the one where the GTK+ and other Webkit calls were done. I need to
come up with some clever way to do everything from the same thread.

(On iOS, I use dispatch_async(dispatch_get_main_queue(),...) to
schedule a block (i.e., a lambda expression) to be run in the main
thread.)
2018-10-17 22:48:14 +03:00
Tor Lillqvist
f122e92977 Build the GTK+ testbed app using autofoo
Rename the gtk/gtk.h file to gtk/gtk.hpp to not have it confused with
the actual GTK+ <gtk/gtk.h>.
2018-10-17 11:00:28 +03:00
Tor Lillqvist
1d495e626f Forgot to commit this file
Change-Id: I6650583931f3c09a8c3d75c38a2e0dbceae5853d
2018-10-17 02:01:16 +03:00
Tor Lillqvist
8ceb8950e8 Add handlers for messages from JS
Change-Id: Ifa3acfd09e10dbee4ecf43bec5735263e3655790
2018-10-17 01:04:05 +03:00
Tor Lillqvist
58db979291 Start on a gtk+-based workalike to the iOS app
The idea is that it would work sufficiently identically, so that even
people without a Mac and without an iOS device could participate in
development of the non-iOS-specific bits, like the JavaScript, or the
online MOBILEAPP-specific plumbing. Which would be great.

No, this doesn't do anything sane yet. It does compile the same online
C++ files as the iOS app, though. (Some minor tweaks were needed in a
couple of them to silence gcc warnings.)

There is a plain Makefile, but I should change to using autofoo, too.
Eventually, this will need to be built in a separate tree from a
normal online, just like when using the --enable-iosapp configure
switch. (But for now, doesn't matter.)

Change-Id: I13e4d921acb99d802d2f9da4b0df4a237ca60ad6
2018-10-17 00:45:35 +03:00