summaryrefslogtreecommitdiff
path: root/desktop
AgeCommit message (Collapse)Author
2022-05-31lok: add more efficient getSelectionType() replacementLuboš Luňák
The getSelectionType() function usually needs to be followed by a call to getTextSelection(), which means having them as two functions leads to duplicating to a number of calls, some of which may be somewhat expensive (pDoc->getSelection() e.g. for Calc builds another ScDocument for the selection, and then getFromTransferrable() converts that to the given format). Change-Id: Ib0a8844701d80eaaff4834dcd3633c09d6b921b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134615 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ash@collabora.com>
2022-05-28tdf#149280 modified called after dialog was destroyedCaolán McNamara
just ignore it in that case Change-Id: I8f294acd9ee16d2f9c8662614fac3672f80b3376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134902 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-05-24sw content controls, picture: add LOK APIMiklos Vajna
- send a LOK_CALLBACK_CONTENT_CONTROL callback with action=change-picture when a file picker should be shown - extend lok::Document::sendContentControlEvent() to be able to replace the placeholder with the selected URL - update gtktiledviewer to work with these (cherry picked from commit 9a76be53dfb801b754bf55f9d4b8c5f82991a62f) Conflicts: sw/source/uibase/uno/unotxdoc.cxx Change-Id: Ifb3750803885fc09fc82905b0cf85b2b8ca06e77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134850 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-05-16sw content controls, dropdown: add LOK APIMiklos Vajna
- expose the available list items in a new "items" key of the LOK_CALLBACK_CONTENT_CONTROL callback - add a new lok::Document::sendContentControlEvent() function to be able to select a list item from the current drop-down - add a new listbox to the gtktiledviewer toolbar to select a content control list item when the cursor is inside a dropdown - add tests for the array API of tools::JsonWriter (cherry picked from commit c7d80d229a5660a0ee702477bfbd2ca137992a7d) Change-Id: I47f1333a7815d67952f7c20a9cba1b248886f6dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134385 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-05-06lok: don't render active textbox on all slidesSzymon Kłos
when we render tiles for slide previews we use viewid = 0 (first session) so when first session edits any textbox and in other session we request slide previews (eg. after new slide was added) then we received tile with additional text from the first session this is caused by: commit bee4ff508a456a1552aacdf6fc838b8b7cffb9ec desktop lok: avoid unnecessary setPart() in paintPartTile() If possible, switch views, not parts, that way started Impress text edits don't end as a side-effect. but later there was a fix which doesn't trigger closing of texbox editing when switching parts: commit ce7bf351972bbfd64ca99e8d2fb4c5f77591c9e0 impress: don't exit textbox editing when new slide was added so we don't need that in all cases... to fix issue described above: still switch views instead of parts when possible - but avoid views where editing is active Change-Id: Ib6e66a85b9ca68d6e67e3d9cb17060aa42b85220 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133202 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133650 Reviewed-by: Andras Timar <andras.timar@collabora.com>
2022-04-23jsdialog: used for formulabarSzymon Kłos
- do not block painting - use welded wrappers to send JSON - don't send tunneled dialog Change-Id: I54c3cd02ab63bad4a50a3623a32f13b0c94a3595 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132757 Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2022-04-21Fix regression in the iOS app (and possibly the Android and GTK apps)Tor Lillqvist
The problem was caused by my remote font downloading changes. We need to be more careful in lo_initialize() and libreofficekit_hook_2() to distinguish whether the code is called from "normal" Online (with "pre-initialisation" through lok_preinit_2()) or otherwise, for instance the iOS app (where pre-initialisation is not done). Sadly, this fix makes state handling in init.cxx even more complex with one more static Boolean flag. Change-Id: I2a8fa96740eb79725aa162cf7adc86d49a8ba603 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133181 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-04-19lok: report state for sparkline UNO commandsTomaž Vajngerl
Change-Id: Ic1e8464ec97ef91f631944dbaa3de0e5bff26c89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133006 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit ee76783d2b2718a66bceefc6f8a71019daa7cc5b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133060 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-04-15lok: send status update for .uno:SplitCellSzymon Kłos
Change-Id: Ic972d3ff3334f4c3a507868a95ac955c9ffbc614 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132585 Reviewed-by: Mert Tumer <mert.tumer@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132909 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-04-14Handle "addfont" from Collabora OnlineTor Lillqvist
We use the AddTempDevFont() API to add a new font. Sadly there is no corresponding way to remove such a temporarily added font. In this branch this commit also includes a follow-up fix to avoid an assertion failure (in a build with assertions). Change-Id: I6fe61919daa5af29e964cec1caf7293aefa8ea4f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132948 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132967 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-03-16Make LOKClipboard available to other modulesSzymon Kłos
LOKClipboard has higher level dependencies (sfx2) so it cannot be moved to the vcl where SystemClibpoard instance is created. - introduce new interface LokClipboard to differentiate from SystemClipboard so we can have vcl's and lok's implementations at the same time - publish LOKClipboard using new interface for other modules by adding component file in desktop module Thanks to that when code calls GetClipboard and we cannot get clipboard assigned to the vcl::Window* (for welded widgets) in GetSystemClipboard correct instance is returned (shared clipboard for current view) so we can access content which was copied before. Previously always a new instance was created (with empty content). test ScTiledRenderingTest::testPasteIntoWrapTextCell was broken add some content to clipboard to simulate more real case and test the content copied Change-Id: I23c0298960a710c498646493f33122b908864cba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126310 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131644 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2022-03-14Send Calc Insert Headers and Footers state change to LOKAron Budea
Change-Id: Id51b4cf1eb962f22ee1e381873f4670789675525 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131293 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 0090e414341f7ca9c70a2191a53d5b8fc855f4c8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131476 Tested-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2022-03-14lok: Fix freshly added comments are not displayedMert Tumer
Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: Ice772eff8b9f8ae8c23ec1e66675e33a80492028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128217 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131521
2022-02-28make sure that LOK "updated types" start a timer as wellLuboš Luňák
273a25c796fca9afa0dfadac57dc3f336831221c changed the handling of LOK messages to only set up an "updated" flag for types and then when flushing the value is fetched. This means that queue() is not called for such updates, and so the timeout to flush the messages wasn't started. Change-Id: I3a7324c86a55697f509f80b6c54cb949fb1daa72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130460 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-20lok: render image preview with lower resolutionSzymon Kłos
renderShapeSelection callback is used to render image previews which are later used during eg. rotation. Do not render preview with original size which slows down app a lot. Use 1280x720 max. Change-Id: Ia8365a67d87cea869ef74cb70ce4830439a523b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129497 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2022-02-20lok: sc: unit test drag & dropHenry Castro
.. Change-Id: I774ece93e5c439c65df50e6a67d1447a062708b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121898 Tested-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129470 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-20lok: test: fix testSheetSelectionsHenry Castro
The unit test is selecting again range, it will conflict with the drag & drop because it will drop to new cell address. The unit test will fail, the removed code will be used to a new unit test for drag & drop. Change-Id: I896f5cd7e6b671f3fac95c8ae76e7558fa8dd1d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123062 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129468 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2022-02-20LOK: don't segfault when reporting errorAshod Nakashian
Change-Id: Ia6d614eb15b15f43ddd3e0b5742b888060dfd581 Reviewed-on: https://gerrit.libreoffice.org/69069 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 9fa568dced78011072390320f64eae28dd06d2b9) Reviewed-on: https://gerrit.libreoffice.org/78443 (cherry picked from commit fa18cdce824525ebd76b542a44741a35062741ce)
2022-02-14lok: avoid duplicate emission of statechanged: messages.Michael Meeks
We tend to get many of these per keystroke, with the same state. Change-Id: I9d759f54aee8d6dabcef094997e8f352dd608ec3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128539 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-02-14desktop lok, export options: allow passing through a JSON string as-isMiklos Vajna
setFormatSpecificFilterData() sets useful defaults, but the PDF export code has the (sane) behavior of preferring FilterData over FilterOptions, so in case we explicitly got a JSON string in FilterOptions to in fact set FilterData, then leave FilterData empty. Change-Id: I20e8094bf431782fe0f5d68e3ec630e1274e30c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128970 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-02-14comphelper: move JsonToPropertyValues() from desktop/Miklos Vajna
Because filter/ code will need this in a bit, and that can't depend on desktop/. Change-Id: I07f0f8ef30942a2d11388c6721c7f277e117bfba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128709 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-14lok: avoid reundant progress bar messages.Michael Meeks
Change-Id: I9e04f428dbfafd98d1b08a549bb2758b9cc60eff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128674 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-02-14lok: avoid duplicate notification of tab-stop and ruler changes.Michael Meeks
We get far too many of these, one per key-stroke sometimes. Change-Id: Ifecffe0a82c6eef6809e3a49883bb3f17cb4d170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128535 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2022-02-14preload configmgr data for COOLNoel Grandin
touch all the config data we need during LOK pre-init. This means that most of the keys we need should become cached by ConfigurationWrapper in comphelper. Which means that the child processes we fork should be able to use the shared pages and not allocate their own. Change-Id: Iea8b1c4beaba67b6310b20cc161061ccf9a0db89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128247 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-02-14We don't want or need any LOKClipboard on iOSTor Lillqvist
Try to make the code more like in the co-2021 branch, where copy/paste between Collabora Office and other iOS apps currently works again, in both directions, both for text and images. Sadly something is broken or missing either here in core or in online as it doesn't fully work in a Collabora Office based on the master branch of core, even after this commit, though. We use only the system clipboard on iOS. (It is actually called the "pasteboard" in Apple's operating systems.) The code to interface with the system clipboard is in vcl. It has worked fine to copy and paste between the Collabora Office iOS app and other iOS apps without any LOKClipboard being involved. If LOKClipboard is used it doesn't work at all. Change-Id: I0d3b4e3eabe17b633390e071701225e1d356a75a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128037 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2022-02-14ensure invalidate tiles LOK message range checkingLuboš Luňák
3db1ce30ab235ad22aed71c22e4f6f52b7b88829 added some range checking on the rectangles, such as making sure (x,y) is not less than (0,0), and it added it to converting string messages back to rectangles. But then 3b729db05553c1a6d461fb41c89a05702f407448 avoided the conversions from string messages back to rectangles, and thus it avoided also these checks. Change-Id: I73a08e418dc2e48ef5e89fe1aee0272851f7d363 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126865 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-14fix handling of the "EMPTY" LOK tile invalidationLuboš Luňák
The LOK_CALLBACK_INVALIDATE_TILES documentation says that invalidate-all message should say "EMPTY", which wasn't converted properly from the MaxTwips rectangle representation. Doing that now needs also changing the testTileInvalidationCompression() test, but that should be a fix of the test, and conceptually it should be the same. Change-Id: I58fcc56ee56d9f6fcdb9298938e8aa7e3609d6db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126651 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-14lokit: add env. var to set the certificate database dirTomaž Vajngerl
This adds to LOKit a way to set the certificate database dir with a env. var. - LO_CERTIFICATE_DATABASE_PATH, which is used for signing and encrypting of documents. Change-Id: Ieb7725d41893212d962c8b9e32f9607d0ba10397 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126553 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 03f177d22873069e8e2e520c98f05ebfcc1b063c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126807 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-02-14make sure vector elements are initialized properlyLuboš Luňák
Change-Id: If18268a26118ea587f474c21b7ca0f1fa4622744 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126469 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2022-02-14jsdialog: use string identifiersSzymon Kłos
Thanks to that it is easier to debug and find widgets in maps. Sidebar and notebookbar are now in different map entries. This fixes the issue when destroying notebookbar deleted sidebar's widgets. After this patch sidebar works correctly when using notebookbar mode in lok. Change-Id: Ie9dcb82675129bdb567b766e29779744f500cb48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125216 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128853 Tested-by: Jenkins
2022-02-13[cp] enable crashreport on WindowsAndras Timar
(cherry picked from commit ce263269dff121af85634ada7870f33632e02bdd) Change-Id: I55df3da63919f76afcd4905b1898287e26c8c4f1 Reviewed-on: https://gerrit.libreoffice.org/78401 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94477 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-04Always use <poll.h>, no modern system needs <sys/poll.h>Ismael Luceno
This was standardized in IEEE 1003.1-2001, so more than 20 years old. Verified following systems using online resources: - FreeBSD 3.0 (1998) - NetBSD 1.3 (1998) - OpenBSD 2.0 (1996) - CentOS 5.0 (2007) - Debian 4.0 (2007) - IRIX 6.5.30 (2006) - SunOS 4.1.3 (1992) - SUSE 10.2 (2008) - Red Hat 5.0 (1998) So the check used for BSDs on vcl/unx/generic/dtrans/X11_selection.cxx was never correct. On GNU/Linux specifically, <poll.h> is provided since glibc 2.0 (1997). musl libc produces the following warning if the non-standard header is included: /usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] Change-Id: Ia8f4b9e1ee069f86abe03140c18a77d17336d09c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127666 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 4242c7b91887236375e08e2b6b24de0cecbf1626) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127586 Reviewed-by: Ismael Luceno <ismael@iodev.co.uk> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-25loplugin:stringliteraldefine in desktopNoel Grandin
Change-Id: I36025f17dc6c47710d6cd299f0349b5be227c21d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125760 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-25lok: add pdf version option for exportGabriel Masei
Change-Id: I02c1edecd291309bf028e6e5a0f04a578ac1b639 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125255 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2021-11-12make it explicit whether to ignore the result of getLOKPayload()Luboš Luňák
Returning an empty string to signify 'ignore' was a poor design, as some messages types actually may have valid empty messages. Change-Id: Ia82d3d97d150bc5ef412a1bd4b1091d9b2d84385 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124979 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-12rtl::Static to thread-safe staticNoel Grandin
Change-Id: I6390d1811bad59c09a074039c635710d25a660d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124886 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-11Impress- Correct commands mentioning Page instead of SlideNnamani Ezinne
Replaced UNO commands that have similar implementation but their labels bear Page instead of Slide Change-Id: I5fb24493478b0a8fdd4e324066d8112497fc9eb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124888 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125047 Tested-by: Jenkins
2021-11-11Use o3tl::convertMike Kaganski
Change-Id: Ia64ae3445a4aea3be3044e2345e432e839d9a0f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125027 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-10new loplugin:stringliteraldefineNoel Grandin
look for #define FOO "foo" that can be converted into OUStringLiteral. This is the first pass of this plugin, only doing those #define which are local to a single compilation unit. Change-Id: Ic8610e29ec42c36d03db5014a93c244315d5bbea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-08use more OUStringLiteral in MediaDescriptorNoel Grandin
Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-03loplugin:constparamsNoel Grandin
Change-Id: Iebeb531fad5cc819b536788925cf8508737198b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124599 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-30Prepare for removal of non-const operator[] from Sequence in desktopMike Kaganski
Change-Id: I76959f62d46e12d984fe4c7be74e5857399e9126 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124358 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-26use boost flat_map for faster mapLuboš Luňák
setUpdatedTypePerViewId() gets called so often that even unordered_map lookup and allocations show up in profiling. It seems that flat_map can do better. Change-Id: Id2e4f0c40d6973b51e557f84a08bf12feb58b3ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124210 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-25use pull model also for LOK text selectionLuboš Luňák
Make LOK_CALLBACK_TEXT_SELECTION, LOK_CALLBACK_TEXT_SELECTION_START, LOK_CALLBACK_TEXT_SELECTION_END and LOK_CALLBACK_TEXT_VIEW_SELECTION also use pull model, i.e. LO core will only set a flag and when CallbackFlushHandler needs the actual data it'll use getLOKPayload(). This again avoids a large number of messages passed to CallbackFlushHandler only for them to be sooner or later discarded. Change-Id: Ia7528039be996a6e9e8491b4eba3f4133582fa56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124146 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-24change some LOK internal updates to be pull model instead of pushLuboš Luňák
Some LOK messages may get called very often, such as updates about cursor position. And since only the last one matters, they get generated every time, which costs some time, and then later except for one they get all discard again from CallbackFlushHandler queue, which again costs time. Change the model to instead only set an 'updated' flag, and CallbackFlushHandler will request the actual message payload only before flushing. This commit changes LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR and LOK_CALLBACK_INVALIDATE_VIEW_CURSOR to work this way. Change-Id: I376be63176c0b4b5cb492fbf529c21ed01b35481 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124083 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-23Fix typosAndrea Gelmini
Change-Id: Iaba882b1bd000a068cfaa207c743be038d5db434 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124087 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-22LOK: maintain blocked command list per viewPranam Lashkari
Conflicts: include/LibreOfficeKit/LibreOfficeKitEnums.h include/sfx2/viewsh.hxx libreofficekit/source/gtk/lokdocview.cxx sfx2/source/view/viewsh.cxx Change-Id: I7c621accd84f49447ab3e08a4bb662a9b91b834a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124049 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-10-22LOK: unify freemium APIs and uno command restriction APIsPranam Lashkari
Conflicts: include/LibreOfficeKit/LibreOfficeKit.hxx sfx2/source/control/unoctitm.cxx Change-Id: I3badb038822331ab5cb30df6a66ce9a0640cf340 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124047 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-10-22better name for a function overloadLuboš Luňák
It's better to add to the name what the overload does rather than just have a "mysterious" extra int. Change-Id: Iff89679c4a978a4596ac662ef74e934cdefefc9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124001 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-22LOK: introduce way to restrict uno commandsPranam Lashkari
With this new API we can define which uno commands to restrict their functionality Conflicts: desktop/qa/desktop_lib/test_desktop_lib.cxx include/LibreOfficeKit/LibreOfficeKit.h include/LibreOfficeKit/LibreOfficeKit.hxx include/sfx2/viewsh.hxx Change-Id: I9f3fd659d373e56542c5323922a53564f1cfb27b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124046 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>