scripting: Use appropriate OUString functions on string constants
Change-Id: I8ee8eb92ac95937893c894e67882e9df2c16a67d
This commit is contained in:
@@ -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( ':' );
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
Reference in New Issue
Block a user