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