[Libreoffice-commits] .: 4 commits - i18npool/source sot/source svl/source unotools/source
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Jan 17 03:14:29 PST 2011
i18npool/source/search/levdis.cxx | 4 ++--
sot/source/sdstor/ucbstorage.cxx | 6 +++---
svl/source/fsstor/fsstorage.cxx | 6 +++---
unotools/source/config/moduleoptions.cxx | 20 ++++++++++----------
unotools/source/ucbhelper/ucblockbytes.cxx | 8 ++++----
5 files changed, 22 insertions(+), 22 deletions(-)
New commits:
commit 62d003f6736a2320d1939087818aeb0991107910
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 17 11:11:19 2011 +0000
equalsAsciiL faster than equalsAscii
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 440e099..1ff83ae 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -1335,7 +1335,7 @@ void SAL_CALL FSStorage::setPropertyValue( const ::rtl::OUString& aPropertyName,
if ( !m_pImpl )
throw lang::DisposedException();
- if ( aPropertyName.equalsAscii( "URL" ) || aPropertyName.equalsAscii( "OpenMode" ) )
+ if ( aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")) || aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OpenMode")) )
throw beans::PropertyVetoException(); // TODO
else
throw beans::UnknownPropertyException(); // TODO
@@ -1353,9 +1353,9 @@ uno::Any SAL_CALL FSStorage::getPropertyValue( const ::rtl::OUString& aPropertyN
if ( !m_pImpl )
throw lang::DisposedException();
- if ( aPropertyName.equalsAscii( "URL" ) )
+ if ( aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URL")) )
return uno::makeAny( m_pImpl->m_aURL );
- else if ( aPropertyName.equalsAscii( "OpenMode" ) )
+ else if ( aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OpenMode")) )
return uno::makeAny( m_pImpl->m_nMode );
throw beans::UnknownPropertyException(); // TODO
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index bbf70a7..69de4bf 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -956,10 +956,10 @@ static sal_Bool UCBOpenContentSync(
aScheme = xContId->getContentProviderScheme();
// now determine wether we use a timeout or not;
- if( ! aScheme.equalsIgnoreAsciiCaseAscii("http") &&
- ! aScheme.equalsIgnoreAsciiCaseAscii("https") &&
- ! aScheme.equalsIgnoreAsciiCaseAscii("vnd.sun.star.webdav") &&
- ! aScheme.equalsIgnoreAsciiCaseAscii("ftp"))
+ if( ! aScheme.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("http")) &&
+ ! aScheme.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("https")) &&
+ ! aScheme.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.webdav")) &&
+ ! aScheme.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("ftp")))
return _UCBOpenContentSync(
xLockBytes,xContent,rArg,xSink,xInteract,xProgress,xHandler);
commit 1152cc57564cb65b904cc0aa7c782ca787866ee7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 17 10:36:01 2011 +0000
equalsAsciiL faster than equalsAscii
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index fe4f88d..1d7648b 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -1402,25 +1402,25 @@ sal_uInt32 SvtModuleOptions::GetFeatures() const
-----------------------------------------------*/
SvtModuleOptions::EFactory SvtModuleOptions::ClassifyFactoryByShortName(const ::rtl::OUString& sName)
{
- if (sName.equalsAscii("swriter"))
+ if (sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("swriter")))
return E_WRITER;
- if (sName.equalsIgnoreAsciiCaseAscii("swriter/Web")) // sometimes they are registerd for swriter/web :-(
+ if (sName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("swriter/Web"))) // sometimes they are registerd for swriter/web :-(
return E_WRITERWEB;
- if (sName.equalsIgnoreAsciiCaseAscii("swriter/GlobalDocument")) // sometimes they are registerd for swriter/globaldocument :-(
+ if (sName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("swriter/GlobalDocument"))) // sometimes they are registerd for swriter/globaldocument :-(
return E_WRITERGLOBAL;
- if (sName.equalsAscii("scalc"))
+ if (sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("scalc")))
return E_CALC;
- if (sName.equalsAscii("sdraw"))
+ if (sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sdraw")))
return E_DRAW;
- if (sName.equalsAscii("simpress"))
+ if (sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("simpress")))
return E_IMPRESS;
- if (sName.equalsAscii("schart"))
+ if (sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("schart")))
return E_CHART;
- if (sName.equalsAscii("smath"))
+ if (sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("smath")))
return E_MATH;
- if (sName.equalsAscii("sbasic"))
+ if (sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sbasic")))
return E_BASIC;
- if (sName.equalsAscii("sdatabase"))
+ if (sName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sdatabase")))
return E_DATABASE;
return E_UNKNOWN_FACTORY;
commit 3836f8e2494c829c6946c286823bb6339f3dd224
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 17 10:33:06 2011 +0000
equalsAsciiL faster than equalsAscii
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 360e052..f1a3221 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1979,7 +1979,7 @@ void UCBStorage_Impl::ReadContent()
if ( m_bIsLinked )
{
// unpacked storages have to deal with the meta-inf folder by themselves
- if( aTitle.equalsAscii("META-INF") )
+ if( aTitle.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("META-INF")) )
continue;
}
else
@@ -2103,7 +2103,7 @@ sal_Int32 UCBStorage_Impl::GetObjectCount()
for ( sal_Int32 nProps=0; nProps<rMyProps.getLength(); nProps++ )
{
const PropertyValue& rAny = rMyProps[nProps];
- if ( rAny.Name.equalsAscii("FullPath") )
+ if ( rAny.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FullPath")) )
{
rtl::OUString aTmp;
if ( ( rAny.Value >>= aTmp ) && aTmp == rPath )
@@ -2111,7 +2111,7 @@ sal_Int32 UCBStorage_Impl::GetObjectCount()
if ( aType.getLength() )
break;
}
- else if ( rAny.Name.equalsAscii("MediaType") )
+ else if ( rAny.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MediaType")) )
{
if ( ( rAny.Value >>= aType ) && aType.getLength() && bFound )
break;
commit a82086c22969112e1bf3f2251b0dfbfb0d942e31
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jan 17 10:04:42 2011 +0000
cppcheck: unused variable
diff --git a/i18npool/source/search/levdis.cxx b/i18npool/source/search/levdis.cxx
index 177fe79..e1aecab 100644
--- a/i18npool/source/search/levdis.cxx
+++ b/i18npool/source/search/levdis.cxx
@@ -369,11 +369,11 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen )
// aus Userwerten nOtherX, nShorterY, nLongerZ, bRelaxed
int WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool bRelaxed )
{
- int nMin, nMid, nMax;
+ int nMid, nMax;
if ( nX < 0 ) nX = 0; // nur positive Werte
if ( nY < 0 ) nY = 0;
if ( nZ < 0 ) nZ = 0;
- if ( 0 == (nMin = Min3( nX, nY, nZ )) ) // mindestens einer 0
+ if (0 == Min3( nX, nY, nZ )) // mindestens einer 0
{
nMax = Max3( nX, nY, nZ ); // entweder 0 bei drei 0 oder Max
if ( 0 == (nMid = Mid3( nX, nY, nZ )) ) // sogar zwei 0
More information about the Libreoffice-commits
mailing list