summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/CppunitTest_connectivity_commontools.mk3
-rw-r--r--connectivity/Library_dbtools.mk3
-rw-r--r--connectivity/inc/connectivity/CommonTools.hxx6
-rw-r--r--connectivity/source/commontools/CommonTools.cxx11
4 files changed, 13 insertions, 10 deletions
diff --git a/connectivity/CppunitTest_connectivity_commontools.mk b/connectivity/CppunitTest_connectivity_commontools.mk
index e0f7752edd12..3ececdd9eb84 100644
--- a/connectivity/CppunitTest_connectivity_commontools.mk
+++ b/connectivity/CppunitTest_connectivity_commontools.mk
@@ -45,7 +45,8 @@ $(eval $(call gb_CppunitTest_use_libraries,connectivity_commontools, \
cppu \
cppuhelper \
i18nisolang1 \
- $(if $(filter IOS,$(OS)),,jvmaccess) \
+ $(if $(filter TRUE,$(SOLAR_JAVA)), \
+ jvmaccess) \
sal \
salhelper \
test \
diff --git a/connectivity/Library_dbtools.mk b/connectivity/Library_dbtools.mk
index 1e063eacd2a9..2d65ea9de9c6 100644
--- a/connectivity/Library_dbtools.mk
+++ b/connectivity/Library_dbtools.mk
@@ -52,7 +52,8 @@ $(eval $(call gb_Library_use_libraries,dbtools,\
cppuhelper \
sal \
salhelper \
- $(if $(filter IOS,$(OS)),,jvmaccess) \
+ $(if $(filter TRUE,$(SOLAR_JAVA)), \
+ jvmaccess) \
utl \
tl \
comphelper \
diff --git a/connectivity/inc/connectivity/CommonTools.hxx b/connectivity/inc/connectivity/CommonTools.hxx
index fa7ab752e32d..a2c4e60f149f 100644
--- a/connectivity/inc/connectivity/CommonTools.hxx
+++ b/connectivity/inc/connectivity/CommonTools.hxx
@@ -40,7 +40,10 @@ namespace com { namespace sun { namespace star { namespace util {
struct Time;
}
}}}
+
+#ifdef SOLAR_JAVA
namespace jvmaccess { class VirtualMachine; }
+#endif
namespace connectivity
{
@@ -157,7 +160,7 @@ namespace connectivity
OOO_DLLPUBLIC_DBTOOLS void checkDisposed(sal_Bool _bThrow) throw ( ::com::sun::star::lang::DisposedException );
-
+#ifdef SOLAR_JAVA
/** creates a java virtual machine
@param _rxContext
The ORB.
@@ -173,6 +176,7 @@ namespace connectivity
The class name to look for.
*/
OOO_DLLPUBLIC_DBTOOLS sal_Bool existsJavaClassByName( const ::rtl::Reference< jvmaccess::VirtualMachine >& _pJVM,const ::rtl::OUString& _sClassName );
+#endif
}
//==================================================================================
diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx
index 75015c7b564f..909e411a8d76 100644
--- a/connectivity/source/commontools/CommonTools.cxx
+++ b/connectivity/source/commontools/CommonTools.cxx
@@ -31,7 +31,9 @@
#include "TConnection.hxx"
#include <comphelper/types.hxx>
#include <com/sun/star/java/JavaVirtualMachine.hpp>
+#ifdef SOLAR_JAVA
#include <jvmaccess/virtualmachine.hxx>
+#endif
#include <rtl/process.h>
using namespace ::comphelper;
@@ -153,7 +155,7 @@ namespace connectivity
return rtl::OUString::createFromAscii(s);
}
- // -----------------------------------------------------------------------------
+#ifdef SOLAR_JAVA
::rtl::Reference< jvmaccess::VirtualMachine > getJavaVM(const Reference<XComponentContext >& _rxContext)
{
::rtl::Reference< jvmaccess::VirtualMachine > aRet;
@@ -199,7 +201,6 @@ namespace connectivity
sal_Bool existsJavaClassByName( const ::rtl::Reference< jvmaccess::VirtualMachine >& _pJVM,const ::rtl::OUString& _sClassName )
{
sal_Bool bRet = sal_False;
-#ifdef SOLAR_JAVA
if ( _pJVM.is() )
{
jvmaccess::VirtualMachine::AttachGuard aGuard(_pJVM);
@@ -213,13 +214,9 @@ namespace connectivity
pEnv->DeleteLocalRef( out );
}
}
-#else
- (void)_pJVM;
- (void)_sClassName;
-#endif
return bRet;
}
-
+#endif
}
#include <ctype.h> //isdigit