diff options
author | Matthew J. Francis <mjay.francis@gmail.com> | 2015-07-09 09:03:46 +0800 |
---|---|---|
committer | Matthew J. Francis <mjay.francis@gmail.com> | 2015-07-09 09:03:46 +0800 |
commit | 85ce6a2446deb0f4c01604b6188f969603de9b16 (patch) | |
tree | 311c5351c1b7e4da186ee912b8fd24fb78ea705d /stoc | |
parent | 240d6c9fb84be66500136e3a2fb8e1ff309d2a54 (diff) |
Eliminate pointless string copies
Change-Id: I30049795f511704a43ed0eaf8dd0841c7109c334
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/inspect/introspection.cxx | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index cfa7085f2901..c92d6366ccf9 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -1489,22 +1489,12 @@ Any ImplIntrospectionAccess::getMaterial() throw(RuntimeException, std::exceptio return maInspectedObject; } -// Hilfs-Funktion zur LowerCase-Wandlung eines OUString -OUString toLower( const OUString& aUStr ) -{ - // Tabelle fuer XExactName pflegen - OUString aOWStr( aUStr.getStr() ); - OUString aOWLowerStr = aOWStr.toAsciiLowerCase(); - OUString aLowerUStr( aOWLowerStr.getStr() ); - return aLowerUStr; -} - // Methoden von XExactName OUString ImplIntrospectionAccess::getExactName( const OUString& rApproximateName ) throw( RuntimeException, std::exception ) { OUString aRetStr; LowerToExactNameMap::iterator aIt = - mpStaticImpl->maLowerToExactNameMap.find( toLower( rApproximateName ) ); + mpStaticImpl->maLowerToExactNameMap.find( rApproximateName.toAsciiLowerCase() ); if( !( aIt == mpStaticImpl->maLowerToExactNameMap.end() ) ) aRetStr = (*aIt).second; return aRetStr; @@ -1898,7 +1888,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect( rPropNameMap[ aPropName ] = rPropCount; // Tabelle fuer XExactName pflegen - rLowerToExactNameMap[ toLower( aPropName ) ] = aPropName; + rLowerToExactNameMap[ aPropName.toAsciiLowerCase() ] = aPropName; } else { @@ -1989,7 +1979,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect( rPropNameMap[ aPropName ] = rPropCount; // Tabelle fuer XExactName pflegen - rLowerToExactNameMap[ toLower( aPropName ) ] = aPropName; + rLowerToExactNameMap[ aPropName.toAsciiLowerCase() ] = aPropName; // Field merken IntrospectionAccessStatic_Impl::checkInterfaceArraySize( pAccess->aInterfaceSeq1, @@ -2169,7 +2159,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect( rPropNameMap[ aPropName ] = rPropCount; // Tabelle fuer XExactName pflegen - rLowerToExactNameMap[ toLower( aPropName ) ] = aPropName; + rLowerToExactNameMap[ aPropName.toAsciiLowerCase() ] = aPropName; // get-Methode merken IntrospectionAccessStatic_Impl::checkInterfaceArraySize( pAccess->aInterfaceSeq1, @@ -2359,7 +2349,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect( rPropNameMap[ aPropName ] = rPropCount; // Tabelle fuer XExactName pflegen - rLowerToExactNameMap[ toLower( aPropName ) ] = aPropName; + rLowerToExactNameMap[ aPropName.toAsciiLowerCase() ] = aPropName; // set-Methode merken IntrospectionAccessStatic_Impl::checkInterfaceArraySize( pAccess->aInterfaceSeq2, @@ -2421,7 +2411,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect( rMethodNameMap[ aMethName2 ] = iAllExportedMethod; // Tabelle fuer XExactName pflegen - rLowerToExactNameMap[ toLower( aMethName2 ) ] = aMethName2; + rLowerToExactNameMap[ aMethName2.toAsciiLowerCase() ] = aMethName2; } else { @@ -2580,7 +2570,7 @@ css::uno::Reference<css::beans::XIntrospectionAccess> Implementation::inspect( rPropNameMap[ aPropName ] = rPropCount; // Tabelle fuer XExactName pflegen - rLowerToExactNameMap[ toLower( aPropName ) ] = aPropName; + rLowerToExactNameMap[ aPropName.toAsciiLowerCase() ] = aPropName; // Field merken IntrospectionAccessStatic_Impl::checkInterfaceArraySize( pAccess->aInterfaceSeq1, |