summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
AgeCommit message (Collapse)Author
2017-04-06lokit: this was supposed to be plain C functionsThorsten Behrens
Change-Id: I22c568edd297fcc53a8d4fb826e12ee0cea59432 Reviewed-on: https://gerrit.libreoffice.org/36176 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-04-06lokit: make this build on windows, silence extra warningsThorsten Behrens
Change-Id: I78d5ce58d55d27eaa0256a0c1ddffed3a5f2cf91 Reviewed-on: https://gerrit.libreoffice.org/36175 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-04-06lokit: avoid null pointer access w/ undefined LOPath varGabriel Herrera
Change-Id: I777fa58a138d453a108b0c65dcfd667d3da25999 Reviewed-on: https://gerrit.libreoffice.org/36174 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-03-24lok: Allow setting of the language during load.Jan Holesovsky
Change-Id: I9dbb62950e639376c26122ceb9fcec2982b3ca82
2017-03-22Consistently mark function definitions in LibreOfficeKitInit.h as staticStephan Bergmann
...to give them internal linkage in both C and C++. Of those definitions that were not marked as static: * Those that had not been marked as inline had external linkage in both C and C++, so would have caused ODR violations were LibreOfficeKitInit.h included in multiple translation units. * Those that had been marked as inline lacked an external defintion in C. (Which 3f02b2aa51e32c46d5b6610480bc1ba22156a3ec "LOK init: avoid non-inline function definition in header file" had apparently faied to take into account.) (IOS_SWIFTCBRIDGE introduced in 028ef4748e53aa8f72c6464ce6bbeeb28c61d30c "LibreOfficeKitInit.h modified to avoid ODR" becomes unnecessary again.) Change-Id: Ibb8033cdbac87b20fa0e3b203b99571c1a7e7234 Reviewed-on: https://gerrit.libreoffice.org/35491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-20LibreOfficeKitInit.h modified to avoid ODR.jan Iversen
As discussed in IRC, the prev. version would cause an ODR the use of _cplusplus have been changed to IOS_SWIFTCBRIDGE Change-Id: If18610858cb56780347bb28f909619db4aac85b0
2017-03-19ios LibreOfficeLight LOkit integrationjan Iversen
Integrated LibreOfficeLight into gbuild. added lo.xcconfig and Resources (needed to link with LO and run LO) added swift --> C interface for LOkit add known commands from JS client added C++ condition in LibreOfficekitInit.h (inline no good in a C file) Change-Id: I19ebe8912546408bf701c96c0c63541d6e37cad8 Reviewed-on: https://gerrit.libreoffice.org/35430 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@libreoffice.org>
2017-03-15tdf#102511: Fix gobject-introspection annotation syntaxMike Gorse
Change-Id: I43a3ee21bd2db9ace809084d3ab888008243c97f Reviewed-on: https://gerrit.libreoffice.org/35155 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-03-07Remove redundant 'inline' keyword, Linux reduxStephan Bergmann
Change-Id: I10c7dbd6a7acce309b056a1ae57c39f00f22c46d
2017-03-03Fix typosAndrea Gelmini
Change-Id: I5e3c9683741ddc66283008c20794be5c2b2bc53f Reviewed-on: https://gerrit.libreoffice.org/34804 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28Run macro:// via LOKitKatarina Behrens
Change-Id: I54d3c734d86d4b44e1dfe1ad7728e2f51cd26d53 Reviewed-on: https://gerrit.libreoffice.org/34538 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-02-16ios update to make TiledLibreOffice compile/linkjan Iversen
changes needed to make TiledLibreOffice compile/link for ios-simulator. Remark: autogen.input need to have --disable-pdfium due to a missing <Carbon/Carbon.h> Change-Id: I3e1af26d99c35c3c552510f28e13a7e530fca09f Reviewed-on: https://gerrit.libreoffice.org/34145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@libreoffice.org>
2017-01-31Revert "Lok: support for batch API calls"Jan Holesovsky
This was for the moment removed from the online.git, so let's disable the API bits too before it shows this is really necessary. Reverts also: Revert "Lok: unittest batch API" Change-Id: I7bf3fe62d1e73b6f233992d51f587868a78f4bec
2017-01-27lok: Implement new callbacks for comment notificationsPranav Kant
Change-Id: I298183b295c68c4a39cb1f6fffe4b89b4eaee0f3 Reviewed-on: https://gerrit.libreoffice.org/33469 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-01-23lok: New feature flag to turn off tiled annotationsPranav Kant
Change-Id: Ie418642242ada98d4a41f30bb6cefcd57f398ef0 Reviewed-on: https://gerrit.libreoffice.org/33472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2017-01-23Lok: support for batch API callsAshod Nakashian
Mouse and keyboard operations typically come in batches, and often each results in tile invalidations and/or layout modifications. Processing each input event on its own, then processing the resulting output event is very costly and unecessary when we know there is more of the same. The new API adds support for batching such related input events by disabling the output events generated by Core until the batch is done. The client can then process the resulting events, which will be compressed and deduplicated. Change-Id: Id381dab807186d010021a8778ee440074a739920 Reviewed-on: https://gerrit.libreoffice.org/33402 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-27Lok: number callback enum for easier debuggingAshod Nakashian
Since the entries and their order are part of the public API, and will not change, numbering them makes it easier to trap particular callbacks by their number (as that's what shows in logs and the debugger). Change-Id: Ife2fe3e601ce3dce0939363d748fcb54d3c85fd4 Reviewed-on: https://gerrit.libreoffice.org/31257 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-15Add the missing lok::Office::registerCallback().Jan Holesovsky
Change-Id: I0aebf12c4d685f69f094b9acbe6b04bb5b3234a4
2016-11-14lok: add character parameter to renderFontHenry Castro
When client side request special character, it is very useful to send a preview of the rendered font character Conflicts: desktop/source/lib/init.cxx Change-Id: I1f5727163dfcc861add121e616bdb17881c28197 Reviewed-on: https://gerrit.libreoffice.org/30784 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-10-21tdf#102511: Add (allow-none) for backward GI compatibilityPranav Kant
(allow-none), though deprecated since GI 1.42, is required to maintain the backward compatibility since (nullable), added in GI 1.42, is not understood by GI tools < 1.42 preventing the clients from passing a null parameter to various functions in the widget. We can remove this deprecated (allow-none) annotation once we bump the GI version in LibreOffice to atleast 1.42 Change-Id: I98a1f3d2205ec5afd8060f16e69c5f938f229e26
2016-09-29LOK: conditionally include part number in invalidation payloadMiklos Vajna
Since desktop/ code queues, compresses and only emits callbacks on idle, it's possible that two invalidations are in the queue, and there was a setPart() call between them. In this case it's impossible to tell what part the invalidation was sent for. Fix this by conditionally including the part number in the invalidation payload. It's off by default, a new feature flag is added to request this behavior. gtktiledviewer enables this feature flag by default, though just to show the part number in the debug output. Android doesn't enable it. Change-Id: I73e6def848c0eb61d64e71026002c7a0e750aab4
2016-09-16sfx2: add SfxLokHelper::getViewIdsMiklos Vajna
and also expose it in the LOK API. This way clients don't have to keep track of what views they created / destroyed, they can also get an up to date list with this method. Change-Id: Ibaee42c545803e04a31e7c13ab6ec370b99465c4
2016-09-16lok::Document: rename getViews() to getViewsCount()Miklos Vajna
As this only returns the number of views, not the actual views. Since it's a rename, it's just an API (but not an ABI) change. Change-Id: Ib4f0ea56a90e5ae9c80ee1781aa2f29aff4259e7
2016-09-15Revert "LOK: we use callbacks latch for not missing messages sent very early"Marco Cecchetti
This reverts commit bbae556d12e4edf7795b0b5643df77fd8cdbdacd. Change-Id: If1370751b612ff06ef5be13e8a4017af7dc34a7c Reviewed-on: https://gerrit.libreoffice.org/28908 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit c0dd075d52409031876f5bc3923062ba5847fd53) Reviewed-on: https://gerrit.libreoffice.org/28929 Reviewed-by: Marco Cecchetti <mrcekets@gmail.com> Tested-by: Marco Cecchetti <mrcekets@gmail.com>
2016-09-11LOK: we use callbacks latch for not missing messages sent very earlyMarco Cecchetti
- lok::Document::setCallbackLatch: used on document load for set/unset the latch - now cell cursors of other views are correctly notified to the new view Change-Id: Ife6dca0e3e329b801d44070f55869afe95a2f313 Reviewed-on: https://gerrit.libreoffice.org/28812 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2016-08-30Clarify what the error code actually isTor Lillqvist
Based on how LOK_CALLBACK_ERROR callbacks are actually done in desktop/source/lib/lokinteractionhandler.cxx. Change-Id: Ibbe37c681252aa91c979d51b9aae6236ff9d88de
2016-08-29Emit notification to a LibreOfficeKit client also when a redline is modifiedTor Lillqvist
Work in progress, not all modifications to a redline record cause notifications yet. Change-Id: I01614cd6ede9576e9cc329889fef86342567325f
2016-08-20Check arm64 tooTor Lillqvist
Change-Id: I51f89eb05f7844a7b0a99eab1587bbe333b96b09
2016-08-19sw redlines: expose description as part of the UNO/LOK APIMiklos Vajna
A redline can have a manual comment and also an autogenerated description, like "Insert 'abc'". Expose this later property as well, as it provides useful additional information, especially when the comment property is empty. Change-Id: Id0f0ff62aef58d96b9b6071706c6f5b4a0d74800
2016-08-19sw lok: add callbacks for redline table insertion / removalMiklos Vajna
An alternative would be to follow the Manage Changes dialog approach and subscribe to the SFX_HINT_DOCCHANGED notification in SwDocShell, cache the old redline table and find out the differences to the current one, but that way sound much more complex without benefits. Change-Id: I20a45285b88255ccea9d6646c0b5288ac1c91879
2016-08-18gtktiledviewer: specify author name when calling initializeForRendering()Miklos Vajna
Open two views, and type into both of them when a Writer doc with redlining enabled is open: the manage changes dialog now shows how the correct author is used when creating the redline items. Change-Id: I48fb90301bfcc04b06d5be5544324ca76fe7b3d7
2016-08-18Better fix for Objective-CTor Lillqvist
Not sure what the exact mechanism of the problem is, but anyway, this helps. Change-Id: I5812381af0e4f12fcbdd06eafb1eedc170ffb608
2016-08-17Revert "These 'inline' keywords are fairly pointless"Tor Lillqvist
Nah, they are a good idea in most cases. This reverts commit 1c8e4f74c63312fca5898452fae4ba32268fce65.
2016-08-17These 'inline' keywords are fairly pointlessTor Lillqvist
Change-Id: I1018ca4954282d0b62a254d509e29493588960c1
2016-08-09LOK init: strcpy() -> strncpy()Miklos Vajna
'strcpy' is insecure as it does not provide bounding of the memory buffer in general, so let's avoid it even here. Change-Id: If39319a2df7ddd9297938bc0be67fe5f8a2af962 Reviewed-on: https://gerrit.libreoffice.org/27999 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-08-04LOK init: avoid non-inline function definition in header fileMiklos Vajna
To prevent possible ODR violations. Change-Id: Ic9538244a0bf3760808904d2bcf608151c53f899 Reviewed-on: https://gerrit.libreoffice.org/27883 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-22sw: add new LOK_CALLBACK_VIEW_LOCK callbackMiklos Vajna
When we're after SdrBeginTextEdit(), but before SdrEndTextEdit(), and have multiple views, then only the active view paints the edited text, the other views look like the shape has no text at all. Add a new callback that exposes the position and size of the rectangle where the shape text will be painted after text edit ended, so clients can draw some kind of locking indicator there. This way the rendered result can differ in the "shape has no text" and the "shape text is edited in an other view" cases. Change-Id: I6096479a8a05c2547d15222e6d997b848af02945 Reviewed-on: https://gerrit.libreoffice.org/27441 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-08sw lok: add LOK_CALLBACK_VIEW_CURSOR_VISIBLEMiklos Vajna
With this, in case a text cursor is turned into a graphic selection in view#0, then view#1 can also hide the text cursor of view#0. Change-Id: I7de89b8537ef8b0985336793b719d93733604bff Reviewed-on: https://gerrit.libreoffice.org/27044 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-01svx lok: add LOK_CALLBACK_GRAPHIC_VIEW_SELECTIONMiklos Vajna
So a view can be aware where the graphic selections of other views are. Change-Id: I0cc420cfe4bf3824fbfa1a58da889cac5e9a7b60 Reviewed-on: https://gerrit.libreoffice.org/26863 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-07-01sc lok: add LOK_CALLBACK_CELL_VIEW_CURSORMiklos Vajna
So a view can be aware where the cell cursors of other views are. Change-Id: Ifcf06c0019c6af8b859e2e92222e4f3fd18da74f Reviewed-on: https://gerrit.libreoffice.org/26844 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-30LOK: change back type of view ids to intMiklos Vajna
Commit 45c2410041c48c22bd860efb42d4daadad7869b0 (LOK: change type of view ids to uintptr_t, 2016-06-17) fixed the problem of view IDs being reused for the price of random IDs, which makes debugging harder. Implement a simple shellToView() function that makes sure view IDs are not reused, and stop exposing view shell pointer addresses, which allows reverting the LOK API change. Change-Id: I63089e6de08ee7e1c7706757d43a11f6cf4d6e06 Reviewed-on: https://gerrit.libreoffice.org/26773 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-21lok: Change version string to JSON formatPranav Kant
Change-Id: Ie1264fed9964b09006980df2e151e170b48b4082
2016-06-21sw lok: add LOK_CALLBACK_TEXT_VIEW_SELECTIONMiklos Vajna
So a view can be aware where selections of other views are. Change-Id: I5026b1ff2b99a4eedfd0bde32a05ceb8e2f424bc Reviewed-on: https://gerrit.libreoffice.org/26542 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-21lok: Expose LO version informationPranav Kant
Change-Id: Ided924e928c04385457c7a2e231fdf57e7e38970
2016-06-20sw lok: add LOK_CALLBACK_INVALIDATE_VIEW_CURSORMiklos Vajna
So a view can be aware where cursors of other views are. Change-Id: I6133fb55aa2869843c0284b7d76264bab3b3d5da Reviewed-on: https://gerrit.libreoffice.org/26513 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-06-17LOK: change type of view ids to uintptr_tMiklos Vajna
This fixes the following problem: - createView() = 1 - createView() = 2 - destroyView(1) and then view #2 was renumbered to 1. Instead expose the pointer address of the SfxViewShell as the ID, which is not changing in such a situation. Note that the SfxViewShell <-> ID mapping is an implementation detail of SfxLokHelper, and only pointers are converted to IDs, user-supplied IDs are never converted back to pointers. Change-Id: If79ef8b99ba391011b5d82b219ad13447d44cd5a Reviewed-on: https://gerrit.libreoffice.org/26423 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-05-09Allow painting for arbitrary partAshod Nakashian
Painting should not cause any state changes, but to paint a tile on a different part than the current has to change the document, which sends notifications to all clients. A new API, paintPartTile, allows for painting tiles on any part without sending change of part notifications. Furthermore, because we block notifications during this operation, no tile invalidation is issued due to changing of the part. One issue remains in the cases when the LO Core resets the cursor position internally and we resume editing after painting, the cursor might be at the top of the page. This needs fixing separately. Change-Id: If19bd1c90ecad4d5ed5e8d09513741b7994fa6e5 Reviewed-on: https://gerrit.libreoffice.org/24698 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-21lok: getPartHash should be at the end, it is a new API call.Jan Holesovsky
Also add it to the init.cxx so that it is actually used. Change-Id: I255411158d0822718116ac05aad1ee925a9a7a9a
2016-04-21lokit: add getPartHashHenry Castro
In the tiled rendering case, the slides, no matter if it is inserted or deleted, the part names always return sequential names i.e. Slide 1, Slide 2, ..., Slide N. However the client side needs to know what slides had been deleted or inserted, so it is necessary to send the hash codes. Change-Id: I0e9caeec660c3e42dd9f751bdce7690f9ad365a1 Reviewed-on: https://gerrit.libreoffice.org/24267 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-04-19In lok_init_2, allow vnd.sun.star.pathname user_profile_urlStephan Bergmann
...which takes a raw filesystem pathname that is internally converted to a file URL (similarly to what is supported for the INIFILENAME and URE_BOOTSTRAP bootstrap variables in rtl::Bootstrap). That way, the gtktiledviewer executable doesn't need to try convert a pathname into a URL. Also adapted various parameter names to make it obvious that URLs get passed, not pathnames. Change-Id: I33ab31fe142d94ee47885033ef48278ef5ff55a2 Reviewed-on: https://gerrit.libreoffice.org/24241 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>