summaryrefslogtreecommitdiff
path: root/psprint
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-02-25 13:11:00 +0000
committerKurt Zenker <kz@openoffice.org>2004-02-25 13:11:00 +0000
commit5bf551ddb4e73f47003a40299b8b0677221f2983 (patch)
tree104c35cc7d218cbd5fbab7ad6918587dc2bb659d /psprint
parentcf878d3fe8f3b4aab2c606300aa96d9f7a309dc3 (diff)
INTEGRATION: CWS geordi2q15 (1.10.8); FILE MERGED
2004/02/20 13:15:33 hr 1.10.8.1: #111934#: merge CWS ooo111regression2
Diffstat (limited to 'psprint')
-rw-r--r--psprint/source/helper/ppdparser.cxx20
1 files changed, 15 insertions, 5 deletions
diff --git a/psprint/source/helper/ppdparser.cxx b/psprint/source/helper/ppdparser.cxx
index 0219333f49bf..00ceabddd455 100644
--- a/psprint/source/helper/ppdparser.cxx
+++ b/psprint/source/helper/ppdparser.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ppdparser.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: hr $ $Date: 2004-02-02 18:55:36 $
+ * last change: $Author: kz $ $Date: 2004-02-25 14:11:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -183,14 +183,24 @@ String PPDParser::getPPDFile( const String& rFile )
if( ! aStream.IsOpen() )
{
initPPDFiles();
+#ifdef MACOSX
+ std::hash_map< OUString, OUString, OUStringHash >::const_iterator it =
+ pAllPPDFiles->find( aPPD.getName() );
+#else
std::hash_map< OUString, OUString, OUStringHash >::const_iterator it =
pAllPPDFiles->find( aPPD.getBase() );
+#endif // MACOSX
if( it == pAllPPDFiles->end() )
{
// a new file ? rehash
delete pAllPPDFiles; pAllPPDFiles = NULL;
initPPDFiles();
+ // aPPD is already the file name minus the extension
+#ifdef MACOSX
+ it = pAllPPDFiles->find( aPPD.getName() );
+#else
it = pAllPPDFiles->find( aPPD.getBase() );
+#endif // MACOSX
// note this is optimized for office start where
// no new files occur and initPPDFiles is called only once
}
@@ -269,10 +279,10 @@ const PPDParser* PPDParser::getParser( String aFile )
aFile = getPPDFile( aFile );
if( ! aFile.Len() )
-{
-fprintf( stderr, "Could not get printer PPD file!\n" );
+ {
+ fprintf( stderr, "Could not get printer PPD file!\n" );
return NULL;
-}
+ }
for( ::std::list< PPDParser* >::const_iterator it = aAllParsers.begin(); it != aAllParsers.end(); ++it )
if( (*it)->m_aFile == aFile )