scripting: Use appropriate OUString functions on string constants

Change-Id: I8ee8eb92ac95937893c894e67882e9df2c16a67d
This commit is contained in:
Stephan Bergmann
2014-12-15 10:15:16 +01:00
parent 0d58e67239
commit fe17eb9448
3 changed files with 7 additions and 7 deletions

View File

@@ -527,7 +527,7 @@ namespace dlgprov
OUString sScriptURL; OUString sScriptURL;
OUString sScriptCode( aScriptEvent.ScriptCode ); OUString sScriptCode( aScriptEvent.ScriptCode );
if ( aScriptEvent.ScriptType.equalsAscii( "StarBasic" ) ) if ( aScriptEvent.ScriptType == "StarBasic" )
{ {
// StarBasic script: convert ScriptCode to scriptURL // StarBasic script: convert ScriptCode to scriptURL
sal_Int32 nIndex = sScriptCode.indexOf( ':' ); sal_Int32 nIndex = sScriptCode.indexOf( ':' );

View File

@@ -203,8 +203,8 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
// Sometimes we get a propertyval with name = "Referer" // Sometimes we get a propertyval with name = "Referer"
// this is not an argument to be passed to script, so // this is not an argument to be passed to script, so
// ignore. // ignore.
if ( !lArgs[ index ].Name.equalsAscii("Referer") || if ( lArgs[ index ].Name != "Referer" ||
lArgs[ index ].Name.isEmpty() ) lArgs[ index ].Name.isEmpty() ) //TODO:???
{ {
inArgs.realloc( ++argCount ); inArgs.realloc( ++argCount );
inArgs[ argCount - 1 ] = lArgs[ index ].Value; inArgs[ argCount - 1 ] = lArgs[ index ].Value;

View File

@@ -113,24 +113,24 @@ ScriptingFrameworkURIHelper::initBaseURI()
OUString uri, test; OUString uri, test;
bool bAppendScriptsPart = false; bool bAppendScriptsPart = false;
if ( m_sLocation.equalsAscii(USER)) if ( m_sLocation == USER )
{ {
test = USER; test = USER;
uri = USER_URI; uri = USER_URI;
bAppendScriptsPart = true; bAppendScriptsPart = true;
} }
else if ( m_sLocation.equalsAscii(USER_UNO_PACKAGES)) else if ( m_sLocation == USER_UNO_PACKAGES )
{ {
test = "uno_packages"; test = "uno_packages";
uri = OUString( USER_URI ) + USER_UNO_PACKAGES_DIR; uri = OUString( USER_URI ) + USER_UNO_PACKAGES_DIR;
} }
else if (m_sLocation.equalsAscii(SHARE)) else if (m_sLocation == SHARE)
{ {
test = SHARE; test = SHARE;
uri = SHARE_URI; uri = SHARE_URI;
bAppendScriptsPart = true; bAppendScriptsPart = true;
} }
else if (m_sLocation.equalsAscii(SHARE_UNO_PACKAGES)) else if (m_sLocation == SHARE_UNO_PACKAGES)
{ {
test = "uno_packages"; test = "uno_packages";
uri = SHARE_UNO_PACKAGES_URI; uri = SHARE_UNO_PACKAGES_URI;