summaryrefslogtreecommitdiff
path: root/libreofficekit/source
AgeCommit message (Collapse)Author
2021-10-18LOK: maintain blocked command list per viewPranam Lashkari
Change-Id: I7c621accd84f49447ab3e08a4bb662a9b91b834a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122253 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2021-09-07sc: lok: introduce LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR callbackDennis Francis
to send the document background color (Calc only for now). Change-Id: Ibd2f042a81c9bb714bed947c4ef92f82ff3e6f50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120524 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Dennis Francis <dennis.francis@collabora.com> (cherry picked from commit 5f2d669a51a91b21196eecb935aa55d3fc1aa7be) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120736 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2021-07-11cid#1478187 Resource leakCaolán McNamara
Change-Id: Ib63d25e358f81c428fcbbb502650c37d016b6b44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112821 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit da86cd492c5a04c42086985e17ae84d63bdedd0b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118617 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-07-11cid#1474127 Unchecked return value from libraryCaolán McNamara
Change-Id: I6dac6f24d33ce4557ab94ff08357e597819510d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112839 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 9456a764a98daa2915f6fefac336d8bb5cff531a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118619 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2020-11-19tdf#123936 Formatting files in module libreofficekit with clang-formatPhilipp Hofer
Change-Id: I3f086de3a49181d32e54d7d58e1206615a9371e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105687 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-10tdf#42949 Fix new IWYU warnings in directories [h-r]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I886b6f446293d3b1cfbf4ae05e8dbd7fabab9f20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105510 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-10-26Allow some spelling dictionaries for gtktiledviewer.Michael Meeks
Change-Id: Ie3e646321aff2705d908b25e4beff0768a5936fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104703 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-18Online: Show input help on Online / Core part.gokaysatir
Change-Id: I9d10179f266a725b770fdae50045fdb5d77178ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102708 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 110069adbba4d272450b30fa03c56efbd478e84c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102935 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-08-11loplugin:flattenNoel Grandin
Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100447 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-04lokit: add new callback type LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRYDennis Francis
This is to notify the clients about changes in current sheet's geometry data. Use this to notify clients of various sheet geometry invalidations if the new feature flag scPrintTwipsMsgs is set. Change-Id: I478d2e646606320399905d7b15881a165a53146d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96969 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com> (cherry picked from commit 7d0181f519f83b978b9040986738ad0cedc020ba) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97956 Tested-by: Jenkins
2020-06-04Change FIXME to plain comment, there apparently is nothing to do about it hereTor Lillqvist
Change-Id: I81e50e7e604e8ef17ba0d369e8987f4c840f8361
2020-06-04Bin two leftover spurious writes to std::cerrTor Lillqvist
Change-Id: I89601e3682a5f8eca81b45af62e5aa50c481bc84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95502 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-06-04tdf#128502: Add a FIXME commentTor Lillqvist
The view id concept is badly broken. Way too many wild assumptions that the "current" view is the one we expect here and there. For instance here. Change-Id: Icf36808b2c09f0b3fd8070deecf175ba7f52b5f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95508 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-05-08lok: MSForms: Add callback for form field button.Tamás Zolnai
Show and hide the button and send the button area, where it should be displayed. Change-Id: I5922eb9f5e544483dd4efd12e4218d2e51270632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93657 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-04-14lok: add tabstop changing and callback to send tabstop updatesTomaž Vajngerl
This adds callback LOK_CALLBACK_TAB_STOP_LIST to send the tabstops for the current paragraph. In addition it adds .uno:ChangeTabStop action, with which it is possible to change just one tabstop identified by the index. Change-Id: I7762ead12e47288cbb0b0a1c8ffb8e9872cee8e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92147 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-03-06tdf#42949 Fix IWYU warnings in libreofficekit/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ic57b1259e612cc38ad22f123edbaca690cd506ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89937 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-29lokdocview: Add notify_property when the document is initializedCorentin Noël
The property "is-initialized" was updated under the hood but no notification was sent to the user preventing to use features like g_object_bind_property Change-Id: If5fab557fbd2b3ae2b2531799548907404d79a33 Reviewed-on: https://gerrit.libreoffice.org/82472 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-11-29lokdocview: Add support for HiDPI renderingCorentin Noël
Change-Id: I3c6b8c958dec78de1457d06ceb81e56b9ae36ce9 Reviewed-on: https://gerrit.libreoffice.org/82714 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-11-26lok: calc formula bar tunneling: function list callbackMarco Cecchetti
Added a lok callback for sending the list of functions matching the current characters typed by the user. Change-Id: Ia971fc55ec5eb961b4098592a8049dd0eed3ba14 Reviewed-on: https://gerrit.libreoffice.org/83750 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-19lokdocview: Add support for get_command_valuesCorentin Noël
Change-Id: I6a007724de8aea0e4de035313855acd6e9342ee7 Reviewed-on: https://gerrit.libreoffice.org/82377 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-11-19Improved loplugin:external, handling class typesStephan Bergmann
...plus follow-up loplugin:fakebool and loplugin:consttobool findings Change-Id: I2b19d80f7313d3d5b0e502581b39fe20147bdfcc Reviewed-on: https://gerrit.libreoffice.org/83121 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-14New loplugin:consttoboolStephan Bergmann
...to: "Find implicit conversions from non-'bool' constants (e.g., 'sal_False') to 'bool'". Due to how FALSE is defined as just #define FALSE (0) (i.e., a literal of type 'int') but TRUE is defined as #define TRUE (!FALSE) (i.e., an implicit conversion from 'int' to 'bool') in GLib (see the comment in ConstToBool::VisitImplicitCastExpr), we get more warnings about uses of 'TRUE' than of 'FALSE'. For example, in libreofficekit/source/gtk/lokdocview.cxx there is a warning about the 'TRUE' in g_main_context_iteration(nullptr, TRUE); but not about the 'FALSE' in g_main_context_iteration(nullptr, FALSE); (where the parameter of 'g_main_context_iteration' is of type 'gboolean'). Lets live with that asymmetry for now... (Besides the issues addressed directly in this commit, it also found the two bogus asserts at 7e09d08807b5ba2fd8b9831557752a415bdad562 "Fix useless assert(true) (which would never fire)" and 122a0be8ae480473bd1d7f35e197a2529f4621e3 "Fix useless assert(true) (which would never fire)", plus 5f0d6df7f57ae281fe161e61c7f25d67453fddd2 "Use two-argument form of static_assert".) Change-Id: Id77322de9f94b85a7b65608a03e0e9865d14467b Reviewed-on: https://gerrit.libreoffice.org/82667 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-13Extend loplugin:salbool to loplugin:fakeboolStephan Bergmann
...checking for unnecessary uses of more "fake bool" types. In the past, some of the checks involving the types of variables or data members, or the return types of functions, issued warnings that required surrounding code to be changed too (e.g., when changing the signature of a function whose address was taken). These checks have been tightened now to not warn in such cases (which avoids warnings that require changes to additional code, or changes that might even be impossible to make, at the cost of being less aggressive about removing all unnecessary uses of those "fake bool" types). Change-Id: I70eb75039817cda34ed611387ee27dc5f36a3e2e Reviewed-on: https://gerrit.libreoffice.org/82554 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-13lokdocview: refresh tile buffer on resize to avoid UI breakage.Michael Meeks
Otherwise we get tiles in the wrong locations based on incorrrect widths. Change-Id: I1c76bc6eaabd8af4c283e421bf8901e7d64b4efa Reviewed-on: https://gerrit.libreoffice.org/82574 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-11-13lokdocview: encapsulate tile buffer properly.Michael Meeks
Change-Id: I59d690fbde67f4985246f13b992e962d11b7b07f Reviewed-on: https://gerrit.libreoffice.org/82573 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-30gtktiledviewer: always load with en-US languageAshod Nakashian
This is the default for Online, so makes sense to have the same in the gtktiledviewer as well. Change-Id: I8c4729aa301069e246554b06671ad86bbe50c441 Reviewed-on: https://gerrit.libreoffice.org/81778 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-17Silence Clang 10 trunk -Wdeprecated-volatile in GLib for nowStephan Bergmann
See <https://gitlab.gnome.org/GNOME/glib/merge_requests/1170> "Avoid C++20 deprecated assignment to volatile" for a potential fix in GLib (but also see my question at <https://github.com/llvm/llvm-project/commit/ 4a6861a7e5b59be24a09b8b9782255d028e7aade#commitcomment-35540755> "[c++20] P1152R4: warn on any simple-assignment to a volatile lvalue" whether that Clang warning is actually wanted here). With glib2-devel-2.62.1-1.fc31.x86_64, the suppressed warnings looked like > libreofficekit/source/gtk/lokdocview.cxx:327:1: error: use of result of assignment to object of volatile-qualified type 'volatile gsize' (aka 'volatile unsigned long') is deprecated [-Werror,-Wdeprecated-volatile] > G_DEFINE_TYPE_WITH_CODE (LOKDocView, lok_doc_view, GTK_TYPE_DRAWING_AREA, > ^ > /usr/include/glib-2.0/gobject/gtype.h:1617:56: note: expanded from macro 'G_DEFINE_TYPE_WITH_CODE' > #define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END() > ^ > /usr/include/glib-2.0/gobject/gtype.h:2034:3: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN' > _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \ > ^ > /usr/include/glib-2.0/gobject/gtype.h:2005:7: note: expanded from macro '_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER' > g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \ > ^ > /usr/include/glib-2.0/glib/gthread.h:257:17: note: expanded from macro 'g_once_init_leave' > (void) (0 ? *(location) = (result) : 0); \ > ^ Change-Id: If67ad04f8fb242f50b43a1d98ad2b28c4bed55a4 Reviewed-on: https://gerrit.libreoffice.org/80937 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-07enable -Wrange-loop-analysis on clangNoel Grandin
Change-Id: I2095308943c94ad16c110d5fac47715398eb5d39 Reviewed-on: https://gerrit.libreoffice.org/80187 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-30jsdialogs: add callback LOK_CALLBACK_JSDIALOGSzymon Kłos
Change-Id: Ie79e24ae3a376e0de3d82daff4a1263c7ce3b33a Reviewed-on: https://gerrit.libreoffice.org/79825 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-09-29constmethod for accessor-type methodsNoel Grandin
Apply the constmethod plugin, but only to accessor-type methods, e.g. IsFoo(), GetBar(), etc, where we can be sure of that constifying is a reasonable thing to do. Change-Id: Ibc97f5f359a0992dd1ce2d66f0189f8a0a43d98a Reviewed-on: https://gerrit.libreoffice.org/74269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26gtktiledviewer: Turn an annoying assert into a compile-time check.Jan Holesovsky
So that people don't forget adding the enum values here... Change-Id: I0342e2ecca4d7d14641e44ca562b1999921182e8 Reviewed-on: https://gerrit.libreoffice.org/79554 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-09-24Add reference marks callbackSzymon Kłos
Change-Id: Ic749e138356392b0c327a30cff28055f06e23e2e Reviewed-on: https://gerrit.libreoffice.org/79464 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-09-07lokdocview: Add missing callback casesAron Budea
To prevent gtktiledviewer from crashing. Change-Id: Ia23504c20eac185f3302e8d694672ebf6d853585 Reviewed-on: https://gerrit.libreoffice.org/78737 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.budea@collabora.com>
2019-08-24loplugin:returnconstval in fpicker..reportdesignNoel Grandin
Change-Id: I59c55a858b2706d1327c837abc158dceca02360e Reviewed-on: https://gerrit.libreoffice.org/78058 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-20loplugin:constvars in i18npool..openclNoel Grandin
Change-Id: I82738a18ff116fdc78f07b453c93b1b631632caf Reviewed-on: https://gerrit.libreoffice.org/77775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-17LOK: move LOK callback-type-to-string helper to headerAshod Nakashian
This is a very common function that is used by clients as well as LO Core, so makes sense to have it implemented once and updated when new callback-types are added, all in one place. Change-Id: Id6a1d6bcf5585d7be440b62a0c3a9c993e46e5e0 Reviewed-on: https://gerrit.libreoffice.org/77587 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2019-08-15tdf#122529 lok - table border position manipulationTomaž Vajngerl
This adds a new LOK callback (LOK_CALLBACK_TABLE_SELECTED) that sends the border positions to the client when the user has the cursor or slelection in a table. In addition this adds a .uno:TableChangeCurrentBorderPosition uno command, which implements changing a specific border in the current table. Border can be either a column or a row border, which is either at the first, middle or last position. Change-Id: Ife7cff14d91ffc84c95c040f0b42319e3d6194b4 Reviewed-on: https://gerrit.libreoffice.org/77365 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-28lok: send cell selection rectangle and cell area fill rectangleTomaž Vajngerl
Instead of text selection start/end for cell selection we send a cell selection rectangle event. This is needed so we're able to differentiate when to draw cell selection and text selection markers. In addition send cell fill area rectangle, which is the area where we need to hit to trigger area fill functionality in Calc. Change-Id: I54af958932815818a1a4d48364192ba43f1df7de Reviewed-on: https://gerrit.libreoffice.org/76491 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-07-27Fix typosAndrea Gelmini
Change-Id: I380856ca45c835e732fdf080a522caab4534db5b Reviewed-on: https://gerrit.libreoffice.org/76346 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-20Demote from std::unique_lock to std::scoped_lock where applicableStephan Bergmann
Change-Id: I53a019f05978bab62ad0da3d0eb08f37f8ec1e18 Reviewed-on: https://gerrit.libreoffice.org/74414 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-20Consolidate on C++17 std::scoped_lock instead of std::lock_guardStephan Bergmann
...where scoped_lock was originally meant as a transparent generalization of lock_guard, but eventually had to supersede it under a new name, for backwards- compatibility reasons, see <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0156r2.html> "Variadic lock_guard (Rev. 5)" and <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0488r0.pdf> "WG21 Working Paper, NB Comments, ISO/IEC CD 14882". Change-Id: Ie58909f63beec5939601183d6bcda3bc638d5747 Reviewed-on: https://gerrit.libreoffice.org/74382 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-25gtktiledviewer: Fix crash on copy.Michael Meeks
Change-Id: I1afc6278f6853d5e45a305b4f731cb6af0e00cc1 Reviewed-on: https://gerrit.libreoffice.org/72955 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-05-10unipoll: add a --unipoll parameter to gtktiledviewer.Michael Meeks
Arguably should be the default. Implementation is a bit cute - re-starting the main-loop as a child of a callback from its idle handler. Change-Id: I95e87c8a4ae3de745d7ca1f636859dd1d8deca17 Reviewed-on: https://gerrit.libreoffice.org/72072 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-04-27lok: handle missing callback.Michael Meeks
Change-Id: I13a200c9c9d8b0a8fde6dd15a71fe1a665d04e8d Reviewed-on: https://gerrit.libreoffice.org/71432 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-04-15lok: emit ProfileZone data in messages when requested.Michael Meeks
Change-Id: I42a773e2d5b8e4deeafa8eeb2785913db36a47d7 Reviewed-on: https://gerrit.libreoffice.org/70688 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-04-13use more std::make_uniqueNoel Grandin
Change-Id: I7d85cbc9105c5e0c4a8d9a69c4ac9d6dfc07eabd Reviewed-on: https://gerrit.libreoffice.org/70663 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-15gtktiledviewer: Handle LOK_CALLBACK_SIGNATURE_STATUS to avoid an assert.Jan Holesovsky
Change-Id: Iae56708d94a229911a5d008d519120ac59069cf3 Reviewed-on: https://gerrit.libreoffice.org/63391 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-11-15gtktiledviewer: Compile-time check instead of an annoying assert.Jan Holesovsky
Change-Id: Iece75f6f40bf7d7dfcde372cf9b4606adb9e34b2 Reviewed-on: https://gerrit.libreoffice.org/63390 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2018-10-19clang-tidy modernize-redundant-void-argNoel Grandin
Change-Id: Ia25ac2e40f29e5b766a4c5c013fb53274196f656 Reviewed-on: https://gerrit.libreoffice.org/61934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>