diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-04-04 22:46:53 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-04-05 00:18:50 +0300 |
commit | b7525f1f1d123084b60269f420300afdd405b0d1 (patch) | |
tree | 0b2e32b3879a27802c0e607b187c1b43ab697c9e /connectivity | |
parent | f5928f09ad53de2c4683000619d29be140a97be8 (diff) |
Drop jvmaccess and jvmfwk when no SOLAR_JAVA
Just sprinkle #ifdef SOLAR_JAVA into the code instead.
In the source for jvmaccess and jvmfwk such ifdefs can be removed as
it isn't compiled unless SOLAR_JAVA.
Change-Id: Ia8614f8bd6d833582d3b79b5fb75f9153fa79606
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/CppunitTest_connectivity_commontools.mk | 3 | ||||
-rw-r--r-- | connectivity/Library_dbtools.mk | 3 | ||||
-rw-r--r-- | connectivity/inc/connectivity/CommonTools.hxx | 6 | ||||
-rw-r--r-- | connectivity/source/commontools/CommonTools.cxx | 11 |
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 |