Commit graph

8471 commits

Author SHA1 Message Date
Jan Holesovsky
82bcd8db73 Add a comment where the HULLO response is handled.
Useful for git grep HULLO :-)

Change-Id: Ia7696f91f6452aaab6df95b640ac361b4904d4b5
Reviewed-on: https://gerrit.libreoffice.org/76300
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-07-25 13:03:09 +02:00
Henry Castro
393db38ce2 kit: take ownership when saving a document template
Otherwise, it causes error log:
ERR  Cannot save docKey [/filename], the .uno:Save has failed in LOK.

Change-Id: Ic99807848def72f76471c4f999ebeed9a7c0a2c8
2019-07-25 07:59:24 +02:00
Jan Holesovsky
635f0627f2 Fix build.
Change-Id: I3e7dc00a8acdaf0ad1a07c0cd55ff7bff7b64295
2019-07-25 07:58:19 +02:00
Henry Castro
760864870f wsd: introduce "TemplateSource" WOPI property
Change-Id: I9df1d5d0d4be7fe10ee15c40c36195c86ccf857e
Reviewed-on: https://gerrit.libreoffice.org/76190
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-07-24 12:10:15 +02:00
Tor Lillqvist
f7a70ba9d3 tdf#125681: Get rid of ChildSession::getDocumentMutex() and associated code
Now with the "Unipoll" concept all this locking is unnecessary as the
kit process is single-threaded, and actually it is harmful as the bug
shows.

Michael explains in chat:

But in fact - we should be a single threaded kit process there now. We
are protected by the solar-mutex (which is recursive) while our
locking is not. This was the whole point of the Unipoll refactor: to
remove the extra threads, complex queues, etc. etc. I just left the
mutexes. Even a recursive mutex won't work there; since it needs to be
drop-able and transferable to another (LOK internal thread) in Yield,
so - we should remove them.

Change-Id: I7d1e1dfb0e20f14134be5f81da057539b0f86ab9
Reviewed-on: https://gerrit.libreoffice.org/75849
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-07-24 12:09:24 +02:00
Samuel Mehrbrodt
3dd8364056 Font list empty in some cases
The list of font sizes was taken from the font info. This causes
problems when the document uses a font which is not available on the system.

As there is no obvious reason, why the list of font sizes should depend on the font
(and update with every font change), remove this dependency and just populate
the list of fonts once.
If the document uses a font size which is not in the list, it still will be added to
the font size list.

Change-Id: I4d434244b341c8e782138e5a6df85a50ddad3df5
Reviewed-on: https://gerrit.libreoffice.org/75959
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-07-24 07:43:17 +02:00
Jan Holesovsky
68b33ba7f2 android: Load the document only after we've got the permission.
Without this, the first start was failing, there was only a black screen
and the request for permission.

Change-Id: I7929048ca51b044dcb574f48bd2b7bc9a27e0ec8
2019-07-23 14:20:25 +02:00
Jan Holesovsky
1d549fa9dd android: Obviously we need to request for writing, not only reading.
Change-Id: I68927593bd17a6ee6de0c1d879d6b05372c1350e
2019-07-23 12:40:09 +02:00
Jan Holesovsky
a04ed68104 android: No need for the extra wrapper, use the LOActivity directly.
Change-Id: Ie4afaedcc3b255c83c570acea02101d284e85653
2019-07-23 12:40:09 +02:00
kaishu-sahu
73f839164a android: add cut, copy, paste support to document viewer.
Change-Id: I85c3a602ab7e98272a193c392bf7bcfd1050dc90
Reviewed-on: https://gerrit.libreoffice.org/74127
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-07-22 12:03:09 +02:00
kaishu-sahu
f5a67c696d android: fix keyboard popping out on clicking edit button.
Change-Id: I619955a38998ce4091e7d432b989ef487a928a69
Reviewed-on: https://gerrit.libreoffice.org/74720
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-07-22 10:10:43 +02:00
George
360d5a0956 added server uptime field to admin console
Change-Id: Id23fee1299b87095f186ce7aaa8c2d2e0f3cef52
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2019-07-19 21:14:01 +01:00
Jan Holesovsky
2f7fac7547 android: Fix the LOActivity lifecycle in several ways.
First of all, we shouldn't destroy the document in onStop(), instead do
that in onDestroy().  onStop() should only (auto-)save the document, but
otherwise keep it open, so that when we return from the file picker
Activity, the caret is at the same position as it was before.

In addition to that, we should close any open document before we try to
open the new one (in createLOOLWSD).

And finally, when closing the document, we should wait until after the
LOOLWSD is completely torn down, so that we avoid the risk that the user
tries to load another document too quickly, and the messages from the JS
go into the old, still running LOOLWSD.

Change-Id: Ib775021bccc5d5bc69aae392a88dc62a7c05a8fa
2019-07-19 17:59:06 +02:00
Jan Holesovsky
155718796e android: Fix a threading / ordering issue.
Sometimes when closing & reloading a document, the JS ended up with:

cmd=/storage/0/...document_name... type=unknown

error.  The problem was that the HULLO response came later than the next
message in the queue which was

loolclient 0.1

So LOOLWSd tried to load the document called "loolclient 0.1", which
failed, and then it did not know what to do with the "/storage/0/..."
which it understood as a command.

Seems we don't need to send the stuff from a thread on Android, so let's
avoid that, instead of setting up another sender queue here.

Change-Id: I96b4ad13153f1cad6aeb7fc71efcb402edbdc6d2
2019-07-19 17:58:58 +02:00
kaishu-sahu
89a8ce6009 android: add insert image feature to document viewer
Change-Id: I19cb8ef93606cf1bba7341f0d258487b604ad10e
2019-07-19 17:58:49 +02:00
Samuel Mehrbrodt
ec56d52f61 Fix tooltip for "BackColor"
Change-Id: Ic7c41851e79bb74e6080795fe4823cc637047bfe
Reviewed-on: https://gerrit.libreoffice.org/75868
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-07-19 13:06:18 +02:00
Samuel Mehrbrodt
15e2e91fc7 Add API methods to hide/show ruler
Change-Id: I4d14d9d68e7ebda56c80a1ad678a21c67ffd5ac2
Reviewed-on: https://gerrit.libreoffice.org/72265
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-07-16 09:11:21 +02:00
Jan Holesovsky
397e7236c9 android: Issue an error message when the document cannot be loaded.
Instead of keep spinning the spinner, show an error message.

Relevant for iOS too I guess.

Change-Id: I9fb45a1808a12e133bc2548c4cf07c1ba8bb629f
2019-07-15 20:18:09 +02:00
Jan Holesovsky
fd4d896a7f android: Rename the .xml files to avoid potential conflicts.
Change-Id: I6209309c038f16aff150494adf14953aa6f31541
2019-07-15 19:41:44 +02:00
Henry Castro
41c6d402f4 loleaflet: mobile: enable graphic dragging
Change-Id: Ia6ef34ff99891ad249d6f7aa6ed5915723d1013b
Reviewed-on: https://gerrit.libreoffice.org/75619
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-15 11:31:22 +02:00
Marco Cecchetti
c72e68154f loleaflet: mobile enable tripletap for opening links
Change-Id: I9bcf7dfda7984b51f7be4c195496a892046077bc
Reviewed-on: https://gerrit.libreoffice.org/75618
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-15 11:31:13 +02:00
Szymon Kłos
02be8f962d Increase selectable cell area
Change-Id: If9ca302253369bfa5708097106507e8f3d8d398b
Reviewed-on: https://gerrit.libreoffice.org/75617
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-15 11:31:03 +02:00
Jan Holesovsky
2b13c69d75 android: Split the actual editing Activity into an own library.
This way, it is more naturally visible what is the actuall app (with the
initial recent documents / file picker) and the editing part.

Change-Id: Ia764f2900939e980f703e3da9f9abd6c0aee7cbb
2019-07-12 11:52:56 +02:00
Florin Ciornei
fa6e1054a9 Set focus on document after closing copy/paste/cut warning.
Change-Id: I4e241278bea441f77e6b7780d69e540f9e6d4771
Reviewed-on: https://gerrit.libreoffice.org/72838
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit 79468654f54358c77ee8240053cccdd69fc055b3)
Reviewed-on: https://gerrit.libreoffice.org/75435
Reviewed-by: Aron Budea <aron.budea@collabora.com>
Tested-by: Aron Budea <aron.budea@collabora.com>
2019-07-11 21:57:54 +02:00
Henry Castro
5a1a057854 loleaflet: mobile: remove Map.CalcTap initialisation
follow up:
"create Map.CalcTap handler when initialize L.Map"

remove init in Socket.js which was include in the
original commit

Change-Id: If26278dc655ff4434bce0ca21d4b63623f2cdd17
2019-07-11 16:51:02 +09:00
Henry Castro
fcdcfa3e7c aloleaflet: mobile: activate manual drag and drop
In order to reuse code to handle drag and drop, it is necessary to
handle without listening the drag events. The Hammer library has an
event called "swipe" and it can be used to simulate drag and drop.

Change-Id: I1ed4e9422cd9bd98bdede88f2c994bdbba4adc4c
2019-07-11 16:51:02 +09:00
Henry Castro
b5f2ad76db loleaflet: mobile: prevent more default actions
Occurs that some devices support touch and pointer events,
and the combination emit mouse events

Change-Id: I85a6a918d2e39ec1b60105a15d35856fd5600ebb
2019-07-11 16:51:02 +09:00
Henry Castro
f519ff51c4 Revert "loleaflet: mobile: check against undefined values"
This reverts commit aa0c968976416b16af071787c99204068f91482c.

It was a bad idea, it breaks panning on IOS devices
2019-07-11 16:51:02 +09:00
Henry Castro
166d0beb79 loleaflet: mobile: avoid undefined values when panning
Change-Id: I3e67b52b383e11ea2e98831e040edc5ae0650910
2019-07-11 16:51:02 +09:00
Henry Castro
fb2a9a0e37 loleaflet: mobile: remove Map.TouchZoom
It is obsolete and now we use hammerjs library

Change-Id: I9126e694767a8fca372c8e6c608f38626b76537b
2019-07-11 16:51:02 +09:00
Henry Castro
fa757db186 loleaflet: mobile: check against undefined values
Change-Id: Ic353d381b8a39eb548122d0324d2048728d887fe
2019-07-11 16:51:02 +09:00
Henry Castro
7e71b32a00 loleaflet: mobile: add handlers to pinch events
Change-Id: Ibc757415e6bb9da9654b08c05e96560991d9d4b1
2019-07-11 16:51:02 +09:00
Henry Castro
f0d803b7c0 loleaflet: mobile: remove context toolbar
It is no longer need it because the context menu has the same
functionality

Change-Id: I8f0cfa0ff8ea6d0d564e5edb7eeabdf369952926
2019-07-11 16:51:02 +09:00
Henry Castro
cf7436a58e loleaflet: mobile: do no use setTimeout to set focus
Change-Id: I83f03f00aa3a09af04a83368c14a79901ea401e6
2019-07-11 16:51:02 +09:00
Henry Castro
c75124d008 loleaflet: mobile: fix single tap to set focus
Change-Id: Ia5431893815ca56a3e4991b2c3a956c7aaa88764
2019-07-11 16:51:02 +09:00
Henry Castro
e98fc715f7 loleaflet: mobile: prevent default action of the 'contextmenu' event
Change-Id: I3f991dfc277548e5811c9342edd98775b3d51122
2019-07-11 16:51:02 +09:00
Henry Castro
a89d122479 loleaflet: mobile: remove obsolete Map.Tap handler
It has been replaced by Map.TouchGesture using Hammerjs library

Change-Id: I386e270015b507897cc355c62f7ea57551d18531
2019-07-11 16:51:02 +09:00
Henry Castro
ed9aa0a800 loleaflet: mobile: show context toolbar when press...
the input marker handler

Change-Id: Ia5d8a5002d978b2b82a7a384a1aca152332d8124
2019-07-11 16:51:02 +09:00
Henry Castro
f90810e6e8 loleaflet: mobile: rename Map.CalcTap to Map.TouchGesture
Change-Id: Ibcb45d87fcf5a0ea98bec06816e9085c6fe28937
2019-07-11 16:51:02 +09:00
Jan Holesovsky
b75adb8629 android: Corrected the .odp template.
Change-Id: Iaea2e4f47dd2252ee1d736bd8d49ed1bffe37381
2019-07-11 08:34:03 +02:00
Jan Holesovsky
18ee97d9c8 android: Copy also the branded images if any.
Change-Id: I9f8ed9f726015f9a668bd0d6e8f6d934f60cd413
2019-07-11 08:33:52 +02:00
Jan Holesovsky
6f5290da0e android: Actually use the branding if it exists.
Change-Id: Idd7136f0657452c5fb88f2a84b5c647ab8c2935b
2019-07-11 08:33:43 +02:00
Jan Holesovsky
55377739c6 android: Avoid system fonts.
They are huge and fontconfig has real trouble indexing / creating the
cache on the 1st start.

This reduces the startup time by nearly a minute (on my phone).

Change-Id: I85abd541251ab949c3c29c4df5fb95ce28f5634c
2019-07-11 08:33:34 +02:00
Henry Castro
2a318230e4 loleaflet: mobile: create Map.CalcTap handler when initialize L.Map
Change-Id: If26278dc655ff4434bce0ca21d4b63623f2cdd17
2019-07-10 14:18:46 +09:00
Henry Castro
dcb8ea10c1 loleaflet: mobile: iuse initialize function in L.Map.CalcTap handler
Change-Id: I201035a4c5a7a21853df97149c45f7a08d4553f2
2019-07-10 14:18:46 +09:00
Henry Castro
42f94e962e loleaflet: mobile: attach 'touchend' event handler to $.contextMenu
$.contextMenu does not support touch events so,
attach 'touchend' menu clicks event handler

Change-Id: Ia6ed0e4d6d5c9d425fd149652f453c192c70b412
2019-07-10 14:18:46 +09:00
Henry Castro
fddadc78a4 loleaflet: mobile: enable panning events in read-only documents
Change-Id: I94e496428173d487ecd1a3017863e2bbaefc667a
2019-07-10 14:18:46 +09:00
Henry Castro
b2311c31eb loleaflet: mobile: hide the context toolbar on tap event
Change-Id: I40d8d9f5e0ece04d3cd17d3b66ad17f89a0d67a4
2019-07-10 14:18:46 +09:00
Henry Castro
0452072823 loleaflet: mobile: start cell selections when a drag inside ...
the cursor cell

Otherwise pan the sheet as before.

Change-Id: I2b8d4278df4157229960930928da022872982022
2019-07-10 14:18:46 +09:00
Henry Castro
0c19139f5d loleaflet: mobile: display a context menu if touch press detected
Change-Id: Iae19d2217c8e71de58debf1904bcd8cd83d124b1
2019-07-10 14:18:46 +09:00