summaryrefslogtreecommitdiff
path: root/vcl/unx/source/gdi
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-06-25 13:37:21 +0000
committerKurt Zenker <kz@openoffice.org>2008-06-25 13:37:21 +0000
commit8e6b7c31707aef460e97351ae788df3aa518bdf4 (patch)
tree8b59560ec44b289008788d3aade5f4c142c500e6 /vcl/unx/source/gdi
parentbb665d5924fad7fc70df5c8bdaa1636a2277be1e (diff)
INTEGRATION: CWS vcl89 (1.51.16); FILE MERGED
2008/05/16 13:01:37 pl 1.51.16.1: #i88799# fix a remnant of threelayer office
Diffstat (limited to 'vcl/unx/source/gdi')
-rw-r--r--vcl/unx/source/gdi/salprnpsp.cxx62
1 files changed, 13 insertions, 49 deletions
diff --git a/vcl/unx/source/gdi/salprnpsp.cxx b/vcl/unx/source/gdi/salprnpsp.cxx
index 1204a9295958..c1b4e05238bb 100644
--- a/vcl/unx/source/gdi/salprnpsp.cxx
+++ b/vcl/unx/source/gdi/salprnpsp.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: salprnpsp.cxx,v $
- * $Revision: 1.51 $
+ * $Revision: 1.52 $
*
* This file is part of OpenOffice.org.
*
@@ -103,56 +103,20 @@ static void getPaLib()
{
if( ! driverLib )
{
- #ifdef MACOSX
- // Use OSL module loading for MacOS X
- OUString printerDriverLibName( RTL_CONSTASCII_USTRINGPARAM(_XSALSET_LIBNAME) );
- oslModule pPrinterDriverLib = osl_loadModule( printerDriverLibName.pData, SAL_LOADMODULE_DEFAULT );
- if( !pPrinterDriverLib )
- {
- fprintf( stderr, "salprnpsp.cxx: Cannot load printer setup library %s.\n", (char *) printerDriverLibName.pData);
- return;
- }
-
- // Get the address of Sal_SetupPrinterDriver
- OUString setupPrinterDriverFuncName( RTL_CONSTASCII_USTRINGPARAM("Sal_SetupPrinterDriver") );
- void *pSetupPrinterDriverFunc;
- pSetupPrinterDriverFunc = osl_getSymbol( pPrinterDriverLib, setupPrinterDriverFuncName.pData );
- if( !pSetupPrinterDriverFunc )
- {
- fprintf( stderr, "salprnpsp.cxx: Cannot get address of symbol 'Sal_SetupPrinterDriver'.\n" );
- return;
- }
- pSetupFunction = (int(*)(PrinterInfo&))pSetupPrinterDriverFunc;
-
- // Get the address of Sal_queryFaxNumber
- OUString queryFaxNumFuncName( RTL_CONSTASCII_USTRINGPARAM("Sal_queryFaxNumber") );
- void *pQueryFaxNumFunc;
- pQueryFaxNumFunc = osl_getSymbol( pPrinterDriverLib, queryFaxNumFuncName.pData );
- if( !pQueryFaxNumFunc )
- {
- fprintf( stderr, "salprnpsp.cxx: Cannot get address of symbol 'Sal_queryFaxNumber'.\n" );
- return;
- }
- pFaxNrFunction = (int(*)(String&))pQueryFaxNumFunc;
-
- #else
- OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( _XSALSET_LIBNAME ) );
- driverLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT );
- if ( !driverLib )
- {
- return;
- }
+ OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( _XSALSET_LIBNAME ) );
+ driverLib = osl_loadModuleRelative( (oslGenericFunction)getPaLib, aLibName.pData, SAL_LOADMODULE_DEFAULT );
+ if ( !driverLib )
+ {
+ return;
+ }
- OUString aSetupSym( RTL_CONSTASCII_USTRINGPARAM( "Sal_SetupPrinterDriver" ) );
- pSetupFunction = (setupFunction)osl_getFunctionSymbol( driverLib, aSetupSym.pData );
- if ( !pSetupFunction )
- fprintf( stderr, "could not resolve Sal_SetupPrinterDriver\n" );
+ pSetupFunction = (setupFunction)osl_getAsciiFunctionSymbol( driverLib, "Sal_SetupPrinterDriver" );
+ if ( !pSetupFunction )
+ fprintf( stderr, "could not resolve Sal_SetupPrinterDriver\n" );
- OUString aFaxSym( RTL_CONSTASCII_USTRINGPARAM( "Sal_queryFaxNumber" ) );
- pFaxNrFunction = (faxFunction)osl_getFunctionSymbol( driverLib, aFaxSym.pData );
- if ( !pFaxNrFunction )
- fprintf( stderr, "could not resolve Sal_queryFaxNumber\n" );
- #endif
+ pFaxNrFunction = (faxFunction)osl_getAsciiFunctionSymbol( driverLib, "Sal_queryFaxNumber" );
+ if ( !pFaxNrFunction )
+ fprintf( stderr, "could not resolve Sal_queryFaxNumber\n" );
}
}