[Libreoffice-commits] core.git: vcl/source
Julien Nabet
serval2412 at yahoo.fr
Thu Mar 28 22:37:21 PDT 2013
vcl/source/filter/FilterConfigCache.cxx | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
New commits:
commit eed411835d41118e72a304026c0a7a208be009b6
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Mar 29 06:34:21 2013 +0100
Use const_iterator instead of iterator if possible
Change-Id: I16a4ad9393eb05af3cf493ae476eaa4a791a7925
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index 0288911..4f39afb 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -323,7 +323,7 @@ String FilterConfigCache::GetImportFilterName( sal_uInt16 nFormat )
sal_uInt16 FilterConfigCache::GetImportFormatNumber( const String& rFormatName )
{
- CacheVector::iterator aIter, aEnd;
+ CacheVector::const_iterator aIter, aEnd;
for (aIter = aImport.begin(), aEnd = aImport.end(); aIter != aEnd; ++aIter)
{
if ( aIter->sUIName.equalsIgnoreAsciiCase( rFormatName ) )
@@ -335,7 +335,7 @@ sal_uInt16 FilterConfigCache::GetImportFormatNumber( const String& rFormatName )
/// get the index of the filter that matches this extension
sal_uInt16 FilterConfigCache::GetImportFormatNumberForExtension( const String& rExt )
{
- CacheVector::iterator aIter, aEnd;
+ CacheVector::const_iterator aIter, aEnd;
for (aIter = aImport.begin(), aEnd = aImport.end(); aIter != aEnd; ++aIter)
{
for ( sal_Int32 i = 0; i < aIter->lExtensionList.getLength(); i++ )
@@ -349,7 +349,7 @@ sal_uInt16 FilterConfigCache::GetImportFormatNumberForExtension( const String& r
sal_uInt16 FilterConfigCache::GetImportFormatNumberForMediaType( const String& rMediaType )
{
- CacheVector::iterator aIter, aEnd;
+ CacheVector::const_iterator aIter, aEnd;
for (aIter = aImport.begin(), aEnd = aImport.end(); aIter != aEnd; ++aIter)
{
if ( aIter->sMediaType.equalsIgnoreAsciiCase( rMediaType ) )
@@ -360,7 +360,8 @@ sal_uInt16 FilterConfigCache::GetImportFormatNumberForMediaType( const String& r
sal_uInt16 FilterConfigCache::GetImportFormatNumberForShortName( const String& rShortName )
{
- CacheVector::iterator aIter, aEnd;
+ CacheVector::const_iterator aEnd;
+ CacheVector::iterator aIter;
for (aIter = aImport.begin(), aEnd = aImport.end(); aIter != aEnd; ++aIter)
{
if ( aIter->GetShortName().EqualsIgnoreCaseAscii( rShortName ) )
@@ -371,7 +372,7 @@ sal_uInt16 FilterConfigCache::GetImportFormatNumberForShortName( const String& r
sal_uInt16 FilterConfigCache::GetImportFormatNumberForTypeName( const String& rType )
{
- CacheVector::iterator aIter, aEnd;
+ CacheVector::const_iterator aIter, aEnd;
for (aIter = aImport.begin(), aEnd = aImport.end(); aIter != aEnd; ++aIter)
{
if ( aIter->sType.equalsIgnoreAsciiCase( rType ) )
@@ -451,7 +452,7 @@ String FilterConfigCache::GetExportFilterName( sal_uInt16 nFormat )
sal_uInt16 FilterConfigCache::GetExportFormatNumber( const String& rFormatName )
{
- CacheVector::iterator aIter, aEnd;
+ CacheVector::const_iterator aIter, aEnd;
for (aIter = aImport.begin(), aEnd = aImport.end(); aIter != aEnd; ++aIter)
{
if ( aIter->sUIName.equalsIgnoreAsciiCase( rFormatName ) )
@@ -462,7 +463,7 @@ sal_uInt16 FilterConfigCache::GetExportFormatNumber( const String& rFormatName )
sal_uInt16 FilterConfigCache::GetExportFormatNumberForMediaType( const String& rMediaType )
{
- CacheVector::iterator aIter, aEnd;
+ CacheVector::const_iterator aIter, aEnd;
for (aIter = aImport.begin(), aEnd = aImport.end(); aIter != aEnd; ++aIter)
{
if ( aIter->sMediaType.equalsIgnoreAsciiCase( rMediaType ) )
@@ -473,7 +474,8 @@ sal_uInt16 FilterConfigCache::GetExportFormatNumberForMediaType( const String& r
sal_uInt16 FilterConfigCache::GetExportFormatNumberForShortName( const String& rShortName )
{
- CacheVector::iterator aIter, aEnd;
+ CacheVector::const_iterator aEnd;
+ CacheVector::iterator aIter;
for (aIter = aImport.begin(), aEnd = aImport.end(); aIter != aEnd; ++aIter)
{
if ( aIter->GetShortName().EqualsIgnoreCaseAscii( rShortName ) )
@@ -484,7 +486,7 @@ sal_uInt16 FilterConfigCache::GetExportFormatNumberForShortName( const String& r
sal_uInt16 FilterConfigCache::GetExportFormatNumberForTypeName( const String& rType )
{
- CacheVector::iterator aIter, aEnd;
+ CacheVector::const_iterator aIter, aEnd;
for (aIter = aImport.begin(), aEnd = aImport.end(); aIter != aEnd; ++aIter)
{
if ( aIter->sType.equalsIgnoreAsciiCase( rType ) )
More information about the Libreoffice-commits
mailing list