summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/basmgr.cxx4
-rw-r--r--basic/source/classes/sb.cxx4
-rw-r--r--basic/source/comp/symtbl.cxx4
-rw-r--r--basic/source/inc/symtbl.hxx2
-rw-r--r--basic/source/runtime/methods.cxx2
-rw-r--r--basic/source/sbx/sbxarray.cxx6
6 files changed, 11 insertions, 11 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 17e5d1760bbc..4173ad9c694c 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1215,14 +1215,14 @@ bool BasicManager::HasLib( std::u16string_view rName ) const
return false;
}
-OUString BasicManager::GetLibName( sal_uInt16 nLib )
+const OUString & BasicManager::GetLibName( sal_uInt16 nLib )
{
DBG_ASSERT( nLib < maLibs.size(), "Lib?!" );
if ( nLib < maLibs.size() )
{
return maLibs[nLib]->GetLibName();
}
- return OUString();
+ return EMPTY_OUSTRING;
}
bool BasicManager::LoadLib( sal_uInt16 nLib )
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index e2fe5dfb3059..58ded6c8c3d1 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1712,7 +1712,7 @@ ErrCode StarBASIC::GetErrBasic()
}
// make the additional message for the RTL function error accessible
-OUString StarBASIC::GetErrorMsg()
+const OUString & StarBASIC::GetErrorMsg()
{
if( GetSbData()->pInst )
{
@@ -1720,7 +1720,7 @@ OUString StarBASIC::GetErrorMsg()
}
else
{
- return OUString();
+ return EMPTY_OUSTRING;
}
}
diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx
index 0040e55613d5..6f8b53ed0d5a 100644
--- a/basic/source/comp/symtbl.cxx
+++ b/basic/source/comp/symtbl.cxx
@@ -40,10 +40,10 @@ SbiStringPool::SbiStringPool( )
SbiStringPool::~SbiStringPool()
{}
-OUString SbiStringPool::Find( sal_uInt32 n ) const
+const OUString & SbiStringPool::Find( sal_uInt32 n ) const
{
if( n == 0 || n > aData.size() )
- return OUString();
+ return EMPTY_OUSTRING;
else
return aData[n - 1];
}
diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index 56f68d4fe882..eeb37844dbd1 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -42,7 +42,7 @@ public:
sal_uInt32 GetSize() const { return aData.size(); }
short Add( const OUString& );
short Add( double, SbxDataType );
- OUString Find( sal_uInt32 ) const;
+ const OUString & Find( sal_uInt32 ) const;
};
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index d0cf61f9fa42..597537385c7c 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3564,7 +3564,7 @@ void SbRtl_VarType(StarBASIC *, SbxArray & rPar, bool)
}
// Exported function
-OUString getBasicTypeName( SbxDataType eType )
+const OUString & getBasicTypeName( SbxDataType eType )
{
static constexpr OUString pTypeNames[] =
{
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index 6cfbefad5500..f4025745e3d0 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -144,17 +144,17 @@ void SbxArray::Put( SbxVariable* pVar, sal_uInt32 nIdx )
}
}
-OUString SbxArray::GetAlias( sal_uInt32 nIdx )
+const OUString & SbxArray::GetAlias( sal_uInt32 nIdx )
{
if( !CanRead() )
{
SetError( ERRCODE_BASIC_PROP_WRITEONLY );
- return OUString();
+ return EMPTY_OUSTRING;
}
SbxVarEntry& rRef = reinterpret_cast<SbxVarEntry&>(GetRef( nIdx ));
if (!rRef.maAlias)
- return OUString();
+ return EMPTY_OUSTRING;
return *rRef.maAlias;
}