summaryrefslogtreecommitdiff
path: root/ucb
AgeCommit message (Collapse)AuthorFilesLines
2020-08-03loplugin:flatten in ucbNoel Grandin20-850/+846
Change-Id: Ica7e5d3b5a5cec065f35f99d62b3b6604323601a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100009 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-23ucb/gio: create instances with uno constructorsNoel Grandin3-49/+22
See tdf#74608 for motivation. Change-Id: I8e20d9800d9446a42e1e2baed51f650b324cc248 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99267 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-22ucb/ftp: create instances with uno constructorsNoel Grandin5-99/+13
See tdf#74608 for motivation. Change-Id: Ic71294b1fb2afd1726e0c5948d6f088b7cdac964 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99222 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-22ucb/package: create instances with uno constructorsNoel Grandin5-88/+21
See tdf#74608 for motivation. Change-Id: Id93f1e18d6646e3747443678bf3d56fa75cb46ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99223 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-22ucb/file: create instances with uno constructorsNoel Grandin5-78/+11
See tdf#74608 for motivation. Change-Id: I1650f042a87d7351a126c0701cce8b2e12829461 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99221 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-22ucb/neon: create instances with uno constructorsNoel Grandin5-99/+18
See tdf#74608 for motivation. Change-Id: Ia86a4cc06819ce5820ab44d293790f7bd9a03711 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-22ucb/ext: create instances with uno constructorsNoel Grandin5-87/+14
See tdf#74608 for motivation. Change-Id: Ie2e0958e181db002d747bffd05ead02bebd96956 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-22ucb/expand: create instances with uno constructorsNoel Grandin2-48/+12
See tdf#74608 for motivation. Change-Id: I83f75a1d107a74c1c9707243caf323b630f0b33f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99178 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-22ucb/sorter: create instances with uno constructorsNoel Grandin5-100/+12
See tdf#74608 for motivation. Change-Id: I6d9b20e281238038f9eed1578a64316857cf6247 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99176 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-22ucb/cmis: create instances with uno constructorsNoel Grandin3-48/+15
See tdf#74608 for motivation. Change-Id: I5bf06ba3d9bac04d18e6b9338a20030cb4a42c89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99177 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-16ucb/hierarchy: create instances with uno constructorsNoel Grandin7-127/+33
See tdf#74608 for motivation. Change-Id: I6c57cf814af386bfb2c2c035d32175c4ff9ef7a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98874 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-16loplugin:unusedmethodsNoel Grandin1-4/+0
Change-Id: Ibc1ec64cba8eb083aaff28848a42337cc597ea19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98857 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-15ucb/cacher: create instances with uno constructorsNoel Grandin11-215/+65
See tdf#74608 for motivation. Change-Id: I56261af8f540c214419e01b81c789cb6a4c31d31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98747 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-13expand out an UNO macroNoel Grandin15-15/+148
to make the ongoing convert-to-UNO-constructor work easier Change-Id: I99596561832b10538505cf4dfdabaf11d6e4d7cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98664 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-13ucb/tdoc: create instances with uno constructorsNoel Grandin7-146/+36
See tdf#74608 for motivation. Change-Id: I669e3b35dd692b974c040b5d076d18f710d5cc28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98663 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-10replace usage of blacklist with excludelist for IWYUThorsten Behrens1-1/+1
Background and motivation: https://tools.ietf.org/html/draft-knodel-terminology-02 Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-02Upcoming improved loplugin:staticanonymous -> redundantstatic: ucbStephan Bergmann6-35/+35
Change-Id: Id9301e65bea34c0edd9aadab85b848117e05075e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97710 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-12tdf#133673 fix webdav lock refresh with Auth:NegotiateJulian Kalinowski1-2/+0
NeonSession::NeonAuth requires an AuthListener to be set in the RequestEnvironment (RE). After a HTTP 401, the Negotiate challenge should be handled. The whole RE however is reset in HandleError, which is called after every request. Usually, this is not a problem because the RE is re-set at the beginning of almost all requests (PUT, GET, PROPFIND, ...). But when refreshing locks this is not the case, as the LockStore does not know any RequestEnvironment. NeonSession::NeonAuth is then called in a post-send hook after a HTTP 401, the AuthListener is null and in consequence Neon's ah_post_send does not return NE_RETRY. So there will be no retry with the correct authorization header. This patch removes the reset of the RequestEnvironment in HandleError, thus keeping it in the session for further use. Change-Id: Ib1a5eff08072f9ef003e760c5f40d9ad26c6cad1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96191 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-06-10Fix webdav lock refresh returning 0 instead of true when successfulJulian Kalinowski1-2/+2
With commit 58b84caca87c893ac04f0b1399aeadc839a2f075, the NeonSession.LOCK returns "theRetVal" from ne_lock_refresh when successful. But when there is no error, theRetVal will be NE_OK, which is 0, so the method returns false instead of true. This results in lock refresh being stopped after the first refresh, so WebDAV servers will unlock the file after the lock timeouts. Users will see error messages regarding lock timeouts and lost updates are possible. Fix this by adding a return statement when theRetVal == NE_OK. Change-Id: Ie43131fca96e1cfbe932444906b742958a719b26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96023 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-06-05Upcoming loplugin:elidestringvar: ucbStephan Bergmann2-11/+8
Change-Id: I25535b844b6fa12679908427997713dadf819d74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95588 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-02inline some use-once typedefsNoel Grandin1-3/+1
Change-Id: I335e0c5cf7944efa487e4535a9e6a5baab2f36dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95140 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-31neon: upgrade to release 0.31.1Jan-Marek Glogowski1-0/+1
Drops some of the LO patches upstreamed since 0.31.0. Version 0.31.0 introduced an new session flag for MS SharePoint compatibility, NE_SESSFLAG_SHAREPOINT, which enables a few workarounds, where SharePoint breaks the WebDAV RFCs. In 0.31.1 a compiler warning and the MD5 ABI break introduced in 0.31.0 are fixed, so LO can now update neon. Change-Id: Ia79ce530271664c0e6bab30a5e2516319da328d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91070 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-05-29loplugin:simplifybool in ucb..vclNoel Grandin1-2/+1
Change-Id: Ib63623f5ca3f6559e02a0013c3cbd6174f7aec14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95108 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-21use for-range on Sequence in testtools..xmloffNoel Grandin1-4/+3
Change-Id: I05b02a2f8b4b9091c7de0f7e98409d5b608ed250 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94610 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-13Fix syntax errors in --with-webdav=serf codeStephan Bergmann6-9/+9
...introduced with de61e14d0b6ee90cb4d170af340275d811b9fbbf "compact namespace in ucb..uui" Change-Id: I58e24303e1e12db0a53d46acc2daef1faa2e4cf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94128 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-10compact namespace in ucb..uuiNoel Grandin31-79/+79
Change-Id: I644d5e418028b4b4e66cf67b20a1155a689acab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin1-1/+1
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-29tdf#132460 Fix feedback-loop during WebDAV lock refreshJean-Louis Fuchs1-1/+6
Prevent a feedback-loop, where LibreOffice would request a shorter timeout on each refresh. WebDAV servers do not return the lock-timeout the lock was set up with; they have to return the remaining time. There are WebDAV servers that return a lower timeout. Two examples [2] [3]. Other servers probably reuse the same timestamp for the whole request and are therefore not subject to that problem. (This might even be incorrect if the request takes very long.) Updating the lock-timeout with the value returned by the server decreases the timeout until it reaches zero. LibreOffice request SERVER response LOCK(180) -> LOCK(60) LOCK(60) -> LOCK(59) LOCK(59) -> LOCK(58) ... 0: no LOCK header -> FAIL If we do not update the timeout in NeonSession::LOCK() only the initial setup updates the timeout. LibreOffice request SERVER response LOCK(180) -> LOCK(60) LOCK(60) -> LOCK(59) LOCK(60) -> LOCK(59) ... It is essential that lastChanceToSendRefreshRequest uses the timeout returned by the server; after it calculated the deadline, we reset the timeout. The maintainer of neon confirmed that the timeout should stay the same after the initial setup. [4]. [1] https://tools.ietf.org/html/rfc4918#section-6.6 [2] https://www.alfresco.com/ [3] https://github.com/mar10/wsgidav [4] https://github.com/notroj/neon/issues/12 Change-Id: Ie76338f7a88f41f47569a62ea6efec8c6f646f50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92981 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-04-24Typo: surf->serfJulien Nabet1-1/+1
Change-Id: I1aba26d5495f7b1c158c432dc6e92f56f4453160 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92880 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2020-04-17loplugin:buriedassign in tools..xmloffNoel Grandin3-6/+14
Change-Id: I31df6c4fd82c6f6d15bbe5228e92e5171cacba51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92410 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-14"General Internet Error" dialog appearing on gio mountCaolán McNamara1-1/+3
we get a GError of G_IO_ERROR_FAILED_HANDLED which is documented as "Operation failed and a helper program has already interacted with the user. Do not display any error dialog." PENDING seems to describe this state better than a generic error case and results in no error dialog. Change-Id: Iee382e49edaa0a734526659971e0339991e2c03e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92187 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-09Error strings are not guaranteed to be ASCIIMike Kaganski1-4/+5
E.g., it happened to be this string with Cyrillic characters in my testing: SSL handshake failed: Удаленный хост принудительно разорвал существующее подключение. Change-Id: I4721560412ab6543206cd13c8729dc8cc851eefd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91905 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-04-07loplugin:unusedvariableplus in ucb,xmlscriptNoel Grandin1-2/+2
Change-Id: I8fac8c7766df7c6be489280fcac2a423183429c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91790 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-03Improve handling of non-ASCII HTTP header field valuesStephan Bergmann1-2/+8
...following up on afad46c4e891359aad7a829e704e627e1039fc33 "crashtesting: assert on loading fdo102527-1.html" (and partially reverting it). Loading that fdo102527-1.html as of today causes LO to send a HTTP GET request for <http://aplikasikita.com:80/styles/style.css%E2%80%9D> that is answered by > HTTP/1.1 301 Moved Permanently > Connection: Keep-Alive > Date: Fri, 03 Apr 2020 06:59:55 GMT > Server: LiteSpeed > Location: https://aplikasikita.com/styles/style.css” > Vary: User-Agent (i.e., the "Location" header value containing the three octets %xE2 %x80 %x9D). Change-Id: I14a3e94013d584e793fad24196f1f01cd411be55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91610 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-01crashtesting: assert on loading fdo102527-1.htmlCaolán McNamara1-2/+2
Change-Id: I3978a2570f61c68fe080c6143924fcacee0784fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91530 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-25ucb-webdav-neon: drop large commented code blocksJan-Marek Glogowski1-42/+1
Change-Id: I02fe3f93edf94829b4456df2e8a7740698cf5263 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91066 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-03-25Remove unused using declarations in oox...xmlsecurityGabor Kelemen3-6/+0
Found by: run-clang-tidy-10 -checks=-*,misc-unused-using-decls Change-Id: I3e95791e223ef01e140a6217e29a9efae428a784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90876 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-15Revert "loplugin:constfields in ucb"Noel Grandin38-56/+56
This reverts commit d8f8b4375998b62431c8605004e7c7d5c921ccc9. Change-Id: Iece88b16cfb2e4ff18dd82bbf6624dc64a33cebf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90519 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-09improve loplugin:unusedfieldsNoel Grandin2-3/+1
noticed something that wasn't being picked up, wrote some tests, and found an unhandled case in Plugin::getParentFunctionDecl Change-Id: I52b4ea273be6614e197392dfc4d6053bbc1704de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90141 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-21Drop o3tl::optional wrapperStephan Bergmann1-3/+3
...now that macOS builds are guaranteed to have std::optional since 358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to Xcode 11.3 and macOS 10.14.4". The change is done mostly mechanically with > for i in $(git grep -Fl optional); do > sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \ > -e 's/\<o3tl::optional\>/std::optional/g' \ > -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i" > done > for i in $(git grep -Flw o3tl::nullopt); do > sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i" > done (though that causes some of the resulting #include <optional> to appear at different places relative to other includes than if they had been added manually), plus a few manual modifications: * adapt bin/find-unneeded-includes * adapt desktop/IwyuFilter_desktop.yaml * remove include/o3tl/optional.hxx * quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl * and then solenv/clang-format/reformat-formatted-files Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-12clang-analyzer-deadcode.DeadStoresNoel Grandin2-2/+2
Change-Id: Ifa384933569b27d0d08eb479bb95b799163ae386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88450 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-31clang-tidy modernize-concat-nested-namespaceNoel Grandin6-12/+12
Change-Id: Iab35a8b85b3ba1df791c774f40b037f9420a071a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-30tdf#124176: Use pragma once instead of include guardsbugrakurt1-4/+1
Change-Id: Ia353a95df0e78e9da2b6fb95c2bc3a6e83c72fcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87738 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
2020-01-26remove some unused local varsNoel Grandin2-3/+1
found by a more aggressive variant of loplugin:unusedvariables. This is my first pass, committing the simplest and most obviously unnecessary vars Change-Id: I9676a6e39a101937097788548764506c93811c57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87414 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-25tdf#130137 Replace remaining uses of WNT define checks with _WIN32A_GAN1-1/+1
Change-Id: If95f1ea5a81de62eb4f725e5fcb30ccb8530062a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87372 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-24loplugin:makeshared in svgio..writerperfectNoel Grandin1-1/+1
Change-Id: I0f8de0f78c7a8fb78d47ee5dfed09019b4eb5288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-21lok: disable ucbgio provider for Online.Michael Meeks1-0/+15
Of course, some lok apps may want the provider, but it creates unwanted threads causing problems with forkit in some cases. Change-Id: I7d19d629b3657780b52c3c753a4c8dcba6ae86b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87111 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-20Split independent loop vars, giving them appropriate typesStephan Bergmann1-3/+2
...and thus avoiding an unnecessary explicit cast from sal_IntPtr to (potentially smaller) sal_uInt32 Change-Id: Id05769c1db1cd272c8c193361c8f39f01dbec948 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87050 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-18Fix typo in commentStephan Bergmann1-1/+1
(cf. SortedResultSet::maS2O in ucb/source/sorter/sortresult.hxx) Change-Id: I4dd9118335d51a98e6f1ed6af39c62558b295933 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87006 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-13tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorMesut Çifci1-2/+1
Change-Id: I1c1e7b42211c51f572698efd3135e388f8fb2979 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86648 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>