summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-03-10 15:01:54 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2022-03-10 16:00:11 +0100
commitabb85b390bab2073fd03ac3732232e35b9519401 (patch)
treef5839ba96b6e0ddc9229e0a62f0ed8dc9e06165e
parent4361caa98656ae95e27c89e03957089e4b4b4da3 (diff)
ucb: webdav-curl: demodernize code so it builds
Change-Id: Ic12c38be4426d7cb3c4134585df34a7107e8f4ce
-rw-r--r--ucb/source/ucp/webdav-curl/CurlSession.cxx31
-rw-r--r--ucb/source/ucp/webdav-curl/DAVProperties.cxx36
-rw-r--r--ucb/source/ucp/webdav-curl/DAVProperties.hxx26
-rw-r--r--ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx2
-rw-r--r--ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx18
-rw-r--r--ucb/source/ucp/webdav-curl/webdavcontent.cxx49
-rw-r--r--ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx3
-rw-r--r--ucb/source/ucp/webdav-curl/webdavprovider.cxx2
-rw-r--r--ucb/source/ucp/webdav-curl/webdavresponseparser.cxx2
9 files changed, 83 insertions, 86 deletions
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 70f9f828467d..bddefa1ad117 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -106,12 +106,12 @@ auto GetErrorString(CURLcode const rc, char const* const pErrorBuffer = nullptr)
{
char const* const pMessage( // static fallback
(pErrorBuffer && pErrorBuffer[0] != '\0') ? pErrorBuffer : curl_easy_strerror(rc));
- return OString::Concat("(") + OString::number(sal_Int32(rc)) + ") " + pMessage;
+ return "(" + OString::number(sal_Int32(rc)) + ") " + pMessage;
}
auto GetErrorStringMulti(CURLMcode const mc) -> OString
{
- return OString::Concat("(") + OString::number(sal_Int32(mc)) + ") " + curl_multi_strerror(mc);
+ return "(" + OString::number(sal_Int32(mc)) + ") " + curl_multi_strerror(mc);
}
/// represent an option to be passed to curl_easy_setopt()
@@ -300,9 +300,8 @@ static int debug_callback(CURL* handle, curl_infotype type, char* data, size_t s
sal_Int32 const end(tmp.indexOf("\r\n", start));
assert(end != -1);
sal_Int32 const len(SAL_N_ELEMENTS("Authorization: ") - 1);
- tmp = tmp.replaceAt(
- start + len, end - start - len,
- OStringConcatenation(OString::number(end - start - len) + " bytes redacted"));
+ tmp = tmp.replaceAt(start + len, end - start - len,
+ OString::number(end - start - len) + " bytes redacted");
}
SAL_INFO("ucb.ucp.webdav.curl", "CURLINFO_HEADER_OUT: " << handle << ": " << tmp);
return 0;
@@ -430,7 +429,7 @@ static size_t header_callback(char* const buffer, size_t const size, size_t cons
return 0; // error
}
pHeaders->HeaderFields.back().first.back()
- += OString::Concat(" ") + ::std::string_view(&buffer[i], nitems - i);
+ += OString(" ") + OString(&buffer[i], nitems - i);
}
else
{
@@ -492,8 +491,8 @@ static auto ProcessHeaders(::std::vector<OString> const& rHeaders) -> ::std::map
--nEnd;
}
// RFC 7230 says that only ASCII works reliably anyway (neon also did this)
- auto const value(::rtl::OStringToOUString(line.subView(nStart, nEnd - nStart),
- RTL_TEXTENCODING_ASCII_US));
+ auto const value(
+ ::rtl::OStringToOUString(line.copy(nStart, nEnd - nStart), RTL_TEXTENCODING_ASCII_US));
auto const it(ret.find(name));
if (it != ret.end())
{
@@ -620,8 +619,8 @@ CurlSession::CurlSession(uno::Reference<uno::XComponentContext> const& xContext,
// en.wikipedia.org:80 forces back 403 "Scripts should use an informative
// User-Agent string with contact information, or they may be IP-blocked
// without notice" otherwise:
- OString const useragent(OString::Concat("LibreOffice " LIBO_VERSION_DOTTED " curl/")
- + ::std::string_view(pVersion->version, strlen(pVersion->version)) + " "
+ OString const useragent(OString("LibreOffice " LIBO_VERSION_DOTTED " curl/")
+ + OString(pVersion->version, strlen(pVersion->version)) + " "
+ pVersion->ssl_version);
// looks like an explicit "User-Agent" header in CURLOPT_HTTPHEADER
// will override CURLOPT_USERAGENT, see Curl_http_useragent(), so no need
@@ -1561,7 +1560,7 @@ auto CurlProcessor::PropFind(
xWriter->startDocument();
rtl::Reference<::comphelper::AttributeList> const pAttrList(new ::comphelper::AttributeList);
pAttrList->AddAttribute("xmlns", "CDATA", "DAV:");
- xWriter->startElement("propfind", pAttrList);
+ xWriter->startElement("propfind", pAttrList.get());
if (o_pResourceInfos)
{
xWriter->startElement("propname", nullptr);
@@ -1583,7 +1582,7 @@ auto CurlProcessor::PropFind(
DAVProperties::createSerfPropName(rName, name);
pAttrList->Clear();
pAttrList->AddAttribute("xmlns", "CDATA", OUString::createFromAscii(name.nspace));
- xWriter->startElement(OUString::createFromAscii(name.name), pAttrList);
+ xWriter->startElement(OUString::createFromAscii(name.name), pAttrList.get());
xWriter->endElement(OUString::createFromAscii(name.name));
}
xWriter->endElement("prop");
@@ -1701,7 +1700,7 @@ auto CurlSession::PROPPATCH(OUString const& rURIReference,
xWriter->startDocument();
rtl::Reference<::comphelper::AttributeList> const pAttrList(new ::comphelper::AttributeList);
pAttrList->AddAttribute("xmlns", "CDATA", "DAV:");
- xWriter->startElement("propertyupdate", pAttrList);
+ xWriter->startElement("propertyupdate", pAttrList.get());
for (ProppatchValue const& rPropValue : rValues)
{
assert(rPropValue.operation == PROPSET || rPropValue.operation == PROPREMOVE);
@@ -1713,7 +1712,7 @@ auto CurlSession::PROPPATCH(OUString const& rURIReference,
DAVProperties::createSerfPropName(rPropValue.name, name);
pAttrList->Clear();
pAttrList->AddAttribute("xmlns", "CDATA", OUString::createFromAscii(name.nspace));
- xWriter->startElement(OUString::createFromAscii(name.name), pAttrList);
+ xWriter->startElement(OUString::createFromAscii(name.name), pAttrList.get());
if (rPropValue.operation == PROPSET)
{
if (DAVProperties::isUCBDeadProperty(name))
@@ -2024,7 +2023,7 @@ auto CurlProcessor::MoveOrCopy(CurlSession& rSession, OUString const& rSourceURI
{
throw uno::RuntimeException("curl_slist_append failed");
}
- OString const utf8Overwrite(OString::Concat("Overwrite: ") + (isOverwrite ? "T" : "F"));
+ OString const utf8Overwrite(OString("Overwrite: ") + (isOverwrite ? "T" : "F"));
pList.reset(curl_slist_append(pList.release(), utf8Overwrite.getStr()));
if (!pList)
{
@@ -2164,7 +2163,7 @@ auto CurlSession::LOCK(OUString const& rURIReference, ucb::Lock /*const*/& rLock
xWriter->startDocument();
rtl::Reference<::comphelper::AttributeList> const pAttrList(new ::comphelper::AttributeList);
pAttrList->AddAttribute("xmlns", "CDATA", "DAV:");
- xWriter->startElement("lockinfo", pAttrList);
+ xWriter->startElement("lockinfo", pAttrList.get());
xWriter->startElement("lockscope", nullptr);
switch (rLock.Scope)
{
diff --git a/ucb/source/ucp/webdav-curl/DAVProperties.cxx b/ucb/source/ucp/webdav-curl/DAVProperties.cxx
index 746c82ad993d..b362d512c52a 100644
--- a/ucb/source/ucp/webdav-curl/DAVProperties.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVProperties.cxx
@@ -26,38 +26,38 @@ using namespace http_dav_ucp;
// static
-void DAVProperties::createSerfPropName( ::std::u16string_view const rFullName,
+void DAVProperties::createSerfPropName( OUString const& rFullName,
SerfPropName & rName )
{
- if (o3tl::starts_with(rFullName, u"DAV:"))
+ if (rFullName.startsWith("DAV:"))
{
rName.nspace = "DAV:";
rName.name
= strdup( OUStringToOString(
- rFullName.substr(RTL_CONSTASCII_LENGTH("DAV:")),
+ rFullName.copy(RTL_CONSTASCII_LENGTH("DAV:")),
RTL_TEXTENCODING_UTF8 ).getStr() );
}
- else if (o3tl::starts_with(rFullName, u"http://apache.org/dav/props/"))
+ else if (rFullName.startsWith("http://apache.org/dav/props/"))
{
rName.nspace = "http://apache.org/dav/props/";
rName.name
= strdup( OUStringToOString(
- rFullName.substr(
+ rFullName.copy(
RTL_CONSTASCII_LENGTH(
"http://apache.org/dav/props/" ) ),
RTL_TEXTENCODING_UTF8 ).getStr() );
}
- else if (o3tl::starts_with(rFullName, u"http://ucb.openoffice.org/dav/props/"))
+ else if (rFullName.startsWith("http://ucb.openoffice.org/dav/props/"))
{
rName.nspace = "http://ucb.openoffice.org/dav/props/";
rName.name
= strdup( OUStringToOString(
- rFullName.substr(
+ rFullName.copy(
RTL_CONSTASCII_LENGTH(
"http://ucb.openoffice.org/dav/props/" ) ),
RTL_TEXTENCODING_UTF8 ).getStr() );
}
- else if (o3tl::starts_with(rFullName, u"<prop:"))
+ else if (rFullName.startsWith("<prop:"))
{
// Support for 3rd party namespaces/props
@@ -101,16 +101,16 @@ void DAVProperties::createUCBPropName( const char * nspace,
// in this case, if name is a well-known dav property name.
// Although this is not 100% correct, it solves many problems.
- if (o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::RESOURCETYPE).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::SUPPORTEDLOCK).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::LOCKDISCOVERY).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::CREATIONDATE).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::DISPLAYNAME).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::GETCONTENTLANGUAGE).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::GETCONTENTLENGTH).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::GETCONTENTTYPE).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::GETETAG).substr(4)) ||
- o3tl::equalsIgnoreAsciiCase(aName, std::u16string_view(DAVProperties::GETLASTMODIFIED).substr(4)))
+ if (aName.equalsIgnoreAsciiCase(OUString(DAVProperties::RESOURCETYPE).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::SUPPORTEDLOCK).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::LOCKDISCOVERY).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::CREATIONDATE).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::DISPLAYNAME).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::GETCONTENTLANGUAGE).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::GETCONTENTLENGTH).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::GETCONTENTTYPE).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::GETETAG).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::GETLASTMODIFIED).copy(4)))
{
aNameSpace = "DAV:";
}
diff --git a/ucb/source/ucp/webdav-curl/DAVProperties.hxx b/ucb/source/ucp/webdav-curl/DAVProperties.hxx
index af005300c79d..ee64fcff70be 100644
--- a/ucb/source/ucp/webdav-curl/DAVProperties.hxx
+++ b/ucb/source/ucp/webdav-curl/DAVProperties.hxx
@@ -29,19 +29,19 @@ typedef struct { const char *nspace, *name; } SerfPropName;
struct DAVProperties
{
- static constexpr OUStringLiteral CREATIONDATE = u"DAV:creationdate";
- static constexpr OUStringLiteral DISPLAYNAME = u"DAV:displayname";
- static constexpr OUStringLiteral GETCONTENTLANGUAGE = u"DAV:getcontentlanguage";
- static constexpr OUStringLiteral GETCONTENTLENGTH = u"DAV:getcontentlength";
- static constexpr OUStringLiteral GETCONTENTTYPE = u"DAV:getcontenttype";
- static constexpr OUStringLiteral GETETAG = u"DAV:getetag";
- static constexpr OUStringLiteral GETLASTMODIFIED = u"DAV:getlastmodified";
- static constexpr OUStringLiteral LOCKDISCOVERY = u"DAV:lockdiscovery";
- static constexpr OUStringLiteral RESOURCETYPE = u"DAV:resourcetype";
- static constexpr OUStringLiteral SUPPORTEDLOCK = u"DAV:supportedlock";
- static constexpr OUStringLiteral EXECUTABLE = u"http://apache.org/dav/props/executable";
-
- static void createSerfPropName( ::std::u16string_view rFullName,
+ static constexpr OUStringLiteral CREATIONDATE = "DAV:creationdate";
+ static constexpr OUStringLiteral DISPLAYNAME = "DAV:displayname";
+ static constexpr OUStringLiteral GETCONTENTLANGUAGE = "DAV:getcontentlanguage";
+ static constexpr OUStringLiteral GETCONTENTLENGTH = "DAV:getcontentlength";
+ static constexpr OUStringLiteral GETCONTENTTYPE = "DAV:getcontenttype";
+ static constexpr OUStringLiteral GETETAG = "DAV:getetag";
+ static constexpr OUStringLiteral GETLASTMODIFIED = "DAV:getlastmodified";
+ static constexpr OUStringLiteral LOCKDISCOVERY = "DAV:lockdiscovery";
+ static constexpr OUStringLiteral RESOURCETYPE = "DAV:resourcetype";
+ static constexpr OUStringLiteral SUPPORTEDLOCK = "DAV:supportedlock";
+ static constexpr OUStringLiteral EXECUTABLE = "http://apache.org/dav/props/executable";
+
+ static void createSerfPropName( OUString const& rFullName,
SerfPropName & rName );
static void createUCBPropName ( const char * nspace,
const char * name,
diff --git a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
index 248d65b8c60c..988970b9a0df 100644
--- a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
@@ -69,7 +69,7 @@ int DAVAuthListener_Impl::authenticate(
m_aURL, inHostName, inRealm, inoutUserName,
outPassWord,
bCanUseSystemCredentials );
- xIH->handle( xRequest );
+ xIH->handle( xRequest.get() );
rtl::Reference< ucbhelper::InteractionContinuation > xSelection
= xRequest->getSelection();
diff --git a/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
index 4f3460a26785..9e7176a218b8 100644
--- a/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
+++ b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
@@ -26,15 +26,15 @@ using namespace ::com::sun::star;
// static
-constexpr OUStringLiteral aTypeString = u"string";
-constexpr OUStringLiteral aTypeLong = u"long";
-constexpr OUStringLiteral aTypeShort = u"short";
-constexpr OUStringLiteral aTypeBoolean = u"boolean";
-constexpr OUStringLiteral aTypeChar = u"char";
-constexpr OUStringLiteral aTypeByte = u"byte";
-constexpr OUStringLiteral aTypeHyper = u"hyper";
-constexpr OUStringLiteral aTypeFloat = u"float";
-constexpr OUStringLiteral aTypeDouble = u"double";
+constexpr OUStringLiteral aTypeString = "string";
+constexpr OUStringLiteral aTypeLong = "long";
+constexpr OUStringLiteral aTypeShort = "short";
+constexpr OUStringLiteral aTypeBoolean = "boolean";
+constexpr OUStringLiteral aTypeChar = "char";
+constexpr OUStringLiteral aTypeByte = "byte";
+constexpr OUStringLiteral aTypeHyper = "hyper";
+constexpr OUStringLiteral aTypeFloat = "float";
+constexpr OUStringLiteral aTypeDouble = "double";
// static
bool UCBDeadPropertyValue::supportsType( const uno::Type & rType )
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 1eb069a3480e..46eac2f6f03c 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -1257,7 +1257,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
xRow->appendPropertySet( xSet );
}
- return uno::Reference<sdbc::XRow>(xRow);
+ return uno::Reference<sdbc::XRow>(xRow.get());
}
namespace {
@@ -1729,7 +1729,6 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
}
uno::Sequence< uno::Any > aRet( rValues.getLength() );
- auto aRetRange = asNonConstRange(aRet);
uno::Sequence< beans::PropertyChangeEvent > aChanges( rValues.getLength() );
sal_Int32 nChanged = 0;
@@ -1767,7 +1766,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( aTmpProp.Attributes & beans::PropertyAttribute::READONLY )
{
// Read-only property!
- aRetRange[ n ] <<= lang::IllegalAccessException(
+ aRet[ n ] <<= lang::IllegalAccessException(
"Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
continue;
@@ -1780,21 +1779,21 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( rName == "ContentType" )
{
// Read-only property!
- aRetRange[ n ] <<= lang::IllegalAccessException(
+ aRet[ n ] <<= lang::IllegalAccessException(
"Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "IsDocument" )
{
// Read-only property!
- aRetRange[ n ] <<= lang::IllegalAccessException(
+ aRet[ n ] <<= lang::IllegalAccessException(
"Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "IsFolder" )
{
// Read-only property!
- aRetRange[ n ] <<= lang::IllegalAccessException(
+ aRet[ n ] <<= lang::IllegalAccessException(
"Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
@@ -1827,7 +1826,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
}
catch ( DAVException const & )
{
- aRetRange[ n ] <<= lang::IllegalArgumentException(
+ aRet[ n ] <<= lang::IllegalArgumentException(
"Invalid content identifier!",
static_cast< cppu::OWeakObject * >( this ),
-1 );
@@ -1835,7 +1834,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
}
else
{
- aRetRange[ n ] <<= lang::IllegalArgumentException(
+ aRet[ n ] <<= lang::IllegalArgumentException(
"Empty title not allowed!",
static_cast< cppu::OWeakObject * >( this ),
-1 );
@@ -1843,7 +1842,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
}
else
{
- aRetRange[ n ] <<= beans::IllegalTypeException(
+ aRet[ n ] <<= beans::IllegalTypeException(
"Property value has wrong type!",
static_cast< cppu::OWeakObject * >( this ) );
}
@@ -1866,7 +1865,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
// Check, whether property exists. Skip otherwise.
// PROPPATCH::set would add the property automatically, which
// is not allowed for "setPropertyValues" command!
- aRetRange[ n ] <<= beans::UnknownPropertyException(
+ aRet[ n ] <<= beans::UnknownPropertyException(
"Property is unknown!",
static_cast< cppu::OWeakObject * >( this ) );
continue;
@@ -1875,21 +1874,21 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( rName == "Size" )
{
// Read-only property!
- aRetRange[ n ] <<= lang::IllegalAccessException(
+ aRet[ n ] <<= lang::IllegalAccessException(
"Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "DateCreated" )
{
// Read-only property!
- aRetRange[ n ] <<= lang::IllegalAccessException(
+ aRet[ n ] <<= lang::IllegalAccessException(
"Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
else if ( rName == "DateModified" )
{
// Read-only property!
- aRetRange[ n ] <<= lang::IllegalAccessException(
+ aRet[ n ] <<= lang::IllegalAccessException(
"Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
@@ -1897,14 +1896,14 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
// Read-only property!
// (but could be writable, if 'getcontenttype' would be)
- aRetRange[ n ] <<= lang::IllegalAccessException(
+ aRet[ n ] <<= lang::IllegalAccessException(
"Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
if ( rName == "CreatableContentsInfo" )
{
// Read-only property!
- aRetRange[ n ] <<= lang::IllegalAccessException(
+ aRet[ n ] <<= lang::IllegalAccessException(
"Property is read-only!",
static_cast< cppu::OWeakObject * >( this ) );
}
@@ -1952,24 +1951,24 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
}
catch ( beans::UnknownPropertyException const & e )
{
- aRetRange[ n ] <<= e;
+ aRet[ n ] <<= e;
}
catch ( lang::WrappedTargetException const & e )
{
- aRetRange[ n ] <<= e;
+ aRet[ n ] <<= e;
}
catch ( beans::PropertyVetoException const & e )
{
- aRetRange[ n ] <<= e;
+ aRet[ n ] <<= e;
}
catch ( lang::IllegalArgumentException const & e )
{
- aRetRange[ n ] <<= e;
+ aRet[ n ] <<= e;
}
}
else
{
- aRetRange[ n ] <<= uno::Exception(
+ aRet[ n ] <<= uno::Exception(
"No property set for storing the value!",
static_cast< cppu::OWeakObject * >( this ) );
}
@@ -2018,7 +2017,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
while ( it != end )
{
// Set error.
- aRetRange[ (*it) ] <<= MapDAVException( e, true );
+ aRet[ (*it) ] <<= MapDAVException( e, true );
++it;
}
#endif
@@ -2080,7 +2079,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
aNewTitle.clear();
// Set error .
- aRetRange[ nTitlePos ] <<= uno::Exception(
+ aRet[ nTitlePos ] <<= uno::Exception(
"Exchange failed!",
static_cast< cppu::OWeakObject * >( this ) );
}
@@ -2091,7 +2090,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
aNewTitle.clear();
// Set error .
- aRetRange[ nTitlePos ] = MapDAVException( e, true );
+ aRet[ nTitlePos ] = MapDAVException( e, true );
}
}
@@ -2514,7 +2513,7 @@ void Content::insert(
aExAsAny,
ContinuationFlags::Approve
| ContinuationFlags::Disapprove );
- xIH->handle( xRequest );
+ xIH->handle( xRequest.get() );
const ContinuationFlags nResp = xRequest->getResponse();
@@ -2721,7 +2720,7 @@ void Content::transfer(
xContext.set( m_xContext );
xIdentifier.set( m_xIdentifier );
- xProvider.set( m_xProvider );
+ xProvider.set( m_xProvider.get() );
xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
}
diff --git a/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx b/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx
index a7e2bb96893b..836edd7c75e8 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx
@@ -479,7 +479,6 @@ uno::Sequence< beans::Property > Content::getProperties(
// std::set -> uno::Sequence
sal_Int32 nCount = aPropSet.size();
uno::Sequence< beans::Property > aProperties( nCount );
- auto aPropertiesRange = asNonConstRange(aProperties);
beans::Property aProp;
sal_Int32 n = 0;
@@ -487,7 +486,7 @@ uno::Sequence< beans::Property > Content::getProperties(
for ( const auto& rProp : aPropSet )
{
xProvider->getProperty( rProp, aProp );
- aPropertiesRange[ n++ ] = aProp;
+ aProperties[ n++ ] = aProp;
}
return aProperties;
diff --git a/ucb/source/ucp/webdav-curl/webdavprovider.cxx b/ucb/source/ucp/webdav-curl/webdavprovider.cxx
index effd6665ad1d..972306cb3bf5 100644
--- a/ucb/source/ucp/webdav-curl/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavprovider.cxx
@@ -141,7 +141,7 @@ ContentProvider::queryContent(
osl::MutexGuard aGuard( m_aMutex );
// Check, if a content with given id already exists...
- uno::Reference<ucb::XContent> xContent = queryExistingContent(xCanonicId);
+ uno::Reference<ucb::XContent> xContent = queryExistingContent(xCanonicId).get();
if ( xContent.is() )
return xContent;
diff --git a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
index a236957c096e..33074b94040e 100644
--- a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
@@ -928,7 +928,7 @@ namespace
// create parser; connect parser and filter
rtl::Reference<WebDAVResponseParser> const pWebDAVResponseParser(
new WebDAVResponseParser(eWebDAVResponseParserMode));
- uno::Reference< xml::sax::XDocumentHandler > xWebDAVHdl(pWebDAVResponseParser);
+ uno::Reference< xml::sax::XDocumentHandler > xWebDAVHdl(pWebDAVResponseParser.get());
xParser->setDocumentHandler(xWebDAVHdl);
// finally, parse the stream