summaryrefslogtreecommitdiff
path: root/ucb
AgeCommit message (Collapse)Author
2021-12-17use more OInterfaceContainer3::notifyEachNoel Grandin
Change-Id: I0dd6e9f1514792e73a31e81896d09c27c1912318 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126966 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-15ucb: remove --with-webdav=neonMichael Stahl
Remove code in ucb/source/ucp/webdav-neon, and now unused external neon. The --with-webdav=no option is retained for now. Change-Id: I4ce429587e3991fa82009da2f8e4a068abe36435 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126839 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-12-15ucb: remove --with-webdav=serfMichael Stahl
Remove code in ucb/source/ucp/webdav, and now unused externals apr, apr-util, serf. Change-Id: I31ab8bb1491f5290e175e87f2b30499811c5a359 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126835 Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2021-12-14find-unneeded-includes: add exception for boost/shared_ptr.hppGabor Kelemen
* as seen in vcl/inc/skia/salbmp.hxx * also remove earlier exception from ucb modules file Change-Id: Ie0ad46048147916b615f74d8eab6e033c2020565 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126739 Tested-by: Jenkins Tested-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-12-10Generally determine Rdb content from gb_*_set_componentfile callsStephan Bergmann
...instead of by listing the content somewhat redundantly in the Rdb_*.mk files, to avoid duplication of logic for components that are only built conditionally (and thus should only be included conditionally in the corresponding Rdb). To achieve that, add an "rdb" parameter to gb_ComponentTarget_ComponentTarget (and to the gb_*_set_componentfile macros that internally call gb_ComponentTarget_ComponentTarget), which is used to make the appropriate gb_Rdb_add_component call internally from within gb_ComponentTarget_ComponentTarget. (As a special case, gb_CppunitTest_set_componentfile shall not call gb_Rdb_add_component, as that has already been done by the corresponding gb_Library_set_componentfile call, so allow the gb_ComponentTarget_ComponentTarget "rdb" parameter to be empty to support that special case.) Most Rdb_*.mk files are thus mostly empty now. One exception is i18npool/Rdb_saxparser.mk, which duplicates some of the Rdb_services content as needed during the build in CustomTarget_i18npool/localedata. 1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had already tried to do something similar (in addition to other things) under a new --enable-services-rdb-from-build option. However, that approach had four drawbacks that this approach here addresses (and which thus partly reverts 1c9a40299d328c78c035ca63ccdf22c5c669a03b): 1 Rdb_services shall not contain the component files of all libraries that are built. While that commit filtered out the component files that go into Rdb_ure/services (ure/Rdb_ure.mk), it failed to filter out the component files that go into others like Rdb_postgresql-sdbc (connectivity/Rdb_postgresql-sdbc.mk). 2 The code added by that commit to Makefile.gbuild codified the knowledge that there is an Rdb_services, which is brittle. 3 The code added by that commit to solenv/gbuild/Rdb.mk codified the knowledge (for gb_Rdb__URECOMPONENTS) that there is an Rdb_ure/services, which is brittle. 4 Introducing an --enable-services-rdb-from-build option needlessly provided two different ways how the content of Rdb_services is assembled. The changes done here would leave --enable-services-rdb-from-build as a misnomer, as it no longer controls how Rdb_services is assembled. I thus renamed it to --enable-customtarget-components, as that is apparently what it still does now. Change-Id: Ia5e8df4b640146c77421fcec6daa11a9cd260265 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126577 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-07loplugin:unusedmethodsNoel Grandin
Change-Id: Ic1ba90447575278d854af85312271c41766b776b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126422 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-07loplugin:unusedfieldsNoel Grandin
Change-Id: Id39c3f484a364fb5163444febe99aee79daf1a76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126418 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-07loplugin:unnecessaryvirtualNoel Grandin
Change-Id: I231195c36d620254cbcd2f4d7bbb9044f7887fe8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126413 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-05remove OMultiTypeInterfaceContainerHelperVar2Noel Grandin
superceded and replaced by OMultiTypeInterfaceContainerHelperVar3 Change-Id: I46ad14bcc9bfcfe1a5279414e72d9356ddb02329 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-04use OMultiTypeInterfaceContainerHelperVar3 in ContentResultSetWrapperNoel Grandin
Change-Id: I50d79f400833987b5f5050826c7901c4fc22386e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126341 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-04use OMultiTypeInterfaceContainerHelperVar3 in PersistentPropertySetNoel Grandin
Change-Id: I4bb884fc76f766d58afec3632c7443e348ea5342 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126340 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-04use OMultiTypeInterfaceContainerHelperVar3 in SortedResultSetNoel Grandin
Change-Id: I371dc8d97a4d6cb24c69e97b874bb50384df7526 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-01webdav-curl: just mask CURLE_QUIC_CONNECT_ERRORJan-Marek Glogowski
... obviously we still need the throw... Change-Id: Ia7960ce2296e196be600f6b9a8139bc261fd2159 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126170 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-12-01CURLE_QUIC_CONNECT_ERROR requires curl >= 7.69.0Jan-Marek Glogowski
This new error code replaced several CURLE_FAILED_INIT in curl commit cbb5429001084df4e71ebd95dbf748c3c302c9f7 ("ngtcp2: Add an error code for QUIC connection errors"). Instead of escalating the curl version further, just mask it with CURL_AT_LEAST_VERSION; this way my Ubuntu 20.04 schroot can still use the system CURL for the build... Change-Id: I24afd32737e2ab74d9e4ce1722012d522ae010bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126158 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-11-30use more OInterfaceContainerHelper3 in PropertyListenersNoel Grandin
Change-Id: I44b06c1ab469e99a9d3b8f4e2b0f3058959fc202 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126063 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-30use more OInterfaceContainerHelper2 in ucbNoel Grandin
Change-Id: I81300a707c81a011f29bd6b63794e1abd472a015 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126062 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-29ucb: webdav-curl: don't read from XInputStream during uploadMichael Stahl
Nextcloud will reply to a PROPFIND request with "100 Continue" and then after the data is uploaded it will send a "401 Unauthorized" if the auth header is missing in the headers to which it replied with "100 Continue". In the next call to ProcessRequestImpl(), reading from the stream returns no data because it's at EOF, and because of the Content-Length header the server will hang forever waiting for data. So copy the stream to a temporary buffer and use that for multiple calls to ProcessRequestImpl(). Change-Id: If5943a32c4cf50259fe1f84013141765cb5bd891 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125923 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-29loplugin:stringliteraldefine in ucbNoel Grandin
Change-Id: I3b2e01b482f7f4dbceea090b9586cdb4eee4e703 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125869 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-26ucb: webdav-curl: fix CurlUri::CloneWithRelativeRefPathAbsolute()Michael Stahl
Change-Id: Idf1d75817009286cd79a00c0ba154cea70e2ffda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125908 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-26ucb: webdav-curl: don't use chunked encoding for PROPPATCHMichael Stahl
Sharepoint 16 has the same problem with this as with PROPFIND. But this still doesn't work, trying to add dead properties results in HTTP/1.1 400 BAD REQUEST now. In fact, it has additional problems: request 3 properties Foo, Bar, Baz with one PROPFIND and it complains about Foo, FooBar, FooBarBaz... Change-Id: Ia0ce0f7b9422e0751839151a4c964f0437282c64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125907 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-26cid#1494447 ucb: webdav-curl: Logically dead codeMichael Stahl
Change-Id: I98a99ddc287fd83ff95e9a1b3851a9888dd6ef5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125864 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-26ucb: webdav-curl: remove useless assert in getLockTokenForURI()Michael Stahl
Change-Id: Ia27acf55bd7baf70c0b57e0922a62b1d9680c5b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125848 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-26ucb: webdav-curl: don't use chunked encoding for LOCKMichael Stahl
Sharepoint 16 produces exactly the same error HTML as for PROPFIND. Change-Id: Idd3862456c4efbb9eb0533298dcd93711b30faae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125847 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-26ucb: webdav-curl: avoid pointless HEAD requests for DAV resourcesMichael Stahl
Content::getPropertyValues() has a funny conditional which was changed in commit a86bc34ddcff6b04bb9fdb8c960bbf2c49540da1 "Resolves: #i121922# Fix wrong condition". But the new condition also appears wrong, there is no need to do any further requests if all properties have already been retrieved, so the check for m_bDidGetOrHead could just be omitted. There is a surprising result in the Remote Files dialog when connecting to a Sharepoint 16 server: all properties have been retrieved from the directory given as Root, but because of !m_bDidGetOrHead the branch is taken anyway. The HEAD request results in a "HTTP/1.1 302 Redirect" to $ROOT/Forms/AllItems.aspx, HEAD on this URL gives a "HTTP/1.1 200 OK" and then subsequently a PROPFIND on that very same URL results in "HTTP/1.1 404 NOT FOUND". Physics claims that a single observation should be sufficient to determine whether an URL exists or not, but Sharepoint is apparently able to maintain this quantum superposition indefinitely, hence the Remote Files dialog doesn't display anything as the 404 causes an exception. Try to fix this by requiring a missing property again before initiating the HEAD request for DAV resources. Change-Id: I1239762948b6abd1f8fc097edd4a16cb6b75ca7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125826 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-26ucb: webdav-curl: don't use chunked encoding for PROPFINDMichael Stahl
Sharepoint 16 responds to PROPFIND with "Transfer-Encoding: chunked" with "HTTP/1.1 200 OK" and this body: <HTML><DIV dir="ltr"><H2>Microsoft SharePoint Foundation Error.</H2>\n\n<P>\n<B>User:</B> please report details to this Web site's Webmaster.\n<P>\n\n<P>\n<B>Webmaster:</B> please see the server's application event log for more details.\n</P></DIV> Understandably, WebDAVResponseParser barfs on this: ucb/source/ucp/webdav-curl/webdavresponseparser.cxx:405: Parser destructed with existing content (!) ucb/source/ucp/webdav-curl/webdavresponseparser.cxx:942: WebDAV Parse error (!) Apparently setting Content-Length works better. Change-Id: If3eae8c2f8b9f1e1bb4ed4fc67a79a682d7d0050 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125825 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-26cid#1494446 Uninitialized scalar fieldCaolán McNamara
Change-Id: Ib8e1d0e691772e822f81afafbd47ba33698b592e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125863 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Caolán McNamara <caolanm@redhat.com>
2021-11-26Removed break; after returnAndrea Gelmini
Change-Id: I14e12fee4b86ba2fadeefddef5de086e85d4bb95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125729 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2021-11-25ucb: webdav-curl: NTLM is both system and not-system authenticationMichael Stahl
Leave it to libcurl collapse the wave function. Change-Id: Idb51ebaec8b68a7c7fadcae2ae13b3b63ba1db79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125788 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-25ucb: webdav-curl: Sharepoint returns redirect urls that curl can't parseMichael Stahl
Encode them just like in WebDAVResponseParser. Change-Id: I7f0ee1d42df356fdd585d1f6e0f39e4094701a2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125787 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-24Remove break; after returnAndrea Gelmini
Change-Id: I0690bcf0740842abde7268d99ab791163262945f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125766 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-24ucb: webdav-curl: properly reset CURLOPT_INFILESIZE_LARGEMichael Stahl
If the value is set to 0, then the next PROPFIND after PUT will not append the "Expect: 100-continue" header, and hang without uploading. See Curl_http_bodysend() which checks for != 0. Unfortunately with different default values for "long" and "curl_off_t" CurlOption becomes a little more complicated. (regression from 8e34fe50412fd58a600ba1b8238b80444aec02e5) Change-Id: I55ea02659f7a64f373e89a6d02d6865c158fd0c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125742 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23tdf#145769 ucb: webdav-curl: stop returning IsDocument=true if it doesn't existMichael Stahl
Content::getPropertyValues() has no less than 2 fallbacks that cause it to return property values IsDocument=true and IsFolder=false in case there is an authentication failure or server connection failure. Change-Id: Iddcda6420c517f522d98e58b12a7e19247ff2d1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125667 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-23ucb: webdav-curl: fix some issues caused by missing authenticationMichael Stahl
* DAV_HTTP_NOAUTH wasn't actually handled anywhere; treat it the same as DAV_HTTP_AUTH for now * Content::getResourceType() would just determine that the server doesn't support DAV if there is any authentication missing * Content::getResourceOptions() would cache authentication error that is caused by executing the command without any XCommandEnvironment and therefore no XInteractionHandler Change-Id: Ie319a505da4b0f6bde01d6611262b8b1dad33d2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125665 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-22ucb: webdav-curl: don't use chunked encoding for PUTMichael Stahl
What happens with Nextcloud: CURLINFO_HEADER_OUT: 0xa028408: PUT .../testB.odt HTTP/1.1 User-Agent: LibreOffice 7.3.0.0 curl/7.79.1 NSS/3.71 Accept: */* Accept-Encoding: deflate, gzip Transfer-Encoding: chunked Expect: 100-continue debug log: 0xa028408: STATE: DO => DID handle 0xa028408; line 2077 (connection #0) debug log: 0xa028408: STATE: DID => PERFORMING handle 0xa028408; line 2196 (connection #0) debug log: 0xa028408: HTTP 1.1 or later with persistent connection CURLINFO_HEADER_IN: 0xa028408: HTTP/1.1 100 Continue debug log: 0xa028408: CURLINFO_DATA_OUT 8357 debug log: 0xa028408: Signaling end of chunked upload via terminating chunk. debug log: 0xa028408: CURLINFO_DATA_OUT 5 debug log: 0xa028408: Mark bundle as not supporting multiuse debug log: 0xa028408: HTTP 1.1 or later with persistent connection CURLINFO_HEADER_IN: 0xa028408: HTTP/1.1 201 Created CURLINFO_HEADER_IN: 0xa028408: Date: Fri, 19 Nov 2021 16:27:47 GMT CURLINFO_HEADER_IN: 0xa028408: Server: Apache CURLINFO_HEADER_IN: 0xa028408: Content-Length: 0 ... yes, "201 Created" a 0 byte file. https://github.com/nextcloud/server/issues/7995 Apparently this doesn't happen with header Content-Length: 8347 Change-Id: I3f38d50530a8b6430b27de2525370e1d95705da6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125579 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-22ucb: webdav-curl: log headers in debug_callbackMichael Stahl
Change-Id: I40ed170c2ae8bc769372fa2269dcf1f1643000de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125580 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-22Revert "The CurlOption curl_off_t case appears to be unused"Michael Stahl
This reverts commit 20168b1f09b4d2aa8643dc7d4a16d8a1dd1008a6. Change-Id: I3ac7bdeece94ec2a0e01d67f2788874b3f286fe4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125578 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-18ucb: webdav-curl: don't assert on valid URLMichael Stahl
If you put an URL into the host field of the remote files dialog, it will gladly create silly urls that start with "https://https://" - these are syntactically valid because ":" may occur without port number path segment may be empty, so don't assert. Change-Id: I29b6317daeb76d8f2fd4a22c0908ad2366c36297 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125484 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-15fix typo in commentStephan Bergmann
Change-Id: I267390e6d7251ec59c6374ca904ccba16f2a94bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125253 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins
2021-11-12Fix (mis-)uses of temporary O[U]StringLiteralStephan Bergmann
...as sub-expressions of ternary operators, which happened to keep compiling after 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String" and e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString" because both branches are of the same type O[U]StringLiteral<N>, and which didn't cause any issues because no dangling pointers to those temporary objects escaped the surrounding full expressions. This was found with an experimental build with VS 2022 with --enable-latest-c++, which would support HAVE_CPP_CONSTEVAL after some linking fix in the configure.ac detection code (which is forthcoming in a later commit) and flagged all these uses in ternary operators as error C7595 "call to immediate function is not a constant expression". That error looks bogus (and it also caused a false > sd/source/ui/unoidl/unoobj.cxx(742): error C7595: 'Color::Color': call to immediate function is not a constant expression so HAVE_CPP_CONSTEVAL will need to remain undefined for VS 2022 until that compiler bug is fixed), but it nicely found all these cases that should arguably be cleaned up. Change-Id: I81de94e8af5a6c50e5fe7dfa1a4b253e0c2a68f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125082 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-10new loplugin:stringliteraldefineNoel Grandin
look for #define FOO "foo" that can be converted into OUStringLiteral. This is the first pass of this plugin, only doing those #define which are local to a single compilation unit. Change-Id: Ic8610e29ec42c36d03db5014a93c244315d5bbea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-10Fix typoAndrea Gelmini
Change-Id: I1ab712c8bea7083e0f32c647d783d12a770322a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124941 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-11-09The CurlOption curl_off_t case appears to be unusedStephan Bergmann
...at least for my clang-cl Windows x86-64 build (see comments at <https://gerrit.libreoffice.org/c/core/+/124452/5#message-10cc4dfb88a258e59f09c5fbf413052aa9ddd49c> "ucb: webdav-curl: rewrite authentication loop for reentrancy") Change-Id: I4f6b255c6a9acb26844b7ef5c11f0f1fcf06b3df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124907 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-09Address of dllimport function isn't considered constant expression by clang-clStephan Bergmann
...causing the (mis-)use of std::integral_constant to fail with > In file included from ucb/source/ucp/webdav-curl/CurlUri.cxx:20: > In file included from ucb/source/ucp/webdav-curl/CurlUri.hxx:24: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\memory:11: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\exception:12: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\type_traits:12: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\xstddef:11: > In file included from C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\cstddef:13: > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\xtr1common(22,26): error: constexpr variable 'value' must be initialized by a constant expression > static constexpr _Ty value = _Val; > ^ ~~~~ > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\xtr1common(28,16): note: in instantiation of static data member 'std::integral_constant<void (*)(void *), &curl_free>::value' requested here > return value; > ^ > C:/PROGRA~1/MIB055~1/2022/Preview/VC/Tools/MSVC/1430~1.307/Include\memory(3195,13): note: in instantiation of member function 'std::integral_constant<void (*)(void *), &curl_free>::operator void (*)(void *)' requested here > _Mypair._Get_first()(_Mypair._Myval2); > ^ > ucb/source/ucp/webdav-curl/CurlUri.cxx(49,25): note: in instantiation of member function 'std::unique_ptr<char, std::integral_constant<void (*)(void *), &curl_free>>::~unique_ptr' requested here > CurlUniquePtr<char> pPart2(pPart); > ^ etc. as the involved functions like curl_free are defined as CURL_EXTERN void curl_free(void *p); in workdir/UnpackedTarball/curl/include/curl/curl.h, where CURL_EXTERN expands to __declspec(dllimport) Change-Id: Ib278cd9e97260b588144d81dba344ccbb5309608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124899 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-08Fix typosAndrea Gelmini
Change-Id: I945c72ce9065d0c59e7ebcb96c70995d5333b67f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124841 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-07Typo: implemnented->implementedJulien Nabet
Change-Id: I3171c95523408b69587aaa2bb064c750bc56c55d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124809 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-11-05webdav-curl: there's no non-const Sequence::operator[]Mike Kaganski
... since commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 Change-Id: Ib56e854206074dd247dcd0f876a8a92b3f9af7ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124763 Tested-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-03Silence loplugin:toolslong in ucb/source/ucp/webdav-curl/CurlSession.cxxStephan Bergmann
...similarly to how it was already done for its ucb/source/ucp/webdav-neon/NeonSession.cxx cousin Change-Id: I78124f45d4cb08131ee5d6e8c2606b38407c0668 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124637 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-03ucb: webdav-curl: consolidate unit testsMichael Stahl
1 CppuniTest makefile should be sufficient, particularly since all 4 of them used gb_CppunitTest_use_library_objects so this should reduce wasted space. Change-Id: I485f0af0aee2b265b56c505ced44257834784e98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124608 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-03ucb: webdav-curl: convert webdav unit tests to curlMichael Stahl
There's no point in building the tests for neon any more, just build them only if curl is used. This finds a bug in CurlUri::Init() where query and fragment separators need to be added manually. Change-Id: I3dcd1512450522df2c2a7d223b2e29b6c0e794fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124607 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>