diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-01-28 20:29:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-29 09:25:12 +0100 |
commit | 1250aecd71fabde4dba990bfceb61bbe8e06b8ea (patch) | |
tree | 3c42ffdf68b7e81aba29228631a8cd34e2f11830 /basic | |
parent | 4f3987e0b1a995431478769c898b5ef151745254 (diff) |
loplugin:stringviewparam extend to new..
O[U]StringBuffer methods
Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sb.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 4ebab52ee2c4..94d496e87c4f 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1538,7 +1538,7 @@ void StarBASIC::SetErrorData( ErrCode nCode, sal_uInt16 nLine, aGlobals.nCol2 = nCol2; } -void StarBASIC::MakeErrorText( ErrCode nId, const OUString& aMsg ) +void StarBASIC::MakeErrorText( ErrCode nId, std::u16string_view aMsg ) { SolarMutexGuard aSolarGuard; sal_uInt16 nOldID = GetVBErrorCode( nId ); diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index ac6fcf8a2879..2afc7ed52604 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -284,13 +284,13 @@ namespace } } -static void implAppendExceptionMsg( OUStringBuffer& _inout_rBuffer, const Exception& _e, const OUString& _rExceptionType, sal_Int32 _nLevel ) +static void implAppendExceptionMsg( OUStringBuffer& _inout_rBuffer, const Exception& _e, std::u16string_view _rExceptionType, sal_Int32 _nLevel ) { _inout_rBuffer.append( "\n" ); lcl_indent( _inout_rBuffer, _nLevel ); _inout_rBuffer.append( "Type: " ); - if ( _rExceptionType.isEmpty() ) + if ( _rExceptionType.empty() ) _inout_rBuffer.append( "Unknown" ); else _inout_rBuffer.append( _rExceptionType ); @@ -303,7 +303,7 @@ static void implAppendExceptionMsg( OUStringBuffer& _inout_rBuffer, const Except } // construct an error message for the exception -static OUString implGetExceptionMsg( const Exception& e, const OUString& aExceptionType_ ) +static OUString implGetExceptionMsg( const Exception& e, std::u16string_view aExceptionType_ ) { OUStringBuffer aMessageBuf; implAppendExceptionMsg( aMessageBuf, e, aExceptionType_, 0 ); @@ -338,7 +338,7 @@ static Any convertAny( const Any& rVal, const Type& aDestType ) catch( const CannotConvertException& e2 ) { StarBASIC::Error( ERRCODE_BASIC_EXCEPTION, - implGetExceptionMsg( e2, "com.sun.star.lang.IllegalArgumentException" ) ); + implGetExceptionMsg( e2, u"com.sun.star.lang.IllegalArgumentException" ) ); return aConvertedVal; } return aConvertedVal; @@ -4150,7 +4150,7 @@ void RTL_Impl_CreateUnoValue( SbxArray& rPar ) catch( const NoSuchElementException& e1 ) { StarBASIC::Error( ERRCODE_BASIC_EXCEPTION, - implGetExceptionMsg( e1, "com.sun.star.container.NoSuchElementException" ) ); + implGetExceptionMsg( e1, u"com.sun.star.container.NoSuchElementException" ) ); return; } Reference< XTypeDescription > xTypeDesc; |