summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-02-08 09:27:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-02-08 10:01:05 +0100
commit587ac01f97d3fd63638bbb1e4b165b49140bfc90 (patch)
tree020c6d10d04ca8cc3466315e23ad6100a689dca6 /basic
parentbd824be5371d5e4d6e49b72ccf01897ba301c55e (diff)
loplugin:indentation in basctl..bridges
Change-Id: Ie4e27466c4258c6f774a3ebb82ec3a88c28fd753 Reviewed-on: https://gerrit.libreoffice.org/67525 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/basmgr.cxx2
-rw-r--r--basic/source/classes/image.cxx2
-rw-r--r--basic/source/classes/sbunoobj.cxx2
-rw-r--r--basic/source/classes/sbxmod.cxx6
-rw-r--r--basic/source/comp/buffer.cxx2
-rw-r--r--basic/source/comp/dim.cxx2
-rw-r--r--basic/source/comp/parser.cxx2
-rw-r--r--basic/source/sbx/sbxint.cxx11
-rw-r--r--basic/source/sbx/sbxvalue.cxx100
-rw-r--r--basic/source/uno/namecont.cxx2
-rw-r--r--basic/source/uno/scriptcont.cxx2
11 files changed, 65 insertions, 68 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 92d94a423334..e39655abaf9d 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1443,7 +1443,7 @@ bool BasicManager::LegacyPsswdBinaryLimitExceeded( std::vector< OUString >& _out
if ( nBigModules )
{
- _out_rModuleNames.swap(aBigModules);
+ _out_rModuleNames.swap(aBigModules);
return true;
}
}
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 932a541bb57a..f2e255b78a2d 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -515,7 +515,7 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
}
}
- SbiCloseRecord( r, nPos );
+ SbiCloseRecord( r, nPos );
}
}
// Set overall length
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 2daadfad2c04..045204c543c6 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -4810,7 +4810,7 @@ void SbUnoStructRefObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
SbUnoProperty* pProp = dynamic_cast<SbUnoProperty*>( pVar );
if( pProp )
{
- StructFieldInfo::iterator it = maFields.find( pProp->GetName() );
+ StructFieldInfo::iterator it = maFields.find( pProp->GetName() );
// handle get/set of members of struct
if( pHint->GetId() == SfxHintId::BasicDataWanted )
{
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 253eac73f0d3..30f234655abb 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -160,7 +160,7 @@ DocObjectWrapper::DocObjectWrapper( SbModule* pVar ) : m_pMod( pVar )
m_xAggProxy->setDelegator( static_cast< cppu::OWeakObject * >( this ) );
}
- osl_atomic_decrement( &m_refCount );
+ osl_atomic_decrement( &m_refCount );
}
}
}
@@ -1202,7 +1202,7 @@ void SbModule::Run( SbMethod* pMeth )
}
if ( pBasic && pBasic->IsDocBasic() && pBasic->IsQuitApplication() && !GetSbData()->pInst )
bQuit = true;
- if ( bQuit )
+ if ( bQuit )
{
Application::PostUserEvent( LINK( &AsyncQuitHandler::instance(), AsyncQuitHandler, OnAsyncQuit ) );
}
@@ -1932,7 +1932,7 @@ SbMethod::SbMethod( const SbMethod& r )
nDebugFlags = r.nDebugFlags;
nLine1 = r.nLine1;
nLine2 = r.nLine2;
- refStatics = r.refStatics;
+ refStatics = r.refStatics;
mCaller = r.mCaller;
SetFlag( SbxFlagBits::NoModify );
}
diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index 7b8feaa36165..4e28d3c8a00b 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -132,7 +132,7 @@ void SbiBuffer::Chain( sal_uInt32 off )
{
ip = reinterpret_cast<sal_uInt8*>(pBuf.get()) + i;
sal_uInt8* pTmp = ip;
- i = *pTmp++; i |= *pTmp++ << 8; i |= *pTmp++ << 16; i |= *pTmp++ << 24;
+ i = *pTmp++; i |= *pTmp++ << 8; i |= *pTmp++ << 16; i |= *pTmp++ << 24;
if( i >= nOff )
{
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index dc6bf5260448..e209114aabf1 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -216,7 +216,7 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic )
}
// behavior in VBA is that a module scope variable's lifetime is
// tied to the document. e.g. a module scope variable is global
- if( GetBasic()->IsDocBasic() && bVBASupportOn && !pProc )
+ if( GetBasic()->IsDocBasic() && bVBASupportOn && !pProc )
bPersistentGlobal = true;
// PRIVATE is a synonymous for DIM
// _CONST_?
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index 44eb2efcbc2f..b7a09c7ce739 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -398,7 +398,7 @@ bool SbiParser::Parse()
Next();
Push( eCurTok );
aGen.Statement();
- Symbol(nullptr);
+ Symbol(nullptr);
}
}
else
diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx
index 40bc75f82d5c..c29aba304935 100644
--- a/basic/source/sbx/sbxint.cxx
+++ b/basic/source/sbx/sbxint.cxx
@@ -433,8 +433,7 @@ start:
nRes = 0;
else
{
- ::OString aOStr = OUStringToOString
- ( *p->pOUString, RTL_TEXTENCODING_ASCII_US );
+ ::OString aOStr = OUStringToOString( *p->pOUString, RTL_TEXTENCODING_ASCII_US );
nRes = aOStr.toInt64();
if( nRes == 0 )
{
@@ -544,8 +543,7 @@ start:
p->pOUString = new OUString;
::OString aOStr = OString::number( n );
- (*p->pOUString) = ::OStringToOUString
- ( aOStr, RTL_TEXTENCODING_ASCII_US );
+ (*p->pOUString) = ::OStringToOUString( aOStr, RTL_TEXTENCODING_ASCII_US );
break;
}
case SbxOBJECT:
@@ -695,7 +693,7 @@ start:
nRes = 0;
else
{
- ::OString aOStr = OUStringToOString
+ ::OString aOStr = OUStringToOString
( *p->pOUString, RTL_TEXTENCODING_ASCII_US );
sal_Int64 n64 = aOStr.toInt64();
if( n64 == 0 )
@@ -823,8 +821,7 @@ start:
else
{
::OString aOStr = OString::number( n );
- (*p->pOUString) = ::OStringToOUString
- ( aOStr, RTL_TEXTENCODING_ASCII_US );
+ (*p->pOUString) = ::OStringToOUString( aOStr, RTL_TEXTENCODING_ASCII_US );
}
break;
case SbxOBJECT:
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 05e8773aab9f..b92d43d2d688 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -573,7 +573,7 @@ bool SbxValue::PutBool( bool b )
bool SbxValue::PutEmpty()
{
bool bRet = SetType( SbxEMPTY );
- SetModified( true );
+ SetModified( true );
return bRet;
}
@@ -1549,60 +1549,60 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
write_uInt16_lenPrefixed_uInt8s_FromOUString(r, OUString(), RTL_TEXTENCODING_ASCII_US);
}
break;
- case SbxERROR:
- case SbxUSHORT:
- r.WriteUInt16( aData.nUShort ); break;
- case SbxOBJECT:
- // to save itself as Objectptr does not work!
- if( aData.pObj )
- {
- if( dynamic_cast<SbxValue*>( aData.pObj) != this )
+ case SbxERROR:
+ case SbxUSHORT:
+ r.WriteUInt16( aData.nUShort ); break;
+ case SbxOBJECT:
+ // to save itself as Objectptr does not work!
+ if( aData.pObj )
{
- r.WriteUChar( 1 );
- return aData.pObj->Store( r );
+ if( dynamic_cast<SbxValue*>( aData.pObj) != this )
+ {
+ r.WriteUChar( 1 );
+ return aData.pObj->Store( r );
+ }
+ else
+ r.WriteUChar( 2 );
}
else
- r.WriteUChar( 2 );
+ r.WriteUChar( 0 );
+ break;
+ case SbxCHAR:
+ {
+ char c = sal::static_int_cast< char >(aData.nChar);
+ r.WriteChar( c );
+ break;
}
- else
- r.WriteUChar( 0 );
- break;
- case SbxCHAR:
- {
- char c = sal::static_int_cast< char >(aData.nChar);
- r.WriteChar( c );
- break;
- }
- case SbxBYTE:
- r.WriteUChar( aData.nByte ); break;
- case SbxULONG:
- r.WriteUInt32( aData.nULong ); break;
- case SbxINT:
- {
- r.WriteUChar( SAL_TYPES_SIZEOFINT ).WriteInt32( aData.nInt );
- break;
- }
- case SbxUINT:
- {
- r.WriteUChar( SAL_TYPES_SIZEOFINT ).WriteUInt32( aData.nUInt );
- break;
+ case SbxBYTE:
+ r.WriteUChar( aData.nByte ); break;
+ case SbxULONG:
+ r.WriteUInt32( aData.nULong ); break;
+ case SbxINT:
+ {
+ r.WriteUChar( SAL_TYPES_SIZEOFINT ).WriteInt32( aData.nInt );
+ break;
+ }
+ case SbxUINT:
+ {
+ r.WriteUChar( SAL_TYPES_SIZEOFINT ).WriteUInt32( aData.nUInt );
+ break;
+ }
+ case SbxEMPTY:
+ case SbxNULL:
+ case SbxVOID:
+ break;
+ case SbxDATAOBJECT:
+ r.WriteInt32( aData.nLong );
+ break;
+ // #78919 For backwards compatibility
+ case SbxWSTRING:
+ case SbxWCHAR:
+ break;
+ default:
+ SAL_WARN( "basic.sbx", "Saving a non-supported data type" );
+ return false;
}
- case SbxEMPTY:
- case SbxNULL:
- case SbxVOID:
- break;
- case SbxDATAOBJECT:
- r.WriteInt32( aData.nLong );
- break;
- // #78919 For backwards compatibility
- case SbxWSTRING:
- case SbxWCHAR:
- break;
- default:
- SAL_WARN( "basic.sbx", "Saving a non-supported data type" );
- return false;
+ return true;
}
- return true;
-}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 77ce160665d7..05e2dbb7792d 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1159,7 +1159,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
// Create library
Reference< XNameContainer > xLib = createLibrary( aLibName );
- SfxLibrary* pNewLib = static_cast< SfxLibrary* >( xLib.get() );
+ SfxLibrary* pNewLib = static_cast< SfxLibrary* >( xLib.get() );
pNewLib->mbLoaded = false;
pNewLib->implSetModified( false );
checkStorageURL( aLibFolder, pNewLib->maLibInfoFileURL,
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index f9b2b424e07a..d04ed65746eb 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -625,7 +625,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
sal_Int8* pData = aBinSeq.getArray();
memcpy( pData, aMemStream.GetData(), nSize );
- Reference< XOutputStream > xOut = xCodeStream->getOutputStream();
+ Reference< XOutputStream > xOut = xCodeStream->getOutputStream();
if ( !xOut.is() )
{
throw io::IOException(); // access denied because the stream is readonly