summaryrefslogtreecommitdiff
path: root/desktop/source/lib
AgeCommit message (Collapse)Author
2019-12-04desktop: fix Android -Werror,-Wunreachable-codeMiklos Vajna
error: code will never be executed [-Werror,-Wunreachable-code] In the 'old' (JNI-based) Android app case. If clang doesn't like 'if (false)', then invert the #if condition so we don't need it. Change-Id: I79818a51cb284519313738ab4272d109171dfcd0 Reviewed-on: https://gerrit.libreoffice.org/84431 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-12-04lok: Fix the condition of setting the transparent background.Jan Holesovsky
Change-Id: I7b201296efe6541761896e0af1b230aecb534cdc Reviewed-on: https://gerrit.libreoffice.org/84211 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins
2019-12-04lok: cleanup getCellCursorMichael Meeks
Switching the zoom is no longer necessary - we now have a known and fixed zoom per view now (as the core has), that saves some complexity. Change-Id: I14c952ca1e06fae016faa8b6ee07115c56312ed6 Reviewed-on: https://gerrit.libreoffice.org/84372 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-03desktop: disable callback handling while changing the viewAshod Nakashian
When changing the view, some components are disabled and re-enabled. This triggers a flood of invalidations that then result in rendering requests. For each rendering the view is set, which triggers more invalidations. The Sidebar suffers from this, and it causes cpu pegging. This fix prevents this issue by disabling all callbacks during setView. Change-Id: If6b93b2ab31f568a0761f15d945a43de1bc2d4d0 Reviewed-on: https://gerrit.libreoffice.org/84184 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/84226 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-03lok: formula bar: function completionMarco Cecchetti
lok clients can request to complete a function name partially typed in the formula input box. Change-Id: I8771fd4d2a7f79c20138d9183162da23a92f2ba4 Reviewed-on: https://gerrit.libreoffice.org/83984 Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com> Tested-by: Marco Cecchetti <marco.cecchetti@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/84258 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-12-02android: Get rid of the 'old' vs. Online-based runtime distinction.Jan Holesovsky
No need for this when we have a compile-time distinction now anyway. Change-Id: Ic86c8cce38a86635ea3efb4229c08f63059c9ee6 Reviewed-on: https://gerrit.libreoffice.org/83719 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins
2019-11-30lok: add viewId to window painting, to allow special-casing on render.Michael Meeks
View switching should not cause the sidebar UX to re-build at all. Particularly it should not do this when we switch view just to render a sidebar. Change-Id: Iec0427cdc8308fc273d73ea56dd208bfa7036471 Reviewed-on: https://gerrit.libreoffice.org/84120 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 92814f3389de346f3ae32cddb38f079763e68ddf) Reviewed-on: https://gerrit.libreoffice.org/84129 Tested-by: Jenkins
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-26We use the system clipboard on iOS and not the "LOK clipboard"Tor Lillqvist
The use of the system clipboard was implemented for iOS in vcl already in cp-6.0. This "LOK clipboard" thing is for different situations in web-based Online and not applicable for the iOS app. Change-Id: I679b5c27d308a563eadaf1e543ce8c45d763f3c6 Reviewed-on: https://gerrit.libreoffice.org/83339 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-11-24lok: Chart context menu: Replace tunneled context menu with JS context menu.Tamás Zolnai
Change-Id: I36db90887bff86036093ce0732db6fc6c76e79f6 Reviewed-on: https://gerrit.libreoffice.org/83604 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@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-17Extend loplugin:external to warn about enumsStephan Bergmann
To mitigate the dangers of silently breaking ADL when moving enums into unnamed namespaces (see the commit message of 206b5b2661be37efdff3c6aedb6f248c4636be79 "New loplugin:external"), note all functions that are affected. (The plan is to extend loplugin:external further to also warn about classes and class templates, and the code to identify affected functions already takes that into account, so some parts of that code are not actually relevant for enums.) But it appears that none of the functions that are actually affected by the changes in this commit relied on being found through ADL, so no adaptions were necessary for them. (clang::DeclContext::collectAllContexts is non-const, which recursively means that External's Visit... functions must take non-const Decl*. Which required compilerplugins/clang/sharedvisitor/analyzer.cxx to be generalized to support such Visit... functions with non-const Decl* parameters.) Change-Id: Ia215291402bf850d43defdab3cff4db5b270d1bd Reviewed-on: https://gerrit.libreoffice.org/83001 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-10Added Orientation argument to LOKIT renderFontMert Tumer
method for rendering watermarks with angle Change-Id: Id422ed62e4f78390661e4e1efa45101af9ecfc23 Reviewed-on: https://gerrit.libreoffice.org/81435 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-06Revert "sc lok: Implement hi-dpi and zoom for spreadsheets."Michael Meeks
This reverts commit 498dceb43f870bf9e380f1f87e99c6ccadf1963c. Change-Id: Iadb9da47cf8c9a57385530ab888d55169db7639a Reviewed-on: https://gerrit.libreoffice.org/82088 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-11-04lok: share conversion of OUString to C strings.Michael Meeks
Change-Id: I0178f673dc1e59d9fba8f3daae532f19b46e4d36 Reviewed-on: https://gerrit.libreoffice.org/82036 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-31jsdialogs: refresh SidebarDockingWindow after eventSzymon Kłos
Before we had JSON genertion in Deck now it was moved to the parent. Change-Id: I0fc11ec716542fd3aa6862292ae94985ee3d20d4 Reviewed-on: https://gerrit.libreoffice.org/81854 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-22lok: convert JSON to StringMap in sent DialogEvent functionHenry Castro
The StringMap type is used to the class UIObject methods to get state and execute actions. So the idea is the loleaflet client side send a raw JSON string: { ctrl: "id_control", cmd: "SELECT", ID: "item_id", ... // more parameters } Then it is transformed with a simple JSON to StringMap, finally it is dispatched to execute the actions. Change-Id: Icd628598fe46ae28b4afa3ca17ac75797c1b9308 Reviewed-on: https://gerrit.libreoffice.org/81313 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com>
2019-10-21jsdialogs: handle spinfieldsSzymon Kłos
Change-Id: I9b845917ff1a7cb2242d7ef2b6b370007d0091b4 Reviewed-on: https://gerrit.libreoffice.org/81230 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-21jsdialogs: use click event if not a comboboxSzymon Kłos
Change-Id: I377de66bd086fa2cb5ef70514f5f1613a3fcb5cd Reviewed-on: https://gerrit.libreoffice.org/81211 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-21jsdialogs: force resend UI descriptionSzymon Kłos
Change-Id: I8d3466df6f2ad75c33ce2f9a91da9e9361201c0b Reviewed-on: https://gerrit.libreoffice.org/81050 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-18jsdialogs: handle combobox selectionsSzymon Kłos
Change-Id: Ib968bfaf7ad9e7becd16355259142d583bf7b5e3 Reviewed-on: https://gerrit.libreoffice.org/80991 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-18jsdialogs: avoid exception crashing app on eventsSzymon Kłos
Change-Id: I83ddb44f54061d9f585eef3864415a472151976a Reviewed-on: https://gerrit.libreoffice.org/80989 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-16Send 'INPLACE EXIT' on inplace deactivationSzymon Kłos
Change-Id: Ieb44fb356966df0eb92141a5f22f1df13683f6fc Reviewed-on: https://gerrit.libreoffice.org/80694 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-15jsdialogs: handle dialog eventsSzymon Kłos
Change-Id: Icc092cd5b06168d9de8ebed891fc03491865dbad Reviewed-on: https://gerrit.libreoffice.org/80788 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-15new loplugin:bufferaddNoel Grandin
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-15Bin a fairly pointless unconditional NSLog() callTor Lillqvist
Change-Id: I7c1910c3e1bf345966ec289aaf5f9c9b6cbabc22
2019-10-11Add FullSheetPreview support for convert-to endpoint of onlineMuhammet Kara
Change-Id: I31e4f3cbcf0cf49c5446d9460bd42965ce756c0d Reviewed-on: https://gerrit.libreoffice.org/80397 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/80461 Tested-by: Jenkins
2019-10-09lok: Avoid accidental removal of filter optionsMuhammet Kara
Change-Id: I178bcb19aa3073ea72a3bc8712e5e904665b1510 Reviewed-on: https://gerrit.libreoffice.org/80463 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-10-04Related: tdf#127529 make it harder to misunderstand this VirtualDevice ctorCaolán McNamara
Change-Id: I250bc68da118a994a2e0ff8ab9eb11112827756d Reviewed-on: https://gerrit.libreoffice.org/80158 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-04use normal VirtualDevice ctor, not the obscure SystemGraphicsData variantCaolán McNamara
Change-Id: I4be43f692a29b1b1ee3f96bb34133f3ef0cf4eb7 Reviewed-on: https://gerrit.libreoffice.org/80151 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-02input: ensure that removeTextContext happens in the right order.Michael Meeks
Unfortunately the backspace key-events we emit trigger uno accelerator handling, which happens another PostMessage further out, so cheat by doing it synchronously, and relying on the PostMessage inside to get the ordering right. Change-Id: Ibee80af7674fd5107cb1c9ba323071ac024c45ae Reviewed-on: https://gerrit.libreoffice.org/79883 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-02Ensure that 'input' events are processed asynchronously too.Michael Meeks
Change-Id: I715eadd444e428148cfff8a61436987517004fae Reviewed-on: https://gerrit.libreoffice.org/79882 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-01lok: handling a single msg for deleting multiple charactersMarco Cecchetti
also includes: lok: fixing testABI failure Change-Id: I4df662a0df49a864c4b307efdd963b857bb77792 lok: missing removeTextContext implementation for Document class Change-Id: I884ad07f330afc19dfe759c08c8a17bdb4f9dcf3 Change-Id: I045d89f9fa478f37fc2917e159e044eee7e1ab31 Reviewed-on: https://gerrit.libreoffice.org/79879 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-09-26drop unnecessary includes and update pchCaolán McNamara
Change-Id: Id7fa7d5b95c32fdc738a18208eb95eaec102d937 Reviewed-on: https://gerrit.libreoffice.org/79523 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.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-24support O(U)String::number() for fast string concatenationLuboš Luňák
When I did the fast string concatenation, I didn't add any support for number(), which simply returned a O(U)String, and so it did the extra allocation/deallocation, although that could be avoided. In order to support this, number() now returns a special temporary return type, similarly to O(U)StringConcat, which allows delaying the concatenation the same way. Also similarly, the change of the return type in some cases requires explicit cast to the actual string type. Usage of OString::getStr() is so extensive in the codebase that I actually added it to the helper class, after that it's only relatively few cases. Change-Id: Iba6e158010e1e458089698c426803052b6f46031 Reviewed-on: https://gerrit.libreoffice.org/78873 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-09-19desktop: various small cleanups in lokclipboardMiklos Vajna
1) virtual is redundant when override is used 2) LOKTransferable::initFlavourFromMime() had different parameter names in the function declaration and definition 3) const-qualification on nInCount only had an effect in the function definition, not in the declaration Change-Id: I773f1f3cb5bac137a49c7e3b9ecb9b9bdf606268 Reviewed-on: https://gerrit.libreoffice.org/79111 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-09-12desktop: mark LOKClipboard as finalMiklos Vajna
Otherwise the virtual member function calls in the constructor would be dangerous. Change-Id: I2fece2ca5718deafe0b88a774208c553e630b411 Reviewed-on: https://gerrit.libreoffice.org/78824 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-09-02Unnecessary to convert Locale to LanguageTag twiceEike Rathke
Change-Id: Ie2de1a8c5555ac1f8a46cacd052efc1a03e6f2ac Reviewed-on: https://gerrit.libreoffice.org/78395 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2019-09-01Fix '..'Andrea Gelmini
To complete this: https://gerrit.libreoffice.org/#/c/78312/ This is a massive replace for lines ending with ".." instead of "..." It passed "make check" on Linux. Change-Id: I07fa7b2e30ba9ea17a1f9a5e21c57216ba958efe Reviewed-on: https://gerrit.libreoffice.org/78356 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-08-29LOK: per-view support for isMobile()Muhammet Kara
embeddedobj/source/commonembedding/embedobj.cxx will have a follow-up patch, which also removes the -1 case. It is left out because it has many call-sites, and inheritance/override relations. Change-Id: Iaf00530916f3772f7aec151cbd358f255b7aab24 Reviewed-on: https://gerrit.libreoffice.org/78272 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-08-29lok: Add isMobile() methodMuhammet Kara
[ Miklos: this allows core to e.g. serve tunelled dialogs with more or less compact layouts, depending on if the client is mobile or not. ] Change-Id: I3559bee84e6ef6f757809617e303aa090698ce5d Reviewed-on: https://gerrit.libreoffice.org/78261 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-08-28Send Bcp47 codes with regionSzymon Kłos
Change-Id: I816eddab3d88534bff6c1f1dba81b45107cdb372 Reviewed-on: https://gerrit.libreoffice.org/78227 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-08-28Send iso code for languagesSzymon Kłos
[ Miklos: the motivation for this change is that LOK clients may display information on their UI depending on screen size. Mobile clients may want to have a more compact display, where showing the full language name takes too much space, and showing some kind of language code is a better way. ] Change-Id: Iec93ad05d83a8ce871eab33bd12e99aee9aafa86 Reviewed-on: https://gerrit.libreoffice.org/78217 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-08-19loplugin:constvars in cppuhelper..desktopNoel Grandin
Change-Id: Iaf42114ab98875c4bc1545684f1893540b998ef2 Reviewed-on: https://gerrit.libreoffice.org/77723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet
in cppuhelper, desktop, drawinglayer, embeddedobj, extensions Change-Id: I4c970f08c0723299f79c9e18bc71b7372a7092e4 Reviewed-on: https://gerrit.libreoffice.org/77636 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-15loplugin:sequenceloop dbaccess..extensionsNoel Grandin
Change-Id: I0eb33a8e293eb8afd0cf5a933384c44e023a2e6b Reviewed-on: https://gerrit.libreoffice.org/77498 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-08lok: Output a SAL_WARN only if message is not emptyTomaž Vajngerl
Because we call SetLastExceptionMsg with an empty message when we want to reset the exception message and this happens all the time in the LOK code. Change-Id: Iead1b561d303d610db5e02f79a7af6c72b43834a Reviewed-on: https://gerrit.libreoffice.org/77144 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-08-07Remove some unused includesMiklos Vajna
See tdf#42949 for motivation. Change-Id: I76f3cbf866d20a3e70d06148fb42ca25998de34b Reviewed-on: https://gerrit.libreoffice.org/77063 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>