[Libreoffice-commits] core.git: 8 commits - chart2/qa sd/source ucb/source
Tor Lillqvist
tml at collabora.com
Tue Dec 13 16:52:14 UTC 2016
chart2/qa/extras/xshape/chart2xshape.cxx | 2
sd/source/ui/remotecontrol/AvahiNetworkService.cxx | 14 +++
ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx | 4 -
ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx | 6 -
ucb/source/ucp/webdav/SerfLockReqProcImpl.hxx | 2
ucb/source/ucp/webdav/SerfPostReqProcImpl.cxx | 2
ucb/source/ucp/webdav/SerfPostReqProcImpl.hxx | 6 -
ucb/source/ucp/webdav/SerfPropFindReqProcImpl.hxx | 4 -
ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.hxx | 2
ucb/source/ucp/webdav/SerfPutReqProcImpl.hxx | 2
ucb/source/ucp/webdav/SerfRequestProcessor.cxx | 6 -
ucb/source/ucp/webdav/SerfRequestProcessor.hxx | 8 +-
ucb/source/ucp/webdav/SerfSession.cxx | 16 ++--
ucb/source/ucp/webdav/SerfUnlockReqProcImpl.cxx | 2
ucb/source/ucp/webdav/SerfUri.cxx | 4 -
ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx | 6 -
ucb/source/ucp/webdav/webdavcontent.cxx | 77 ++++++++-------------
ucb/source/ucp/webdav/webdavcontent.hxx | 4 -
ucb/source/ucp/webdav/webdavdatasupplier.cxx | 8 --
ucb/source/ucp/webdav/webdavdatasupplier.hxx | 2
ucb/source/ucp/webdav/webdavprovider.cxx | 10 +-
ucb/source/ucp/webdav/webdavresponseparser.cxx | 4 -
ucb/source/ucp/webdav/webdavservices.cxx | 2
23 files changed, 95 insertions(+), 98 deletions(-)
New commits:
commit 092e361031ed09756eac89d3d5e06645a2942a5e
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Dec 13 18:00:18 2016 +0200
Fix fallout from 60b1c95cc47831246f097ee13dda8bcd71c57eb4
Change-Id: I77722619a249616ab59af0eeaeb075e89040c715
diff --git a/chart2/qa/extras/xshape/chart2xshape.cxx b/chart2/qa/extras/xshape/chart2xshape.cxx
index c49662f..af218b9 100644
--- a/chart2/qa/extras/xshape/chart2xshape.cxx
+++ b/chart2/qa/extras/xshape/chart2xshape.cxx
@@ -89,7 +89,7 @@ void Chart2XShapeTest::compareAgainstReference(const OUString& rReferenceFile, b
{
OUString aDump = getXShapeDumpString();
- OUString aReference = getPathFromSrc("/chart2/qa/extras/xshape/data/reference/") + rReferenceFile;
+ OUString aReference = m_directories.getPathFromSrc("/chart2/qa/extras/xshape/data/reference/") + rReferenceFile;
if(bCreateReference)
{
OString aOFile = OUStringToOString(aReference, RTL_TEXTENCODING_UTF8);
commit fee59313ce70cc27112c0f4b031585441fd0f348
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Dec 13 17:48:20 2016 +0200
Fix weird configury option combination lossage
Change-Id: If67e703d82846c17deecff3e04172bfa339888a6
diff --git a/sd/source/ui/remotecontrol/AvahiNetworkService.cxx b/sd/source/ui/remotecontrol/AvahiNetworkService.cxx
index 9d1204e..aea4513 100644
--- a/sd/source/ui/remotecontrol/AvahiNetworkService.cxx
+++ b/sd/source/ui/remotecontrol/AvahiNetworkService.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -6,6 +6,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+
+#include <config_dbus.h>
+
#include <time.h>
#include <iostream>
#include <limits>
@@ -22,7 +25,10 @@
#include <avahi-common/timeval.h>
#include <avahi-common/thread-watch.h>
#include <comphelper/random.hxx>
+
+#if ENABLE_DBUS
#include <dbus/dbus.h>
+#endif
#include <sal/log.hxx>
@@ -161,12 +167,18 @@ static void client_callback(AvahiClient *c, AvahiClientState state, AVAHI_GCC_UN
}
void AvahiNetworkService::setup() {
+#if ENABLE_DBUS
+ // Sure, without ENABLE_DBUS it probably makes no sense to try to use this Avahi stuff either,
+ // but this is just a stop-gap measure to get this to even compile for now with the probably
+ // pointless combination of configury options --enable-avahi --enable-dbus --disable-gui.
+
// Avahi internally uses D-Bus, which requires the following in order to be
// thread-safe (and we potentially access D-Bus from different threads in
// different places of the code base):
if (!dbus_threads_init_default()) {
throw std::bad_alloc();
}
+#endif
int error = 0;
avahiService = this;
commit c5e2eeb19cb4539c207a532d483440a9fb5f98e1
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Dec 13 17:32:14 2016 +0200
loplugin:staticanonymous
Change-Id: I8c08a303026219dbf87af7165a3f9a99134d5091
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 8db55d9..101aa17 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -77,13 +77,13 @@ using namespace http_dav_ucp;
namespace
{
-static void lcl_sendPartialGETRequest( bool &bError,
- DAVException &aLastException,
- const std::vector< rtl::OUString >& rProps,
- std::vector< rtl::OUString > &aHeaderNames,
- const std::unique_ptr< DAVResourceAccess > &xResAccess,
- std::unique_ptr< ContentProperties > &xProps,
- const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+void lcl_sendPartialGETRequest( bool &bError,
+ DAVException &aLastException,
+ const std::vector< rtl::OUString >& rProps,
+ std::vector< rtl::OUString > &aHeaderNames,
+ const std::unique_ptr< DAVResourceAccess > &xResAccess,
+ std::unique_ptr< ContentProperties > &xProps,
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
{
bool bIsRequestSize = false;
DAVResource aResource;
commit 2cc0095c28c283ccae7877179a67b180fac8b4ed
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Dec 13 17:16:54 2016 +0200
loplugin:salbool
Change-Id: Ia2a2c900bf8bf8ecee2edf130b8ca58f7f35b6aa
diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx
index 37e6e45..40c8ffe 100644
--- a/ucb/source/ucp/webdav/SerfSession.cxx
+++ b/ucb/source/ucp/webdav/SerfSession.cxx
@@ -492,7 +492,7 @@ apr_status_t SerfSession::verifySerfCertificateChain (
if (nVerificationResult == 0)
{
// Certificate (chain) is valid.
- xCertificateContainer->addCertificate(getHostName(), sServerCertificateSubject, sal_True);
+ xCertificateContainer->addCertificate(getHostName(), sServerCertificateSubject, true);
return APR_SUCCESS;
}
else if ((nVerificationResult & security::CertificateValidity::CHAIN_INCOMPLETE) != 0)
@@ -506,7 +506,7 @@ apr_status_t SerfSession::verifySerfCertificateChain (
(security::CertificateValidity::INVALID | security::CertificateValidity::REVOKED)) != 0)
{
// Certificate (chain) is invalid.
- xCertificateContainer->addCertificate(getHostName(), sServerCertificateSubject, sal_False);
+ xCertificateContainer->addCertificate(getHostName(), sServerCertificateSubject, false);
return SERF_SSL_CERT_UNKNOWN_FAILURE;
}
else
@@ -536,13 +536,13 @@ apr_status_t SerfSession::verifySerfCertificateChain (
uno::Reference< task::XInteractionApprove > xApprove( xSelection.get(), uno::UNO_QUERY );
if ( xApprove.is() )
{
- xCertificateContainer->addCertificate( getHostName(), sServerCertificateSubject, sal_True );
+ xCertificateContainer->addCertificate( getHostName(), sServerCertificateSubject, true );
return APR_SUCCESS;
}
else
{
// Don't trust cert
- xCertificateContainer->addCertificate( getHostName(), sServerCertificateSubject, sal_False );
+ xCertificateContainer->addCertificate( getHostName(), sServerCertificateSubject, false );
return SERF_SSL_CERT_UNKNOWN_FAILURE;
}
}
@@ -550,7 +550,7 @@ apr_status_t SerfSession::verifySerfCertificateChain (
else
{
// Don't trust cert
- xCertificateContainer->addCertificate( getHostName(), sServerCertificateSubject, sal_False );
+ xCertificateContainer->addCertificate( getHostName(), sServerCertificateSubject, false );
return SERF_SSL_CERT_UNKNOWN_FAILURE;
}
}
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 60746e6..8db55d9 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -2715,7 +2715,7 @@ void Content::transfer(
xResAccess->getSessionFactory(),
sourceURI.GetURI() );
- if ( rArgs.MoveData == sal_True )
+ if ( rArgs.MoveData )
{
uno::Reference< ucb::XContentIdentifier > xId
= new ::ucbhelper::ContentIdentifier( rArgs.SourceURL );
commit f409daff083903b066159c8e62f04bebd9263219
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Dec 13 17:05:55 2016 +0200
loplugin:stringconstant
Change-Id: Ifc100e8ece6ea826b745919583beac315c41b100
diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx
index dff7b1f..ba82a41 100644
--- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx
+++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx
@@ -176,11 +176,11 @@ static OUString encodeValue( const OUString & rValue )
const sal_Unicode c = pValue[ n ];
if ( '%' == c )
- aResult.appendAscii( "%per;" );
+ aResult.append( "%per;" );
else if ( '<' == c )
- aResult.appendAscii( "%lt;" );
+ aResult.append( "%lt;" );
else if ( '>' == c )
- aResult.appendAscii( "%gt;" );
+ aResult.append( "%gt;" );
else
aResult.append( c );
}
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 0575d4d..60746e6 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -296,8 +296,7 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType )
uno::Reference< beans::XPropertySet > const xProps(
m_xContext, uno::UNO_QUERY_THROW );
uno::Reference< uno::XComponentContext > xCtx;
- xCtx.set( xProps->getPropertyValue(
- OUString( "DefaultContext" ) ),
+ xCtx.set( xProps->getPropertyValue( "DefaultContext" ),
uno::UNO_QUERY_THROW );
uno::Reference< task::XInteractionHandler > xIH(
@@ -1120,8 +1119,7 @@ Content::queryCreatableContentsInfo()
| ucb::ContentInfoAttribute::KIND_DOCUMENT;
beans::Property aProp;
- m_pProvider->getProperty(
- OUString( "Title" ), aProp );
+ m_pProvider->getProperty( "Title", aProp );
uno::Sequence< beans::Property > aDocProps( 1 );
aDocProps.getArray()[ 0 ] = aProp;
@@ -1563,7 +1561,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
//xProps.reset(
// new ContentProperties( aUnescapedTitle ) );
xProps->addProperty(
- OUString( "Title" ),
+ "Title",
uno::makeAny( aUnescapedTitle ),
true );
}
@@ -1573,20 +1571,20 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
xProps.reset( new ContentProperties( aUnescapedTitle, false ) );
else
xProps->addProperty(
- OUString( "Title" ),
+ "Title",
uno::makeAny( aUnescapedTitle ),
true );
xProps->addProperty(
- OUString( "IsFolder" ),
+ "IsFolder",
uno::makeAny( false ),
true );
xProps->addProperty(
- OUString( "IsDocument" ),
+ "IsDocument",
uno::makeAny( true ),
true );
xProps->addProperty(
- OUString( "ContentType" ),
+ "ContentType",
uno::makeAny( OUString(WEBDAV_CONTENT_TYPE) ),
true );
}
@@ -1608,7 +1606,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
{
// Add BaseURI property, if requested.
xProps->addProperty(
- OUString( "BaseURI" ),
+ "BaseURI",
uno::makeAny( getBaseURI( xResAccess ) ),
true );
}
@@ -1616,11 +1614,10 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
{
// Add CreatableContentsInfo property, if requested.
bool bFolder = false;
- xProps->getValue(
- OUString( "IsFolder" ) )
+ xProps->getValue( "IsFolder" )
>>= bFolder;
xProps->addProperty(
- OUString( "CreatableContentsInfo" ),
+ "CreatableContentsInfo",
uno::makeAny( bFolder
? queryCreatableContentsInfo()
: uno::Sequence< ucb::ContentInfo >() ),
@@ -2086,8 +2083,7 @@ uno::Any Content::open(
// Error: Not a folder!
OUStringBuffer aMsg;
- aMsg.appendAscii( "Non-folder resource cannot be "
- "opened as folder! Wrong Open Mode!" );
+ aMsg.append( "Non-folder resource cannot be opened as folder! Wrong Open Mode!" );
ucbhelper::cancelCommandExecution(
uno::makeAny(
@@ -2637,23 +2633,19 @@ void Content::transfer(
OUString aScheme = sourceURI.GetScheme().toAsciiLowerCase();
if ( aScheme == WEBDAV_URL_SCHEME )
{
- sourceURI.SetScheme(
- OUString( HTTP_URL_SCHEME ) );
+ sourceURI.SetScheme( HTTP_URL_SCHEME );
}
else if ( aScheme == WEBDAVS_URL_SCHEME )
{
- sourceURI.SetScheme(
- OUString( HTTPS_URL_SCHEME ) );
+ sourceURI.SetScheme( HTTPS_URL_SCHEME );
}
else if ( aScheme == DAV_URL_SCHEME )
{
- sourceURI.SetScheme(
- OUString( HTTP_URL_SCHEME ) );
+ sourceURI.SetScheme( HTTP_URL_SCHEME );
}
else if ( aScheme == DAVS_URL_SCHEME )
{
- sourceURI.SetScheme(
- OUString( HTTPS_URL_SCHEME ) );
+ sourceURI.SetScheme( HTTPS_URL_SCHEME );
}
else
{
@@ -2671,17 +2663,13 @@ void Content::transfer(
aScheme = targetURI.GetScheme().toAsciiLowerCase();
if ( aScheme == WEBDAV_URL_SCHEME )
- targetURI.SetScheme(
- OUString( HTTP_URL_SCHEME ) );
+ targetURI.SetScheme( HTTP_URL_SCHEME );
else if ( aScheme == WEBDAVS_URL_SCHEME )
- targetURI.SetScheme(
- OUString( HTTPS_URL_SCHEME ) );
+ targetURI.SetScheme( HTTPS_URL_SCHEME );
else if ( aScheme == DAV_URL_SCHEME )
- targetURI.SetScheme(
- OUString( HTTP_URL_SCHEME ) );
+ targetURI.SetScheme( HTTP_URL_SCHEME );
else if ( aScheme == DAVS_URL_SCHEME )
- targetURI.SetScheme(
- OUString( HTTPS_URL_SCHEME ) );
+ targetURI.SetScheme( HTTPS_URL_SCHEME );
// @@@ This implementation of 'transfer' only works
// if the source and target are located at same host.
@@ -3286,8 +3274,7 @@ Content::getBaseURI( const std::unique_ptr< DAVResourceAccess > & rResAccess )
if ( m_xCachedProps.get() )
{
OUString aLocation;
- m_xCachedProps->getValue( OUString(
- "Content-Location" ) ) >>= aLocation;
+ m_xCachedProps->getValue( "Content-Location" ) >>= aLocation;
if ( aLocation.getLength() )
{
try
diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx
index 05566de..cfb8dd5 100644
--- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx
+++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx
@@ -426,9 +426,7 @@ bool DataSupplier::getData()
bool bFolder = false;
const uno::Any & rValue
- = pContentProperties->getValue(
- OUString(
- "IsFolder" ) );
+ = pContentProperties->getValue( "IsFolder" );
rValue >>= bFolder;
if ( !bFolder )
@@ -442,9 +440,7 @@ bool DataSupplier::getData()
bool bDocument = false;
const uno::Any & rValue
- = pContentProperties->getValue(
- OUString(
- "IsDocument" ) );
+ = pContentProperties->getValue( "IsDocument" );
rValue >>= bDocument;
if ( !bDocument )
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index d843a6a..0cca80f 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -134,28 +134,28 @@ ContentProvider::queryContent(
{
aURL = aURL.replaceAt( 0,
WEBDAV_URL_SCHEME_LENGTH,
- OUString( HTTP_URL_SCHEME ) );
+ HTTP_URL_SCHEME );
bNewId = true;
}
else if ( aScheme == WEBDAVS_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
WEBDAVS_URL_SCHEME_LENGTH,
- OUString( HTTPS_URL_SCHEME ) );
+ HTTPS_URL_SCHEME );
bNewId = true;
}
else if ( aScheme == DAV_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
DAV_URL_SCHEME_LENGTH,
- OUString( HTTP_URL_SCHEME ) );
+ HTTP_URL_SCHEME );
bNewId = true;
}
else if ( aScheme == DAVS_URL_SCHEME )
{
aURL = aURL.replaceAt( 0,
DAVS_URL_SCHEME_LENGTH,
- OUString( HTTPS_URL_SCHEME ) );
+ HTTPS_URL_SCHEME );
bNewId = true;
}
commit 20cc8a453d3bc970ec4bfa899691027850bb8fe1
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Dec 13 17:02:53 2016 +0200
loplugin:nullptr
Change-Id: I2cd1e82d86d8776155db2f70bc92c7c448f81ce0
diff --git a/ucb/source/ucp/webdav/SerfUnlockReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfUnlockReqProcImpl.cxx
index 59c8994..53826ac 100644
--- a/ucb/source/ucp/webdav/SerfUnlockReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfUnlockReqProcImpl.cxx
@@ -40,7 +40,7 @@ serf_bucket_t * SerfUnlockReqProcImpl::createSerfRequestBucket( serf_request_t *
serf_bucket_t *req_bkt = serf_request_bucket_request_create( inSerfRequest,
"UNLOCK",
getPathStr(),
- 0,
+ nullptr,
serf_request_get_alloc( inSerfRequest ) );
// set request header fields
serf_bucket_t* hdrs_bkt = serf_bucket_request_get_headers( req_bkt );
diff --git a/ucb/source/ucp/webdav/SerfUri.cxx b/ucb/source/ucp/webdav/SerfUri.cxx
index 1c11679..565ece8 100644
--- a/ucb/source/ucp/webdav/SerfUri.cxx
+++ b/ucb/source/ucp/webdav/SerfUri.cxx
@@ -40,12 +40,12 @@ SerfUri::SerfUri( const apr_uri_t * inUri )
, mPort()
, mPath()
{
- if ( inUri == 0 )
+ if ( inUri == nullptr )
throw DAVException( DAVException::DAV_INVALID_ARG );
char * uri = apr_uri_unparse( apr_environment::AprEnv::getAprEnv()->getAprPool(), &mAprUri, 0 );
- if ( uri == 0 )
+ if ( uri == nullptr )
throw DAVException( DAVException::DAV_INVALID_ARG );
init( &mAprUri );
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 741363a..0575d4d 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -352,11 +352,11 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes()
{
}
- cppu::OTypeCollection * pCollection = 0;
+ cppu::OTypeCollection * pCollection = nullptr;
if ( bFolder )
{
- static cppu::OTypeCollection* pFolderTypes = 0;
+ static cppu::OTypeCollection* pFolderTypes = nullptr;
pCollection = pFolderTypes;
if ( !pCollection )
@@ -389,7 +389,7 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes()
}
else
{
- static cppu::OTypeCollection* pDocumentTypes = 0;
+ static cppu::OTypeCollection* pDocumentTypes = nullptr;
pCollection = pDocumentTypes;
if ( !pCollection )
@@ -3365,7 +3365,7 @@ Content::ResourceType Content::getResourceType(
// resource is NON_DAV
eResourceType = NON_DAV;
}
- else if (networkAccessAllowed != 0)
+ else if (networkAccessAllowed != nullptr)
{
*networkAccessAllowed = *networkAccessAllowed
&& shouldAccessNetworkAfterException(e);
diff --git a/ucb/source/ucp/webdav/webdavcontent.hxx b/ucb/source/ucp/webdav/webdavcontent.hxx
index c0199d4..75e47cf 100644
--- a/ucb/source/ucp/webdav/webdavcontent.hxx
+++ b/ucb/source/ucp/webdav/webdavcontent.hxx
@@ -120,7 +120,7 @@ private:
ResourceType
getResourceType( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv,
const std::unique_ptr< DAVResourceAccess > & rResAccess,
- bool * networkAccessAllowed = 0 )
+ bool * networkAccessAllowed = nullptr )
throw ( css::uno::Exception );
// Command "open"
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index 2725082..d843a6a 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -38,7 +38,7 @@ ContentProvider::ContentProvider(
const uno::Reference< uno::XComponentContext >& rContext )
: ::ucbhelper::ContentProviderImplHelper( rContext ),
m_xDAVSessionFactory( new DAVSessionFactory() ),
- m_pProps( 0 )
+ m_pProps( nullptr )
{
}
diff --git a/ucb/source/ucp/webdav/webdavresponseparser.cxx b/ucb/source/ucp/webdav/webdavresponseparser.cxx
index e30f675..d7f30dd 100644
--- a/ucb/source/ucp/webdav/webdavresponseparser.cxx
+++ b/ucb/source/ucp/webdav/webdavresponseparser.cxx
@@ -372,7 +372,7 @@ namespace
WebDAVResponseParser::WebDAVResponseParser(WebDAVResponseParserMode eWebDAVResponseParserMode)
: maResult_PropFind(),
maResult_PropName(),
- mpContext(0),
+ mpContext(nullptr),
maHref(),
maStatus(),
maResponseProperties(),
diff --git a/ucb/source/ucp/webdav/webdavservices.cxx b/ucb/source/ucp/webdav/webdavservices.cxx
index 1b849e1..7454c54 100644
--- a/ucb/source/ucp/webdav/webdavservices.cxx
+++ b/ucb/source/ucp/webdav/webdavservices.cxx
@@ -28,7 +28,7 @@ using namespace com::sun::star;
extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL ucpdav1_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
- void * pRet = 0;
+ void * pRet = nullptr;
uno::Reference< lang::XMultiServiceFactory > xSMgr(
static_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
commit c69a8d918cecba5f3f9c6e288e442273057043fd
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Dec 13 16:04:22 2016 +0200
loplugin:override
Change-Id: Idb5e16bae0fe573b22c86d1c4d6d4ab8da790557
diff --git a/ucb/source/ucp/webdav/SerfPostReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfPostReqProcImpl.hxx
index d6cc1ca..aebd60b 100644
--- a/ucb/source/ucp/webdav/SerfPostReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfPostReqProcImpl.hxx
@@ -47,7 +47,7 @@ public:
const char* inReferer,
const css::uno::Reference< css::io::XOutputStream > & xioOutStrm );
- virtual ~SerfPostReqProcImpl();
+ virtual ~SerfPostReqProcImpl() override;
virtual
serf_bucket_t * createSerfRequestBucket( serf_request_t * inSerfRequest ) override;
diff --git a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.hxx
index 53a102f..2acabda 100644
--- a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.hxx
@@ -46,7 +46,7 @@ public:
const Depth inDepth,
std::vector< DAVResourceInfo > & ioResInfo );
- virtual ~SerfPropFindReqProcImpl();
+ virtual ~SerfPropFindReqProcImpl() override;
virtual
serf_bucket_t * createSerfRequestBucket( serf_request_t * inSerfRequest ) override;
diff --git a/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.hxx
index 830dd2a..330e0d9 100644
--- a/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.hxx
@@ -35,7 +35,7 @@ public:
const DAVRequestHeaders& inRequestHeaders,
const std::vector< ProppatchValue > & inProperties );
- virtual ~SerfPropPatchReqProcImpl();
+ virtual ~SerfPropPatchReqProcImpl() override;
virtual
serf_bucket_t * createSerfRequestBucket( serf_request_t * inSerfRequest ) override;
diff --git a/ucb/source/ucp/webdav/SerfPutReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfPutReqProcImpl.hxx
index c4ca2e7..8eeb791 100644
--- a/ucb/source/ucp/webdav/SerfPutReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfPutReqProcImpl.hxx
@@ -35,7 +35,7 @@ public:
const OUString& sToken );
- virtual ~SerfPutReqProcImpl();
+ virtual ~SerfPutReqProcImpl() override;
virtual
serf_bucket_t * createSerfRequestBucket( serf_request_t * inSerfRequest ) override;
diff --git a/ucb/source/ucp/webdav/webdavcontent.hxx b/ucb/source/ucp/webdav/webdavcontent.hxx
index 3b6cf4c..c0199d4 100644
--- a/ucb/source/ucp/webdav/webdavcontent.hxx
+++ b/ucb/source/ucp/webdav/webdavcontent.hxx
@@ -196,7 +196,7 @@ public:
rtl::Reference< DAVSessionFactory > const & rSessionFactory,
bool isCollection )
throw ( css::ucb::ContentCreationException );
- virtual ~Content();
+ virtual ~Content() override;
// XInterface
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.hxx b/ucb/source/ucp/webdav/webdavdatasupplier.hxx
index 50a7fc7..053e61a 100644
--- a/ucb/source/ucp/webdav/webdavdatasupplier.hxx
+++ b/ucb/source/ucp/webdav/webdavdatasupplier.hxx
@@ -44,7 +44,7 @@ public:
const rtl::Reference< Content >& rContent,
sal_Int32 nOpenMode);
- virtual ~DataSupplier();
+ virtual ~DataSupplier() override;
virtual OUString queryContentIdentifierString( sal_uInt32 nIndex ) override;
virtual css::uno::Reference< css::ucb::XContentIdentifier >
diff --git a/ucb/source/ucp/webdav/webdavresponseparser.cxx b/ucb/source/ucp/webdav/webdavresponseparser.cxx
index 66b73f1..e30f675 100644
--- a/ucb/source/ucp/webdav/webdavresponseparser.cxx
+++ b/ucb/source/ucp/webdav/webdavresponseparser.cxx
@@ -352,7 +352,7 @@ namespace
public:
explicit WebDAVResponseParser(WebDAVResponseParserMode eWebDAVResponseParserMode);
- virtual ~WebDAVResponseParser();
+ virtual ~WebDAVResponseParser() override;
// Methods XDocumentHandler
virtual void SAL_CALL startDocument( ) throw (xml::sax::SAXException, uno::RuntimeException) override;
commit 3a349b7ccf9b31ec699bf1a4bfc7d0339c1ee916
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Dec 13 16:04:08 2016 +0200
loplugin:refcounting
Change-Id: I5ca4c1599a1abc4281bac9a4d0164d4b0cb3e24a
diff --git a/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx
index 07d12c5..17dcb24 100644
--- a/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx
@@ -26,7 +26,7 @@ namespace http_dav_ucp
SerfGetReqProcImpl::SerfGetReqProcImpl( const char* inPath,
const DAVRequestHeaders& inRequestHeaders,
- const css::uno::Reference< SerfInputStream > & xioInStrm )
+ const rtl::Reference< SerfInputStream > & xioInStrm )
: SerfRequestProcessorImpl( inPath, inRequestHeaders )
, xInputStream( xioInStrm )
, xOutputStream()
@@ -37,7 +37,7 @@ SerfGetReqProcImpl::SerfGetReqProcImpl( const char* inPath,
SerfGetReqProcImpl::SerfGetReqProcImpl( const char* inPath,
const DAVRequestHeaders& inRequestHeaders,
- const css::uno::Reference< SerfInputStream > & xioInStrm,
+ const rtl::Reference< SerfInputStream > & xioInStrm,
const std::vector< OUString > & inHeaderNames,
DAVResource & ioResource )
: SerfRequestProcessorImpl( inPath, inRequestHeaders )
diff --git a/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx
index f463f42..d043f30 100644
--- a/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx
@@ -37,11 +37,11 @@ class SerfGetReqProcImpl : public SerfRequestProcessorImpl
public:
SerfGetReqProcImpl( const char* inPath,
const DAVRequestHeaders& inRequestHeaders,
- const css::uno::Reference< SerfInputStream > & xioInStrm );
+ const rtl::Reference< SerfInputStream > & xioInStrm );
SerfGetReqProcImpl( const char* inPath,
const DAVRequestHeaders& inRequestHeaders,
- const css::uno::Reference< SerfInputStream > & xioInStrm,
+ const rtl::Reference< SerfInputStream > & xioInStrm,
const std::vector< OUString > & inHeaderNames,
DAVResource & ioResource );
@@ -71,7 +71,7 @@ protected:
void handleEndOfResponseData( serf_bucket_t * inSerfResponseBucket ) override;
private:
- css::uno::Reference< SerfInputStream > xInputStream;
+ rtl::Reference< SerfInputStream > xInputStream;
css::uno::Reference< css::io::XOutputStream > xOutputStream;
const std::vector< OUString > * mpHeaderNames;
DAVResource* mpResource;
diff --git a/ucb/source/ucp/webdav/SerfLockReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfLockReqProcImpl.hxx
index 1c8b5ff..29d1361 100644
--- a/ucb/source/ucp/webdav/SerfLockReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfLockReqProcImpl.hxx
@@ -57,7 +57,7 @@ private:
// if m_plastChanceToSendRefreshRequest is not 0 we are sending just refresh request
sal_Int32* m_plastChanceToSendRefreshRequest;
TimeValue m_aStartCall;
- css::uno::Reference< SerfInputStream > m_xInputStream;
+ rtl::Reference< SerfInputStream > m_xInputStream;
};
} // namespace http_dav_ucp
diff --git a/ucb/source/ucp/webdav/SerfPostReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfPostReqProcImpl.cxx
index 3d19f93..bbef197 100644
--- a/ucb/source/ucp/webdav/SerfPostReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfPostReqProcImpl.cxx
@@ -32,7 +32,7 @@ SerfPostReqProcImpl::SerfPostReqProcImpl( const char* inPath,
apr_size_t inDataLen,
const char* inContentType,
const char* inReferer,
- const css::uno::Reference< SerfInputStream > & xioInStrm )
+ const rtl::Reference< SerfInputStream > & xioInStrm )
: SerfRequestProcessorImpl( inPath, inRequestHeaders )
, mpPostData( inData )
, mnPostDataLen( inDataLen )
diff --git a/ucb/source/ucp/webdav/SerfPostReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfPostReqProcImpl.hxx
index 4696f7f..d6cc1ca 100644
--- a/ucb/source/ucp/webdav/SerfPostReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfPostReqProcImpl.hxx
@@ -37,7 +37,7 @@ public:
apr_size_t inDataLen,
const char* inContentType,
const char* inReferer,
- const css::uno::Reference< SerfInputStream > & xioInStrm );
+ const rtl::Reference< SerfInputStream > & xioInStrm );
SerfPostReqProcImpl( const char* inPath,
const DAVRequestHeaders& inRequestHeaders,
@@ -64,7 +64,7 @@ private:
apr_size_t mnPostDataLen;
const char* mpContentType;
const char* mpReferer;
- css::uno::Reference< SerfInputStream > xInputStream;
+ rtl::Reference< SerfInputStream > xInputStream;
css::uno::Reference< css::io::XOutputStream > xOutputStream;
};
diff --git a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.hxx
index 4c3db5d..53a102f 100644
--- a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.hxx
@@ -67,7 +67,7 @@ private:
std::vector< DAVResourceInfo > * mpResInfo;
const bool mbOnlyPropertyNames;
- css::uno::Reference< SerfInputStream > xInputStream;
+ rtl::Reference< SerfInputStream > xInputStream;
};
} // namespace http_dav_ucp
diff --git a/ucb/source/ucp/webdav/SerfRequestProcessor.cxx b/ucb/source/ucp/webdav/SerfRequestProcessor.cxx
index 12ee076..21cc15e 100644
--- a/ucb/source/ucp/webdav/SerfRequestProcessor.cxx
+++ b/ucb/source/ucp/webdav/SerfRequestProcessor.cxx
@@ -129,7 +129,7 @@ bool SerfRequestProcessor::processPropPatch( const std::vector< ProppatchValue >
}
// GET
-bool SerfRequestProcessor::processGet( const css::uno::Reference< SerfInputStream >& xioInStrm,
+bool SerfRequestProcessor::processGet( const rtl::Reference< SerfInputStream >& xioInStrm,
apr_status_t& outSerfStatus )
{
mpProcImpl = new SerfGetReqProcImpl( mPathStr,
@@ -141,7 +141,7 @@ bool SerfRequestProcessor::processGet( const css::uno::Reference< SerfInputStrea
}
// GET inclusive header fields
-bool SerfRequestProcessor::processGet( const css::uno::Reference< SerfInputStream >& xioInStrm,
+bool SerfRequestProcessor::processGet( const rtl::Reference< SerfInputStream >& xioInStrm,
const std::vector< OUString > & inHeaderNames,
DAVResource & ioResource,
apr_status_t& outSerfStatus )
@@ -223,7 +223,7 @@ bool SerfRequestProcessor::processPost( const char* inData,
apr_size_t inDataLen,
const OUString & inContentType,
const OUString & inReferer,
- const css::uno::Reference< SerfInputStream >& xioInStrm,
+ const rtl::Reference< SerfInputStream >& xioInStrm,
apr_status_t& outSerfStatus )
{
mContentType = apr_pstrdup( SerfSession::getAprPool(),
diff --git a/ucb/source/ucp/webdav/SerfRequestProcessor.hxx b/ucb/source/ucp/webdav/SerfRequestProcessor.hxx
index 01ba790..dea753f 100644
--- a/ucb/source/ucp/webdav/SerfRequestProcessor.hxx
+++ b/ucb/source/ucp/webdav/SerfRequestProcessor.hxx
@@ -34,6 +34,8 @@
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/ucb/Lock.hpp>
+#include <rtl/ref.hxx>
+
namespace http_dav_ucp
{
@@ -64,11 +66,11 @@ public:
apr_status_t& outSerfStatus );
// GET
- bool processGet( const css::uno::Reference< SerfInputStream >& xioInStrm,
+ bool processGet( const rtl::Reference< SerfInputStream >& xioInStrm,
apr_status_t& outSerfStatus );
// GET inclusive header fields
- bool processGet( const css::uno::Reference< SerfInputStream >& xioInStrm,
+ bool processGet( const rtl::Reference< SerfInputStream >& xioInStrm,
const std::vector< OUString > & inHeaderNames,
DAVResource & ioResource,
apr_status_t& outSerfStatus );
@@ -98,7 +100,7 @@ public:
apr_size_t inDataLen,
const OUString & inContentType,
const OUString & inReferer,
- const css::uno::Reference< SerfInputStream >& xioInStrm,
+ const rtl::Reference< SerfInputStream >& xioInStrm,
apr_status_t& outSerfStatus );
// POST
diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx
index 6b93ae5..37e6e45 100644
--- a/ucb/source/ucp/webdav/SerfSession.cxx
+++ b/ucb/source/ucp/webdav/SerfSession.cxx
@@ -709,7 +709,7 @@ SerfSession::GET( const OUString & inPath,
Init( rEnv );
- uno::Reference< SerfInputStream > xInputStream( new SerfInputStream );
+ rtl::Reference< SerfInputStream > xInputStream( new SerfInputStream );
apr_status_t status = APR_SUCCESS;
std::shared_ptr<SerfRequestProcessor> aReqProc( createReqProc( inPath ) );
aReqProc->processGet( xInputStream,
@@ -755,7 +755,7 @@ SerfSession::GET( const OUString & inPath,
Init( rEnv );
std::shared_ptr<SerfRequestProcessor> aReqProc( createReqProc( inPath ) );
- uno::Reference< SerfInputStream > xInputStream( new SerfInputStream );
+ rtl::Reference< SerfInputStream > xInputStream( new SerfInputStream );
ioResource.uri = inPath;
ioResource.properties.clear();
apr_status_t status = APR_SUCCESS;
@@ -841,7 +841,7 @@ SerfSession::POST( const OUString & inPath,
Init( rEnv );
std::shared_ptr<SerfRequestProcessor> aReqProc( createReqProc( inPath ) );
- uno::Reference< SerfInputStream > xInputStream( new SerfInputStream );
+ rtl::Reference< SerfInputStream > xInputStream( new SerfInputStream );
apr_status_t status = APR_SUCCESS;
aReqProc->processPost( reinterpret_cast< const char * >( aDataToSend.getConstArray() ),
aDataToSend.getLength(),
More information about the Libreoffice-commits
mailing list