summaryrefslogtreecommitdiff
path: root/basic/source/classes
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 07:36:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-23 08:39:10 +0200
commit44688e498c9672f0a1759ead394f6d6e0f0ef5fd (patch)
treef2f1b33f882ced5c23c2854177c9b266c907ac56 /basic/source/classes
parentb0c6d587405af9e2263dc5073a9a965db46ff986 (diff)
clang-tidy performance-unnecessary-copy-initialization in
basctl..basic Change-Id: I4009282869cd8a2f269093564bd4fafccab80ec3 Reviewed-on: https://gerrit.libreoffice.org/62212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/classes')
-rw-r--r--basic/source/classes/image.cxx2
-rw-r--r--basic/source/classes/sb.cxx2
-rw-r--r--basic/source/classes/sbunoobj.cxx18
3 files changed, 11 insertions, 11 deletions
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 28667187513e..932a541bb57a 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -465,7 +465,7 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
SbxProperty* pTypeElem = static_cast< SbxProperty* > ( pTypeMembers->Get(j) );
- OUString aElemName = pTypeElem->GetName();
+ const OUString& aElemName = pTypeElem->GetName();
r.WriteUniOrByteString( aElemName, eCharSet );
SbxDataType dataType = pTypeElem->GetType();
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 944836865545..23fedab3b08b 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -730,7 +730,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
SbxObject* pObj = dynamic_cast<SbxObject*>( pObjBase );
if( pObj != nullptr )
{
- OUString aObjClass = pObj->GetClassName();
+ const OUString& aObjClass = pObj->GetClassName();
SbClassModuleObject* pClassModuleObj = dynamic_cast<SbClassModuleObject*>( pObjBase );
if( pClassModuleObj != nullptr )
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 3e9df83c4df7..9aa7725aca74 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -327,7 +327,7 @@ static OUString implGetExceptionMsg( const Any& _rCaughtException )
static Any convertAny( const Any& rVal, const Type& aDestType )
{
Any aConvertedVal;
- Reference< XTypeConverter > xConverter = getTypeConverter_Impl();
+ const Reference< XTypeConverter >& xConverter = getTypeConverter_Impl();
try
{
aConvertedVal = xConverter->convertTo( rVal, aDestType );
@@ -1146,7 +1146,7 @@ static bool implGetTypeByName( const OUString& rName, Type& rRetType )
{
bool bSuccess = false;
- Reference< XHierarchicalNameAccess > xTypeAccess = getTypeProvider_Impl();
+ const Reference< XHierarchicalNameAccess >& xTypeAccess = getTypeProvider_Impl();
if( xTypeAccess->hasByHierarchicalName( rName ) )
{
Any aRet = xTypeAccess->getByHierarchicalName( rName );
@@ -2835,7 +2835,7 @@ static SbUnoObject* Impl_CreateUnoStruct( const OUString& aClassName )
// search for the class
Reference< XIdlClass > xClass;
- Reference< XHierarchicalNameAccess > xHarryName =
+ const Reference< XHierarchicalNameAccess >& xHarryName =
getCoreReflection_HierarchicalNameAccess_Impl();
if( xHarryName.is() && xHarryName->hasByHierarchicalName( aClassName ) )
xClass = xCoreReflection->forName( aClassName );
@@ -3294,7 +3294,7 @@ SbUnoClass* findUnoClass( const OUString& rName )
// #105550 Check if module exists
SbUnoClass* pUnoClass = nullptr;
- Reference< XHierarchicalNameAccess > xTypeAccess = getTypeProvider_Impl();
+ const Reference< XHierarchicalNameAccess >& xTypeAccess = getTypeProvider_Impl();
if( xTypeAccess->hasByHierarchicalName( rName ) )
{
Any aRet = xTypeAccess->getByHierarchicalName( rName );
@@ -3444,7 +3444,7 @@ SbUnoService* findUnoService( const OUString& rName )
{
SbUnoService* pSbUnoService = nullptr;
- Reference< XHierarchicalNameAccess > xTypeAccess = getTypeProvider_Impl();
+ const Reference< XHierarchicalNameAccess >& xTypeAccess = getTypeProvider_Impl();
if( xTypeAccess->hasByHierarchicalName( rName ) )
{
Any aRet = xTypeAccess->getByHierarchicalName( rName );
@@ -3691,7 +3691,7 @@ SbUnoSingleton* findUnoSingleton( const OUString& rName )
{
SbUnoSingleton* pSbUnoSingleton = nullptr;
- Reference< XHierarchicalNameAccess > xTypeAccess = getTypeProvider_Impl();
+ const Reference< XHierarchicalNameAccess >& xTypeAccess = getTypeProvider_Impl();
if( xTypeAccess->hasByHierarchicalName( rName ) )
{
Any aRet = xTypeAccess->getByHierarchicalName( rName );
@@ -4130,7 +4130,7 @@ void RTL_Impl_CreateUnoValue( SbxArray& rPar )
}
// Check the type
- Reference< XHierarchicalNameAccess > xTypeAccess = getTypeProvider_Impl();
+ const Reference< XHierarchicalNameAccess >& xTypeAccess = getTypeProvider_Impl();
Any aRet;
try
{
@@ -4507,7 +4507,7 @@ bool SbModule::createCOMWrapperForIface( Any& o_rRetAny, SbClassModuleObject* pP
for( sal_uInt16 i = 0 ; i < nCount ; ++i )
{
SbxVariable* pVar = pModIfaces->Get( i );
- OUString aIfaceName = pVar->GetName();
+ const OUString& aIfaceName = pVar->GetName();
if( !aIfaceName.isEmpty() )
{
@@ -4778,7 +4778,7 @@ OUString SbUnoStructRefObject::Impl_DumpProperties()
// Is it in Uno a sequence?
SbxDataType eType = pVar->GetFullType();
- OUString aName( pVar->GetName() );
+ const OUString& aName( pVar->GetName() );
StructFieldInfo::iterator it = maFields.find( aName );
if ( it != maFields.end() )