diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2017-05-28 19:41:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-17 11:55:13 +0200 |
commit | 9881bea8d41997fb46579eb5f0314300159c96cc (patch) | |
tree | f52daa7055d2d28959e2d1ad576d963b7c0d3b2d /basic | |
parent | ec4034c4a4f23574401ba2a74b635d9ed4befbc8 (diff) |
remove unnecessary use of OUString::getStr
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4
Reviewed-on: https://gerrit.libreoffice.org/38114
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 10 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 7 |
2 files changed, 7 insertions, 10 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index e90b52ea412c..1edf4bb1c527 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -1201,7 +1201,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property const * pUn { Reference< XInterface > xRef; OUString aClassName = xIdlTargetClass->getName(); - Type aClassType( xIdlTargetClass->getTypeClass(), aClassName.getStr() ); + Type aClassType( xIdlTargetClass->getTypeClass(), aClassName ); aRetVal.setValue( &xRef, aClassType ); } else @@ -1271,7 +1271,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property const * pUn if( xIdlClass.is() ) { OUString aClassName = xIdlClass->getName(); - Type aType( xIdlClass->getTypeClass(), aClassName.getStr() ); + Type aType( xIdlClass->getTypeClass(), aClassName ); aRetVal <<= aType; } } @@ -1550,7 +1550,7 @@ OUString Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Referenc aRetStr.append( " " ); aRetStr.append( xClass->getName() ); OUString aClassName = xClass->getName(); - Type aClassType( xClass->getTypeClass(), aClassName.getStr() ); + Type aClassType( xClass->getTypeClass(), aClassName ); // checking if the interface is really supported if( !x->queryInterface( aClassType ).hasValue() ) @@ -3076,7 +3076,7 @@ void RTL_Impl_HasInterfaces( SbxArray& rPar ) } // check if the interface will be supported OUString aClassName = xClass->getName(); - Type aClassType( xClass->getTypeClass(), aClassName.getStr() ); + Type aClassType( xClass->getTypeClass(), aClassName ); if( !(*x)->queryInterface( aClassType ).hasValue() ) { return; @@ -4053,7 +4053,7 @@ void SbRtl_CreateUnoListener(StarBASIC * pBasic, SbxArray & rPar, bool) return; OUString aClassName = xClass->getName(); - Type aClassType( xClass->getTypeClass(), aClassName.getStr() ); + Type aClassType( xClass->getTypeClass(), aClassName ); aTmp = xLst->queryInterface( aClassType ); if( !aTmp.hasValue() ) return; diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 16e3d225be33..62bc21ba8246 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -3520,9 +3520,7 @@ void SbRtl_Shell(StarBASIC *, SbxArray & rPar, bool) // #72471 work parameter(s) up std::list<OUString>::const_iterator iter = aTokenList.begin(); - const OUString& rStr = *iter; - OUString aOUStrProg( rStr.getStr(), rStr.getLength() ); - OUString aOUStrProgURL = getFullPath( aOUStrProg ); + OUString aOUStrProgURL = getFullPath( *iter ); ++iter; @@ -3534,9 +3532,8 @@ void SbRtl_Shell(StarBASIC *, SbxArray & rPar, bool) for(int iList = 0; iter != aTokenList.end(); ++iList, ++iter) { const OUString& rParamStr = (*iter); - const OUString aTempStr( rParamStr.getStr(), rParamStr.getLength()); pParamList[iList] = nullptr; - rtl_uString_assign(&(pParamList[iList]), aTempStr.pData); + rtl_uString_assign(&(pParamList[iList]), rParamStr.pData); } } |