diff options
Diffstat (limited to 'basic/source/classes/eventatt.cxx')
-rw-r--r-- | basic/source/classes/eventatt.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index 6489d88d8339..93399726ef11 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -39,7 +39,7 @@ #include <basic/basmgr.hxx> #include <sal/log.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <vcl/svapp.hxx> #include <sbunoobj.hxx> #include <basic/sberrors.hxx> @@ -113,7 +113,7 @@ void SFURL_firing_impl( const ScriptEvent& aScriptEvent, Any* pRet, const Refere Any result = xScript->invoke( inArgs, outIndex, outArgs ); if ( pRet ) { - *pRet = result; + *pRet = std::move(result); } } catch ( const RuntimeException& ) @@ -184,13 +184,13 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any if( comphelper::string::getTokenCount(aMacro, '.') == 3 ) { sal_Int32 nLast = 0; - OUString aFullLibName = aMacro.getToken( 0, '.', nLast ); + std::u16string_view aFullLibName = o3tl::getToken(aMacro, 0, '.', nLast ); - sal_Int32 nIndex = aFullLibName.indexOf( ':' ); - if (nIndex >= 0) + size_t nIndex = aFullLibName.find( ':' ); + if (nIndex != std::u16string_view::npos) { - aLocation = aFullLibName.copy( 0, nIndex ); - aLibName = aFullLibName.copy( nIndex + 1 ); + aLocation = aFullLibName.substr( 0, nIndex ); + aLibName = aFullLibName.substr( nIndex + 1 ); } aMacro = aMacro.copy( nLast ); |