Kaydet (Commit) b5f11394 authored tarafından Michael Meeks's avatar Michael Meeks

cleanup some module calls.

Change-Id: I2871b7e49416c1fb25b80a7a4e7e2dc98efd75d8
üst fb23f10f
...@@ -103,12 +103,11 @@ static void getPaLib() ...@@ -103,12 +103,11 @@ static void getPaLib()
#if defined( UNX ) && !( defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) ) #if defined( UNX ) && !( defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) )
if( ! driverLib ) if( ! driverLib )
{ {
OUString aLibName( _XSALSET_LIBNAME ); driverLib = osl_loadModuleRelativeAscii( (oslGenericFunction)getPaLib,
driverLib = osl_loadModuleRelative( (oslGenericFunction)getPaLib, aLibName.pData, SAL_LOADMODULE_DEFAULT ); _XSALSET_LIBNAME,
SAL_LOADMODULE_DEFAULT );
if ( !driverLib ) if ( !driverLib )
{
return; return;
}
pSetupFunction = (setupFunction)osl_getAsciiFunctionSymbol( driverLib, "Sal_SetupPrinterDriver" ); pSetupFunction = (setupFunction)osl_getAsciiFunctionSymbol( driverLib, "Sal_SetupPrinterDriver" );
if ( !pSetupFunction ) if ( !pSetupFunction )
......
...@@ -148,14 +148,13 @@ RandRWrapper::RandRWrapper( Display* pDisplay ) : ...@@ -148,14 +148,13 @@ RandRWrapper::RandRWrapper( Display* pDisplay ) :
initFromModule(); initFromModule();
if( ! m_bValid ) if( ! m_bValid )
{ {
rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libXrandr.so.2" ) );
// load and resolve dependencies immediately // load and resolve dependencies immediately
// rationale: there are older distributions where libXrandr.so.2 is not linked // rationale: there are older distributions where libXrandr.so.2 is not linked
// with libXext.so, resulting in a missing symbol and terminating the office // with libXext.so, resulting in a missing symbol and terminating the office
// obviously they expected libXext to be linked in global symbolspace (that is // obviously they expected libXext to be linked in global symbolspace (that is
// linked by the application), which is not the case with us (because we want // linked by the application), which is not the case with us (because we want
// to be able to run in headless mode even without an installed X11 library) // to be able to run in headless mode even without an installed X11 library)
m_pRandRLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT | SAL_LOADMODULE_NOW ); m_pRandRLib = osl_loadModule( "libXrandr.so.2", SAL_LOADMODULE_DEFAULT | SAL_LOADMODULE_NOW );
initFromModule(); initFromModule();
} }
if( m_bValid ) if( m_bValid )
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#include <stdio.h> #include <stdio.h>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <osl/module.h>
#include <unx/salunx.h> #include <unx/salunx.h>
#include <unx/saldata.hxx> #include <unx/saldata.hxx>
#include <unx/saldisp.hxx> #include <unx/saldisp.hxx>
......
...@@ -870,9 +870,7 @@ bool CUPSManager::addOrRemovePossible() const ...@@ -870,9 +870,7 @@ bool CUPSManager::addOrRemovePossible() const
const char* CUPSManager::authenticateUser( const char* /*pIn*/ ) const char* CUPSManager::authenticateUser( const char* /*pIn*/ )
{ {
const char* pRet = NULL; const char* pRet = NULL;
oslModule pLib = osl_loadModuleAscii( _XSALSET_LIBNAME, SAL_LOADMODULE_LAZY );
OUString aLib(_XSALSET_LIBNAME );
oslModule pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY );
if( pLib ) if( pLib )
{ {
OUString aSym( "Sal_authenticateQuery" ); OUString aSym( "Sal_authenticateQuery" );
......
...@@ -106,7 +106,7 @@ VisualStylesAPI::VisualStylesAPI() ...@@ -106,7 +106,7 @@ VisualStylesAPI::VisualStylesAPI()
lpfnGetThemePartSize( NULL ), lpfnGetThemePartSize( NULL ),
lpfnIsThemeActive( NULL ) lpfnIsThemeActive( NULL )
{ {
OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM( "uxtheme.dll" ) ); OUString aLibraryName( "uxtheme.dll" );
mhModule = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT ); mhModule = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT );
if ( mhModule ) if ( mhModule )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment