summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools/CommonTools.cxx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-04-04 22:46:53 +0200
committerTor Lillqvist <tml@iki.fi>2013-04-05 00:18:50 +0300
commitb7525f1f1d123084b60269f420300afdd405b0d1 (patch)
tree0b2e32b3879a27802c0e607b187c1b43ab697c9e /connectivity/source/commontools/CommonTools.cxx
parentf5928f09ad53de2c4683000619d29be140a97be8 (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/source/commontools/CommonTools.cxx')
-rw-r--r--connectivity/source/commontools/CommonTools.cxx11
1 files changed, 4 insertions, 7 deletions
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