summaryrefslogtreecommitdiff
path: root/libreofficekit/source
AgeCommit message (Collapse)AuthorFilesLines
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann1-1/+1
...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 Holesovsky1-0/+5
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 Holesovsky1-1/+9
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 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-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-06-28Fix typosAndrea Gelmini1-1/+1
Change-Id: I1b966b636f67a549718ca19c00c2820e8d168c7a Reviewed-on: https://gerrit.libreoffice.org/56589 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
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-13lokdocview: new property 'is-initialized'; fix gtktiledviewer for calcPranav Kant1-0/+22
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-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-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-12More loplugin:cstylecast: libreofficekitStephan Bergmann1-18/+18
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-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-04lokdialog: Simplify; make the LOK dialog API more genericPranav Kant1-46/+9
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
2017-10-24fix build errorDavid Tardon1-4/+2
Change-Id: I1e65f075a0519db86836b3aa09848178796a020b
2017-10-02Change CB_DIALOG_INVALIDATE to CB_DIALOGPranav Kant1-7/+8
We can specify whether it is an invalidation or something else in the payload. Change-Id: I95c5fc0a0a88b5277eaa93c8d1f9b937bddce7b3
2017-10-02lokdialog: Support for rendering floating window dialog widgetsPranav Kant1-0/+37
Now gtktiledviewer can show floating window dialog widgets when user clicks any of such widget in the dialog. Change-Id: I13d756f236379bc8b2041ed41cb7b502f7fd9b24
2017-10-02lokdocview: Remove unnecessary codePranav Kant1-30/+11
Change-Id: I1d744c91f01eb098e9273d2459b63a5444558f39
2017-10-02lokdialog: Queue a redraw on invalidation in gtktiledviewerPranav Kant1-1/+17
Change-Id: I081508674a71c3beb89175e4f8ac3256e6bc6c6a
2017-10-02lokdialog: Dialog invalidation supportPranav Kant1-0/+4
For now, just invalidate the whole dialog whenever any of the controls in the dialog get invalidated. Since during dialog painting, many such invalidations are triggered, don't listen to them when we are painting. Change-Id: Ia8fc12cf9469691d60e91ef770d687e5ff01a7ef
2017-08-17implementing callback for ruler invalidationAditya Dewan1-0/+16
adding commands to fetch and changee ruler state '.uno:RulerState' and '.uno:RulerStateChange' Change-Id: I66107039a7ae5893691feb45c8ab2e4aa476ea76 Reviewed-on: https://gerrit.libreoffice.org/40727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: pranavk <pranavk@collabora.co.uk>
2017-07-31loplugin:oncevarNoel Grandin1-1/+1
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21migrate to boost::gettextCaolán McNamara1-1/+0
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-10teach unnecessaryparen loplugin about identifiersNoel Grandin1-1/+1
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b Reviewed-on: https://gerrit.libreoffice.org/39737 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23loplugin:unusedfields in jvmfwk..mysqlcNoel Grandin2-7/+0
Change-Id: If9c7a3239fceba9a2db3a5905ccaa7fa9adadb08 Reviewed-on: https://gerrit.libreoffice.org/39099 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-18Fix typosAndrea Gelmini1-1/+1
Change-Id: Iba6b13871222d591bce49d04990e7c85ff154cce Reviewed-on: https://gerrit.libreoffice.org/38915 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-06-16Resolves: rhbz#1454693 segv if tiled rendering is interruptedCaolán McNamara1-0/+15
Change-Id: I1131f246c43806adb8a83f6eeafca2b734851a0e Reviewed-on: https://gerrit.libreoffice.org/38888 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-15Related: rhbz#1444437 check if m_nTimeoutId is validCaolán McNamara1-1/+2
Change-Id: I80d850d23ab0e95bb4b105efa5a1ae1e59933a95
2017-05-11lok: sc: notify cell cursor position to address control in clientMarco Cecchetti1-0/+28
A new callback has been introduced for notifying the client: LOK_CALLBACK_CELL_ADDRESS Change-Id: I40b38a3cb8fb658c3f00332d56cfcbaf98e13771 Reviewed-on: https://gerrit.libreoffice.org/37357 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-05-10Resolves: rhbz#144437 make gnome-documents not crash the whole timeCaolán McNamara1-11/+23
accept that once initted that LibreOffice cannot be deinitted and reinited (without lots of work), but allow the main loop to quit and restart so LOKs thread can run and exit successfully, new LOK connections will restart the main loop. The buckets of global state continues to be valid the whole time this way Change-Id: Ide54c0df2ce4065f7c192ae8c2cedfaaa2b58d72 Reviewed-on: https://gerrit.libreoffice.org/37399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-09rhbz#1444437 gnome-documents finalize may not occur immediatelyCaolán McNamara1-2/+15
when LOK Widget is destroyed, it may instead happen during GC of javascript, like in the in gnome-documents case, but "destroy" will be called promptly. So close documents and office in destroy, not finalize Change-Id: I1dd7b828839894cb2d87f5c087194fe458ca22f0 Reviewed-on: https://gerrit.libreoffice.org/37398 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-25Fix typosAndrea Gelmini1-1/+1
Change-Id: Id5811d092917c872715559f4508d01e4173d090c Reviewed-on: https://gerrit.libreoffice.org/35636 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-02-22loplugin:unusedfieldsNoel Grandin2-10/+4
Change-Id: I8a114bcda99f123d230d61b0d0595bfe657cc3c0 Reviewed-on: https://gerrit.libreoffice.org/34513 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27lokdocview: 'comment' signal for comment callbacksPranav Kant1-0/+36
Change-Id: I82040893added83ff13395db3917b230ef6b01d5
2017-01-27lokdocview: Separate gobject property for turning off commentsPranav Kant1-1/+26
Pass --enable-tiled-annotations to gtktiledviewer on command line to turn comments on again, by default they are turned off now. Change-Id: I40e93ab683ec9538e088ae9aa83cda2eaaf9939e Reviewed-on: https://gerrit.libreoffice.org/33622 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-01-27lok: Implement new callbacks for comment notificationsPranav Kant1-0/+4
Change-Id: I298183b295c68c4a39cb1f6fffe4b89b4eaee0f3 Reviewed-on: https://gerrit.libreoffice.org/33469 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-01-27lokdocview: Turn off annotations rendering herePranav Kant1-0/+1
Change-Id: Ia1ee4f54a05ab3daca62a78fe335e731e4cfc02d Reviewed-on: https://gerrit.libreoffice.org/33465 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-01-24loplugin: unnecessary destructor jvmfwk..lotuswordproNoel Grandin1-2/+0
Change-Id: Iaa4f9b178ab265342255066af7fff09f5b33ab37 Reviewed-on: https://gerrit.libreoffice.org/33496 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-23lokdocview: Handle keypad enterPranav Kant1-0/+1
Change-Id: Ia892c346d4a3c0a5439c7977963cc502d287e6f7 Reviewed-on: https://gerrit.libreoffice.org/33445 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2017-01-09New loplugin:externvar: libreofficekitStephan Bergmann1-1/+1
Change-Id: Ib2a19249e1dd8d187b1fdc5559a9b4b9c2825e8c
2017-01-06lokdocview: Handle insert keyPranav Kant1-0/+3
Change-Id: Idb5ad17a3a94b9a6fba1113a759207c59acfb7bd
2017-01-02Fix inefficient usage of string::find() in condition (CWE597)Muhammet Kara1-1/+1
string::compare() will be faster when string::find's result is compared with 0, because it will not scan the whole string. Change-Id: I78596a6d796fe9779f88b7c7b91da09aa27b7035 Reviewed-on: https://gerrit.libreoffice.org/32430 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-10-24revert string::find changesNoel Grandin1-1/+1
this reverts commit 610f59651563205564a0f4818b5c1d347ca02132 fix "cppcheck:stlIfStrFind" and commit 5c1bb338ef0d781648d5b33ffc9d64c2be6d9926 cppcheck:stlIfStrFind which are deficient in one way or another, the original logic, while inefficient, is still most accurate Change-Id: I4907d2569c9c2976533f8ac9f4b8b45eb1807b72
2016-10-24fix "cppcheck:stlIfStrFind"Noel Grandin1-1/+1
in commit 5c1bb338ef0d781648d5b33ffc9d64c2be6d9926, compare does not do a startswith Change-Id: If518b3f6880848a5b5463c09fb73974d972010fd
2016-10-24cppcheck:stlIfStrFindJulien Nabet1-1/+1
Change-Id: Ic3c1b37b0c2cf9995e0bd1017cdbaed427fb296c Reviewed-on: https://gerrit.libreoffice.org/30185 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>