summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/printer/ppdparser.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/unx/generic/printer/ppdparser.cxx')
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 75df5943bb5d..3024b1ed6fa0 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -398,8 +398,6 @@ void PPDParser::scanPPDDir( const OUString& rDir )
} const pSuffixes[] =
{ { ".PS", 3 }, { ".PPD", 4 }, { ".PS.GZ", 6 }, { ".PPD.GZ", 7 } };
- const int nSuffixes = SAL_N_ELEMENTS(pSuffixes);
-
PPDCache &rPPDCache = thePPDCache::get();
osl::Directory aDir( rDir );
@@ -425,13 +423,13 @@ void PPDParser::scanPPDDir( const OUString& rDir )
aPPDFile.Append( aFileName );
// match extension
- for( int nSuffix = 0; nSuffix < nSuffixes; nSuffix++ )
+ for(const suffix_t & rSuffix : pSuffixes)
{
- if( aFileName.getLength() > pSuffixes[nSuffix].nSuffixLen )
+ if( aFileName.getLength() > rSuffix.nSuffixLen )
{
- if( aFileName.endsWithIgnoreAsciiCaseAsciiL( pSuffixes[nSuffix].pSuffix, pSuffixes[nSuffix].nSuffixLen ) )
+ if( aFileName.endsWithIgnoreAsciiCaseAsciiL( rSuffix.pSuffix, rSuffix.nSuffixLen ) )
{
- (*rPPDCache.pAllPPDFiles)[ aFileName.copy( 0, aFileName.getLength() - pSuffixes[nSuffix].nSuffixLen ) ] = aPPDFile.PathToFileName();
+ (*rPPDCache.pAllPPDFiles)[ aFileName.copy( 0, aFileName.getLength() - rSuffix.nSuffixLen ) ] = aPPDFile.PathToFileName();
break;
}
}