summaryrefslogtreecommitdiff
path: root/desktop/source
AgeCommit message (Collapse)Author
2020-01-06Revert "sfx2: sidebar: new .uno commands to show and hide sidebars"Michael Meeks
This reverts commit b6f4d3b92789e972d9b079a5561723f3e73e07a6. These are now handled as LOK pseudo-uno commands internally, and seem unlikely to have worked. Retains a small change to SidebarDockingWindow.. Change-Id: I861f46f0c9b5cf39a5aa0a0de0fc2f33de800cb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86293 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-02sidebar: bring new sidebar commands in-house & be more assertive with sfx2Michael Meeks
Force the sidebar to do it's asynchronous things synchronously to help keep things sane. Also emit our (in-process on Android / iOS) context change notification after everyone else got it & updated their panels. Change-Id: If94de6c83f1b783d7deee515fc2ee9a8d3754765 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86088 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-23lok: catch and log exceptions during key / mouse event emission.Michael Meeks
Change-Id: I2be8219f6b2648f3f0192caeccf8e8b037634dc2 Reviewed-on: https://gerrit.libreoffice.org/85387 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 46fbc12dac86579708695fddeaf4a3a2f8098955) Reviewed-on: https://gerrit.libreoffice.org/85684 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2019-12-21lok: Add pseudo uno command ToggleOrientationMuhammet Kara
Toggles orientation of the Writer page Change-Id: Ifcd5ca96bd16e50e5a4fa304f82f60e2425bd8f0 Reviewed-on: https://gerrit.libreoffice.org/85638 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2019-12-19sal_Char->char in desktop..dtransNoel Grandin
Change-Id: I6ad7d6acf081c16f904eb1b2506b545a88046c48 Reviewed-on: https://gerrit.libreoffice.org/85470 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-16sfx2: sidebar: new .uno commands to show and hide sidebarsAshod Nakashian
Change-Id: I9afba5eec855d6de590086736177b543d52d3b20 Reviewed-on: https://gerrit.libreoffice.org/85192 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-16LOK: don't send LOK notifications while switching viewsAshod Nakashian
Changing the active view is done for virtually every LOK API, and in some cases simply changing the view results in a flurry of notifications that themselves caues further API calls that need to change the view. This moves the disabling of callbacks during setView to SfxLokHelper to make sure no view gets any notifications. This is needed because even when we disable notifications for the current view, the _other_ view(s) can still get notified as they lose their frame. Change-Id: Ia88a58d6a1162e48c40f4c4ce73c40ecb2c1fb7e Reviewed-on: https://gerrit.libreoffice.org/84417 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-12-16jsdialogs: simply resize to reloadSzymon Kłos
Change-Id: I4eaee0f1ec27674d74fc7abfa05abaf39cb97117 Reviewed-on: https://gerrit.libreoffice.org/83326 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-12-16Revert "jsdialogs: don't recreate sidebar on event"Szymon Kłos
This reverts commit 0c75ccd84ea64f2c69afe104a4b4ebd55b3cc215. Change-Id: I127cd0179d24af52f695c9f1ee0792b9573e6e0e Reviewed-on: https://gerrit.libreoffice.org/83219 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-12-16jsdialogs: don't recreate sidebar on eventSzymon Kłos
This will allow to use mobile wizard in multiple views. JS listeners on uno commands are used instead. Also vcl events broadcasting is needed. Change-Id: Iddb230bfcf899384749d92da359b0a6a1260bc9f Reviewed-on: https://gerrit.libreoffice.org/82669 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2019-12-16jsdialogs: refresh after eventSzymon Kłos
Change-Id: Ie0128ec38dd442a04d6ea9e24cea254f5bc69791 Reviewed-on: https://gerrit.libreoffice.org/82170 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-13loplugin:unusedfieldsNoel Grandin
Change-Id: I28c8d60543d85ea878698a3e3661bbd5891ad9c7 Reviewed-on: https://gerrit.libreoffice.org/85075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-09Use o3tl::doAccess, prevent -Werror=maybe-uninitializedStephan Bergmann
Change-Id: Id30119c03dbbe0b3befe17cdb0bdb5f2943097ce Reviewed-on: https://gerrit.libreoffice.org/84753 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-05Fix typoAndrea Gelmini
Change-Id: I3cabc94a2916b1433285a7c725607fbda80cb8ac Reviewed-on: https://gerrit.libreoffice.org/84476 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
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-03use scoped enumStephan Bergmann
Change-Id: Ife99f3bea2972e080b4c3da6f5068543d4010173 Reviewed-on: https://gerrit.libreoffice.org/84307 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-03remove some useless comment linesNoel Grandin
which merely announce that the next declaration is a class Change-Id: Ifdb1398bcd99816b13e0b3769b46d0562bfbc1dc Reviewed-on: https://gerrit.libreoffice.org/84229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-03Make OpenCLMinimumDataSize configuration property non-nillableStephan Bergmann
It had curiously been added as nillable (by default) alongside other properties that were added as non-nillable with ef809ce9480182ea5c4f77843f72d1d45bd48c35 "More work on the new OpenCL options", but with a non-nil default value, and no code sets a nil value, and ScModelObj::getFormulaCellNumberLimit, which reads its value and expects it to be non-nil, would cause UB if it was nil. So make it non-nillable and thereby simplify the code handling it. (Similar to how e8bb827571f540ac4af2247cb11239bb96876669 "Fixed cppheader.xsl nillable treatment" retrofitted lots of existing properties to be non-nillable in the past.) Change-Id: I60ac95025f363e346f3102ef80f38d00862e6e9a Reviewed-on: https://gerrit.libreoffice.org/84248 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.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-12-01cppcheck: performing init in init list (desktop/editeng)Julien Nabet
Change-Id: Ie489d36852b9c6be449c44f7fcc0cf1ee0164833 Reviewed-on: https://gerrit.libreoffice.org/84144 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
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-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-30Rewrite uses of boost::optionalStephan Bergmann
...to only use functions that are also available for std::optional (in preparation for changing from boost::optional to std::optional): * uses of get are replaced with operator * or operator -> * uses of is_initialized are replaced with operator bool * uses of reset with an argument are replace with operator = (All of the replacements are also available for boost::optional "since forever", so this change should not break builds against old --with-system-boost. An alternative replacement for is_initialized would have been has_value, but that is only available since Boost 1.68.) Change-Id: I532687b6a5ee37dab28befb8e0eb05c22cbecf0f Reviewed-on: https://gerrit.libreoffice.org/84124 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-11-27Remove unused BackendImpl::t_string2objectStephan Bergmann
(found by upcoming loplugin:unusedmember) Change-Id: I466a588837b476c94fb8a0ce926318629d8524dd Reviewed-on: https://gerrit.libreoffice.org/83815 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.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-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-24cppcheck: performing init in init list (dbaccess/desktop/dtrans/e.)Julien Nabet
Change-Id: I7909df04a550a4fa843a70d20b5192231c3f175e Reviewed-on: https://gerrit.libreoffice.org/83600 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
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-19tdf#128523: drop cache directory when restart manager initiates restartMike Kaganski
This would allow to re-create cached elements that could be broken. Restarts include those after a version upgrade (with bugfixes); using safe mode dialog (after crashes/problems); some configuration changes. An example of issue fixed by this is bad cached icons from versions affected by tdf#119020, that still make troubles to users after a year after the reason of generation of bad icons had been fixed [1, 2, 3]. [1] https://ask.libreoffice.org/en/question/211759 [2] https://ask.libreoffice.org/en/question/215263 [3] https://ask.libreoffice.org/en/question/217831 Change-Id: I2362547c25f8f265915efafa4e224435eda03e20 Reviewed-on: https://gerrit.libreoffice.org/83138 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.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-16Replace some std::once with static initializersMike Kaganski
Change-Id: I6234bc252dac5b1c29e3f1ef844cf51f56aaa7ac Reviewed-on: https://gerrit.libreoffice.org/82970 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.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-06loplugin:indentation find broken if statementsNoel Grandin
so I don't read the "then" block as being a sequential statements Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c Reviewed-on: https://gerrit.libreoffice.org/82069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-11-02New loplugin:conditionalstringStephan Bergmann
Change-Id: I2eab990c15f845b44a3b598571aca361dadf9ff3 Reviewed-on: https://gerrit.libreoffice.org/81946 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.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-31Fix StringAdd::isCompileTimeConstantStephan Bergmann
...to find StringLiteral on the RHS of +=. Which revealed that the VisitCompoundStmt/checkForCompoundAssign logic needed to be fixed, too, so that s += side_effect(); s += "literal"; s += side_effect(); only gets combined to s += side_effect() + "literal"; s += side_effect(); and not all the way to s += side_effect() + "literal" + side_effect(); Change-Id: I432e3458b933a7d0ad6141c747b675cc8b0f0ba4 Reviewed-on: https://gerrit.libreoffice.org/81804 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-30Fix Plugin::containsPreprocessingConditionalInclusionStephan Bergmann
...which had been broken since dfc0dc4801707b2d8080af1540625b43bd463e17 "loplugin:casttovoid: fix containsPreprocessingConditionalInclusion()", and, when range.getEnd() was a macro loc, would typically have wandered off past the end of the intended range, until it would have encountered some #if etc. and erroneously returned true. Fixed the fallout across the code base. While at it, added a clarifying comment and made the "lexing fails" cases that should never happen fail with a fatal error in debug mode. Change-Id: Ieff44548384426d7716b6fc6c836c9069d878729 Reviewed-on: https://gerrit.libreoffice.org/81721 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-29Resolves: tdf#127645 fix crash on revisit to check updatesCaolán McNamara
Change-Id: I64474d014754e6a58aa8a9b037c336997c44daf2 Reviewed-on: https://gerrit.libreoffice.org/81693 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-29remove unnecessary includesCaolán McNamara
Change-Id: Ia4a622b34ff3f71963cff7a1aa8658a4df12f04f Reviewed-on: https://gerrit.libreoffice.org/81676 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-24Introduce OStringCharStephan Bergmann
...similar to OUStringChar, to be used in string concatenation expressions. And enable the corresponding loplugin:stringadd check, and fix its findings. Change-Id: I35ebb2253ba82bda6c98ae6ebd2ad4f27cf9abf9 Reviewed-on: https://gerrit.libreoffice.org/81456 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.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>