Kaydet (Commit) 8471ba7b authored tarafından Stephan Bergmann's avatar Stephan Bergmann

No need for extern "C" here

...and fix resulting loplugin:salbool fallout

Change-Id: I5ae1497608d31c20b0d10676450a7673dee1c651
üst b6dbc5e7
...@@ -27,8 +27,6 @@ ...@@ -27,8 +27,6 @@
#include <osl/mutex.h> #include <osl/mutex.h>
#include "jni.h" #include "jni.h"
extern "C" {
/** @file /** @file
<p>This library can operate in two modes, application mode and direct mode.</p> <p>This library can operate in two modes, application mode and direct mode.</p>
...@@ -285,10 +283,10 @@ JVMFWK_DLLPUBLIC void SAL_CALL jfw_freeJavaInfo(JavaInfo *pInfo); ...@@ -285,10 +283,10 @@ JVMFWK_DLLPUBLIC void SAL_CALL jfw_freeJavaInfo(JavaInfo *pInfo);
@param pInfoB @param pInfoB
the second argument which is compared with the first. the second argument which is compared with the first.
@return @return
sal_True - both object represent the same JRE.</br> true - both object represent the same JRE.</br>
sal_False - the objects represend different JREs false - the objects represend different JREs
*/ */
JVMFWK_DLLPUBLIC sal_Bool SAL_CALL jfw_areEqualJavaInfo( JVMFWK_DLLPUBLIC bool SAL_CALL jfw_areEqualJavaInfo(
JavaInfo const * pInfoA,JavaInfo const * pInfoB); JavaInfo const * pInfoA,JavaInfo const * pInfoB);
/** determines if a Java Virtual Machine is already running. /** determines if a Java Virtual Machine is already running.
...@@ -573,7 +571,7 @@ JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_getSelectedJRE(JavaInfo **ppInf ...@@ -573,7 +571,7 @@ JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_getSelectedJRE(JavaInfo **ppInf
/** determines if Java can be used. /** determines if Java can be used.
<p>If <code>bEnabled</code> is <code>sal_False</code> then a call <p>If <code>bEnabled</code> is <code>false</code> then a call
to jfw_startVM will result in an error with the errorcode to jfw_startVM will result in an error with the errorcode
<code>JFW_E_JAVA_DISABLED</code></p> <code>JFW_E_JAVA_DISABLED</code></p>
...@@ -587,7 +585,7 @@ JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_getSelectedJRE(JavaInfo **ppInf ...@@ -587,7 +585,7 @@ JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_getSelectedJRE(JavaInfo **ppInf
were not met.<br/> were not met.<br/>
JFW_E_DIRECT_MODE the function cannot be used in this mode. JFW_E_DIRECT_MODE the function cannot be used in this mode.
*/ */
JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_setEnabled(sal_Bool bEnabled); JVMFWK_DLLPUBLIC javaFrameworkError SAL_CALL jfw_setEnabled(bool bEnabled);
/** provides the information if Java can be used. /** provides the information if Java can be used.
...@@ -766,8 +764,6 @@ JVMFWK_DLLPUBLIC void SAL_CALL jfw_lock(); ...@@ -766,8 +764,6 @@ JVMFWK_DLLPUBLIC void SAL_CALL jfw_lock();
*/ */
JVMFWK_DLLPUBLIC void SAL_CALL jfw_unlock(); JVMFWK_DLLPUBLIC void SAL_CALL jfw_unlock();
}
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -624,13 +624,13 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo) ...@@ -624,13 +624,13 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
return errcode; return errcode;
} }
sal_Bool SAL_CALL jfw_areEqualJavaInfo( bool SAL_CALL jfw_areEqualJavaInfo(
JavaInfo const * pInfoA,JavaInfo const * pInfoB) JavaInfo const * pInfoA,JavaInfo const * pInfoB)
{ {
if (pInfoA == pInfoB) if (pInfoA == pInfoB)
return sal_True; return true;
if (pInfoA == nullptr || pInfoB == nullptr) if (pInfoA == nullptr || pInfoB == nullptr)
return sal_False; return false;
OUString sVendor(pInfoA->sVendor); OUString sVendor(pInfoA->sVendor);
OUString sLocation(pInfoA->sLocation); OUString sLocation(pInfoA->sLocation);
OUString sVersion(pInfoA->sVersion); OUString sVersion(pInfoA->sVersion);
...@@ -642,9 +642,9 @@ sal_Bool SAL_CALL jfw_areEqualJavaInfo( ...@@ -642,9 +642,9 @@ sal_Bool SAL_CALL jfw_areEqualJavaInfo(
&& pInfoA->nRequirements == pInfoB->nRequirements && pInfoA->nRequirements == pInfoB->nRequirements
&& sData == pInfoB->arVendorData) && sData == pInfoB->arVendorData)
{ {
return sal_True; return true;
} }
return sal_False; return false;
} }
...@@ -827,7 +827,7 @@ javaFrameworkError SAL_CALL jfw_setSelectedJRE(JavaInfo const *pInfo) ...@@ -827,7 +827,7 @@ javaFrameworkError SAL_CALL jfw_setSelectedJRE(JavaInfo const *pInfo)
} }
return errcode; return errcode;
} }
javaFrameworkError SAL_CALL jfw_setEnabled(sal_Bool bEnabled) javaFrameworkError SAL_CALL jfw_setEnabled(bool bEnabled)
{ {
javaFrameworkError errcode = JFW_E_NONE; javaFrameworkError errcode = JFW_E_NONE;
try try
......
...@@ -163,7 +163,7 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque ...@@ -163,7 +163,7 @@ void SAL_CALL JavaInteractionHandler::handle( const Reference< XInteractionReque
nResult = aQueryBox->Execute(); nResult = aQueryBox->Execute();
if ( nResult == RET_YES ) if ( nResult == RET_YES )
{ {
jfw_setEnabled(sal_True); jfw_setEnabled(true);
} }
m_nResult_JavaDisabled = nResult; m_nResult_JavaDisabled = nResult;
......
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