[Libreoffice-commits] core.git: sc/source

Stephan Bergmann sbergman at redhat.com
Tue Jun 2 03:33:57 PDT 2015


 sc/source/core/tool/callform.cxx |   18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

New commits:
commit f8421bdef4ec4a02b62a3afc00d59dd11b801b51
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jun 2 12:33:30 2015 +0200

    No need for an intermediate FARPROC here
    
    Change-Id: I601040a142d7a1d946a7141ae48981790eb3f305

diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index 2b941ac..bc0bcb3 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -63,8 +63,6 @@ typedef void (CALLTYPE* Advice)  ( sal_uInt16&      nNo,
                                    AdvData&     pfCallback );
 typedef void (CALLTYPE* Unadvice)( double&      nHandle );
 
-typedef void (CALLTYPE* FARPROC) ( void );
-
 }
 
 #ifndef DISABLE_DYNLOADING
@@ -176,13 +174,13 @@ bool InitExternalFunc(const OUString& rModuleName)
     osl::Module* pLib = new osl::Module( aNP );
     if (pLib->is())
     {
-        FARPROC fpGetCount = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(GETFUNCTIONCOUNT));
-        FARPROC fpGetData = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(GETFUNCTIONDATA));
+        oslGenericFunction fpGetCount = pLib->getFunctionSymbol(GETFUNCTIONCOUNT);
+        oslGenericFunction fpGetData = pLib->getFunctionSymbol(GETFUNCTIONDATA);
         if ((fpGetCount != NULL) && (fpGetData != NULL))
         {
-            FARPROC fpIsAsync = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(ISASYNC));
-            FARPROC fpAdvice = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(ADVICE));
-            FARPROC fpSetLanguage = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(SETLANGUAGE));
+            oslGenericFunction fpIsAsync = pLib->getFunctionSymbol(ISASYNC);
+            oslGenericFunction fpAdvice = pLib->getFunctionSymbol(ADVICE);
+            oslGenericFunction fpSetLanguage = pLib->getFunctionSymbol(SETLANGUAGE);
             if ( fpSetLanguage )
             {
                 LanguageType eLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType();
@@ -257,7 +255,7 @@ bool FuncData::Call(void** ppParam) const
 #else
     bool bRet = false;
     osl::Module* pLib = pModuleData->GetInstance();
-    FARPROC fProc = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(aFuncName));
+    oslGenericFunction fProc = pLib->getFunctionSymbol(aFuncName);
     if (fProc != NULL)
     {
         switch (nParamCount)
@@ -355,7 +353,7 @@ bool FuncData::Unadvice( double nHandle )
 #else
     bool bRet = false;
     osl::Module* pLib = pModuleData->GetInstance();
-    FARPROC fProc = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(UNADVICE));
+    oslGenericFunction fProc = pLib->getFunctionSymbol(UNADVICE);
     if (fProc != NULL)
     {
         reinterpret_cast< ::Unadvice>(fProc)(nHandle);
@@ -382,7 +380,7 @@ bool FuncData::getParamDesc( OUString& aName, OUString& aDesc, sal_uInt16 nParam
     if ( nParam <= nParamCount )
     {
         osl::Module* pLib = pModuleData->GetInstance();
-        FARPROC fProc = reinterpret_cast<FARPROC>(pLib->getFunctionSymbol(GETPARAMDESC));
+        oslGenericFunction fProc = pLib->getFunctionSymbol(GETPARAMDESC);
         if ( fProc != NULL )
         {
             sal_Char pcName[256];


More information about the Libreoffice-commits mailing list