summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-07 15:59:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-08 06:11:51 +0000
commit8955c3fde60b0621527e4b91576e49778494f926 (patch)
treec74b6e1991bb7684f0fd78c943a1968f2113e602 /basic
parent525a45f22f591d8046ca95af3073ed27fd283ef0 (diff)
loplugin:oncevar
Change-Id: I44fb6858eeff14fcbd9fdfbbb0aabd1433b6a27d Reviewed-on: https://gerrit.libreoffice.org/30668 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.cxx7
1 files changed, 2 insertions, 5 deletions
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;