summaryrefslogtreecommitdiff
path: root/include/LibreOfficeKit
AgeCommit message (Collapse)Author
2024-08-14Related: cool#9735 vcl lok: add an AnyInput() callbackMiklos Vajna
Open the 300 pages bugdoc, paste a oneliner plain text content in a paragraph which is part of a numbered list, observe a 274 ms hang till layout is done for all pages, then we get an updated tile. This could be better, there is no such hang in the desktop case. What happens is that 1) vcl doesn't try to invoke the poll callback of the LOK client when there was a processed timer and 2) Writer layout doesn't try to split its work into pieces because the LOK client has no way to inform vcl that it has pending input events. Fix the first problem in this commit: add a new API that allows a LOK client to inform vcl that it has pending input events and use that SvpSalInstance::ImplYield(): if a LOK client has pending input events, then invoke the poll callback after each processed timer. For example, this allows the LOK client to process emitted callbacks between two idle layout jobs, word counting, etc. The second problem around Writer to use comphelper::LibreOfficeKit::anyInput() is not yet fixed. Change-Id: I2e39253bfc4d1b5546bc60eef9ff05ccdc0868b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171846 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-07-26lok: join Webdav Ticker thread.Michael Meeks
Add 'startThreads' lok method for the few thread scenarios where we need to have a background thread running that cannot be started opportunistically. Also add that to the ThreadJoinable interface so we can get into UNO components' implementations to handle their worker threads easily. Implement joining and re-starting in WebDAV ucp too. Change-Id: I329ef9decb32b263197e4c03a0d54952985fdd0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167858 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170979 Tested-by: Jenkins
2024-07-19libreofficekitgtk: Add include for SAL_DLLPUBLIC_EXPORTMichael Weghorn
`SAL_DLLPUBLIC_EXPORT` is defined in `include/sal/types.h`, so add a corresponding include in `include/LibreOfficeKit/LibreOfficeKitGtk.h` before using it. Without this, Qt Creator's Clang code model would'nt find it, resulting in errors like .../libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx:15: error: In included file: unknown type name 'SAL_DLLPUBLIC_EXPORT' being shown when editing the file `libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx` in Qt Creator. Change-Id: Iedd3490be9de72b931573b305d283d80b25a4645 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170749 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-07-17Sw: extract/transform document structure 2Attila Szűcs
inserting a ContentControl, now generate a unique ID for it... search the lowest possible non used (non negative) number added a GetType() function for SwXContentControl that get it from SwContentControl, and used it for extract and transform. Added some support for all other types.. some are not really usable yet. Fixed a problem when setting checkbox check, did not changed its content. If content is set to “”. It now set as placeholder, and reset its content to the initial placeholder value, like: “Choose an item” or “Click here to enter text” (work for checkbox, and picture CntentControl.) Change-Id: I0fc696f73734bdfb9ac5b8fdc6891168b8d4ed5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170600 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-07-12SW: exctract document structureAttila Szűcs
It extract form controls, and write its data to JSON. It is a basic 1. version, for now it only recognize: -PlainText (and write its text) -CheckBox (and write its state) but it writes some common data for any type of controls: ID, alias, Tag, TabIndex, and its index. Change-Id: I9ff74cd013c6f1118942207059181678713504af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170381 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-07-10lok: expose presentation info and slide render functionsMarco Cecchetti
This exposes the (impress only) function to get the current presentation info in JSON format and the slide rendering functions that enable rendering of slide layers to a bitmap. Change-Id: Id0591d5894f730eae48b3edc986ae5d804ce7c81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170263 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-06-27warning C6011: Dereferencing NULL pointer 'sNewPath'Mike Kaganski
C:\lo\build\instdir\sdk\include\LibreOfficeKit\LibreOfficeKitInit.h(161) : warning C6011: Dereferencing NULL pointer 'sNewPath'. : Lines: 136, 137, 138, 140, 143, 144, 157, 159, 160, 161 Change-Id: I0fba0db79b4a36f293e867da262a970eb152e3d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169651 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-06-25Revert "LOK: Introduce LOK_CALLBACK_STATUS_UPDATE"Mike Kaganski
This reverts commit bbd32b39eae24e99d135ed5c48586db8c9b0fb23. A following commit will implement an alternative method without a new enum member. Change-Id: Id00a4a0abe68fc69b1a3a81c731c8085e3dbca2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169467 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-06-21LOK: Introduce LOK_CALLBACK_STATUS_UPDATEMike Kaganski
This allows to send status messages separately from statechanged; this is needed in Impress to notify about any mode update, not only masterview-related. Also send SlideMasterPage updates automatically from core. Change-Id: I0a50dbe61a5f2f28cd418eb4416819a6a76810b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169314 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-06-17Add new LOK CALLBACK for vertical rulerDarshan-upadhyay1110
- We're adding a new LOK callback LOK_CALLBACK_VERTICAL_RULER_UPDATE. - The reason is that we currently override the existing callback. - Using the same callback for both vertical and horizontal rulers causes an issue. - override will create problem like it will only send any one of the ruler orientation update. - It results in online updates being limited to just one ruler orientation. - By introducing a new callback, we ensure updates for both vertical and horizontal rulers both are captured correctly in online. Change-Id: I02d0e3e7e4ac8a07a83644460aa0ba36e0f3c013 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167481 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 11b936629dd4ef9308d63b312900b8b7c8ff19b4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167464 Tested-by: Jenkins
2024-03-28lok: add isForkedChild method.Michael Meeks
This can be used to tag short-lived transient 'save' processes to encourage them not to mutate eg. filesystem state that is shared with the parent process. Change-Id: I027d18cbe4ce519b31c4fc1d3ac46b916d1efc87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165407 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 9dab5edb90d14ad6f71cc2ac96cc504c1e8c290b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165427 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2024-03-19Allow enabling comment editing in readonly view mode.Gökay Şatır
Online side can set this property to allow comment editing. This is the infra. Implementation will be in another commit. Change-Id: I3a6f1ad6818c2c6587d98896c3d6d913d51a2295 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164988 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-08LOK: send inner text boundry information of shapes/textbox on changePranam Lashkari
instroduced new callback for LOK LOK_CALLBACK_SHAPE_INNER_TEXT now if innert text is changed LOK is instantly updated about new textarea Change-Id: I0a88e1dd77556e47f14359ce0a98701a327aceda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164497 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-07Collaborative editing with readonly and edit views.Gökay Şatır
We can have both readOnly and editor views at the same time while collaboratively editing a document. Our current solution is to disable any command if the user's view is readonly. We want to have a closer behaviour to desktop app with readonly views. For this purpose, we are allowing more interactions from online server to core side. We also need to filter out the events like the core side readonly view do (next commit). This commit initiates the readonly view infrastructure. The patches previous commit reverts were an example of how we disable things in readonly mode. We needed to open a window for getting hyperlink information. With this patch, we try to separate the edit and readonly view modes on core side. More notes: We need "&& !comphelper::LibreOfficeKit::isActive()" or it falls into an endless loop with this patch. When we disable editing on a browser, almost all user actions are disabled. (cherry picked from commit 81dae2ca5187bd24aea0befb099a5b53535b5d03) Change-Id: Ia25368dd8065206ec6b4b83eb2f685531110cc78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164527 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-03-07Revert hyperlinkInfoAtPositon changes.Gökay Şatır
Revert "Implement hyperlinkInfoAtPosition for Impress." This reverts commit 876543305c78cb596720da087454a5c54e5feb06. Revert "Readonly Hyperlink Info - normalize the clicked coordinates." This reverts commit 322669725b771f5fa2b3c10c5fb73238ca3713f6. Revert "Implement hyperlinkInfoAtPosition function for Calc." This reverts commit be01dd78c47b51b19603a6259504e29b11979b0b. Revert "Implement hyperlinkInfoAtPosition for Writer." This reverts commit 6773c8929690f557d29bc282dd8f5c4381da3484. Revert "In readonly mode, we restrict many events like click." This reverts commit a4f3b97e506f38e0c43d6fbf1192cc523750a9fd. (cherry picked from commit c3f1d63178d6aaa0888085c7b641eb6d49a18276) Conflicts: sc/source/ui/unoobj/docuno.cxx sd/source/ui/unoidl/unomodel.cxx sw/source/uibase/uno/unotxdoc.cxx Change-Id: Ie821a4bca6e6b4649cea17748c44af105cd45d30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-02-27use getCommandValues instead of adding a getViewRenderStateCaolán McNamara
Change-Id: Ib6db5dd8ef1db2745cb3c616bb81b1ac2baf6504 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163812 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163931 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-26add getViewRenderState to LibreOfficeKitDocumentCaolán McNamara
so we can get the initial render state as it is when created Change-Id: I1202cbbf478bc4f62f4d587e1f2766c61f172cb7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163666 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit effe8f6e5cc5389b234a6e57540f935de4a6f201) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163843 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-14lok: implement a joinThreads function - to wind down thread pools.Michael Meeks
Necessary to do this before forking on Unix systems; use a dynamic_cast interface since this is all for internal use. Change-Id: I8a911322acd4ec5654eb0d14804c09d513a0bd4b Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163335 Tested-by: Jenkins
2024-01-24Normalize include syntax in include/LibreOfficeKitHossein
Changed #include <LibreOfficeKit/...> to #include "..." in the header folder include/LibreOfficeKit/. The reason is described in: C[++]: Normalizing include syntax ("" vs <>) https://lists.freedesktop.org/archives/libreoffice/2017-November/078778.html Change-Id: I8ccbbde38eb649428f99e39b6f0529dffc3e4206 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161809 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-01-04Send tooltip text to LOKMike Kaganski
Call vcl::Window::RequestHelp from LOKPostAsyncEvent for mouse movement. Introduce LOK_CALLBACK_TOOLTIP callback type, and send it from SwEditWin::RequestHelp. Intention is, that the tooltip is shown by client at the current mouse pointer position, which is hopefully not far away from the point that generated the mouse event. On the next movement, the client starts a timer to hide the tooltip. If the next tooltip message arrives, the tooltip would be updated in the new place. Alternatively, the payload could contain the coordinates from the HelpEvent. Change-Id: I8e96eb6e6983ad8d13b4c5d7be4d51ff3fd11893 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161302 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-28In readonly mode, we restrict many events like click.Gökay Şatır
In readonly mode, Online users need to be able to click on a hyperlink and get the related info. For this purpose, this PR adds a new function template that sends the hyperlink info if there is any at the clicked position. I will send the implementation with the next commit. Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I886ea22a7097aac73ade0da78a88ddfc95ad819c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160022 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161372 Tested-by: Jenkins
2023-11-11lok: a11y: implemented support for notifying core log to clientMarco Cecchetti
In this way core log can be printed to the browser console. This may help in understanding if some core event occurs earlier or later wrt a client event. Change-Id: I720ef9b149e98ddbc252aa069649019e79ef6cb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158780 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com> (cherry picked from commit d8dc138be7e69750d1a346b3b49cecc1201e8d46) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159331 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-27lok: a11y: impress: help screen reader to report shape selectionMarco Cecchetti
Refactored LOKDocumentFocusListener::notifyEvent. Implemented 2 new callbacks: - LOK_CALLBACK_A11Y_EDITING_IN_SELECTION_STATE: it says the client if editing in a shape or cell is active or it isn't. - LOK_CALLBACK_A11Y_SELECTION_CHANGED: it says if a shape has been selected/unselected, the name of the shape and text content are sent too for being reported by a screen reader. (cherry picked from commit 76899152ec3d1924cc72d2b869e197a1e34a0a1a) Conflicts: sfx2/source/view/viewsh.cxx Change-Id: I644bcc7daeb8772805688a9bccdabd0631ce0a22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158562 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-10-22lok: a11y: send list item prefix length to clientMarco Cecchetti
Implemented getListPrefixSize function which relies on UNO_NAME_NUMBERING_LEVEL, UNO_NAME_NUMBERING character attributes. The former provides the list item level, the latter is a boolean that says if a prefix (bullet/number) is present or not for the list item. It has been needed to modify SwAccessibleParagraph::_getSupplementalAttributesImpl so that it returns such properties for list item only and not for simple paragraph too. In fact for a simple paragraph the default value for the level property was returned which is 0 exactly the same value for top list item. Change-Id: Ia651af4d4b2372eed42c90b0752e16fd47a4fdec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156816 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com> (cherry picked from commit 038903d2e066de9525a3baffdd232484ef44ff51) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157780 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-29make FunctionBasedURPConnection simplerCaolán McNamara
and leave it to the client how it wants to read/provide the data Change-Id: Ibd4d967b79a699c96d1ea8529544b585a97cc0c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157405 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-01Add a FunctionBasedURPConnection and a websocket URP connectorSkyler Grey
- FunctionBasedURPConnection is used to enable a client to open a URP connection to a fresh Kit instance in COOL. - This URP connector can be used with that and https://github.com/CollaboraOnline/online/pull/6992 to use a Java Uno Remote Protocol client over websockets - For interoperability with existing Collabora Online websockets a prefix (urp ) is added to each message sent and a similar prefix (urp: ) is expected on each message recieved. This allows sending over the same websocket as other data is being transmitted through. If you are writing a bridge to work with this, you will need to add/strip the prefixes accordingly - This commit uses Java WebSocket (https://github.com/TooTallNate/Java-WebSocket) to send data over websockets. Change-Id: I2bda3d0b988bef7883f9b6829eeb5b7ae8075f27 Signed-off-by: Skyler Grey <skyler.grey@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151171 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-14lok: a11y: when we are inside a table notify table and current cell infoMarco Cecchetti
When we get in one or more tables we notify row and column count. When we get out one or more table we notify we are leaving a table. When the fosused cell changes we notify the new row/col index. The paragraph content is notified together with table info, so that client has some opportunity for getting the screen reader to report together content and table info. Change-Id: Ic524259aa1879a70fc3de2467bdee27475352b7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155577 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-06-28Send writer document background color on theme changeParis Oplopoios
Send the doc background color to the kit on theme change Change-Id: Ic025e542417da004c1c4a2bfd58a858deb4caa58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153715 Tested-by: Jenkins Reviewed-by: Paris Oplopoios <parisoplop@gmail.com>
2023-06-09Fix typoAndrea Gelmini
Change-Id: Ica639513051c843bf8065f209427ba4054993463 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152791 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-06-09Fix typoAndrea Gelmini
Change-Id: I4b8e65b686942a20df2d0133ff1208737e272e42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152790 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-06-09notify async password changeJaume Pujantell
Change-Id: I2d16c9804e65f093239e810d466de35286b28dee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151651 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-06-05lok: callback to send the updated theme palette when theme changesTomaž Vajngerl
The callback sends the updated theme color palette when the theme changes or initially when the view is registered, so the client should always have the up-to-date theme color palette stored, so it can just show the color picker with the theme at any time without the need to call the server. Change-Id: I7cceccc46c2fad23ba89e6d3f3643e37f8dab292 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152589 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-06-02lok: accessibility event listener for focused paragraphMarco Cecchetti
LOKDocumentFocusListener keeps track of the currently focused paragraph. Also includes: Author: Andras Timar <andras.timar@collabora.com> Date: Mon May 15 22:06:10 2023 +0200 fix unused exception parameter 'e' Change-Id: Ibfee099e4e9b724648d7500b9ebb4e8ab84989b8 and: Author: Marco Cecchetti <marco.cecchetti@collabora.com> Date: Thu May 4 12:11:53 2023 +0200 lok: a11y: focused paragraph info sent to client For the currently focused paragraph the following data is notified to client: paragraph content, caret position, text selection start/end These data is kept as an instance state so the client can request such info at any time. Change-Id: Ic1a3be0d93472300b1b6a91fb0de5bad87c031aa and: Author: Marco Cecchetti <marco.cecchetti@collabora.com> Date: Sun May 7 11:52:14 2023 +0200 fixup! lok: accessibility event listener for focused paragraph It seems it was not a good idea using a unique_ptr as smart pointer for an instance of LOKDocumentFocusListener Change-Id: I8e6b0f48fee3c5db3c9b074a663f7f3fb96a601e Change-Id: I0fa400694f3129608228ade0b96e0b4e0aee87e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152488 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-04-27Bin the unused paintTileToCGContext special thing for iOSTor Lillqvist
It was used by "LibreOfficeLight" which died years ago. Change-Id: I71a1315448baa4f1ec7a22b20cb3dd39c88cda78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151066 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-04-01Add LoKit callback for application color changeParis Oplopoios
Change-Id: I9d0fe4ab878c9d3a4a6d842be5cd534b97bf77a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149822 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Paris Oplopoios <parisoplop@gmail.com> (cherry picked from commit 48650acef94147c2100eade8c583fddc770b94ef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149876 Tested-by: Jenkins
2023-03-13Improve documentation of lok::Document::getPartPageRectangles()Tor Lillqvist
Change-Id: Ic507749064ff27b36cac8e01a54fb58dd10cdda5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148779 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-03-11lok: add trimMemory capability, and expand dumpState to caches.Michael Meeks
Being able to trigger some more aggressive memory saving is useful in for both online and mobile. Change-Id: I9b91c9fe9eecec06c75112595deac0bfeb94c144 Signed-off-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148624 Tested-by: Jenkins
2023-03-10sw lok: notify clients about view option changesParis Oplopoios
Send a string of the view options to the kit when the view changes Change-Id: I89f65ff1d22a83a54dde35e39eb487edda0b58e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148078 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-07Drop the LibreOfficeKit paintThumbnail() APITor Lillqvist
It turns out that Mert's original idea is actually the simplest and it is known to work. And in that, the separate paintThumbnail() is rather pointless, as all paintThumbnail() did was to call paintTile(). The caller (in Collabora Online) knows when a file is opened specifically for thumbnailing, and can call paintTile() itself with the appropriate parameters. My misguided idea would have had paintThumbnail() somehow figure out the physical Twip coordinates of the current location (for text documents, the insertion caret location) in the document. (Or, as LibreOfficeKit for some reason calls them, "logical" coordinates, even if a Twip is a very physical length unit.) Then it would have called paintTile() with those coordinates. But it turned out to be rather hard to figure out the Twip coordinates of the current location in the document. Mert's idea was that when a document is opened for thumbnailing, only Online actually needs to know that. From LibreOfficeKit's and core's point of view it is a normal document load operation. Then Online performs the .uno:OpenHyperlink magic, which makes core move the current position to the requested "target" or "mark" (the terminology varies) location. And then a "cursor" callback is used by Online to get the Twip coordinates of the target. It is a bit unclear to me whether .uno:HyperLink causes the document to be opened an extra time, but whatever, this way is said to work. So let's do it like that. This reverts the paintThumbnail part of 1aa37ca99112c0760552600d7774ba7224581c5b. Change-Id: I8f3d9917ee362c1518834fc10a57c57ebc4a6edb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148390 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-03-07Fix Doxygen comment thinko: dumpState() is in lok::Office, not in lok::DocumentTor Lillqvist
Change-Id: I87626370fdd8cbe906ed31d1b8c92234696e9708 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148414 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-03-01Improve the LibreOfficeKit Document::paintThumbnail() APITor Lillqvist
No implementation yet. Change-Id: Ie1dc955bc8b589bd336af0545a2270cbe84a8b9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148028 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-02-22Extend LOKit API with functionality to extract a request and paint thumbnailsTor Lillqvist
Original author was Mert Tümer. Change-Id: I181a9955bcce1d5ee4c81e2a52445ef318dc4823 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147396 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-01-29lok: support per-user timezoneAshod Nakashian
This adds support for user-specific timezone. When none is provided during loading, the system default is used. Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk> Change-Id: Ie863450687eb82bc475268a09c9112e9fd50020f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144816 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit abaf8c0af1c6c7fe01276fdf2ae62419c7b0f654) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146211 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-01-27Remove support for AIXStephan Bergmann
As discussed in the mailing list thread starting at <https://lists.freedesktop.org/archives/libreoffice/2023-January/089808.html> "Plan to remove dead C++ UNO bridge implementations (bridges/source/cpp_uno/*)", the bridge implementation at bridges/source/cpp_uno/gcc3_aix_powerpc is apparently dead and should thus be removed. However, that was the only bridge implementation for AIX, which implies that support for the AIX platform as a whole is dead and should thus be removed. Change-Id: I96de3f7f97d4fd770ff78256f0ea435383688be9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146057 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-20Async PDFExport dialog and parent methodsNickWingate
Filter dialogs are all called generically from guisaveas.cxx in GUIStoreModel() Signed-off-by: NickWingate <nick.wingate@collabora.com> Change-Id: Idfbe85c09f84d4a7cf3f00b9704d5af94868a051 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140403 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144511 Tested-by: Jenkins
2022-12-13Attempt to add ifdefs for WASM (Emscripten) for LOKit-based codeTor Lillqvist
Change-Id: I5b2556d1be61fa3a1d7996ce8d61958fbe7984c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144002 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-11-28WASM LibreOfficeKit add EMSCRIPTEN to ifdefMichael Stahl
Change-Id: Ib6f3a6bd6b8703cd9eb24707531c01153cd2f8de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143391 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-11-19lok: masterpage: Introduce mode property to tile renderingSzymon Kłos
This is needed for Impress which can have slides in two Edit Modes: Master Page and Page. Change-Id: I3eca0f51ba7970e793026d1ac6aa09b19b7a904b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137869 Reviewed-by: Ashod Nakashian <ash@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142969 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-11-10lok: Introudce getDataArea for CalcSzymon Kłos
It will share information about real size of a data inside spreadsheet so we can easily check where data ends in online side. Change-Id: I376187a33c5c82d409f559d5cc826a4f36d4252e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139472 Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142503 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-10-26Enable gtktiledviewer on WindowsMike Kaganski
A new configure argument is introduced: --with-gtk3-build=<absolute path to GTK3 build> When provided, libreofficekit_selectionhandles package, libreofficekitgtk library and gtktiledviewer executable would be built on Windows using the GTK3 libraries in the passed directory, that must contain lib/pkgconfig subdirectory with correct pkg-config data. Change-Id: I6504af6eec0fc73cceb26a1ce923337abe14b5c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141624 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>