summaryrefslogtreecommitdiff
path: root/libreofficekit/qa
AgeCommit message (Collapse)Author
2021-03-22Silence -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> (cherry picked from commit 281f3d5c418e50a2858619633ebca290bd626c03)
2020-09-04Remove an odd CPPUNIT_ASSERT(0)Tor Lillqvist
The unit test that code is in isn't even run currently (commented out in Module_libreofficekit.mk), so no harm in not making it fail intentionally. (The commit message of the commit that added the test with the intentionally always failing assertion does not tell what the idea was.) Change-Id: I93407723ce10c77366e6f7f96df93d86f214f497 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102029 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-20We apparently need to call Application::Quit() on iOS nowTor Lillqvist
(This file is included in ios/UnitTest/UnitTest/ViewController.mm.) Change-Id: I79170785db43d9bdb3aca6f500161862eb6a111b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99028 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-06-16Make gtktiledviewer accept multiple documents to openTor Lillqvist
It doesn't really work that well, though. With the right combination of different kinds of documents on the command line, it will even crash. Change-Id: Iccab34a714288fd04c52a21881b6256cfcb86081 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94980 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96361 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.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-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-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-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-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-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-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-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-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-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-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-15improve loplugin simplifyconstructNoel Grandin
to find stuff like OUString s = OUString("xxx") Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04 Reviewed-on: https://gerrit.libreoffice.org/70697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-28simplify reset(nullptr) -> reset()Noel Grandin
Change-Id: Iec5e93d9c59dde44571376e46fb98ea854e16b6c Reviewed-on: https://gerrit.libreoffice.org/69784 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-13lok: keystroke attribution issue.Michael Meeks
Change-Id: I7e5ed3c72fef12d31b5500acffff622b5f4129de Reviewed-on: https://gerrit.libreoffice.org/66931 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-01-25lok: calm down CnP issues & simplify.Michael Meeks
Change-Id: I67669b9b3accbcf89bddf3b8dc8435edba89224b Reviewed-on: https://gerrit.libreoffice.org/66925 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-11-10clang-tidy: (WIP) bugprone-too-small-loop-variable findings 2Tamás Zolnai
Change-Id: I1ddf3fe0e5fad265ae14712a23469b684253079d Reviewed-on: https://gerrit.libreoffice.org/63241 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-11-06loplugin:collapseif in dbaccess..lotuswordproNoel Grandin
Change-Id: Ia2a0d25c3833dfde0cd28337361f3cbd2aa29662 Reviewed-on: https://gerrit.libreoffice.org/62934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-01clang-tidy: (WIP) bugprone-too-small-loop-variable findingsTamás Zolnai
Change-Id: Iaa255b39928ac45dec1ed37e368c149d6027f561 Reviewed-on: https://gerrit.libreoffice.org/62701 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-10-23remove all use_action_appearance linesCaolán McNamara
Change-Id: I031676e939f53a28b1a62654ffe0a91b95dea029 Reviewed-on: https://gerrit.libreoffice.org/62234 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-10Sure it is a squareTor Lillqvist
Change-Id: I2a48c31bfcfa0c1fee213a70f3c25bcdcc1de56d
2018-10-10Move the iOS CGBitmapContextCreate() call do doc_paintTile()Tor Lillqvist
Thus it now actually takes a buffer pointer also on iOS, like on Linux and Android. Less confusing, more uniform. Add a separate iOS-specific paintTileToCGContext() method to LibreOfficeKitDocumentClass that takes a CGContextRef. Adapt callers correspondingly. (The LibreOfficeLight code in particular needs the paintTileToCGContext().) Change-Id: I81084806d37b9aac9f2b2bc03d0c262e991eec81
2018-10-05s/0/nullptr/Tor Lillqvist
Change-Id: Id1b75435134da830130ebe725d86ad4e273d1f06
2018-10-05WaE: unused parameterTor Lillqvist
Change-Id: I0ccdad335f0a2cd6f14a4a226590b0e1d3033244
2018-10-05Use LOK_FEATURE_NO_TILED_ANNOTATIONS here, like in OnlineTor Lillqvist
Change-Id: Ib34b83bc14f17dbb2bf3e89140edb734697710a8
2018-10-05Call also initializeForRendering() and registerCallback()Tor Lillqvist
... to make the LibreOfficeKit usage more like a real app, to make sure that calling these doesn't cause any change in behaviour. (It didn't, as far as I could see.) Change-Id: Idded20c06031b46d5194ffeeb17309f2dbcdbaac
2018-10-02More hacking on the tilebench part of the UnitTest appTor Lillqvist
On iOS, don't attempt to write the tile dump ppm file to /tmp, but use the app-specific directory so that it can be copied for inspection using iTunes. (Of course, even better would be to simply paint it to the app's view. Later) Change-Id: I8dd60d04adc61de6594099f5c358a9b6220522da Reviewed-on: https://gerrit.libreoffice.org/61255 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2018-09-29band-aid: deprecated-declarations related to gtkJulien Nabet
Don't hesitate to revert this one but only if there's a patch to fix it. Change-Id: Ib15352e1a94d0542120f6710acfe19887494ed51 Reviewed-on: https://gerrit.libreoffice.org/61142 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-09-29Band-aid fix for deprecate gtk_css_provider_get_defaultJulien Nabet
by gtk_css_provider_new Don't hesitate to revert this one but only if there's a patch to fix it. Change-Id: Id91fefb689326a31e029a788bd3729e670fe3100 Reviewed-on: https://gerrit.libreoffice.org/60915 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-09-28Start on the iOS unit test appTor Lillqvist
Change-Id: Idef0b375d5c7d6d4542aee1f8abecaf9f834189c Reviewed-on: https://gerrit.libreoffice.org/61058 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-09-08Replace find_if with proper quantifier algorithmsArkadiy Illarionov
Missed in 085269d25a705b656436feac47149296b4b4b35d Change-Id: I3cfab57232908b48d090658e0fbc948d62b3fc6f Reviewed-on: https://gerrit.libreoffice.org/60180 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-16coverity#1437959 Copy into fixed size bufferCaolán McNamara
Change-Id: I5578e195c834b2a3ceacd5c528f58d1d03502c2e Reviewed-on: https://gerrit.libreoffice.org/57461 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-07-09tilebench: add --preinit mode.Michael Meeks
Also cleanup DISPLAY to avoid various weird problems. Change-Id: Ib480c94fc50baab6185ecadaabda9a8063cedfee Reviewed-on: https://gerrit.libreoffice.org/57146 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-07-09tilebench: add dialog profiling mode.Michael Meeks
Change-Id: I4661664d1206aacdaf22a4a8f05d7962547faf45 Reviewed-on: https://gerrit.libreoffice.org/56765 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-07-09Re-factor to allow dialog profiling.Michael Meeks
Change-Id: I2268cc7b1db23c520ce3699d4e478d7c5bf6820f Reviewed-on: https://gerrit.libreoffice.org/56764 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2018-06-28Fix typosAndrea Gelmini
Change-Id: I1b966b636f67a549718ca19c00c2820e8d168c7a Reviewed-on: https://gerrit.libreoffice.org/56589 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-17loplugin:redundantcast improvements for floating-integer conversionsStephan Bergmann
Change-Id: I63dbf18f144a792ae775fe6706da81657f790016 Reviewed-on: https://gerrit.libreoffice.org/54416 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-05-05Fix typosAndrea Gelmini
Change-Id: I92078fdece135754744d85424956dbb071f3899e Reviewed-on: https://gerrit.libreoffice.org/53638 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-04-17cppcheck - fix variableScope in some filesGökhan Gurbetoğlu
Reduced the scope of some variables in source. Change-Id: Ib3b521ca5df8b9b254b51eab5f1d7040d6cfd846 Reviewed-on: https://gerrit.libreoffice.org/52974 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>