summaryrefslogtreecommitdiff
path: root/psprint
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2006-05-24 11:02:17 +0000
committerVladimir Glazounov <vg@openoffice.org>2006-05-24 11:02:17 +0000
commit40114cc2501732cc5780b8b520e1059b1bf79dfc (patch)
tree2a3917e174af2cffa3eb34ba6b67b4ef4df25961 /psprint
parentc519f45716f75a373d739f799f72d97edeb9b9f6 (diff)
INTEGRATION: CWS macosxcups (1.26.14); FILE MERGED
2006/05/13 18:17:42 obr 1.26.14.1: #i63376# Enabled CUPS printing code for MACOSX
Diffstat (limited to 'psprint')
-rw-r--r--psprint/source/helper/helper.cxx30
1 files changed, 17 insertions, 13 deletions
diff --git a/psprint/source/helper/helper.cxx b/psprint/source/helper/helper.cxx
index 871476474a8f..8bdcf6a3d53d 100644
--- a/psprint/source/helper/helper.cxx
+++ b/psprint/source/helper/helper.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: helper.cxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: vg $ $Date: 2006-04-06 15:29:08 $
+ * last change: $Author: vg $ $Date: 2006-05-24 12:02:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -51,8 +51,8 @@
#endif // SOLAR_JAVA
#ifdef MACOSX
-// directory of OS X CUPS ppd files
-#define MACXP_CUPS_PPD_DIR "/etc/cups/ppd"
+// directory of OS X fonts
+#define MACXP_FONT_DIR "/Library/Fonts;"
#endif
using namespace rtl;
@@ -137,10 +137,6 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub
rPathList.clear();
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
-#ifdef MACOSX
- // For CUPS printing, add /etc/cups/ppd to pull in autogenerated printer PPDs
- rPathList.push_back( OUString( RTL_CONSTASCII_USTRINGPARAM(MACXP_CUPS_PPD_DIR) ) );
-#endif
OUStringBuffer aPathBuffer( 256 );
// append net path
@@ -176,11 +172,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub
if( ! aDir.getLength() )
continue;
-#ifdef MACOSX
- if( pSubDir && !aDir.equals(OString(MACXP_CUPS_PPD_DIR)) )
-#else
if( pSubDir )
-#endif
{
aDir += "/";
aDir += pSubDir;
@@ -260,6 +252,18 @@ const OUString& psp::getFontPath()
aPathBuffer.append( OStringToOUString( aEnvPath, osl_getThreadTextEncoding() ) );
}
+#ifdef MACOSX // Search for truetype fonts also in the MACOSX system paths
+ aPath += OUString( RTL_CONSTASCII_USTRINGPARAM( ";" ) );
+ // Add the system font paths to the search path
+ aPath += OUString( RTL_CONSTASCII_USTRINGPARAM(MACXP_FONT_DIR) );
+ //Userfonts
+ if( aUserPath.getLength() )
+ {
+ aPath += aUserPath;
+ aPath += OUString( RTL_CONSTASCII_USTRINGPARAM("/../../Fonts;"));
+ }
+#endif
+
// append jre/jdk fonts if possible
OString aJREpath;
@@ -300,7 +304,7 @@ const OUString& psp::getFontPath()
aPath = aPathBuffer.makeStringAndClear();
#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "initalizing font path to \"%s\"\n", OUStringToOString( aPath, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
+ fprintf( stderr, "initializing font path to \"%s\"\n", OUStringToOString( aPath, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
#endif
}
return aPath;