summaryrefslogtreecommitdiff
path: root/libreofficekit
AgeCommit message (Collapse)Author
2020-03-17libreofficekit: Use 'gb_Library_set_include' for GTK3_CFLAGSMichael Weghorn
This makes sure that gtk3 includes are properly taken into account when generating the corresponding files for IDE integration, s. commit 6a53832080cf201e960113de8e1887d99e857606 ("Use 'gb_Library_set_include' for GTK3_CFLAGS", 2018-12-17) for more details. Change-Id: I443b974a5b9035027fa4c7d0f5a3dbc825370ee9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90650 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
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>
2020-02-21Drop o3tl::optional wrapperStephan Bergmann
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-09Prefer O3TL_UNREACHABLE over assert(false)Stephan Bergmann
...so that -Werror=maybe-uninitialized is also silenced (cf. 281f3d5c418e50a2858619633ebca290bd626c03 "Silence -Werror=maybe-uninitialized") with --disable-assert-always-abort Change-Id: Ie31e18d27823b061375a0740b85bec95740bbecd Reviewed-on: https://gerrit.libreoffice.org/84752 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-04Silence -Werror=maybe-uninitializedStephan Bergmann
...where the members of aRectangle passed into gtv_calc_header_bar_draw_text (and unconditionally used there, see the definition further up in this file) are only set for ROW and COLUMN types. Lets assume that no other types can happen here? (This is part of libreofficekit/Executable_gtktiledviewer.mk, see libreofficekit/README for how to execute it.) Change-Id: I487be241e564127183751758710140ab24941f63 Reviewed-on: https://gerrit.libreoffice.org/84424 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-01Introduce o3tl::optional as an alias for std::optionalStephan Bergmann
...with a boost::optional fallback for Xcode < 10 (as std::optional is only available starting with Xcode 10 according to <https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite all code to use o3tl::optional instead of boost::optional. One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus -Werror=maybe-uninitialized" should no longer be necessary (and whose check happened to no longer trigger for GCC 10 trunk, even though that compiler would still emit bogus -Wmaybe-uninitialized for uses of boost::optional under --enable-optimized, which made me ponder whether this switch from boost::optional to std::optional would be a useful thing to do; I keep that configure.ac check for now, though, and will only remove it in a follow up commit). Another longer-term benefit is that the code is now already in good shape for an eventual switch to std::optional (a switch we would have done anyway once we no longer need to support Xcode < 10). Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses boost::property_tree::ptree::get_child_optional returning boost::optional, so let it keep using boost::optional for now. After a number of preceding commits have paved the way for this change, this commit is completely mechanical, done with > git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g' (before committing include/o3tl/optional.hxx, and relying on some GNU features). It excludes some files where mention of boost::optional et al should apparently not be changed (and the sub-repo directory stubs). It turned out that all uses of boost::none across the code base were in combination with boost::optional, so had all to be rewritten as o3tl::nullopt. Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b Reviewed-on: https://gerrit.libreoffice.org/84128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.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-22Extend loplugin:external to warn about classesStephan Bergmann
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-21loplugin:unusedfieldsNoel Grandin
Change-Id: Ic4cb8444123864fdaee64960f00a05b3066ae5fc Reviewed-on: https://gerrit.libreoffice.org/83387 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-11-13lok: calc: switch row / column / grouping data to pixels.Michael Meeks
This simplifies lots of logic in the clients, making it trivial to get good row/column header alignment at any zoom. Ultimately TWIPS here are highly misleading print-twips, and in this state are ~impossible to map to pixels accurately unless all data is present back to the origin (which is not the current approach). Change-Id: I6ca30e77865b62e886e23860f7c23350e544c9fc Reviewed-on: https://gerrit.libreoffice.org/82572 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-11-09lok: tilebench: slightly sloppy pixel comparison & larger area.Michael Meeks
Change-Id: Ief9d4bc5ce0e83a9eb9564cb94f773a3ff6048ba Reviewed-on: https://gerrit.libreoffice.org/82357 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-11-05lok: tilebench: implement zoom tests.Michael Meeks
Change-Id: Ieffc89b8119c2baf56383ac8b5d3cb54dc9d0d2d Reviewed-on: https://gerrit.libreoffice.org/82090 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-25lok: improve tilebench and add an unpleasant text rendering test case.Michael Meeks
Change-Id: I9e769cff6db794389bcef821c08ca1cd60173ab9 Reviewed-on: https://gerrit.libreoffice.org/81531 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-22tilebench: output a helpful delta image and highlight the diffs.Michael Meeks
Change-Id: I545b3b262805361851ed2c829110c6a4f852e25e Reviewed-on: https://gerrit.libreoffice.org/81267 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-10-04enable -Wunused-exception-parameter on clangNoel Grandin
which is useful because our MSVC build will warn about this by default Change-Id: Idcc0f08b69b6eda4dd2ab010a5fdb674787bebcf Reviewed-on: https://gerrit.libreoffice.org/80184 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-27cid#1454003 silence 'Constant' variable guards dead codeCaolán McNamara
Change-Id: I4ba26647f4081f5c13726b78c737b54e8ab1773d Reviewed-on: https://gerrit.libreoffice.org/79675 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
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-19tilebench: initial joining testMichael Meeks
Add sub-tile dumping code, and do compares. Change-Id: I5bc29c07e1075ac40b495f35d01d433e81ba309a Reviewed-on: https://gerrit.libreoffice.org/79195 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-08-07Mark some vars as constStephan Bergmann
...with the benefit of avoiding some Clang 10 -Werror,-Wimplicit-int-float-conversion in places where they are implicitly converted to double Change-Id: I0a8e85b23e3cb19d736e436b793ad83bb5fb99c4 Reviewed-on: https://gerrit.libreoffice.org/77034 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.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-07-26gtktiledviewer: provide activation functionAshod Nakashian
This fixes the gtktiledviewer on some distros/gtk versions that require an activation function to be provided. Change-Id: I95fb3ed4e92e27d9c725ca38b4cb5a4f8af51771 Reviewed-on: https://gerrit.libreoffice.org/71588 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/76373 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-22New loplugin:dataStephan Bergmann
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.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-05-02lok: We changed the (unstable) ABI, but let's allow the older C++ API.Jan Holesovsky
Helps building the Online before the appropriate patch gets merged. Change-Id: I9983d546bb0cb7fb472806622a0a10e3a4d3ab87 Reviewed-on: https://gerrit.libreoffice.org/71665 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-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-26lok: allow paste content to popup dialogHenry Castro
Change-Id: I1893d52df505bc43428c37a624ca05c569ba1bc0 Reviewed-on: https://gerrit.libreoffice.org/70958 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2019-04-25Cut down on -pthread/-lpthread proliferationStephan Bergmann
Building against libstdc++ effectively always requires -pthread anyway (as various standard C++ headers require it, see the comment added to solenv/gbuild/platform/unxgcc.mk), so many explicit uses of -pthread/-lpthread can be removed. Doing a (partial) test build on Linux with Clang -stdlib=libc++ suggests that libc++ indeed doesn't need -pthread as libstdc++ does. The remaining uses of -pthread/-lpthread are mostly in configure.ac for the various BSDs (which somebody else might want to clean up now), and related to external projects. I tried to be careful to remove -pthread/-lpthread from makefiles only when C++ object files are involved (so -pthread will now be included on the link command line by default). Change-Id: I936e082839cb9a434bd273ce5a1f187a4245dfa1 Reviewed-on: https://gerrit.libreoffice.org/71291 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>