Commit graph

447 commits

Author SHA1 Message Date
DarkByt31
ef90709ad1 tdf#107038 Poco::Timestamp replacement with std::chrono
Change-Id: I55ba23fb104a90c882bc2af068b835e30877bc1e
Reviewed-on: https://gerrit.libreoffice.org/78925
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-09-28 12:51:18 +02:00
Szymon Kłos
022224b7b4 jsdialogs: introduce LOK_CALLBACK_JSDIALOG enum value
Change-Id: Ib1175dedcc8b6c66a10f81915da07b3bcfe0b3f1
Reviewed-on: https://gerrit.libreoffice.org/79717
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-09-27 22:39:04 +02:00
Michael Meeks
53cd0a50a6 Remove invalidations triggered by LOK_CALLBACK_DOCUMENT_SIZE_CHANGED
Change-Id: I337471cdfdaa1f9b49f13bcb05340427f116cac0
2019-09-25 13:06:31 +02:00
Ashod Nakashian
720c26176a wsd: improved kit thread naming
Now the wsd docbroker thread and its peer kit
thread are trivial to match, since they are called
docbroker_xxx and kitbroker_xxx (where xxx is the
instance ID) respectively.

Also, label spare kit instances as kit_spare_xxx
to differentiate from ones with actual documents,
where xxx is a running counter to differentiate
spare instances from one another.

Now we are able to easily see (and count) the number
of spare kit instances, and match wsd and kit threads
handling a given document.

Unit-test logic updated to reflect the new thread
naming scheme.

Change-Id: I154dc8f200fbe0e65f3f5984e6dad2cef1b52e22
Reviewed-on: https://gerrit.libreoffice.org/79328
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-09-22 20:23:27 +02:00
Jan Holesovsky
5fcd8f38be Fix build.
Change-Id: Ibfe0d09ca156540f5ec535c6a5da5e9cd339b16d
(cherry picked from commit b52dd6b14e63ff160524a0f6fe2d3d4e2361d547)
2019-09-03 01:53:12 -04:00
Ashod Nakashian
30c3de53f7 wsd: support resizing of the sidebar
(cherry picked from commit d3a900d3484e4e6690d8c625f1edc73289baba4d)

Change-Id: If7d7b356563f503dfedfb0686c1d1b5be9b7b221
2019-09-03 01:53:12 -04:00
Ashod Nakashian
36b5109d21 wsd: cosmetic formatting
Change-Id: I552b2468432ce6ed52c50e22b6f19d8055c5dbb1
2019-09-03 01:53:12 -04:00
Michael Meeks
f384b8a414 Add watermark opacity setting.
Change-Id: I839e8aef91acfed40d4afd8c1b50176ed54c670a
2019-08-26 16:29:12 -04:00
Michael Meeks
327869fffe re-factor childsession onLoad callback to cleanup parameter clutter.
Change-Id: I0665db05845a910abf1cc56e13d2f9845cc5c373
2019-08-26 16:29:12 -04:00
Tor Lillqvist
634be102c7 tdf#126968: Implement "Save as PDF" in the iOS app
For now, add an entry "Save as PDF" to the File menu in the iOS app.
Handle in an iOS-specific way in ChildSession::downloadAs(). The PDF
is saved in the app's document directory on the device. The name of
the PDF is the basename of the document being edited with the "pdf"
extension.

Change-Id: Ib0059a86b03b978996eb4cadf230ba7f0abcba62
Reviewed-on: https://gerrit.libreoffice.org/77961
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-08-22 16:25:14 +02:00
Ashod Nakashian
64c5ec5bbc wsd: don't warn incorrectly when selecting current part
Change-Id: I3c872469911b1f232e40cc110859402fc0814f3a
Reviewed-on: https://gerrit.libreoffice.org/69640
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/71104
2019-08-17 04:44:29 +02:00
Ashod Nakashian
d45ecd586c wsd: leaflet: track multi-selection
Change-Id: I17c092e950fb4d7a0cb4129c537d60a8e5edd06a
Reviewed-on: https://gerrit.libreoffice.org/69636
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/71100
2019-08-17 04:41:36 +02:00
Ashod Nakashian
2eab5cea76 wsd: leaflet: support reordering of slides via drag-and-drop
Change-Id: I1b471ba07dd0a1016a0759de729171ae968262cb
Reviewed-on: https://gerrit.libreoffice.org/69635
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/71099
2019-08-17 04:33:04 +02:00
Ashod Nakashian
7d03d68e1a wsd: leaflet: status now includes selected parts
Change-Id: I3eeb2fbc52d28047dd0ab7e4318fa44d5c5c0a98
Reviewed-on: https://gerrit.libreoffice.org/69632
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/71096
2019-08-17 04:30:42 +02:00
Ashod Nakashian
eaed3615bb wsd: loleaflet: select multiple parts
Primarily support for selecting multiple slides
to edit their properties together.

Change-Id: I96c7ec048668494b5b769677db6874df91cbb42d
Reviewed-on: https://gerrit.libreoffice.org/69631
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/71095
2019-08-17 04:30:05 +02:00
Ashod Nakashian
919a93cd4b wsd: improved anonymization algorithm
Better hashing algorithm based on FNV-1a.
Adds support for salting the hash, and
for providing salt via configuration.

More unit-tests added, and better formatting.

Change-Id: I2be42675d0cdbaa73c3d7faed99e07631a9c20fc
Reviewed-on: https://gerrit.libreoffice.org/70034
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/71091
2019-08-17 04:26:35 +02:00
Ashod Nakashian
226c2fe71c wsd: unify anonymization flags under one
This simplifies the anonymization configuration
as virtually always they are all either enabled
together, or not at all.

Change-Id: I6fe60f5287fc5d71cd7a6ac3268eac67e5e6e9fb
Reviewed-on: https://gerrit.libreoffice.org/70033
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/71090
2019-08-17 03:42:19 +02:00
Ashod Nakashian
32007cbb32 Update LOK headers and reuse callback-type-to-string helper
Also, avoid repeatedly converting INT_MAX to string.
It's an arbitrary large number, so use 1 billion,
which is probably more easily recognizable as an
arbitrary large number.

Change-Id: Ie6f898d6e8978efa29c355f3cb50b60114870f0d
Reviewed-on: https://gerrit.libreoffice.org/77593
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-08-17 03:38:08 +02:00
Miklos Vajna
85dbb4a9af kit: fix UB in ChildSession::disconnect()
Finally unit-copy-paste passes under sanitizers with this. Details:

==8988==ERROR: AddressSanitizer: heap-use-after-free on address 0x60d0005e6de0 at pc 0x000000988e85 bp 0x7fff753316d0 sp 0x7fff753316c8
READ of size 4 at 0x60d0005e6de0 thread T0 (loolkit)
    #0 0x988e84 in std::pair<int const, UserInfo>::pair(std::pair<int const, UserInfo> const&) /home/vmiklos/git/libreoffice/lode/opt_private/gcc-7.3.0/lib64/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_pair.h:292:17
...
    #12 0x9322af in Document::notifyViewInfo() /home/vmiklos/git/libreoffice/online-san/kit/Kit.cpp:1600:53
    #13 0x9303f9 in Document::onUnload(ChildSession const&) /home/vmiklos/git/libreoffice/online-san/kit/Kit.cpp:1566:13
    #14 0x616dcd in ChildSession::disconnect() /home/vmiklos/git/libreoffice/online-san/kit/ChildSession.cpp:96:25
    #15 0x616535 in ChildSession::~ChildSession() /home/vmiklos/git/libreoffice/online-san/kit/ChildSession.cpp:85:5

freed by thread T0 (loolkit) here:
    #0 0x60f9b0 in operator delete(void*) _asan_rtl_:0
...
    #8 0x939292 in Document::~Document() /home/vmiklos/git/libreoffice/online-san/kit/Kit.cpp:913:5

I.e. when the Document dtor clears Document::_sessions, the ChildSession
dtor may be called. But ChildSession expected that it has a valid
Document during its lifetime, which is not a promise we can hold, see
the above trace.

Fix the problem by having a pointer (and not a reference) to a Document
in ChildSession and then:

1) Clear that Document pointer in ChildSessions at the end of the
Document dtor using a new resetDocManager()

2) Check if the Document is nullptr in ChildSession::disconnect()
instead of dereferencing it unconditionally.

Change-Id: I19d3d6bfe9e142a52c199f49aaa347d1a2edbf87
2019-08-16 09:05:54 +02:00
Tomaž Vajngerl
cc70602939 tdf#122529 Support for table overlay - column/row change markers
This adds table markers for resizing rows and columns if the user
has the table selected or the cursor is in the table. The code
reacts to the callback "tableselected:", where the markers are
created for each column and row, if the payload (json) of course
has any data. When the marker is dragged, a uno command to resize
the table column or row border is send to the core.

Change-Id: I9b21d09639c1b2be70a1a897f9e3340b453d847e
Reviewed-on: https://gerrit.libreoffice.org/77360
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-08-15 05:16:04 +02:00
Miklos Vajna
9a7768b420 common: wrap SigHandlerTrap in a getter function to avoid ODR violation
Otherwise both loolwsd and unit-copy-paste.so would have a
SigHandlerTrap:

==26186==ERROR: AddressSanitizer: odr-violation (0x000002090ae0):
  [1] size=40 'SigHandlerTrap' ../common/SigUtil.cpp:76:12
  [2] size=40 'SigHandlerTrap' common/SigUtil.cpp:76:12
These globals were registered at these points:
  [1]:
    #0 0x5f9a28 in __asan_register_globals.part.13 /home/vmiklos/git/libreoffice/lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0x7f8f537f1d8b in asan.module_ctor (/home/vmiklos/git/libreoffice/online-san/test/../test/.libs/unit-copy-paste.so+0x60ad8b)

  [2]:
    #0 0x5f9a28 in __asan_register_globals.part.13 /home/vmiklos/git/libreoffice/lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0xe2bcfe in asan.module_ctor (/home/vmiklos/git/libreoffice/online-san/loolwsd+0xe2bcfe)

Change-Id: I54d5f6d4298848cacd437d302cff0e8c5003fb8c
2019-08-13 09:08:32 +02:00
Miklos Vajna
bd4d72d41f common: wrap TerminationFlag in a getter function to avoid ODR violation
Otherwise both loolwsd and unit-copy-paste.so would have a
TerminationFlag:

==11732==ERROR: AddressSanitizer: odr-violation (0x00000208f4a0):
  [1] size=1 'TerminationFlag' ../common/SigUtil.cpp:41:19
  [2] size=1 'TerminationFlag' common/SigUtil.cpp:41:19
These globals were registered at these points:
  [1]:
    #0 0x5f9988 in __asan_register_globals.part.13 /home/vmiklos/git/libreoffice/lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0x7f5df9cf18cb in asan.module_ctor (/home/vmiklos/git/libreoffice/online-san/test/../test/.libs/unit-copy-paste.so+0x60a8cb)

  [2]:
    #0 0x5f9988 in __asan_register_globals.part.13 /home/vmiklos/git/libreoffice/lode/packages/llvm-472c6ef8b0f53061b049039f9775ab127beafbe4.src/compiler-rt/lib/asan/asan_globals.cc:365
    #1 0xe2b4fe in asan.module_ctor (/home/vmiklos/git/libreoffice/online-san/loolwsd+0xe2b4fe)

Change-Id: Ic620b143ecb77699f40676ff39d0fa7abceb34d5
2019-08-08 09:10:59 +02:00
Ashod Nakashian
b9674d51cd leaflet: Improve handling of paste without source document
Improve on handling paste without download and
handles onerror properly, which invokes the error
handler callback (where provided) where previously
it was ignored.

Change-Id: I3b527516dc4f90484fd1cfba411b45ff948ffc53
2019-08-06 14:50:51 -04:00
Michael Meeks
9e791fb0d4 clipboard: persist selections for a while after a view closes.
re-factor ClientSession state to be a simpler state machine.
Have a nice disconnect / disconnected handshake on view close.

Change-Id: Ie933cc5c7dfab46c66f4d38a4d75c459aa1cff87
2019-08-05 22:21:54 -04:00
Michael Meeks
7f43d5d385 Use isComplex for calc too.
Change-Id: Ib209cca53079cb9d63a8955caf80945c7ea455d4
2019-08-05 21:53:06 -04:00
Ashod Nakashian
b57f6474dd leaflet: graphics are always complex
Change-Id: I56c5c185c3eeb50ce3c4674dbddce217982cb40a
2019-08-05 21:49:13 -04:00
Ashod Nakashian
8ce397b758 clipboard: Copying of complex data with detection
Complex data is now flagged based on Core's
feedback and/or the size of the payload.

Download now works as expected and copying
to the clipboard is also functional.

Change-Id: I7405517e3a6afcc4c8f5843130476578c1ff06f6
2019-08-05 21:46:31 -04:00
Michael Meeks
00a4fc0cd7 clipboard: good places to dump the raw byte stream.
Change-Id: Idb81bd9f1e090ad337c3f98c03c4fd79f7da51a6
2019-08-05 21:44:54 -04:00
Michael Meeks
e587562226 clipboard: null terminate the mime-type array.
Change-Id: I7d120c22bc95414c51639271abaebd5538551463
2019-08-05 21:42:50 -04:00
Szymon Kłos
18305c8a44 Request text/html in get clipboard
Change-Id: I9096fb2470da0255722f58bdeaeba87fcae3511d
2019-08-05 21:38:01 -04:00
Michael Meeks
b3415abea0 clipboard: test two separate views' clipboards.
Change-Id: Ie6f2eeb1f1dd3c762cca847f4c77a5cd7d39f70a
2019-08-05 21:36:49 -04:00
Michael Meeks
095edb28e2 Adapt to new 'getClipboard' API - works on clipboard not selection.
Vital for a working 'cut'.

Change-Id: I980a4d65ef14eb922343d1d321177a9b3e1629f3
2019-08-05 21:28:09 -04:00
Michael Meeks
13469e8b00 clipboard - set it with a post now.
Change-Id: I6b9234988185984335408da502f479ccda8a95a7
2019-08-05 21:18:44 -04:00
Michael Meeks
149b861975 clipboard: a more helpful calc test.
Change-Id: Ibe0e583a2019e7bc5968dd8f73cf4e4a07d363b2
2019-08-05 21:18:27 -04:00
Michael Meeks
9726ce6f77 Various copy/paste fixes, unit test passing, parsing of result.
Change-Id: I9168853dd011e86896c3bd474a4d05ee82c0e336
2019-08-05 21:18:12 -04:00
Michael Meeks
4a9de331ed Unit testing - add more hooks and helpers.
Change-Id: Ieb12699e3b012606eaa0be3cc94d6f9b58adc441
2019-08-05 21:08:01 -04:00
Michael Meeks
f25d9eb10e fixup d3887f7a94
Change-Id: I26cbe5cfa226465114608d6960c6ffaec96dddbf
2019-08-05 20:48:50 -04:00
Michael Meeks
c36da1cd97 Implement getClipboard and start of a unit test.
includes Change-Id: I47d38f9285c855dcc6fbeeb73d35f22a46a30c05

Change-Id: I60b84bef1cf832ec5c191d664afd90a080b7ffbc
2019-08-05 20:25:49 -04:00
Michael Meeks
d3887f7a94 handle web clipboard request. 2019-08-05 20:06:54 -04:00
Michael Meeks
52e477e57e Switch to text/html for paste where we can.
Build special URLs to detect the same host being in-use, and much more.

Change-Id: I0ca639ea416cb78bf5e5274eac4400542b6b2cda
2019-08-05 15:47:47 -04:00
Tomaž Vajngerl
42c4c864fe tdf#125425 add cell selection markers and cell auto fill marker
This replaces the standard text selection marker with a cell
selection markers to resize the cell selection. This looks and
behaves better for cells in Calc and it is also easier to deal
with.

Additionally add auto fill marker to perform the auto fill action
on the cells. This was not possible to do previously unless you
hit an invisible part of the cell selection, which is not
convenient when using touch.

Change-Id: Ia02d03b7b8e8d98412ea98eb92fb47d1505ef979
Reviewed-on: https://gerrit.libreoffice.org/76494
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-29 08:51:55 +02:00
Michael Meeks
f2c6facb29 Don't combine tiles a long way from each other.
We currently combine only horizontally, but ctrl-right arrow in
calc can throw us to the other side of the sheet, creating a very
large area to re-render.

Change-Id: I7125ab815e3de1296b3af32632626005eeee0ec9
2019-07-26 10:12:00 +01: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
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
Jan Holesovsky
92f83a84b0 android: Don't re-initialize LibreOfficeKit over and over again.
LOK is designed to be initialized just once, so avoid the
re-initialization here.

Change-Id: I7ad9235c36d5a4dee85437a95f358d13ca25a2a9
2019-06-20 14:11:13 +02:00
Jan Holesovsky
b2b3ccdee5 gtkapp: Avoid warning.
The gtkapp is to test functionality, not performance.

Change-Id: I357777f7bd5609af1e8b6658607c73b23b78e857
2019-06-20 14:09:37 +02:00
Miklos Vajna
54e5a1000b kit: mark Document as final
Document has to be final: its constructor calls sendTextFrame(), which
calls the virtual sendFrame(). So the only situation where this code
works correctly is when Document is never subclassed.

Change-Id: I7c13abdae57d9e1ba3416ec1963b58bce0d42e6f
2019-06-04 09:15:38 +02:00
Miklos Vajna
a4fd83794e Remove unused using declarations
Change-Id: I0d4336fc8f85a18b2c41de233166e725166385f6
2019-06-03 09:06:11 +02:00
Jan Holesovsky
ea2b77ce07 android: Make the LOK document accessible from the JNI.
For some operations like printing to PDF, we need to have access to the
LOK API to perform eg. saveAs().  iOS is using an extern for that, but
given that it is needed for Android too, let's introduce a proper getter
for that.

Change-Id: Ie2340a4ee0bdf9dc46e799e2567a828172d9a67d
2019-05-31 09:20:34 +02:00
Miklos Vajna
106b7fbd8e TestStubs: add more stubs for sanitizers
This is needed to compile the tests without undefined references when
using sanitizers. Previously it was possible to run loolwsd, but
building the tests failed.

Change-Id: I6babd1c43816cb2387c82316cc1bf9ff14d7a068
2019-05-28 09:10:45 +02:00
Tor Lillqvist
d59956aa3d Use consistent terminology in LOG_INF() calls around runLoop() call
Change-Id: I46d954250447dea6ffa60c6e0e341f23a9ad4ff9
2019-05-16 11:41:56 +03:00
Tor Lillqvist
8ae35c6348 No need to call Log::shutdown() in a mobile app
The process never exists voluntarily. It is killed by the OS when
inactive and its resources are needed.

Change-Id: I9a7fa8200a44bba8dfcd2b09882f1b87814025be
2019-05-16 11:41:08 +03:00
Michael Meeks
70eb802184 unipoll: remove now redundant SocketPoll parameters.
Change-Id: I8308a0b503db34ac43658a5461005a32132d392f
2019-05-10 18:03:11 +01:00
Miklos Vajna
eb376d122f Fix recently introduced clang warnings
kit/Kit.cpp:2166:17: error: private field '_socketPoll' is not used [-Werror,-Wunused-private-field]

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../include/c++/7/ext/new_allocator.h:140:22: error: destructor called on non-final 'Document' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-abstract-non-virtual-dtor]

Change-Id: I47849db2b0bc64e811577e3a8cede0e2d2c0e2e6
2019-05-10 16:39:10 +02:00
Michael Meeks
73dc711e0a Unipoll: terminate repeated polling loop on wakeup.
Wakeup wakes up the nested SocketPoll::poll nicely, but that's no
use if we immediately ignore that and re-poll, so shorten the
timeout in this case.

Change-Id: I927d2375b92c9ce6c6ebe3f0ab33e2863894e2ef
2019-05-10 15:13:40 +01:00
Michael Meeks
8360f2c951 unipoll: process lots of events at once.
Change-Id: I8b0a37d114a55e5d64d7e5dd7df6c494971087ca
2019-05-10 15:13:40 +01:00
Michael Meeks
956f8bf5e8 Unipoll: move event processing into the same thread.
Change-Id: I15aff3b5f18201eca915da94dbaa05148026e244
2019-05-10 14:43:27 +01:00
Michael Meeks
8172885f74 PNG compression a bottleneck: thread it to accelerate things.
Also have a separate hash <-> wid cache to avoid re-rendering
older tiles as/when we see them.

Change-Id: I238fe6701a1d1cb486473c67faba8c56e9c98dcb
2019-05-02 22:36:52 +01:00
Henry Castro
6bb4edd62c wsd: allow paste content to tunneled dialog
Change-Id: I32fabaa533a0e9d853226b329d2d8b1c489dd776
Reviewed-on: https://gerrit.libreoffice.org/70960
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
2019-04-26 15:32:58 +02:00
Ashod Nakashian
83a73e24e0 wsd: set the language when creating a new view
This uses the new createViewWithOptions API to
set the language of the user at the point of
creating a new view.

Change-Id: Ibf3e0af1b0cc300126388c1217692d8d969be0f3
Reviewed-on: https://gerrit.libreoffice.org/67501
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-23 03:44:07 +02:00
Ashod Nakashian
2ec5023dbf wsd: assert on 0-sized tiles
Change-Id: I10a20bb5a3ad31e368f554bdc5e1701a7ff6a22d
Reviewed-on: https://gerrit.libreoffice.org/71072
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-23 03:02:09 +02:00
Ashod Nakashian
c7ac68e8e3 wsd: tile serializer now supports adding a suffix
Moves appending tokens into the serializer and
avoids making extra copies of itself.

Change-Id: I62d374e69d9c4a55643ea20cb5f8c2b9c75c88c5
Reviewed-on: https://gerrit.libreoffice.org/71022
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-23 03:01:30 +02:00
Ashod Nakashian
c053dc38b2 wsd: set vector size when constructing
Change-Id: I68718554017b47b6df1c6bf3b997483d4c753136
Reviewed-on: https://gerrit.libreoffice.org/71021
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-23 03:01:17 +02:00
Ashod Nakashian
90c8dd41b9 wsd: logging, comments, and const correctness
Change-Id: Ibfbef282e951a80fb145239df4bbcc9f3e4c8e13
Reviewed-on: https://gerrit.libreoffice.org/71017
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-23 03:00:19 +02:00
Ashod Nakashian
6b82d245fa Unipoll: integrate with the LOK mainloop in a single thread.
Unfortunately processing multiple events from the Kit socket
is causing massive document invalidations, for unknown
reasons. As such, for now we have to process one event
at a time, until the source of the invalidations is found
and fixed.

Without the invalidation, the average tile rendering
roundtrip is about 3x faster than with the invalidations
and the maximum roundrip is at least 2x faster.

Change-Id: Iafbf9ccc2b80656cb71c208b598080f72d201ca2
Reviewed-on: https://gerrit.libreoffice.org/70906
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-04-23 03:00:07 +02:00
Michael Meeks
a088e09193 re-factor PNG compression to share and protect TileDesc updates.
Change-Id: I3cbda6ecd78c7be8ca7fc767d9a5a288a020df7b
2019-04-20 01:26:50 +01:00
Michael Meeks
adfaa76ff6 Inline PngCache lookup to avoid redundant watermark blending.
Change-Id: I6fe5cca81b9268c903e011fe0e77f478befbc836
2019-04-19 23:56:20 +01:00
Michael Meeks
2871653bf4 Simplify legacy single tile rendering code-path.
Remove redundant _id member from TileCombined, add constructor
from TileDesc, and use it to shrink the code.

Change-Id: Idc0ded63166ed350ab81b07e191b7a60d4407cd4
2019-04-19 23:51:26 +01:00
Michael Meeks
729c124b3b perftrace: consume PROFILE_FRAME messages and chart lok ProfileZones.
Also - enable performance tracing in the kit when we're logging at
trace level.

Change-Id: I838e8d7769b0ead8508c4482c58e0e2564dcee91
2019-04-16 20:27:37 +01:00
Michael Meeks
ca619e6fd7 perftrace: annotate start events as idle as well.
Change-Id: Iaf603101426caca1f48ebe10918170287aee006d
2019-04-04 20:01:19 +01:00
Tor Lillqvist
9c02d82f7c Fix build in the MOBILEAPP case
Did not check how well it works.

Change-Id: I5ca1b349aafcfddaed517e51ca6bd25e9749779d
2019-03-31 14:34:24 +03:00
Michael Meeks
201bcb0762 Use peercreds to identify processes connecting rather than URL params.
Change-Id: I241e80962fb8cf2f3fff1bb4be81d9f0ee74c648
2019-03-30 21:37:05 +00:00
Michael Meeks
81a27e26aa Switch local prisoner sockets to abstract UDS
Unix Domain Sockets are inaddressable remotely, and more efficient,
as well as allowing future SCM_CREDENTIALS / SCM_RIGHTS.

Change-Id: Ia2472260f75feb43e9022cdfa0fe005ccd489454
2019-03-30 16:51:06 +00:00
Michael Meeks
9b4afbb460 Disable potentially problematic module loads for online.
Change-Id: Iaa30486977ad783e2af0f876d790f2a2b06904f9
2019-03-29 09:49:23 +00:00
Tomaž Vajngerl
02a07d62a5 tdf#124146 touch gesture support, send pan gesture in dialogs
Pan gesture should work for comboboxes, for which panning is
implemented in core.

Change-Id: I0a7e49e9335159a302716f666e2334a9d532c115
Reviewed-on: https://gerrit.libreoffice.org/69720
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-26 10:48:17 +01:00
merttumer
5e7401c2fe Added passing watermark text to saveAs for tiled watermark
Change-Id: I2cc7c942a646a57e39d3c5862bbcc45ddfbafe4c
Signed-off-by: merttumer <mert.tumer@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/67780
2019-03-18 13:04:12 +01:00
Ashod Nakashian
ef63472e1a wsd: more informative callback failure error message
Change-Id: I8d84af03be2bd051ec03d12528dd98b245b982d0
Reviewed-on: https://gerrit.libreoffice.org/67998
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
(cherry picked from commit f6a35eab4f7bcbbbb26d4fc1084d78bc3a19ad76)
Reviewed-on: https://gerrit.libreoffice.org/67506
2019-02-26 14:23:47 +01:00
Tor Lillqvist
76058ac270 Fix crash in iOS app: Just use a raw pointer as the lok_document hack
The lok_document pointer will only be used when it is valid anyway.
Fixes a crash when you open a second document after closing the first.

Change-Id: I362db282e4eccf419b56bf790ea58181594ab0fe
2019-02-26 14:07:59 +02:00
Tor Lillqvist
4dc340972c tdf#122582: Add slideshow functionality
Requires a couple of corresponding commits in core to its filter
subdirectory.

Change-Id: I3e6353752dd93e021fb6058fff5096f1d648d17e
2019-02-22 21:01:54 +02:00
Jan Holesovsky
835bb3db35 android: Perform the android-specific setup before initializing the LOK.
Change-Id: I935e6849dd41c5e66b768c7f2a79c139265c901f
2019-02-15 16:53:35 +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
Andras Timar
6364ed0a2f we need share/template/common/internal/idxexample.odt for Insert TOC dialog
Change-Id: I1b33b3c74695605c0bf887d1e730f833f286c33f
Reviewed-on: https://gerrit.libreoffice.org/67117
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-01-30 11:13:47 +01:00
Andras Timar
309cb05916 remove duplicated check for 'share/config/wizard'
Change-Id: I46f274825a7be024c87ec9b3cc491c5dc91ffa14
Reviewed-on: https://gerrit.libreoffice.org/67116
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-01-30 11:11:11 +01:00
Szymon Kłos
3b93d5f61b Small conditions refactor 2
Change-Id: I11bb3a2ae2907e9cba46f3339b457812c6d1d246
2019-01-22 14:52:40 +01:00
Szymon Kłos
8613f11c75 Small refactor of conditions
Change-Id: Id3884d8385bf1c138eef2909220bfef352b95370
2019-01-22 14:52:40 +01:00
Szymon Kłos
d30ade3ff3 Show progressbar on loading
Change-Id: Id2f6b35843380726e10570c2c3e501921e882b52
2019-01-22 14:52:40 +01:00
Tor Lillqvist
669e90de20 exportSignAndUploadDocument() is not used on MOBILEAPP (and does not compile for iOS at least)
Change-Id: I23bdd461c8dffb407e6aee2a378c47dc38239618
2019-01-22 15:50:13 +02:00
Miklos Vajna
010d415e95 kit: make members private in DummyLibreOfficeKit
Change-Id: I2d29398b16272b683f9682f627b4a0574c9332b7
2019-01-18 09:07:20 +01:00
Tomaž Vajngerl
fe59a510fd send a signal that the export, sign and upload was successful
Change-Id: Ic55a2d5ea452c9153945d3bc9bcbb514a46e70e9
2019-01-17 16:58:20 +01:00
Tomaž Vajngerl
7137c953d8 add export, sign and upload as one function for PDF signing
PDF export, signing and upload needs to be done in one operation
as PDF doesn't change the current document. The workflow is just
a bit different to the ODF / OOXML that it needs a change in
behaviour.

Change-Id: I752b293494a2d677fa7f12f2317954cfcf47859b
2019-01-13 23:50:18 +01:00
Tamás Zolnai
6c6eaaadf0 Now we need gallery for inserting some special shapes
So copy it from the lotemplate.

Change-Id: I84d1514e5e06ec194e549b36f8db2dc6fdd04f38
(cherry picked from commit 66dcff38a7248fb7facc6d459ac8788882262bb1)
Reviewed-on: https://gerrit.libreoffice.org/65018
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2018-12-12 13:18:48 +01:00
Ashod Nakashian
e5723a22d7 wsd: update bundled headers and improve renderShapeSelection test
Unfortuantely it still fails, but this is not regression. Now
with the new patch in Core the exception is caught and so at least
the binary survives (and the API returns 0).
New unit-test added in Core to help track the issue down and fix.

Also, free the memory allocated by the API.

Change-Id: I5d788a2ee0383de1c323af4cd6b39b8615a35baf
2018-12-07 12:39:27 +01:00
Tamás Zolnai
31f99bf9f5 Introduce client-server message for requesting the selected shape as SVG
It works for Impress only now.

Change-Id: I130707d8e96e0c633f2531b1cb81ce74dc6ec6e1
2018-12-07 12:39:27 +01:00
Ashod Nakashian
feb36a4a05 wsd: hoist token parsing outside lock and optimize
Change-Id: I8710f0c3040d22588b46bec732cf8bca7c503244
2018-12-07 12:39:27 +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
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
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
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
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