summaryrefslogtreecommitdiff
path: root/libreofficekit
AgeCommit message (Collapse)AuthorFilesLines
2018-10-19clang-tidy modernize-redundant-void-argNoel Grandin1-1/+1
Change-Id: Ia25ac2e40f29e5b766a4c5c013fb53274196f656 Reviewed-on: https://gerrit.libreoffice.org/61934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-10Sure it is a squareTor Lillqvist1-1/+1
Change-Id: I2a48c31bfcfa0c1fee213a70f3c25bcdcc1de56d
2018-10-10Move the iOS CGBitmapContextCreate() call do doc_paintTile()Tor Lillqvist1-21/+0
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-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann1-1/+1
...where "inline" (in its meaning of "this function can be defined in multiple translation units") thus doesn't make much sense. (As discussed in compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions in include files for now.) All the rewriting has been done automatically by the plugin, except for one instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus some subsequent solenv/clang-format/reformat-formatted-files. Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224 Reviewed-on: https://gerrit.libreoffice.org/61573 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-05s/0/nullptr/Tor Lillqvist1-1/+1
Change-Id: Id1b75435134da830130ebe725d86ad4e273d1f06
2018-10-05WaE: unused parameterTor Lillqvist1-1/+1
Change-Id: I0ccdad335f0a2cd6f14a4a226590b0e1d3033244
2018-10-05Use LOK_FEATURE_NO_TILED_ANNOTATIONS here, like in OnlineTor Lillqvist1-0/+2
Change-Id: Ib34b83bc14f17dbb2bf3e89140edb734697710a8
2018-10-05Call also initializeForRendering() and registerCallback()Tor Lillqvist1-0/+8
... 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 Lillqvist1-2/+30
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 Nabet1-0/+8
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 Nabet1-1/+1
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 Lillqvist1-4/+12
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 Bergmann2-5/+5
...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 Illarionov1-1/+1
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-08-27libreofficekit: update lloconv git URLMiklos Vajna1-1/+1
Change-Id: I3a1699efe5335c43f79a15c3487f8deb7d1be5c6 Reviewed-on: https://gerrit.libreoffice.org/59635 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-16coverity#1437959 Copy into fixed size bufferCaolán McNamara1-6/+5
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 Meeks1-9/+36
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 Meeks2-8/+92
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 Meeks1-132/+167
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 Gelmini2-2/+2
Change-Id: I1b966b636f67a549718ca19c00c2820e8d168c7a Reviewed-on: https://gerrit.libreoffice.org/56589 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-05-24libreofficekit: Run gla11y on gtv.uiSamuel Thibault2-0/+17
Change-Id: I1bb2be7d3636b70018276eb3d6b23ba7ace6e62a Reviewed-on: https://gerrit.libreoffice.org/53926 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-17loplugin:redundantcast improvements for floating-integer conversionsStephan Bergmann1-2/+2
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 Gelmini1-1/+1
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ğlu1-6/+6
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>
2018-04-07sw lok: View jumps to cursor position even if it is moved by an other view.Tamás Zolnai1-2/+15
Scrolling is done twice. Once in SwCursorShell::UpdateCursor() by SCROLLWIN flag. Here we can check the actual viewid and avoid scrolling if the cursor is move by an other user. The second instance in the LO online code, for it we need to pass the viewid identifying the view which moved the cursor. Change-Id: I033274f88ce41acbb632e2aeb0d986ab11cd2d52 Reviewed-on: https://gerrit.libreoffice.org/52220 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-03-25Use for-range loops in some modulesJulien Nabet1-3/+2
jvmaccess, jvmfwk, l10ntools, libreofficekit and linguistic Change-Id: I9d290d1098b25ccb3aee19d2df18c18f4aa65105 Reviewed-on: https://gerrit.libreoffice.org/51495 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-21lok: be informative and exit when tilebench fails to initializeAshod Nakashian1-0/+6
Change-Id: I11078e36aafc715b7103998a17e0cb01926b8e97 Reviewed-on: https://gerrit.libreoffice.org/51618 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2018-03-15move Bitmap::ScopedWriteAccess inside vclNoel Grandin1-1/+1
would have liked to make the AcquireWriteAccess methods DLLPRIVATE, but they are needed by the workbench and testing code Change-Id: I22497788eb68dfb84b7e542e5ef53322892a5274 Reviewed-on: https://gerrit.libreoffice.org/51310 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-03-14lokdialog: debug red-colored boundary for last painted regionPranav Kant1-0/+6
Easier to see what's going on inside the LOK dialog. Change-Id: I59974200af3d2356b7c27eb3dd4032a59c00dbed Reviewed-on: https://gerrit.libreoffice.org/51263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
2018-03-13lokdocview: new property 'is-initialized'; fix gtktiledviewer for calcPranav Kant2-0/+31
there's no lokdocview property to tell if the doc has been completely initialized (initializeForRendering() has been called, etc.). This new property takes care of that which we now use to ignore configure event fired before document is initialized for rendering. Configure event handler queries document for row/col header which asserts because some values hasn't been initialized yet. Change-Id: I58385b2cb56bf317fe20ecf0570b7095f7260174 Reviewed-on: https://gerrit.libreoffice.org/51156 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
2018-03-05Resolves: tdf#116188 set min version on all .ui files to 3.18Caolán McNamara1-1/+1
which is already the min for the runtime Change-Id: Ifebe099f1f94a36f65a31989689400327a823dcd Reviewed-on: https://gerrit.libreoffice.org/50776 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-02delete colordata.hxxNoel Grandin1-1/+1
move what we still need into color.hxx Change-Id: Ied7e31eb16468aa334c666b1499a6262f16a6350 Reviewed-on: https://gerrit.libreoffice.org/50561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27Fix build, for real this timePranav Kant1-0/+1
Add a few missing processEventsToIdle()'s in the tests. Let's disable one of the assertion until I figure out what's going on. Change-Id: I82cbe443b4013d4402151ddae4b06044dfb394bd
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin1-1/+1
with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-14Fix typosAndrea Gelmini1-1/+1
Change-Id: I2b4988e1d81fe60f7699362480cd739d2620c053 Reviewed-on: https://gerrit.libreoffice.org/47856 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-12More loplugin:cstylecast: libreofficekitStephan Bergmann3-32/+32
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Iaa166a248f5c1e9fcf62834f65475265403e4322
2018-01-10Fix typoAndrea Gelmini1-1/+1
Change-Id: I2261578d54e4b986871eab9c309884eb903aa3c6 Reviewed-on: https://gerrit.libreoffice.org/47614 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-08lokdocview: Make g-ir-compiler, scanner happyPranav Kant1-8/+14
Silence their warnings Change-Id: Id397745bbf7fe6687b60eeca60d5a0b67da421b1
2017-12-23LOK: support tile-dumping in tilebenchAshod Nakashian1-11/+60
And other improvements. (cherry picked from commit b7d893d8a1ecb24290c4470e12d71caba2b85216) Reviewed-on: https://gerrit.libreoffice.org/46678 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 0e7ccbdd559df3a446e73c367b12824c6c143579) Change-Id: I5a27d6d2df5f946a708dd3b0b4fef8159da86e5c Reviewed-on: https://gerrit.libreoffice.org/46985 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-12-23LOK: tilebench improvementsAshod Nakashian3-35/+73
* Arguments for max number of parts and tiles to render (optional). + Automatic estimation of maximum tiles to render based on max parts for Writer docs, since there is only 1 part, this caps the number of pages to render, similar to other doc types. * Fixed rendering of Writer documents over and over (as many times as pages). + Writer has a single part, unlike other doc types. + No point in rendering the whole document in writer to a single tile, since that's completely unrealistic and impractical (it takes forever for large docs and artificially spikes the memory). * Rendering starts at the current part and not the first. + This gives the spreadsheet of interest priority (if saved as visible). * The tile size is now more realistic as we use the same dimensions as the Online client does. * When rendering tiles at scale, we use the same dimensions as the Online client rather than splitting the width by 4, for realism. * Rendering of tiles is done rows-first, rather than columns-first, which is similar to what the Online client does, which is more cache friendly, therefore more realistic. * Enabled compiling of tilebench when GTK3 is disabled, which was erroneous, since tilebench doesn't have any dependency on GTK. + Now it's possible to compile with local Cairo/Pixman libs. Reviewed-on: https://gerrit.libreoffice.org/44936 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 7db98521548de9eab955ee25a5aacaaef42df323) Change-Id: I6ad2e97f39572778dd7d0c12d14550841c1d6963 Reviewed-on: https://gerrit.libreoffice.org/46984 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-12-22rhbz#1527945 segv on failed open of password protected doc in gnome-documentsCaolán McNamara1-1/+1
Change-Id: I1bec502ae20d03214c673d8911792c89669c0fe9 Reviewed-on: https://gerrit.libreoffice.org/46921 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-21Fix typosAndrea Gelmini1-1/+1
Change-Id: I5c6e252072089a06f0be4292d51aed020cbc67fe Reviewed-on: https://gerrit.libreoffice.org/46888 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-21lokdocview: Handle INVALIDATE_HEADER cbPranav Kant1-3/+65
With this calc gtktiledviewer or any other lok client shouldn't crash anymore when a new view is opened. And while at it, update documentation of callbacks. Change-Id: I436c3b424dd4e2e6b8c312b0d3ba43d7006e944b
2017-12-21lokdocview: use std::string where possiblePranav Kant1-22/+20
This also prevents an invalid memory access: we were storing the pointer to a temporary in the struct and then using it after temporary was gone. Change-Id: I2b6d9df16bc24b222095ccbf45c9f0bd9c86ed65
2017-12-15lokdialog: If we already have the title, emit it during creationPranav Kant1-0/+4
Some dialogs load the UI before we "Execute()" the dialog, or before the dialog fires the InitShow event. In those cases, the title event has already been fired and won't be fired after dialog is created. Make sure that we send the title for such dialogs. Change-Id: Ib66238298ad9b0dc85bd269aff37aeadf1fc82e4 (cherry picked from commit 10a88598a4233f2b24548571644a83dc9d20e15d)
2017-12-15lokdialog: gtv: Set dialog title on callbackPranav Kant1-0/+5
Change-Id: I6d96a9e2287afdcaad2f770e4b4c73d3671fc76b (cherry picked from commit f0a6fd58575ff6b9ebbfb0835aa8694923ddbffd)
2017-12-04lokdialog: multiview: Do not mix one view with otherPranav Kant3-21/+13
In GTV, use correct application window object to fetch the dialog object. Use correct view shell to notify window (dialogs, etc.) callbacks. Change-Id: I7d82b39d4522a4b4904e156757a032c342c71efb
2017-12-04lokdialog: Merge dialog & dialog child mouse event APIs into onePranav Kant1-27/+27
Change-Id: I91aaa6a58f33dd2d817e02533de96e0c8191f2ca
2017-12-04lokdialog: Rename postDialogKeyEvent -> postWindowKeyEventPranav Kant1-1/+1
Change-Id: I78b434106fbef153adde255d4fcc8f74a7169175
2017-12-04lokdialog: Simplify; make the LOK dialog API more genericPranav Kant7-193/+157
Merge the dialog floating window callbacks and function calls into one. Unique window ids across vcl::Window is enough to distinguish between them. Floating windows don't have a LOK notifier as they are created in the vcl itself (so we can't access them from sfx2). Use the parent LOK notifier in that case (which would be a dialog). This API should also help in autopopup filter tunneling later. Change-Id: I63a2c97ffdd84695dc967e14c793089a7c50b41b