summaryrefslogtreecommitdiff
path: root/extensions/source/update
AgeCommit message (Collapse)Author
2023-01-12Curl:CURLOPT_REDIR_PROTOCOLS(_STR): use only "https", not "http"Julien Nabet
Change-Id: If615503b598f6823d7978f12e666832c82b63ece Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145334 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-01-11Fix types for Curl elements (update part)Julien Nabet
"CURLOPT_REDIR_PROTOCOLS_STR" has been added with Curl 7.85 so check if Curl version is 7.85 min or use the previous version "CURLOPT_REDIR_PROTOCOLS" Change-Id: Iacf6a3c37aba63d615eaa93352b098b1c9183533 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145208 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2023-01-09Fix deprecated Curl elements for update partJulien Nabet
Change-Id: Ide008c8a80800b33c8104ec3d697e836fae73827 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145186 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-12-16Fix deadlockStephan Bergmann
...introduced with 73e062be1ff10e2dd889d9ec9c2d07b692077f62 "blind fix for some 7.4.3.2 crashes in UpdateCheckJob" (and wreaking havoc during --enable-online-update `make check`) Change-Id: Idde4e4fa8ab94dafa141eb740aba1d874de4717d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144320 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-12-16blind fix for some 7.4.3.2 crashes in UpdateCheckJobNoel Grandin
I am guessing that state in this object is being touched from multiple threads (since it is an UNO service object), and one or more of the threads are consequently seeing inconsistent state. Change-Id: Ib925740d3b8db2713c4f132d0367b794a412a269 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144248 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-24Resolves: tdf#152157 show update icon on all menubarsCaolán McNamara
and not just the active one, so they are of a consistent height with eachother. BubbleWindow is only shown for the active one. Change-Id: I157c8c8b0e2a219c20ffde01ec4a04ba93b7f0e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143241 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-24split RemoveBubbleWindowCaolán McNamara
Change-Id: I635bb587b7306bc5f5756a0c24260f10587cc4c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143226 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-24add some notes on how to debug online update from a dev versionCaolán McNamara
Change-Id: I7b4547bfee4ff0bd3bbe7366b6294e925852ce65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143221 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-21clang-tidy modernize-pass-by-value in extensionsNoel Grandin
Change-Id: I9f31d6ddea3f99ed3334fa00d0f2c8448f9b9583 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136203 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-04Just use Any ctor instead of makeAny in extensionsStephan Bergmann
Change-Id: I0441d30044168563b0d5b8406fcc99b51a9cbc1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133817 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-04-19loplugin:stringviewparamStephan Bergmann
Change-Id: I8f27a2260e7195dd0a7dbb0b5e3dd0064ef06c81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133164 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-03-11loplugin:trivialdestructorStephan Bergmann
Change-Id: Id8a35dbbc1eecd2f568f253ddea5cb7ca3064ecd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131341 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-01-17Recheck modules [e-f]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I49a3ce10dee4b03f99156f5b641f69448e1d5617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128479 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-11-19Fix --enable-online-updateStephan Bergmann
...after 4bc44490f51f7cc4a36cc7131137018da986c293 "loplugin:stringliteraldefine in tools" Change-Id: I0ec1e07b151e853be8a795c7135aecf5c6957eac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125556 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-10-30Prepare for removal of non-const operator[] from Sequence in extensionsMike Kaganski
Change-Id: Id57b187aaa669d4b9a35ab726a6df1a9b4823f1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124364 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-09Typo *ropertie -> *ropertyJulien Nabet
Change-Id: Id5ae03140ac4fd67bf4940569ac5cd2f15716749 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123306 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-09-26tdf#50421: use substVariables for remaining %PERCENT% in "Check for Updates"Julien Nabet
Change-Id: I9e1094ef9a957ca1524367f985f37ffc0da5b353 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122621 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-09-23Extend loplugin:stringviewparam to starts/endsWith: extensionsStephan Bergmann
Change-Id: I29c3a09628f213d8b229a981d62421390385c54e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122499 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-09-22lock older -> lock orderCaolán McNamara
Change-Id: I50d2a73e6b95516f421fb71028af67fe116949d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122425 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-05fix --enable-online-update afterNoel Grandin
commit 14cfff500e93f0d6cbf8412065feea85c01ea81d Pass context and resource string down to boost::locale separately Change-Id: I10336d0081c03090d63f48636ee8283b327304aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120058 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-02Fix --enable-online-update buildStephan Bergmann
...after 1597cc5b3e07dd24cb4cb10b35b1e93545e4b929 "convert #defines to OUStringLiteral" (partially reverting that commit), > extensions/source/update/check/updatecheckconfig.cxx:68:17: error: expected '}' > RELEASE_NOTE"1", > ^ > extensions/source/update/check/updatecheckconfig.cxx:62:47: note: to match this '{' > const char * const aUpdateEntryProperties[] = { > ^ etc. Change-Id: I3cebb3dbc74adaeeefc14c11986ee4c8817b31b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119886 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-02convert #defines to OUStringLiteralNoel Grandin
mostly by doing $ git grep -l '#define.*\"' -- *.cxx | xargs perl -pi -e 's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 = u\2;/g' Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-21loplugin:stringadd replace OUStringLiteral temporaries with OUString::ConcatNoel Grandin
Change-Id: I656f06a74d9f0180ae460264563d6a935c7d2c60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114377 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12loplugin:unusedfieldsNoel Grandin
Change-Id: Ifb8ff48a05f37c0593bf619d7c774a26cb2655e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113987 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-23tdf#124176 Use pragma once in extensionsVincent LE GARREC
Change-Id: I1a5ed69da20cef4428f5f61db5fb9411cff61dc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112048 Tested-by: Jenkins Reviewed-by: John Turpish <jbt@gmx.us> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-03-21cid#1474008 silence Unchecked return value from libraryCaolán McNamara
Change-Id: If09a4edb9826507d817f9b0bb425eed8f35bd9c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112846 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-03bubblewindow.hxx can be a private vcl headerCaolán McNamara
Change-Id: Iaf79521e812ec32f6e0b9276ad778fe7abc836a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111807 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-03split and move MenuBar BubbleWindowManager to vclCaolán McNamara
Change-Id: I1d0f4b7d56845a77e979199917c5d9c849b76c8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111798 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-03move BubbleWindow to vclCaolán McNamara
Change-Id: I2481a9882dc66337b35b758fb4f73978df5af541 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111797 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19foward declare NotebookBarAddonsItem instead of using includeCaolán McNamara
Change-Id: I57e5a8f28a40994b61ab0f554401e4f70c8ffc12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111230 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-18loplugin:referencecasting (--enable-extension-update)Stephan Bergmann
Change-Id: I658aa527d426c28fc19132c2583429c4b3de816a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111126 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-16loplugin:referencecasting in editeng..frameworkNoel
Change-Id: Ia3375011ecd0a65afed0f131f477fc1542603fde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-24loplugin:stringviewparam (--enable-online-update)Stephan Bergmann
Change-Id: I9da6453bce5eb628eb1a4eee0863b77b548e95d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106483 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-21tdf#123936 Formatting files in module extensions with clang-formatPhilipp Hofer
Change-Id: I6e86641bc93bf4b3941b01fbef69c1e7984aad3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105667 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-11-17loplugin:stringviewparam (--enable-online-update)Stephan Bergmann
Change-Id: I3284a2460845c0b4816ad0148560e82da9d4eb78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105975 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-12tdf#42949 Fix new IWYU warnings in directories [e-f]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I963aa5fb892a0be36212fd0587b69f217f017947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105469 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-11-11loplugin:stringview (extensions)Julien Nabet
Change-Id: If2984a0de77dcd4848f612f057b3e0a79ffef21a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105582 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2020-10-26loplugin:toolslong (--enable-online-update)Stephan Bergmann
...but where > ~/lo/core/extensions/source/update/check/download.cxx:297:17: error: VarDecl, use "tools::Long" instead of 'long' [loplugin:toolslong] > long nError; > ^~~~~~~~~~~ > ~/lo/core/extensions/source/update/check/download.cxx:153:9: error: VarDecl, use "tools::Long" instead of 'long' [loplugin:toolslong] > long nCode; > ^~~~~~~~~~ were false positives (the third argument to curl_easy_getinfo(..., CURLINFO_RESPONSE_CODE, ...) must be a pointer to long). Change-Id: I9596ff32c32fddc7c1240d7fec3672d36265631a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104794 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-05loplugin:reducevarscope in extensionsNoel
Change-Id: I6ba76a8e50d564cd72edc5a3438faef5f3c71bc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-23cid#1466970 annotate as false positiveCaolán McNamara
Change-Id: I2ccb0fe70626c998fbc108464f03f1d4144e600d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103244 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-18Make sure --enable-online-update does not leave behind UpdateCheckThreadStephan Bergmann
...which is known to cause test processes to crash during exit. (Also see 5cd04405c6b2d1ee46294ce0696d89d2edc97d16 "Disable automatic onFirstVisibleTask UpdateCheck during CppunitTests", so this commit now covers tests like JunitTests and UITests that start a full soffice process.) The relevant code is already rather complex and incomprehensible; it handles the automatic update check triggered by the onFirstVisibleTask UpdateCheckJob, manually triggered update checks, and downloading of new versions. To avoid regressions in all those various scenarios, I tried to add very targeted code that should only wait for a still running UpdateCheckThread triggered by the automatic onFirstVisibleTask UpdateCheckJob---which is the scenario that caused issues during `make check`. (For a manually triggered update check or download it is probably both less likely that related threads would still run during exit, as the user would likely wait for a response before closing LibreOffice, and less severe if threads would still run during exit, as any resulting crashes would likely be "harmless" and might not even be noticed by the user.) However, I note that this targeted fix does increase the complexity and inscrutability of this code even further... The new code does not actually try to join the UpdateCheckJob---see UpdateCheckThread::join referencing <https://bz.apache.org/ooo/show_bug.cgi?id=73893> "webdav ucp does not implement XCommandProcessor::abort". Rather, it waits for UpdateCheckJob::run to finish (after unblocking at least any m_aCondition.wait calls). This, however, can take a while if the update check's HTTP request is in progress. To be able to use a std::condition_variable (with sane semantics compared to osl::ConditionVariable) in UpdateCheck::waitForUpdateCheckFinished, the corresponding UpdateCheck::m_aMutex had to be changed from a (recursive) osl::Mutex to a std::recursive_mutex one (sticking to a recursive one just to be on the safe side, whether or not the code actually makes use of that). Change-Id: I2726acd33b884b807d840cfee2786fcf45815ad7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103013 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-01Fix typo in codeAndrea Gelmini
It passed "make check" on Linux Change-Id: I8be2457de5018e1e764e378e609c3a41c3cb9d11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101802 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-07-25loplugin:constantparamNoel Grandin
Change-Id: Ic0079cf1d5d2463963b1be08a59cb93db6f12870 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99417 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-23extensions/updateui: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: I3380e987be8bf24005676705e26f3135c83d2b2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99324 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-23extensions/updatefeed: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: I1e0303f3fa6295de1f1970bcf8da1edbabb330d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99323 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-08loplugin:redundantstatic (extensions/updatecheck(config|job))Julien Nabet
Change-Id: Icf0769ab24c8a7c470b1fdf6363204d004c51fb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98297 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-07-03loplugin:redundantstatic (extensions/updatecheckui)Julien Nabet
Change-Id: I71144d4b61592cb1157057fe0cc6044d07957447 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97830 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>