From 8955c3fde60b0621527e4b91576e49778494f926 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 7 Nov 2016 15:59:37 +0200 Subject: loplugin:oncevar Change-Id: I44fb6858eeff14fcbd9fdfbbb0aabd1433b6a27d Reviewed-on: https://gerrit.libreoffice.org/30668 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/classes/sbunoobj.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'basic') diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 2a73adfd6f06..d4ccf6d3b98d 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -106,7 +106,6 @@ static char const ID_DBG_PROPERTIES[] = "Dbg_Properties"; static char const ID_DBG_METHODS[] = "Dbg_Methods"; static char const aSeqLevelStr[] = "[]"; -static char const defaultNameSpace[] = "ooo.vba"; // Gets the default property for an uno object. Note: There is some // redirection built in. The property name specifies the name @@ -3258,7 +3257,7 @@ void VBAConstantHelper::init() { Sequence< TypeClass > types(1); types[ 0 ] = TypeClass_CONSTANTS; - Reference< XTypeDescriptionEnumeration > xEnum = getTypeDescriptorEnumeration( defaultNameSpace, types, TypeDescriptionSearchDepth_INFINITE ); + Reference< XTypeDescriptionEnumeration > xEnum = getTypeDescriptorEnumeration( "ooo.vba", types, TypeDescriptionSearchDepth_INFINITE ); if ( !xEnum.is()) { @@ -4162,8 +4161,6 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) (void)pBasic; (void)bWrite; - static const char aTypeTypeString[] = "type"; - // 2 parameters needed if ( rPar.Count() != 3 ) { @@ -4175,7 +4172,7 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) OUString aTypeName = rPar.Get(1)->GetOUString(); SbxVariable* pVal = rPar.Get(2); - if( aTypeName == aTypeTypeString ) + if( aTypeName == "type" ) { SbxDataType eBaseType = pVal->SbxValue::GetType(); OUString aValTypeName; -- cgit v1.2.3