Kaydet (Commit) 30e99b79 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:indentation in ucb..ucbhelper

Change-Id: Ifa4b34065dacf9e144f076631c57f1d01aedaeeb
Reviewed-on: https://gerrit.libreoffice.org/67608
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 9e03f682
......@@ -1492,7 +1492,7 @@ sal_Bool SAL_CALL CachedContentResultSet
return true;
sal_Int32 nNewRow = m_nRow + rows;
if( nNewRow < 0 )
if( nNewRow < 0 )
nNewRow = 0;
if( impl_isKnownValidPosition( nNewRow ) )
......
......@@ -240,7 +240,7 @@ void DynamicResultSetWrapper::impl_notify( const ListEvent& Changes )
aWelcome.Old = m_xMyResultOne;
aWelcome.New = m_xMyResultTwo;
rAction.ActionInfo <<= aWelcome;
rAction.ActionInfo <<= aWelcome;
}
else
{
......
......@@ -303,7 +303,7 @@ void SAL_CALL UniversalContentBroker::dispose()
m_pDisposeEventListeners->disposeAndClear( aEvt );
}
if ( m_xNotifier.is() )
if ( m_xNotifier.is() )
m_xNotifier->removeChangesListener( this );
}
......
......@@ -337,12 +337,12 @@ OUString createDesiredName(
}
// query, fragment present?
sal_Int32 nPos = aName.indexOf( '?' );
if ( nPos == -1 )
nPos = aName.indexOf( '#' );
sal_Int32 nPos = aName.indexOf( '?' );
if ( nPos == -1 )
nPos = aName.indexOf( '#' );
if ( nPos != -1 )
aName = aName.copy( 0, nPos );
if ( nPos != -1 )
aName = aName.copy( 0, nPos );
}
return aName;
}
......
......@@ -952,8 +952,8 @@ sal_IntPtr SortedResultSet::CompareImpl( const Reference < XResultSet >& xResult
nTmp = static_cast<sal_Int32>(aTwo.Year) - static_cast<sal_Int32>(aOne.Year);
if ( !nTmp ) {
nTmp = static_cast<sal_Int32>(aTwo.Month) - static_cast<sal_Int32>(aOne.Month);
if ( !nTmp )
nTmp = static_cast<sal_Int32>(aTwo.Day) - static_cast<sal_Int32>(aOne.Day);
if ( !nTmp )
nTmp = static_cast<sal_Int32>(aTwo.Day) - static_cast<sal_Int32>(aOne.Day);
}
if ( nTmp < 0 )
......@@ -976,14 +976,13 @@ sal_IntPtr SortedResultSet::CompareImpl( const Reference < XResultSet >& xResult
aTwo = xRowTwo->getTime( nColumn );
nTmp = static_cast<sal_Int32>(aTwo.Hours) - static_cast<sal_Int32>(aOne.Hours);
if ( !nTmp ) {
if ( !nTmp )
nTmp = static_cast<sal_Int32>(aTwo.Minutes) - static_cast<sal_Int32>(aOne.Minutes);
if ( !nTmp ) {
if ( !nTmp )
nTmp = static_cast<sal_Int32>(aTwo.Seconds) - static_cast<sal_Int32>(aOne.Seconds);
if ( !nTmp )
nTmp = static_cast<sal_Int32>(aTwo.NanoSeconds)
- static_cast<sal_Int32>(aOne.NanoSeconds);
}}
if ( nTmp < 0 )
nCompare = -1;
......@@ -1005,20 +1004,19 @@ sal_IntPtr SortedResultSet::CompareImpl( const Reference < XResultSet >& xResult
aTwo = xRowTwo->getTimestamp( nColumn );
nTmp = static_cast<sal_Int32>(aTwo.Year) - static_cast<sal_Int32>(aOne.Year);
if ( !nTmp ) {
if ( !nTmp )
nTmp = static_cast<sal_Int32>(aTwo.Month) - static_cast<sal_Int32>(aOne.Month);
if ( !nTmp ) {
if ( !nTmp )
nTmp = static_cast<sal_Int32>(aTwo.Day) - static_cast<sal_Int32>(aOne.Day);
if ( !nTmp ) {
if ( !nTmp )
nTmp = static_cast<sal_Int32>(aTwo.Hours) - static_cast<sal_Int32>(aOne.Hours);
if ( !nTmp ) {
if ( !nTmp )
nTmp = static_cast<sal_Int32>(aTwo.Minutes) - static_cast<sal_Int32>(aOne.Minutes);
if ( !nTmp ) {
if ( !nTmp )
nTmp = static_cast<sal_Int32>(aTwo.Seconds) - static_cast<sal_Int32>(aOne.Seconds);
if ( !nTmp )
nTmp = static_cast<sal_Int32>(aTwo.NanoSeconds)
- static_cast<sal_Int32>(aOne.NanoSeconds);
}}}}}
if ( nTmp < 0 )
nCompare = -1;
......
......@@ -234,7 +234,7 @@ namespace ucb { namespace ucp { namespace ext
else if ( aCommand.Name == "open" )
{
OpenCommandArgument2 aOpenCommand;
if ( !( aCommand.Argument >>= aOpenCommand ) )
if ( !( aCommand.Argument >>= aOpenCommand ) )
{
::ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException(
OUString(), *this, -1 ) ),
......
......@@ -749,7 +749,7 @@ namespace fileaccess {
{
ioErrorCode = IOErrorCode_GENERAL;
aMsg = "a general error during transfer command";
break;
break;
}
default:
ioErrorCode = IOErrorCode_GENERAL;
......
......@@ -649,7 +649,7 @@ sal_Int32 InsertData::read(sal_Int8 *dest,sal_Int32 nBytesRequested)
sal_Int32 m = 0;
if(m_xInputStream.is()) {
Sequence<sal_Int8> seq(nBytesRequested);
Sequence<sal_Int8> seq(nBytesRequested);
m = m_xInputStream->readBytes(seq,nBytesRequested);
memcpy(dest,seq.getConstArray(),m);
}
......
......@@ -161,56 +161,56 @@ uno::Any convertToException(GError *pError, const uno::Reference< uno::XInterfac
{
case G_IO_ERROR_FAILED:
{ io::IOException aExcept(sMessage, rContext);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_NOT_MOUNTED:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING_PATH, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_NOT_FOUND:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_EXISTING, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_EXISTS:
{ ucb::NameClashException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, sName);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_INVALID_ARGUMENT:
{ lang::IllegalArgumentException aExcept(sMessage, rContext, -1 );
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_PERMISSION_DENIED:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_ACCESS_DENIED, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_IS_DIRECTORY:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_NO_FILE, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_NOT_REGULAR_FILE:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_NO_FILE, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_NOT_DIRECTORY:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_NO_DIRECTORY, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_FILENAME_TOO_LONG:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_NAME_TOO_LONG, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_PENDING:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_PENDING, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_CLOSED:
case G_IO_ERROR_CANCELLED:
......@@ -218,45 +218,45 @@ uno::Any convertToException(GError *pError, const uno::Reference< uno::XInterfac
case G_IO_ERROR_WRONG_ETAG:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_GENERAL, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_NOT_SUPPORTED:
case G_IO_ERROR_CANT_CREATE_BACKUP:
case G_IO_ERROR_WOULD_MERGE:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_NOT_SUPPORTED, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_NO_SPACE:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_OUT_OF_DISK_SPACE, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_INVALID_FILENAME:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_INVALID_CHARACTER, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_READ_ONLY:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_WRITE_PROTECTED, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_TIMED_OUT:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_DEVICE_NOT_READY, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_WOULD_RECURSE:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_RECURSIVE, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_BUSY:
case G_IO_ERROR_WOULD_BLOCK:
{ ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
task::InteractionClassification_ERROR, ucb::IOErrorCode_LOCKING_VIOLATION, aArgs);
EXCEPT(aExcept); }
EXCEPT(aExcept); }
break;
case G_IO_ERROR_HOST_NOT_FOUND:
{ ucb::InteractiveNetworkResolveNameException aExcept(sMessage, rContext,
......
......@@ -236,7 +236,7 @@ void ContentProperties::UCBNamesToDAVNames(
{
if ( !bCreationDate )
{
propertyNames.push_back( DAVProperties::CREATIONDATE );
propertyNames.push_back( DAVProperties::CREATIONDATE );
bCreationDate = true;
}
}
......@@ -244,8 +244,7 @@ void ContentProperties::UCBNamesToDAVNames(
{
if ( !bLastModified )
{
propertyNames.push_back(
DAVProperties::GETLASTMODIFIED );
propertyNames.push_back( DAVProperties::GETLASTMODIFIED );
bLastModified = true;
}
}
......@@ -253,8 +252,7 @@ void ContentProperties::UCBNamesToDAVNames(
{
if ( !bContentType )
{
propertyNames.push_back(
DAVProperties::GETCONTENTTYPE );
propertyNames.push_back( DAVProperties::GETCONTENTTYPE );
bContentType = true;
}
}
......@@ -262,8 +260,7 @@ void ContentProperties::UCBNamesToDAVNames(
{
if ( !bContentLength )
{
propertyNames.push_back(
DAVProperties::GETCONTENTLENGTH );
propertyNames.push_back( DAVProperties::GETCONTENTLENGTH );
bContentLength = true;
}
}
......@@ -271,7 +268,7 @@ void ContentProperties::UCBNamesToDAVNames(
{
if ( !bResourceType )
{
propertyNames.push_back( DAVProperties::RESOURCETYPE );
propertyNames.push_back( DAVProperties::RESOURCETYPE );
bResourceType = true;
}
}
......
......@@ -1025,10 +1025,10 @@ void NeonSession::PROPFIND( const OUString & inPath,
#if defined SAL_LOG_INFO
{ //debug
SAL_INFO( "ucb.ucp.webdav", "PROPFIND - relative URL: <" << inPath << "> Depth: " << inDepth );
for(const auto& rPropName : inPropNames)
{
for(const auto& rPropName : inPropNames)
{
SAL_INFO( "ucb.ucp.webdav", "PROPFIND - property requested: " << rPropName );
}
}
} //debug
#endif
......@@ -1726,22 +1726,22 @@ bool NeonSession::UNLOCK( NeonLock * pLock )
if ( ne_unlock( m_pHttpSession, pLock ) == NE_OK )
{
#if defined SAL_LOG_INFO
{
char * p = ne_uri_unparse( &(pLock->uri) );
SAL_INFO( "ucb.ucp.webdav", "UNLOCK (from store) - relative URL: <" << p << "> token: <" << pLock->token << "> succeeded." );
ne_free( p );
}
{
char * p = ne_uri_unparse( &(pLock->uri) );
SAL_INFO( "ucb.ucp.webdav", "UNLOCK (from store) - relative URL: <" << p << "> token: <" << pLock->token << "> succeeded." );
ne_free( p );
}
#endif
return true;
}
else
{
#if defined SAL_LOG_INFO
{
char * p = ne_uri_unparse( &(pLock->uri) );
SAL_INFO( "ucb.ucp.webdav", "UNLOCK (from store) - relative URL: <" << p << "> token: <" << pLock->token << "> failed!" );
ne_free( p );
}
{
char * p = ne_uri_unparse( &(pLock->uri) );
SAL_INFO( "ucb.ucp.webdav", "UNLOCK (from store) - relative URL: <" << p << "> token: <" << pLock->token << "> failed!" );
ne_free( p );
}
#endif
return false;
}
......
......@@ -494,7 +494,7 @@ bool UCBDeadPropertyValue::toXML( const uno::Any & rInData,
// Encode value! It must not contain XML reserved chars!
aStringValue = encodeValue( aStringValue );
rOutData = aXMLPre;
rOutData = aXMLPre;
rOutData += aStringType;
rOutData += aXMLMid;
rOutData += aStringValue;
......
......@@ -474,7 +474,7 @@ bool DataSupplier::getData()
}
}
m_pImpl->m_bCountFinal = true;
m_pImpl->m_bCountFinal = true;
// Callback possible, because listeners may be informed!
aGuard.clear();
......
......@@ -1008,7 +1008,7 @@ bool Content::isFolder()
>>= bFolder )
return bFolder;
ucbhelper::cancelCommandExecution(
ucbhelper::cancelCommandExecution(
makeAny( UnknownPropertyException(
"Unable to retrieve value of property 'IsFolder'!",
get() ) ),
......@@ -1031,7 +1031,7 @@ bool Content::isDocument()
>>= bDoc )
return bDoc;
ucbhelper::cancelCommandExecution(
ucbhelper::cancelCommandExecution(
makeAny( UnknownPropertyException(
"Unable to retrieve value of property 'IsDocument'!",
get() ) ),
......
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