summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-01-21 15:53:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-01-21 15:54:52 +0100
commita3f32769fc4bb23c64168b412dd10ec769a3854d (patch)
tree92bb435946dcfc422c9816bc05c150069a2da3c3 /stoc
parent35539318cecddc9ccb2904573a894ea05adc432c (diff)
Fix bogus mass-conversion equalsAsciiL -> startsWith
3af99e4d59d89c343965a928681a30f36b1007d2 "convert equalsAsciiL calls to startsWith calls" should rather have converted to oprator ==. Change-Id: Id4a8836c5d6d570e54661c40be7214632e202b21
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/security/access_controller.cxx2
-rw-r--r--stoc/source/security/permissions.cxx2
-rw-r--r--stoc/test/testiadapter.cxx58
3 files changed, 31 insertions, 31 deletions
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index 90d46f7727c8..e8c8cb8f5fc7 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -294,7 +294,7 @@ void acc_CurrentContext::release()
Any acc_CurrentContext::getValueByName( OUString const & name )
throw (RuntimeException)
{
- if (name.startsWith(s_acRestriction))
+ if (name == s_acRestriction)
{
return m_restriction;
}
diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx
index ff46844d2ed2..72b14b318e59 100644
--- a/stoc/source/security/permissions.cxx
+++ b/stoc/source/security/permissions.cxx
@@ -318,7 +318,7 @@ FilePermission::FilePermission(
: Permission( FILE, next )
, m_actions( makeMask( perm.Actions, s_actions ) )
, m_url( perm.URL )
- , m_allFiles( perm.URL.startsWith("<<ALL FILES>>") )
+ , m_allFiles( perm.URL == "<<ALL FILES>>" )
{
if (! m_allFiles)
{
diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx
index e13b486f7e12..1f850cb3917c 100644
--- a/stoc/test/testiadapter.cxx
+++ b/stoc/test/testiadapter.cxx
@@ -633,36 +633,36 @@ Any XLB_Invocation::getValue( const OUString & rName )
sal_Bool XLB_Invocation::hasMethod( const OUString & rName )
throw(::com::sun::star::uno::RuntimeException)
{
- return (rName.startsWith( "raiseException" ) ||
- rName.startsWith( "getValues" ) ||
- rName.startsWith( "setValues2" ) ||
- rName.startsWith( "setValues" ) ||
- rName.startsWith( "acquire" ) ||
- rName.startsWith( "release" ) ||
- rName.startsWith( "queryInterface" ));
+ return (rName == "raiseException" ||
+ rName == "getValues" ||
+ rName == "setValues2" ||
+ rName == "setValues" ||
+ rName == "acquire" ||
+ rName == "release" ||
+ rName == "queryInterface" );
}
//__________________________________________________________________________________________________
sal_Bool XLB_Invocation::hasProperty( const OUString & rName )
throw(::com::sun::star::uno::RuntimeException)
{
- return (rName.startsWith( "Bool" ) ||
- rName.startsWith( "Byte" ) ||
- rName.startsWith( "Char" ) ||
- rName.startsWith( "Short" ) ||
- rName.startsWith( "UShort" ) ||
- rName.startsWith( "Long" ) ||
- rName.startsWith( "ULong" ) ||
- rName.startsWith( "Hyper" ) ||
- rName.startsWith( "UHyper" ) ||
- rName.startsWith( "Float" ) ||
- rName.startsWith( "Double" ) ||
- rName.startsWith( "Enum" ) ||
- rName.startsWith( "String" ) ||
- rName.startsWith( "Interface" ) ||
- rName.startsWith( "Any" ) ||
- rName.startsWith( "Sequence" ) ||
- rName.startsWith( "Struct" ) ||
- rName.startsWith( "RuntimeException" ) );
+ return (rName == "Bool" ||
+ rName == "Byte" ||
+ rName == "Char" ||
+ rName == "Short" ||
+ rName == "UShort" ||
+ rName == "Long" ||
+ rName == "ULong" ||
+ rName == "Hyper" ||
+ rName == "UHyper" ||
+ rName == "Float" ||
+ rName == "Double" ||
+ rName == "Enum" ||
+ rName == "String" ||
+ rName == "Interface" ||
+ rName == "Any" ||
+ rName == "Sequence" ||
+ rName == "Struct" ||
+ rName == "RuntimeException" );
}
//##################################################################################################
@@ -895,7 +895,7 @@ sal_Bool raiseException( const Reference<XLanguageBindingTest > & xLBT )
catch (const IllegalArgumentException &aExc)
{
OSL_ENSURE( aExc.ArgumentPosition == 5 &&
- aExc.Message.startsWith("dum dum dum ich tanz im kreis herum..."),
+ aExc.Message == "dum dum dum ich tanz im kreis herum...",
"### unexpected exception content!" );
Reference<XLanguageBindingTest > xLBT2(
@@ -910,7 +910,7 @@ sal_Bool raiseException( const Reference<XLanguageBindingTest > & xLBT )
}
catch (const RuntimeException & rExc)
{
- OSL_ENSURE( rExc.Message.startsWith("dum dum dum ich tanz im kreis herum..."),
+ OSL_ENSURE( rExc.Message == "dum dum dum ich tanz im kreis herum...",
"### unexpected exception content!" );
Reference<XLanguageBindingTest > xLBT2(
@@ -925,9 +925,9 @@ sal_Bool raiseException( const Reference<XLanguageBindingTest > & xLBT )
}
catch (const Exception & aExc)
{
- OSL_ENSURE( aExc.Message.startsWith("dum dum dum ich tanz im kreis herum..."),
+ OSL_ENSURE( aExc.Message == "dum dum dum ich tanz im kreis herum...",
"### unexpected exception content!" );
- return aExc.Message.startsWith("dum dum dum ich tanz im kreis herum...");
+ return aExc.Message == "dum dum dum ich tanz im kreis herum...";
}
return sal_False;
}