diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/app/randrwrapper.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/desktopdetect/desktopdetector.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/fontmanager/fontconfig.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salgdi3.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salprnpsp.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/xrender_peer.cxx | 7 | ||||
-rw-r--r-- | vcl/unx/generic/printer/cupsmgr.cxx | 16 | ||||
-rw-r--r-- | vcl/win/source/gdi/salnativewidgets-luna.cxx | 3 | ||||
-rw-r--r-- | vcl/win/source/gdi/salprn.cxx | 8 | ||||
-rw-r--r-- | vcl/win/source/gdi/winlayout.cxx | 3 | ||||
-rw-r--r-- | vcl/win/source/window/salframe.cxx | 9 |
11 files changed, 21 insertions, 45 deletions
diff --git a/vcl/unx/generic/app/randrwrapper.cxx b/vcl/unx/generic/app/randrwrapper.cxx index cc4db6dc98b2..753be4f123b4 100644 --- a/vcl/unx/generic/app/randrwrapper.cxx +++ b/vcl/unx/generic/app/randrwrapper.cxx @@ -152,14 +152,13 @@ RandRWrapper::RandRWrapper( Display* pDisplay ) : initFromModule(); if( ! m_bValid ) { - rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libXrandr.so.2" ) ); // load and resolve dependencies immediately // rationale: there are older distributions where libXrandr.so.2 is not linked // with libXext.so, resulting in a missing symbol and terminating the office // 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 // 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_loadAsciiModule( "libXrandr.so.2", SAL_LOADMODULE_DEFAULT | SAL_LOADMODULE_NOW ); initFromModule(); } if( m_bValid ) diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx index 95fbc942c6b2..07142f1591a3 100644 --- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx +++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx @@ -235,8 +235,7 @@ static bool is_cde_desktop( Display* pDisplay ) void* pLibrary = NULL; Atom nDtAtom = XInternAtom( pDisplay, "_DT_WM_READY", True ); - OUString aPathName( RTL_CONSTASCII_USTRINGPARAM( "file:///usr/dt/lib/libDtSvc.so" ) ); - if( nDtAtom && ( pLibrary = osl_loadModule( aPathName.pData, SAL_LOADMODULE_DEFAULT ) ) ) + if( nDtAtom && ( pLibrary = osl_loadAsciiModule( "file:///usr/dt/lib/libDtSvc.so", SAL_LOADMODULE_DEFAULT ) ) ) { osl_unloadModule( (oslModule)pLibrary ); return true; diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index a0a66b534002..cea25ed7d414 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -274,13 +274,9 @@ FontCfgWrapper::FontCfgWrapper() m_pOutlineSet( NULL ), m_nFcVersion( 0 ) { - OUString aLib( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so.1" ) ); - m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); + m_pLib = osl_loadAsciiModule( "libfontconfig.so.1", SAL_LOADMODULE_LAZY ); if( !m_pLib ) - { - aLib = OUString( RTL_CONSTASCII_USTRINGPARAM( "libfontconfig.so" ) ); - m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); - } + m_pLib = osl_loadAsciiModule( "libfontconfig.so", SAL_LOADMODULE_LAZY ); if( ! m_pLib ) { diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx index dcd7ab3949fd..1d2f6fe7d94f 100644 --- a/vcl/unx/generic/gdi/salgdi3.cxx +++ b/vcl/unx/generic/gdi/salgdi3.cxx @@ -346,8 +346,7 @@ CairoWrapper::CairoWrapper() if( !XQueryExtension( GetX11SalData()->GetDisplay()->GetDisplay(), "RENDER", &nDummy, &nDummy, &nDummy ) ) return; - OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libcairo.so.2" )); - mpCairoLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT ); + mpCairoLib = osl_loadAsciiModule( "libcairo.so.2", SAL_LOADMODULE_DEFAULT ); if( !mpCairoLib ) return; diff --git a/vcl/unx/generic/gdi/salprnpsp.cxx b/vcl/unx/generic/gdi/salprnpsp.cxx index 48c1e8601c87..9df779772b7e 100644 --- a/vcl/unx/generic/gdi/salprnpsp.cxx +++ b/vcl/unx/generic/gdi/salprnpsp.cxx @@ -101,8 +101,7 @@ static void getPaLib() { if( ! driverLib ) { - OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( _XSALSET_LIBNAME ) ); - driverLib = osl_loadModuleRelative( (oslGenericFunction)getPaLib, aLibName.pData, SAL_LOADMODULE_DEFAULT ); + driverLib = osl_loadAsciiModuleRelative( (oslGenericFunction)getPaLib, _XSALSET_LIBNAME, SAL_LOADMODULE_DEFAULT ); if ( !driverLib ) { return; diff --git a/vcl/unx/generic/gdi/xrender_peer.cxx b/vcl/unx/generic/gdi/xrender_peer.cxx index 43d8c2c02b64..4dcac45af737 100644 --- a/vcl/unx/generic/gdi/xrender_peer.cxx +++ b/vcl/unx/generic/gdi/xrender_peer.cxx @@ -79,13 +79,12 @@ void XRenderPeer::InitRenderLib() // we don't know if we are running on a system with xrender library // we don't want to install system libraries ourselves // => load them dynamically when they are there - const OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( "libXrender.so.1" )); - mpRenderLib = osl_loadModule( aLibName.pData, SAL_LOADMODULE_DEFAULT ); + static const char aLibName[] = "libXrender.so.1"; + mpRenderLib = osl_loadAsciiModule( aLibName, SAL_LOADMODULE_DEFAULT ); if( !mpRenderLib ) { #ifdef DEBUG fprintf( stderr, "Display can do XRender, but no %s installed.\n" - "Please install for improved display performance\n", OUStringToOString( aLibName.getStr(), - osl_getThreadTextEncoding() ).getStr() ); + "Please install for improved display performance\n", aLibName ); #endif return; } diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx index 2a6b9b02d8e7..2e2b8b1bbe6b 100644 --- a/vcl/unx/generic/printer/cupsmgr.cxx +++ b/vcl/unx/generic/printer/cupsmgr.cxx @@ -155,13 +155,9 @@ CUPSWrapper::CUPSWrapper() m_bPPDThreadRunning( false ) { #ifdef ENABLE_CUPS - OUString aLib( RTL_CONSTASCII_USTRINGPARAM( CUPS_LIB_NAME ) ); - m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); + m_pLib = osl_loadAsciiModule( CUPS_LIB_NAME, SAL_LOADMODULE_LAZY ); if( ! m_pLib ) - { - aLib = OUString( RTL_CONSTASCII_USTRINGPARAM( SAL_MODULENAME( "cups" ) ) ); - m_pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); - } + m_pLib = osl_loadAsciiModule( "cups", SAL_LOADMODULE_LAZY ); #endif if( ! m_pLib ) @@ -1136,13 +1132,11 @@ const char* CUPSManager::authenticateUser( const char* /*pIn*/ ) const char* pRet = NULL; #ifdef ENABLE_CUPS - OUString aLib = OUString::createFromAscii( _XSALSET_LIBNAME ); - oslModule pLib = osl_loadModule( aLib.pData, SAL_LOADMODULE_LAZY ); + oslModule pLib = osl_loadAsciiModule( _XSALSET_LIBNAME, SAL_LOADMODULE_LAZY ); if( pLib ) { - OUString aSym( RTL_CONSTASCII_USTRINGPARAM( "Sal_authenticateQuery" ) ); bool (*getpw)( const OString& rServer, OString& rUser, OString& rPw) = - (bool(*)(const OString&,OString&,OString&))osl_getFunctionSymbol( pLib, aSym.pData ); + (bool(*)(const OString&,OString&,OString&))osl_getAsciiFunctionSymbol( pLib, "Sal_authenticateQuery" ); if( getpw ) { osl::MutexGuard aGuard( m_aCUPSMutex ); @@ -1161,7 +1155,7 @@ const char* CUPSManager::authenticateUser( const char* /*pIn*/ ) osl_unloadModule( pLib ); } #if OSL_DEBUG_LEVEL > 1 - else fprintf( stderr, "loading of module %s failed\n", OUStringToOString( aLib, osl_getThreadTextEncoding() ).getStr() ); + else fprintf( stderr, "loading of module %s failed\n", _XSALSET_LIBNAME ); #endif #endif // ENABLE_CUPS diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 92cdafe90518..a8e63a404e23 100644 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -90,8 +90,7 @@ static VisualStylesAPI vsAPI; VisualStylesAPI::VisualStylesAPI() { - OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM( "uxtheme.dll" ) ); - mhModule = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT ); + mhModule = osl_loadAsciiModule( "uxtheme.dll", SAL_LOADMODULE_DEFAULT ); if ( mhModule ) { diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index 9107e573cc3c..e2dae5fac0d7 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -451,14 +451,10 @@ XubString WinSalInstance::GetDefaultPrinter() // check for W2k and XP if( aSalShlData.maVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT && aSalShlData.maVersionInfo.dwMajorVersion >= 5 ) { - OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM( "winspool.drv" ) ); - oslModule pLib = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT ); + oslModule pLib = osl_loadAsciiModule( "winspool.drv", SAL_LOADMODULE_DEFAULT ); oslGenericFunction pFunc = NULL; if( pLib ) - { - OUString queryFuncName( RTL_CONSTASCII_USTRINGPARAM( "GetDefaultPrinterW" ) ); - pFunc = osl_getFunctionSymbol( pLib, queryFuncName.pData ); - } + pFunc = osl_getAsciiFunctionSymbol( pLib, "GetDefaultPrinterW" ); pGetDefaultPrinter = (sal_Bool(WINAPI*)(LPWSTR,LPDWORD)) pFunc; } diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index 6c86eff66c82..b4b719845605 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -1132,8 +1132,7 @@ static bool bManualCellAlign = true; static bool InitUSP() { - OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM( "usp10" ) ); - aUspModule = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT ); + aUspModule = osl_loadAsciiModule( "usp10", SAL_LOADMODULE_DEFAULT ); if( !aUspModule ) return (bUspEnabled = false); diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 8de1c433a42f..d2d76b1ad4c2 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -364,8 +364,7 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, // check for W2k and XP if ( aSalShlData.maVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT && aSalShlData.maVersionInfo.dwMajorVersion >= 5 ) { - OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM( "user32" ) ); - oslModule pLib = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT ); + oslModule pLib = osl_loadAsciiModule( "user32", SAL_LOADMODULE_DEFAULT ); oslGenericFunction pFunc = NULL; if( pLib ) pFunc = osl_getAsciiFunctionSymbol( pLib, "SetLayeredWindowAttributes" ); @@ -2123,8 +2122,7 @@ void WinSalFrame::StartPresentation( sal_Bool bStart ) if ( !aOS.nErrCode ) { - OUString aLibraryName( OUString::createFromAscii( aOS.szPathName ) ); - oslModule mhSageInst = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT ); + oslModule mhSageInst = osl_loadAsciiModule( aOS.szPathName, SAL_LOADMODULE_DEFAULT ); pSalData->mpSageEnableProc = (SysAgt_Enable_PROC)osl_getAsciiFunctionSymbol( mhSageInst, "System_Agent_Enable" ); } else @@ -2859,8 +2857,7 @@ static BOOL ImplDwmIsCompositionEnabled() SalData* pSalData = GetSalData(); if( ! pSalData->mpDwmIsCompositionEnabled ) { - rtl::OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM( "Dwmapi.dll" ) ); - pSalData->maDwmLib = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT ); + pSalData->maDwmLib = osl_loadAsciiModule( "Dwmapi.dll", SAL_LOADMODULE_DEFAULT ); if( pSalData->maDwmLib ) pSalData->mpDwmIsCompositionEnabled = (DwmIsCompositionEnabled_ptr)osl_getAsciiFunctionSymbol( pSalData->maDwmLib, "DwmIsCompositionEnabled" ); if( ! pSalData->mpDwmIsCompositionEnabled ) // something failed |