Kaydet (Commit) 26b4c8e5 authored tarafından Matúš Kukan's avatar Matúš Kukan

webdav: loplugin warnings and sal_Bool -> bool

Change-Id: I0f1797aa03868e7652a0f90a5cf72ba851537b41
üst 910c2888
...@@ -113,27 +113,27 @@ ContentProperties::ContentProperties( const DAVResource& rResource ) ...@@ -113,27 +113,27 @@ ContentProperties::ContentProperties( const DAVResource& rResource )
} }
if ( rResource.uri.endsWith("/") ) if ( rResource.uri.endsWith("/") )
m_bTrailingSlash = sal_True; m_bTrailingSlash = true;
} }
ContentProperties::ContentProperties( ContentProperties::ContentProperties(
const OUString & rTitle, sal_Bool bFolder ) const OUString & rTitle, bool bFolder )
: m_xProps( new PropertyValueMap ), : m_xProps( new PropertyValueMap ),
m_bTrailingSlash( sal_False ) m_bTrailingSlash( false )
{ {
(*m_xProps)[ OUString( "Title" ) ] (*m_xProps)[ OUString( "Title" ) ]
= PropertyValue( uno::makeAny( rTitle ), true ); = PropertyValue( uno::makeAny( rTitle ), true );
(*m_xProps)[ OUString( "IsFolder" ) ] (*m_xProps)[ OUString( "IsFolder" ) ]
= PropertyValue( uno::makeAny( bFolder ), true ); = PropertyValue( uno::makeAny( bFolder ), true );
(*m_xProps)[ OUString( "IsDocument" ) ] (*m_xProps)[ OUString( "IsDocument" ) ]
= PropertyValue( uno::makeAny( sal_Bool( !bFolder ) ), true ); = PropertyValue( uno::makeAny( bool( !bFolder ) ), true );
} }
ContentProperties::ContentProperties( const OUString & rTitle ) ContentProperties::ContentProperties( const OUString & rTitle )
: m_xProps( new PropertyValueMap ), : m_xProps( new PropertyValueMap ),
m_bTrailingSlash( sal_False ) m_bTrailingSlash( false )
{ {
(*m_xProps)[ OUString( "Title" ) ] (*m_xProps)[ OUString( "Title" ) ]
= PropertyValue( uno::makeAny( rTitle ), true ); = PropertyValue( uno::makeAny( rTitle ), true );
...@@ -142,7 +142,7 @@ ContentProperties::ContentProperties( const OUString & rTitle ) ...@@ -142,7 +142,7 @@ ContentProperties::ContentProperties( const OUString & rTitle )
ContentProperties::ContentProperties() ContentProperties::ContentProperties()
: m_xProps( new PropertyValueMap ), : m_xProps( new PropertyValueMap ),
m_bTrailingSlash( sal_False ) m_bTrailingSlash( false )
{ {
} }
...@@ -219,11 +219,11 @@ void ContentProperties::UCBNamesToDAVNames( ...@@ -219,11 +219,11 @@ void ContentProperties::UCBNamesToDAVNames(
// resourcetype <- IsFolder, IsDocument, ContentType // resourcetype <- IsFolder, IsDocument, ContentType
// (taken from URI) <- Title // (taken from URI) <- Title
sal_Bool bCreationDate = sal_False; bool bCreationDate = false;
sal_Bool bLastModified = sal_False; bool bLastModified = false;
sal_Bool bContentType = sal_False; bool bContentType = false;
sal_Bool bContentLength = sal_False; bool bContentLength = false;
sal_Bool bResourceType = sal_False; bool bResourceType = false;
sal_Int32 nCount = rProps.getLength(); sal_Int32 nCount = rProps.getLength();
for ( sal_Int32 n = 0; n < nCount; ++n ) for ( sal_Int32 n = 0; n < nCount; ++n )
...@@ -241,7 +241,7 @@ void ContentProperties::UCBNamesToDAVNames( ...@@ -241,7 +241,7 @@ void ContentProperties::UCBNamesToDAVNames(
if ( !bCreationDate ) if ( !bCreationDate )
{ {
propertyNames.push_back( DAVProperties::CREATIONDATE ); propertyNames.push_back( DAVProperties::CREATIONDATE );
bCreationDate = sal_True; bCreationDate = true;
} }
} }
else if ( rProp.Name == "DateModified" || else if ( rProp.Name == "DateModified" ||
...@@ -251,7 +251,7 @@ void ContentProperties::UCBNamesToDAVNames( ...@@ -251,7 +251,7 @@ void ContentProperties::UCBNamesToDAVNames(
{ {
propertyNames.push_back( propertyNames.push_back(
DAVProperties::GETLASTMODIFIED ); DAVProperties::GETLASTMODIFIED );
bLastModified = sal_True; bLastModified = true;
} }
} }
else if ( rProp.Name == "MediaType" || else if ( rProp.Name == "MediaType" ||
...@@ -261,7 +261,7 @@ void ContentProperties::UCBNamesToDAVNames( ...@@ -261,7 +261,7 @@ void ContentProperties::UCBNamesToDAVNames(
{ {
propertyNames.push_back( propertyNames.push_back(
DAVProperties::GETCONTENTTYPE ); DAVProperties::GETCONTENTTYPE );
bContentType = sal_True; bContentType = true;
} }
} }
else if ( rProp.Name == "Size" || else if ( rProp.Name == "Size" ||
...@@ -271,7 +271,7 @@ void ContentProperties::UCBNamesToDAVNames( ...@@ -271,7 +271,7 @@ void ContentProperties::UCBNamesToDAVNames(
{ {
propertyNames.push_back( propertyNames.push_back(
DAVProperties::GETCONTENTLENGTH ); DAVProperties::GETCONTENTLENGTH );
bContentLength = sal_True; bContentLength = true;
} }
} }
else if ( rProp.Name == "ContentType" || else if ( rProp.Name == "ContentType" ||
...@@ -282,7 +282,7 @@ void ContentProperties::UCBNamesToDAVNames( ...@@ -282,7 +282,7 @@ void ContentProperties::UCBNamesToDAVNames(
if ( !bResourceType ) if ( !bResourceType )
{ {
propertyNames.push_back( DAVProperties::RESOURCETYPE ); propertyNames.push_back( DAVProperties::RESOURCETYPE );
bResourceType = sal_True; bResourceType = true;
} }
} }
else else
...@@ -514,13 +514,13 @@ void ContentProperties::addProperty( const OUString & rName, ...@@ -514,13 +514,13 @@ void ContentProperties::addProperty( const OUString & rName,
rValue >>= aValue; rValue >>= aValue;
// Map DAV:resourceype to UCP:IsFolder, UCP:IsDocument, UCP:ContentType // Map DAV:resourceype to UCP:IsFolder, UCP:IsDocument, UCP:ContentType
sal_Bool bFolder = bool bFolder =
aValue.equalsIgnoreAsciiCase( "collection" ); aValue.equalsIgnoreAsciiCase( "collection" );
(*m_xProps)[ OUString( "IsFolder" ) ] (*m_xProps)[ OUString( "IsFolder" ) ]
= PropertyValue( uno::makeAny( bFolder ), true ); = PropertyValue( uno::makeAny( bFolder ), true );
(*m_xProps)[ OUString( "IsDocument" ) ] (*m_xProps)[ OUString( "IsDocument" ) ]
= PropertyValue( uno::makeAny( sal_Bool( !bFolder ) ), true ); = PropertyValue( uno::makeAny( bool( !bFolder ) ), true );
(*m_xProps)[ OUString( "ContentType" ) ] (*m_xProps)[ OUString( "ContentType" ) ]
= PropertyValue( uno::makeAny( bFolder = PropertyValue( uno::makeAny( bFolder
? OUString( WEBDAV_COLLECTION_TYPE ) ? OUString( WEBDAV_COLLECTION_TYPE )
......
...@@ -102,7 +102,7 @@ public: ...@@ -102,7 +102,7 @@ public:
ContentProperties( const DAVResource& rResource ); ContentProperties( const DAVResource& rResource );
// Mini props for transient contents. // Mini props for transient contents.
ContentProperties( const OUString & rTitle, sal_Bool bFolder ); ContentProperties( const OUString & rTitle, bool bFolder );
// Micro props for non-existing contents. // Micro props for non-existing contents.
ContentProperties( const OUString & rTitle ); ContentProperties( const OUString & rTitle );
......
...@@ -119,7 +119,7 @@ bool SerfRequestProcessorImpl::processSerfResponseBucket( serf_request_t * /*inS ...@@ -119,7 +119,7 @@ bool SerfRequestProcessorImpl::processSerfResponseBucket( serf_request_t * /*inS
const char* data; const char* data;
apr_size_t len; apr_size_t len;
while (1) { while (true) {
outStatus = serf_bucket_read(inSerfResponseBucket, 8096, &data, &len); outStatus = serf_bucket_read(inSerfResponseBucket, 8096, &data, &len);
if (SERF_BUCKET_READ_ERROR(outStatus)) if (SERF_BUCKET_READ_ERROR(outStatus))
{ {
......
...@@ -1559,7 +1559,7 @@ SerfSession::getDataFromInputStream( ...@@ -1559,7 +1559,7 @@ SerfSession::getDataFromInputStream(
sal_Bool sal_Bool
SerfSession::isDomainMatch( OUString certHostName ) SerfSession::isDomainMatch( const OUString & certHostName )
{ {
OUString hostName = getHostName(); OUString hostName = getHostName();
......
...@@ -250,7 +250,7 @@ public: ...@@ -250,7 +250,7 @@ public:
const OUString & getHostName() const { return m_aUri.GetHost(); } const OUString & getHostName() const { return m_aUri.GetHost(); }
int getPort() const { return m_aUri.GetPort(); } int getPort() const { return m_aUri.GetPort(); }
sal_Bool isDomainMatch( OUString certHostName ); sal_Bool isDomainMatch( const OUString & certHostName );
private: private:
friend class SerfLockStore; friend class SerfLockStore;
......
...@@ -95,7 +95,7 @@ private: ...@@ -95,7 +95,7 @@ private:
com::sun::star::ucb::XCommandEnvironment > & xEnv ); com::sun::star::ucb::XCommandEnvironment > & xEnv );
virtual OUString getParentURL(); virtual OUString getParentURL();
sal_Bool isFolder( const ::com::sun::star::uno::Reference< bool isFolder( const ::com::sun::star::uno::Reference<
::com::sun::star::ucb::XCommandEnvironment >& xEnv ) ::com::sun::star::ucb::XCommandEnvironment >& xEnv )
throw ( ::com::sun::star::uno::Exception ); throw ( ::com::sun::star::uno::Exception );
...@@ -117,7 +117,7 @@ private: ...@@ -117,7 +117,7 @@ private:
typedef std::list< ContentRef > ContentRefList; typedef std::list< ContentRef > ContentRefList;
void queryChildren( ContentRefList& rChildren); void queryChildren( ContentRefList& rChildren);
sal_Bool bool
exchangeIdentity( const ::com::sun::star::uno::Reference< exchangeIdentity( const ::com::sun::star::uno::Reference<
::com::sun::star::ucb::XContentIdentifier >& xNewId ); ::com::sun::star::ucb::XContentIdentifier >& xNewId );
...@@ -151,7 +151,7 @@ private: ...@@ -151,7 +151,7 @@ private:
// Command "insert" // Command "insert"
void insert( const ::com::sun::star::uno::Reference< void insert( const ::com::sun::star::uno::Reference<
::com::sun::star::io::XInputStream > & xInputStream, ::com::sun::star::io::XInputStream > & xInputStream,
sal_Bool bReplaceExisting, bool bReplaceExisting,
const com::sun::star::uno::Reference< const com::sun::star::uno::Reference<
com::sun::star::ucb::XCommandEnvironment >& Environment ) com::sun::star::ucb::XCommandEnvironment >& Environment )
throw( ::com::sun::star::uno::Exception ); throw( ::com::sun::star::uno::Exception );
...@@ -163,7 +163,7 @@ private: ...@@ -163,7 +163,7 @@ private:
throw( ::com::sun::star::uno::Exception ); throw( ::com::sun::star::uno::Exception );
// Command "delete" // Command "delete"
void destroy( sal_Bool bDeletePhysical ) void destroy( bool bDeletePhysical )
throw( ::com::sun::star::uno::Exception ); throw( ::com::sun::star::uno::Exception );
// Command "lock" // Command "lock"
...@@ -177,12 +177,12 @@ private: ...@@ -177,12 +177,12 @@ private:
throw( ::com::sun::star::uno::Exception ); throw( ::com::sun::star::uno::Exception );
::com::sun::star::uno::Any MapDAVException( const DAVException & e, ::com::sun::star::uno::Any MapDAVException( const DAVException & e,
sal_Bool bWrite ); bool bWrite );
void cancelCommandExecution( void cancelCommandExecution(
const DAVException & e, const DAVException & e,
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
com::sun::star::ucb::XCommandEnvironment > & xEnv, com::sun::star::ucb::XCommandEnvironment > & xEnv,
sal_Bool bWrite = sal_False ) bool bWrite = false )
throw( ::com::sun::star::uno::Exception ); throw( ::com::sun::star::uno::Exception );
static bool shouldAccessNetworkAfterException( const DAVException & e ); static bool shouldAccessNetworkAfterException( const DAVException & e );
...@@ -220,7 +220,7 @@ public: ...@@ -220,7 +220,7 @@ public:
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::ucb::XContentIdentifier >& Identifier, ::com::sun::star::ucb::XContentIdentifier >& Identifier,
rtl::Reference< DAVSessionFactory > const & rSessionFactory, rtl::Reference< DAVSessionFactory > const & rSessionFactory,
sal_Bool isCollection ) bool isCollection )
throw ( ::com::sun::star::ucb::ContentCreationException ); throw ( ::com::sun::star::ucb::ContentCreationException );
virtual ~Content(); virtual ~Content();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment