[Libreoffice-commits] core.git: stoc/source
Matthew J. Francis
mjay.francis at gmail.com
Wed Jul 8 18:05:01 PDT 2015
stoc/source/inspect/introspection.cxx | 24 +++++++-----------------
1 file changed, 7 insertions(+), 17 deletions(-)
New commits:
commit 85ce6a2446deb0f4c01604b6188f969603de9b16
Author: Matthew J. Francis <mjay.francis at gmail.com>
Date: Thu Jul 9 09:03:46 2015 +0800
Eliminate pointless string copies
Change-Id: I30049795f511704a43ed0eaf8dd0841c7109c334
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index cfa7085..c92d636 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,
More information about the Libreoffice-commits
mailing list