[PATCH] fdo#63154: Removed all usages of SVLIBRARY

Marcos Souza (via Code Review) gerrit at gerrit.libreoffice.org
Tue Apr 23 04:33:12 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3574

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/74/3574/1

fdo#63154: Removed all usages of SVLIBRARY

Change-Id: Ib1b6ba1220657343a264525d1cb55138e481f4fd
---
M connectivity/source/drivers/mozab/MDriver.cxx
M connectivity/source/drivers/mozab/MServices.cxx
M connectivity/workben/testmoz/main.cxx
M sc/source/ui/attrdlg/scabstdlg.cxx
M sc/source/ui/docshell/impex.cxx
M sd/source/filter/sdfilter.cxx
M sfx2/source/appl/app.cxx
M sfx2/source/appl/appinit.cxx
M sfx2/source/appl/appserv.cxx
M svtools/source/misc/svtaccessiblefactory.cxx
M svx/source/form/dbtoolsclient.cxx
M sw/source/filter/basflt/fltini.cxx
M sw/source/ui/dbui/swdbtoolsclient.cxx
M toolkit/source/helper/accessibilityclient.cxx
M tools/inc/tools/solar.h
M vcl/source/filter/FilterConfigCache.cxx
16 files changed, 20 insertions(+), 41 deletions(-)



diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx
index 1e56e71..a924944 100644
--- a/connectivity/source/drivers/mozab/MDriver.cxx
+++ b/connectivity/source/drivers/mozab/MDriver.cxx
@@ -24,7 +24,6 @@
 #include "resource/mozab_res.hrc"
 #include "resource/common_res.hrc"
 
-#include <tools/solar.h>
 using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::beans;
@@ -148,7 +147,7 @@
         ::connectivity::SharedResources aResources;
         const OUString sError( aResources.getResourceStringWithSubstitution(
                 STR_COULD_NOT_LOAD_LIB,
-                "$libname$", OUString( SVLIBRARY( "mozabdrv" ) )
+                "$libname$", OUString( SAL_MODULENAME( "mozabdrv" "lo" ) )
              ) );
 
         ::dbtools::throwGenericSQLException(sError,*this);
@@ -293,7 +292,7 @@
 
     OSL_ENSURE(NULL == m_pCreationFunc, "MozabDriver::ensureInit: inconsistence: already have a factory function!");
 
-    const OUString sModuleName(SVLIBRARY( "mozabdrv" ));
+    const OUString sModuleName(SAL_MODULENAME( "mozabdrv" "lo" ));
 
     // load the mozabdrv library
     m_hModule = osl_loadModuleRelative(&thisModule, sModuleName.pData, 0);
diff --git a/connectivity/source/drivers/mozab/MServices.cxx b/connectivity/source/drivers/mozab/MServices.cxx
index 48e867b..99bfebe 100644
--- a/connectivity/source/drivers/mozab/MServices.cxx
+++ b/connectivity/source/drivers/mozab/MServices.cxx
@@ -23,7 +23,6 @@
 #include <osl/diagnose.h>
 #include <com/sun/star/mozilla/XMozillaBootstrap.hpp>
 #include "bootstrap/MMozillaBootstrap.hxx"
-#include <tools/solar.h>
 
 using namespace connectivity::mozab;
 using ::com::sun::star::uno::Reference;
@@ -83,7 +82,7 @@
 typedef void* (SAL_CALL * OMozillaBootstrap_CreateInstanceFunction)(const Reference< XMultiServiceFactory >& _rxFactory );
 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >  SAL_CALL createMozillaBootstrap(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception )
 {
-        const OUString sModuleName(SVLIBRARY( "mozabdrv" ));
+        const OUString sModuleName(SAL_MODULENAME( "mozabdrv" "lo" ));
 
         // load the dbtools library
         oslModule s_hModule = osl_loadModuleRelative(
diff --git a/connectivity/workben/testmoz/main.cxx b/connectivity/workben/testmoz/main.cxx
index a5d251c..9044634 100644
--- a/connectivity/workben/testmoz/main.cxx
+++ b/connectivity/workben/testmoz/main.cxx
@@ -154,7 +154,7 @@
     , "sdbc2" SAL_DLLEXTENSION
     , "dbpool2" SAL_DLLEXTENSION
 #ifdef SAL_UNX
-    , SVLIBRARY( "dtransX11" )        // OBR
+    , SAL_MODULENAME( "dtransX11" "lo" )        // OBR
 #endif
 #ifdef SAL_W32
     , SAL_MODULENAME( "sysdtrans" )
diff --git a/sc/source/ui/attrdlg/scabstdlg.cxx b/sc/source/ui/attrdlg/scabstdlg.cxx
index 10be258..ff06994 100644
--- a/sc/source/ui/attrdlg/scabstdlg.cxx
+++ b/sc/source/ui/attrdlg/scabstdlg.cxx
@@ -42,10 +42,9 @@
     ScFuncPtrCreateDialogFactory fp = 0;
     static ::osl::Module aDialogLibrary;
 
-    OUStringBuffer aStrBuf;
-    aStrBuf.appendAscii( SVLIBRARY("scui") );
+    OUString aStrBuf( SAL_MODULENAME("scui" "lo") );
 
-    if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, aStrBuf.makeStringAndClear(),
+    if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, aStrBuf,
                                                              SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) )
         fp = ( ScAbstractDialogFactory* (SAL_CALL*)() )
             aDialogLibrary.getFunctionSymbol( OUString("CreateDialogFactory") );
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index b6c4869..d12aeef 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2260,7 +2260,7 @@
         return *plugin;
 
 #ifndef DISABLE_DYNLOADING
-    OUString sFilterLib(SVLIBRARY("scfilt"));
+    OUString sFilterLib(SAL_MODULENAME("scfilt" "lo"));
     static ::osl::Module aModule;
     bool bLoaded = aModule.loadRelative(&thisModule, sFilterLib);
     if (!bLoaded)
diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx
index f8809fb..84d4c2d 100644
--- a/sd/source/filter/sdfilter.cxx
+++ b/sd/source/filter/sdfilter.cxx
@@ -67,7 +67,7 @@
 
 OUString SdFilter::ImplGetFullLibraryName( const OUString& rLibraryName ) const
 {
-    String aTemp(OUString(SVLIBRARY("?")));
+    String aTemp(OUString(SAL_MODULENAME("?" "lo")));
     xub_StrLen nIndex = aTemp.Search( (sal_Unicode)'?' );
     aTemp.Replace( nIndex, 1, rLibraryName );
     OUString aLibraryName( aTemp );
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index b973bc4..9bcf5e0 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -503,7 +503,7 @@
 
 #ifndef DISABLE_DYNLOADING
     // get basctl dllname
-    static OUString aLibName( SVLIBRARY( "basctl"  ) );
+    static OUString aLibName( SAL_MODULENAME( "basctl" "lo" ) );
 
     // load module
     oslModule handleMod = osl_loadModuleRelative(
@@ -605,7 +605,7 @@
 
 #ifndef DISABLE_DYNLOADING
     // get basctl dllname
-    static OUString aLibName( SVLIBRARY( "basctl"  ) );
+    static OUString aLibName( SAL_MODULENAME( "basctl" "lo" ) );
 
     // load module
     oslModule handleMod = osl_loadModuleRelative(
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 2a85ac9..4ff6da9 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -186,7 +186,7 @@
         bDetermineFunction = true;
 
 #ifndef DISABLE_DYNLOADING
-        static OUString aLibName( SVLIBRARY( "cui" ) );
+        static OUString aLibName( SAL_MODULENAME( "cui" "lo" ) );
         oslModule handleMod = osl_loadModuleRelative(
             &thisModule, aLibName.pData, 0 );
 
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index c80b4d4..7a324be 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -847,7 +847,7 @@
 {
 #ifndef DISABLE_DYNLOADING
     // get basctl dllname
-    static OUString aLibName( SVLIBRARY( "basctl"  ) );
+    static OUString aLibName( SAL_MODULENAME( "basctl" "lo" ) );
 
     // load module
     oslModule handleMod = osl_loadModuleRelative(
@@ -875,7 +875,7 @@
 {
 #ifndef DISABLE_DYNLOADING
     // get basctl dllname
-    static OUString aLibName( SVLIBRARY( "basctl"  ) );
+    static OUString aLibName( SAL_MODULENAME( "basctl" "lo" ) );
 
     // load module
     oslModule handleMod = osl_loadModuleRelative(
diff --git a/svtools/source/misc/svtaccessiblefactory.cxx b/svtools/source/misc/svtaccessiblefactory.cxx
index ee5a9c0..2d946a3 100644
--- a/svtools/source/misc/svtaccessiblefactory.cxx
+++ b/svtools/source/misc/svtaccessiblefactory.cxx
@@ -279,7 +279,7 @@
             if ( !s_pFactory.get() )
             {
 #ifndef DISABLE_DYNLOADING
-                const OUString sModuleName( SVLIBRARY( "acc" ));
+                const OUString sModuleName( SAL_MODULENAME( "acc" "lo" ));
                 s_hAccessibleImplementationModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 );
                 if ( s_hAccessibleImplementationModule != NULL )
                 {
diff --git a/svx/source/form/dbtoolsclient.cxx b/svx/source/form/dbtoolsclient.cxx
index e28da50..7e8ad23 100644
--- a/svx/source/form/dbtoolsclient.cxx
+++ b/svx/source/form/dbtoolsclient.cxx
@@ -116,7 +116,7 @@
             OSL_ENSURE(NULL == s_pFactoryCreationFunc, "ODbtoolsClient::registerClient: inconsistence: already have a factory function!");
 
 #ifndef DISABLE_DYNLOADING
-            const OUString sModuleName( SVLIBRARY( "dbtools" )
+            const OUString sModuleName( SAL_MODULENAME( "dbtools" "lo" )
             );
 
             // load the dbtools library
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 058483c..bfb998e 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -153,7 +153,7 @@
 {
     if (!msword_.is())
     {
-        bool ok = msword_.loadRelative( &thisModule, SVLIBRARY( "msword" ), SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY );
+        bool ok = msword_.loadRelative( &thisModule, SAL_MODULENAME( "msword" "lo" ), SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY );
         SAL_WARN_IF(!ok, "sw", "failed to load msword library");
     }
     if (msword_.is())
diff --git a/sw/source/ui/dbui/swdbtoolsclient.cxx b/sw/source/ui/dbui/swdbtoolsclient.cxx
index 14cce3b..789a5eb 100644
--- a/sw/source/ui/dbui/swdbtoolsclient.cxx
+++ b/sw/source/ui/dbui/swdbtoolsclient.cxx
@@ -104,7 +104,7 @@
         OSL_ENSURE(NULL == getDbToolsClientFactoryFunction(), "SwDbtoolsClient::registerClient: inconsistence: already have a factory function!");
 
 #ifndef DISABLE_DYNLOADING
-        const OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM(SVLIBRARY("dbtools")));
+        const OUString sModuleName(SAL_MODULENAME("dbtools" "lo"));
 
         // load the dbtools library
         getDbToolsClientModule() = osl_loadModuleRelative(
diff --git a/toolkit/source/helper/accessibilityclient.cxx b/toolkit/source/helper/accessibilityclient.cxx
index 9ab29d0..f4ebc06 100644
--- a/toolkit/source/helper/accessibilityclient.cxx
+++ b/toolkit/source/helper/accessibilityclient.cxx
@@ -21,7 +21,6 @@
 #include <toolkit/helper/accessiblefactory.hxx>
 #include <osl/module.h>
 #include <osl/diagnose.h>
-#include <tools/solar.h>
 
 // #define UNLOAD_ON_LAST_CLIENT_DYING
     // this is not recommended currently. If enabled, the implementation will log
@@ -201,7 +200,7 @@
             if ( !s_pFactory.get() )
             {
 #ifndef DISABLE_DYNLOADING
-                const OUString sModuleName( SVLIBRARY( "acc" ) );
+                const OUString sModuleName( SAL_MODULENAME( "acc" "lo" ) );
                 s_hAccessibleImplementationModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 );
                 if ( s_hAccessibleImplementationModule != NULL )
                 {
diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h
index 58d5849..d880e28 100644
--- a/tools/inc/tools/solar.h
+++ b/tools/inc/tools/solar.h
@@ -131,24 +131,6 @@
 #define XubString       String
 #define xub_StrLen      sal_uInt16
 
-#define STRING_CONCAT3( s1, s2, s3 ) \
-    s1 s2 s3
-
-// dll file extensions
-
-#if defined WNT
-#define SVLIBRARY( Base ) \
-    STRING_CONCAT3( Base, "lo", ".dll" )
-#elif defined MACOSX
-#define SVLIBRARY( Base ) \
-    STRING_CONCAT3( "lib", Base, "lo.dylib" )
-#elif defined UNX
-#define SVLIBRARY( Base ) \
-    STRING_CONCAT3( "lib", Base, "lo.so" )
-#else
-  #error unknown platform
-#endif
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index fea57af..063fbe0 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -19,6 +19,7 @@
 
 #include "FilterConfigCache.hxx"
 
+#include <osl/module.h>
 #include <vcl/graphicfilter.hxx>
 #include <com/sun/star/uno/Any.h>
 #include <comphelper/processfactory.hxx>
@@ -87,7 +88,7 @@
             if ( sFilterName.EqualsIgnoreCaseAscii( *pPtr ) )
                 bIsPixelFormat = sal_True;
         }
-        OUString sTemp(SVLIBRARY("?"));
+        OUString sTemp(SAL_MODULENAME("?" "lo"));
         sal_Int32 nIndex = sTemp.indexOf(static_cast<sal_Unicode>('?'));
         sFilterName = sTemp.replaceAt(nIndex, 1, sFilterName);
     }

-- 
To view, visit https://gerrit.libreoffice.org/3574
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1b6ba1220657343a264525d1cb55138e481f4fd
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Marcos Souza <marcos.souza.org at gmail.com>



More information about the LibreOffice mailing list