summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--cui/Library_cui.mk6
-rw-r--r--cui/source/options/treeopt.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx6
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx4
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx8
-rw-r--r--dbaccess/source/ui/dlg/TextConnectionHelper.cxx2
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx5
-rw-r--r--desktop/Library_migrationoo2.mk6
-rw-r--r--desktop/source/app/app.cxx3
-rw-r--r--desktop/source/app/desktopcontext.cxx2
-rw-r--r--jvmaccess/Module_jvmaccess.mk4
-rw-r--r--jvmaccess/inc/jvmaccess/classpath.hxx6
-rw-r--r--jvmaccess/inc/jvmaccess/virtualmachine.hxx9
-rw-r--r--jvmaccess/source/classpath.cxx17
-rw-r--r--jvmaccess/source/unovirtualmachine.cxx8
-rw-r--r--jvmaccess/source/virtualmachine.cxx9
-rw-r--r--jvmfwk/Module_jvmfwk.mk4
-rw-r--r--jvmfwk/inc/jvmfwk/framework.h6
-rw-r--r--jvmfwk/inc/jvmfwk/vendorplugin.h2
-rw-r--r--jvmfwk/source/framework.cxx45
-rwxr-xr-xscp2/source/ooo/ure.scp6
-rw-r--r--sfx2/source/control/unoctitm.cxx6
-rw-r--r--svl/Library_svl.mk3
-rw-r--r--svtools/AllLangResTarget_svt.mk3
-rw-r--r--svtools/Library_svt.mk8
-rw-r--r--vcl/Library_desktop_detector.mk3
-rw-r--r--vcl/Library_vcl.mk2
31 files changed, 73 insertions, 135 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
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 1966b7fc1f33..c5e8609cbec5 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -53,7 +53,8 @@ $(eval $(call gb_Library_use_libraries,cui,\
drawinglayer \
editeng \
i18nisolang1 \
- jvmfwk \
+ $(if $(filter TRUE,$(SOLAR_JAVA)), \
+ jvmfwk) \
lng \
sal \
salhelper \
@@ -159,7 +160,8 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
cui/source/options/optHeaderTabListbox \
cui/source/options/opthtml \
cui/source/options/optinet2 \
- cui/source/options/optjava \
+ $(if $(filter TRUE,$(SOLAR_JAVA)), \
+ cui/source/options/optjava) \
cui/source/options/optjsearch \
cui/source/options/optlingu \
cui/source/options/optmemory \
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index eb382088837c..b7bc0b868476 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -312,7 +312,9 @@ SfxTabPage* CreateGeneralTabPage( sal_uInt16 nId, Window* pParent, const SfxItem
case RID_SVXPAGE_ACCESSIBILITYCONFIG: fnCreate = &SvxAccessibilityOptionsTabPage::Create; break;
case RID_SVXPAGE_OPTIONS_CTL: fnCreate = &SvxCTLOptionsPage::Create ; break;
case RID_SVXPAGE_INET_MOZPLUGIN: fnCreate = &MozPluginTabPage::Create; break;
+#ifdef SOLAR_JAVA
case RID_SVXPAGE_OPTIONS_JAVA: fnCreate = &SvxJavaOptionsPage::Create ; break;
+#endif
case RID_SVXPAGE_ONLINEUPDATE: fnCreate = &SvxOnlineUpdateTabPage::Create; break;
case RID_OPTPAGE_CHART_DEFCOLORS: fnCreate = &SvxDefaultColorOptPage::Create; break;
}
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 2bb56799e722..96ea9ed860d9 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -22,7 +22,9 @@
#include <com/sun/star/packages/zip/ZipIOException.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
+#ifdef SOLAR_JAVA
#include <jvmaccess/virtualmachine.hxx>
+#endif
#include "xmlfilter.hxx"
#include "flt_reghelper.hxx"
#include <vcl/svapp.hxx>
@@ -104,6 +106,7 @@ namespace dbaxml
{
if ( m_eWhat == E_JAVA )
{
+#ifdef SOLAR_JAVA
static bool s_bFirstTime = true;
if ( s_bFirstTime )
{
@@ -117,6 +120,7 @@ namespace dbaxml
OSL_ASSERT(0);
}
}
+#endif
}
else if ( m_eWhat == E_CALC )
{
@@ -187,7 +191,9 @@ namespace dbaxml
if ( m_aTypeCollection.needsJVM(sURL) )
{
+#ifdef SOLAR_JAVA
pCreatorThread = new FastLoader(m_xContext, FastLoader::E_JAVA);
+#endif
}
else if ( sURL.matchIgnoreAsciiCaseAsciiL("sdbc:calc:",10,0) )
{
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index 688b0890d6b1..77504d9d3d03 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -22,7 +22,9 @@
#include "ConnectionPage.hrc"
#include "dbu_dlg.hrc"
#include "dsmeta.hxx"
+#ifdef SOLAR_JAVA
#include <jvmaccess/virtualmachine.hxx>
+#endif
#include <svl/itemset.hxx>
#include <unotools/pathoptions.hxx>
#include <svl/stritem.hxx>
@@ -315,6 +317,7 @@ namespace dbaui
{
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
sal_Bool bSuccess = sal_False;
+#ifdef SOLAR_JAVA
try
{
if ( !m_aJavaDriver.GetText().isEmpty() )
@@ -326,6 +329,7 @@ namespace dbaui
catch(Exception&)
{
}
+#endif
const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error;
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 06584cfff7de..f1cfea4ef953 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -33,7 +33,9 @@
#include <vcl/msgbox.hxx>
#include <vcl/mnemonic.hxx>
#include <svl/cjkoptions.hxx>
+#ifdef SOLAR_JAVA
#include <jvmaccess/virtualmachine.hxx>
+#endif
#include <connectivity/CommonTools.hxx>
#include "DriverSettings.hxx"
#include "dbadmin.hxx"
@@ -552,6 +554,7 @@ DBG_NAME(OMySQLIntroPageSetup)
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
sal_Bool bSuccess = sal_False;
+#ifdef SOLAR_JAVA
try
{
if ( !m_aETDriverClass.GetText().isEmpty() )
@@ -564,7 +567,7 @@ DBG_NAME(OMySQLIntroPageSetup)
catch(::com::sun::star::uno::Exception&)
{
}
-
+#endif
const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error;
OSQLMessageBox aMsg( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt );
@@ -672,6 +675,7 @@ DBG_NAME(OMySQLIntroPageSetup)
{
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
sal_Bool bSuccess = sal_False;
+#ifdef SOLAR_JAVA
try
{
if ( !m_aETDriverClass.GetText().isEmpty() )
@@ -684,7 +688,7 @@ DBG_NAME(OMySQLIntroPageSetup)
catch(::com::sun::star::uno::Exception&)
{
}
-
+#endif
sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
OSQLMessageBox aMsg( this, OUString( ModuleRes( nMessage ) ), OUString() );
aMsg.Execute();
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index 05d5485eec21..0d1dad07d5d9 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -34,7 +34,9 @@
#include <vcl/msgbox.hxx>
#include <vcl/mnemonic.hxx>
#include <svl/cjkoptions.hxx>
+#ifdef SOLAR_JAVA
#include <jvmaccess/virtualmachine.hxx>
+#endif
#include <connectivity/CommonTools.hxx>
#include "DriverSettings.hxx"
#include "dbadmin.hxx"
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index 56780f8c0a19..b396360b702d 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -39,7 +39,9 @@
#include <vcl/msgbox.hxx>
#include <vcl/mnemonic.hxx>
#include <svl/cjkoptions.hxx>
+#ifdef SOLAR_JAVA
#include <jvmaccess/virtualmachine.hxx>
+#endif
#include <connectivity/CommonTools.hxx>
#include "DriverSettings.hxx"
#include "dbadmin.hxx"
@@ -622,6 +624,7 @@ namespace dbaui
OSL_ENSURE(m_bUseClass,"Who called me?");
sal_Bool bSuccess = sal_False;
+#ifdef SOLAR_JAVA
try
{
if ( !m_aEDDriverClass.GetText().isEmpty() )
@@ -634,7 +637,7 @@ namespace dbaui
catch(Exception&)
{
}
-
+#endif
const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error;
OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String(), WB_OK | WB_DEF_OK, mt );
diff --git a/desktop/Library_migrationoo2.mk b/desktop/Library_migrationoo2.mk
index f624d18b83f3..89b73d3bb43f 100644
--- a/desktop/Library_migrationoo2.mk
+++ b/desktop/Library_migrationoo2.mk
@@ -35,7 +35,8 @@ $(eval $(call gb_Library_use_libraries,migrationoo2,\
cppu \
cppuhelper \
i18nisolang1 \
- jvmfwk \
+ $(if $(filter TRUE,$(SOLAR_JAVA)), \
+ jvmfwk) \
sal \
tl \
utl \
@@ -47,7 +48,8 @@ $(eval $(call gb_Library_set_componentfile,migrationoo2,desktop/source/migration
$(eval $(call gb_Library_add_exception_objects,migrationoo2,\
desktop/source/migration/services/basicmigration \
desktop/source/migration/services/cexports \
- desktop/source/migration/services/jvmfwk \
+ $(if $(filter TRUE,$(SOLAR_JAVA)), \
+ desktop/source/migration/services/jvmfwk) \
desktop/source/migration/services/wordbookmigration \
))
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 32c8b558caca..96809e70caaa 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1719,11 +1719,12 @@ int Desktop::Main()
try
{
+#ifdef SOLAR_JAVA
// The JavaContext contains an interaction handler which is used when
// the creation of a Java Virtual Machine fails
com::sun::star::uno::ContextLayer layer2(
new svt::JavaContext( com::sun::star::uno::getCurrentContext() ) );
-
+#endif
// check whether the shutdown is caused by restart just before entering the Execute
pExecGlobals->bRestartRequested = pExecGlobals->bRestartRequested ||
xRestartManager->isRestartRequested(true);
diff --git a/desktop/source/app/desktopcontext.cxx b/desktop/source/app/desktopcontext.cxx
index 032078602046..26cd03bcd5e8 100644
--- a/desktop/source/app/desktopcontext.cxx
+++ b/desktop/source/app/desktopcontext.cxx
@@ -41,7 +41,9 @@ Any SAL_CALL DesktopContext::getValueByName( const OUString& Name) throw (Runtim
if ( Name == JAVA_INTERACTION_HANDLER_NAME )
{
+#ifdef SOLAR_JAVA
retVal = makeAny( Reference< XInteractionHandler >( new svt::JavaInteractionHandler()) );
+#endif
}
else if( m_xNextContext.is() )
{
diff --git a/jvmaccess/Module_jvmaccess.mk b/jvmaccess/Module_jvmaccess.mk
index 39eb4ad1897f..912c48ff6daa 100644
--- a/jvmaccess/Module_jvmaccess.mk
+++ b/jvmaccess/Module_jvmaccess.mk
@@ -27,14 +27,16 @@
$(eval $(call gb_Module_Module,jvmaccess))
+ifeq ($(SOLAR_JAVA),TRUE)
+
$(eval $(call gb_Module_add_targets,jvmaccess,\
Package_inc \
))
-ifneq ($(OS),IOS)
$(eval $(call gb_Module_add_targets,jvmaccess,\
Library_jvmaccess \
))
+
endif
# vim:set noet sw=4 ts=4:
diff --git a/jvmaccess/inc/jvmaccess/classpath.hxx b/jvmaccess/inc/jvmaccess/classpath.hxx
index 3fb17f3c7131..507af76d3759 100644
--- a/jvmaccess/inc/jvmaccess/classpath.hxx
+++ b/jvmaccess/inc/jvmaccess/classpath.hxx
@@ -24,13 +24,7 @@
#include "sal/config.h"
#include "com/sun/star/uno/Reference.hxx"
-#if defined SOLAR_JAVA
#include "jni.h"
-#else
-struct JNIEnv;
-typedef void * jclass;
-typedef void * jobjectArray;
-#endif
namespace com { namespace sun { namespace star { namespace uno {
class XComponentContext;
diff --git a/jvmaccess/inc/jvmaccess/virtualmachine.hxx b/jvmaccess/inc/jvmaccess/virtualmachine.hxx
index f425daed6a2a..57ac5ead39f4 100644
--- a/jvmaccess/inc/jvmaccess/virtualmachine.hxx
+++ b/jvmaccess/inc/jvmaccess/virtualmachine.hxx
@@ -24,16 +24,7 @@
#include "rtl/ref.hxx"
#include "salhelper/simplereferenceobject.hxx"
-#ifdef SOLAR_JAVA
#include "jni.h"
-#else
-struct JNIEnv_;
-typedef JNIEnv_ JNIEnv;
-struct JavaVM_;
-typedef JavaVM_ JavaVM;
-typedef int jint;
-typedef void * jobject;
-#endif
namespace jvmaccess {
diff --git a/jvmaccess/source/classpath.cxx b/jvmaccess/source/classpath.cxx
index f0513352c550..4891cc27876a 100644
--- a/jvmaccess/source/classpath.cxx
+++ b/jvmaccess/source/classpath.cxx
@@ -36,16 +36,13 @@
#include "rtl/ustring.hxx"
#include "sal/types.h"
-#if defined SOLAR_JAVA
#include "jni.h"
-#endif
void * ::jvmaccess::ClassPath::doTranslateToUrls(
css::uno::Reference< css::uno::XComponentContext > const & context,
void * environment, ::rtl::OUString const & classPath)
{
OSL_ASSERT(context.is() && environment != 0);
-#if defined SOLAR_JAVA
::JNIEnv * const env = static_cast< ::JNIEnv * >(environment);
jclass classUrl(env->FindClass("java/net/URL"));
if (classUrl == 0) {
@@ -104,12 +101,6 @@ void * ::jvmaccess::ClassPath::doTranslateToUrls(
env->SetObjectArrayElement(result, idx++, *i);
}
return result;
-#else
- (void) context;
- (void) environment;
- (void) classPath;
- return 0;
-#endif
}
void * ::jvmaccess::ClassPath::doLoadClass(
@@ -118,7 +109,6 @@ void * ::jvmaccess::ClassPath::doLoadClass(
::rtl::OUString const & name)
{
OSL_ASSERT(context.is() && environment != 0);
-#if defined SOLAR_JAVA
::JNIEnv * const env = static_cast< ::JNIEnv * >(environment);
jclass classLoader(env->FindClass("java/net/URLClassLoader"));
if (classLoader == 0) {
@@ -151,13 +141,6 @@ void * ::jvmaccess::ClassPath::doLoadClass(
return 0;
}
return env->CallObjectMethodA(cl, methLoadClass, &arg);
-#else
- (void) context;
- (void) environment;
- (void) classPath;
- (void) name;
- return 0;
-#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmaccess/source/unovirtualmachine.cxx b/jvmaccess/source/unovirtualmachine.cxx
index dc2d680f5b14..66c181dfaa39 100644
--- a/jvmaccess/source/unovirtualmachine.cxx
+++ b/jvmaccess/source/unovirtualmachine.cxx
@@ -25,9 +25,7 @@
#include "jvmaccess/virtualmachine.hxx"
-#if defined SOLAR_JAVA
#include "jni.h"
-#endif
namespace jvmaccess {
@@ -50,15 +48,11 @@ UnoVirtualMachine::UnoVirtualMachine(
m_virtualMachine(virtualMachine),
m_classLoader(0)
{
-#if defined SOLAR_JAVA
try {
m_classLoader =
jvmaccess::VirtualMachine::AttachGuard(m_virtualMachine).
getEnvironment()->NewGlobalRef(static_cast< jobject >(classLoader));
} catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &) {}
-#else
- (void) classLoader;
-#endif
if (m_classLoader == 0) {
throw CreationException();
}
@@ -74,7 +68,6 @@ void * UnoVirtualMachine::getClassLoader() const {
}
UnoVirtualMachine::~UnoVirtualMachine() {
-#if defined SOLAR_JAVA
try {
jvmaccess::VirtualMachine::AttachGuard(m_virtualMachine).
getEnvironment()->DeleteGlobalRef(
@@ -84,7 +77,6 @@ UnoVirtualMachine::~UnoVirtualMachine() {
"jvmaccess::UnoVirtualMachine::~UnoVirtualMachine:"
" jvmaccess::VirtualMachine::AttachGuard::CreationException" );
}
-#endif
}
}
diff --git a/jvmaccess/source/virtualmachine.cxx b/jvmaccess/source/virtualmachine.cxx
index f6500f9265c7..23192ab3e437 100644
--- a/jvmaccess/source/virtualmachine.cxx
+++ b/jvmaccess/source/virtualmachine.cxx
@@ -61,10 +61,8 @@ VirtualMachine::VirtualMachine(JavaVM * pVm, int nVersion, bool bDestroy,
m_pVm(pVm), m_nVersion(nVersion), m_bDestroy(bDestroy)
{
(void) pMainThreadEnv; // avoid warnings
-#ifdef SOLAR_JAVA
OSL_ENSURE(pVm != 0 && nVersion >= JNI_VERSION_1_2 && pMainThreadEnv != 0,
"bad parameter");
-#endif
}
VirtualMachine::~VirtualMachine()
@@ -84,10 +82,6 @@ VirtualMachine::~VirtualMachine()
JNIEnv * VirtualMachine::attachThread(bool * pAttached) const
{
-#ifndef SOLAR_JAVA
- (void) pAttached;
- return 0;
-#else
OSL_ENSURE(pAttached != 0, "bad parameter");
JNIEnv * pEnv;
jint n = m_pVm->GetEnv(reinterpret_cast< void ** >(&pEnv), m_nVersion);
@@ -113,16 +107,13 @@ JNIEnv * VirtualMachine::attachThread(bool * pAttached) const
else
*pAttached = false;
return pEnv;
-#endif
}
void VirtualMachine::detachThread() const
{
-#ifdef SOLAR_JAVA
if (m_pVm->DetachCurrentThread() != JNI_OK) {
OSL_FAIL("JNI: DetachCurrentThread failed");
}
-#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/jvmfwk/Module_jvmfwk.mk b/jvmfwk/Module_jvmfwk.mk
index 719bf79dc3a5..dae1b6fdea72 100644
--- a/jvmfwk/Module_jvmfwk.mk
+++ b/jvmfwk/Module_jvmfwk.mk
@@ -27,14 +27,14 @@
$(eval $(call gb_Module_Module,jvmfwk))
+ifeq ($(SOLAR_JAVA),TRUE)
+
$(eval $(call gb_Module_add_targets,jvmfwk,\
Library_jvmfwk \
Package_inc \
Package_rcfiles \
))
-ifneq ($(SOLAR_JAVA),)
-
$(eval $(call gb_Module_add_targets,jvmfwk,\
CustomTarget_jreproperties \
Library_sunjavaplugin \
diff --git a/jvmfwk/inc/jvmfwk/framework.h b/jvmfwk/inc/jvmfwk/framework.h
index 638bd960bb41..dbc10ac125b9 100644
--- a/jvmfwk/inc/jvmfwk/framework.h
+++ b/jvmfwk/inc/jvmfwk/framework.h
@@ -25,13 +25,7 @@
#include "jvmfwkdllapi.h"
#include "rtl/ustring.h"
#include "osl/mutex.h"
-#ifdef SOLAR_JAVA
#include "jni.h"
-#else
-struct JavaVMOption;
-struct JavaVM;
-struct JNIEnv;
-#endif
#ifdef __cplusplus
extern "C" {
diff --git a/jvmfwk/inc/jvmfwk/vendorplugin.h b/jvmfwk/inc/jvmfwk/vendorplugin.h
index 11fc6aaffc6e..5ca5e10009ba 100644
--- a/jvmfwk/inc/jvmfwk/vendorplugin.h
+++ b/jvmfwk/inc/jvmfwk/vendorplugin.h
@@ -24,9 +24,7 @@
#include "jvmfwkplugindllapi.h"
#include "jvmfwk/framework.h"
#include "rtl/ustring.h"
-#ifdef SOLAR_JAVA
#include "jni.h"
-#endif
#ifdef __cplusplus
extern "C" {
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 5111de0ca94d..7a3975b7c18b 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -45,8 +45,6 @@ namespace {
static bool g_bEnabledSwitchedOn = false;
-#ifdef SOLAR_JAVA
-
static JavaVM * g_pJavaVM = NULL;
sal_Bool areEqualJavaInfo(
@@ -55,7 +53,6 @@ sal_Bool areEqualJavaInfo(
return jfw_areEqualJavaInfo(pInfoA, pInfoB);
}
-#endif
}
#ifdef DISABLE_DYNLOADING
@@ -95,12 +92,6 @@ javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist);
javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSize)
{
-#ifndef SOLAR_JAVA
- (void) pparInfo;
- (void) pSize;
-
- return JFW_E_JAVA_DISABLED;
-#else
javaFrameworkError retVal = JFW_E_NONE;
try
{
@@ -287,22 +278,12 @@ javaFrameworkError SAL_CALL jfw_findAllJREs(JavaInfo ***pparInfo, sal_Int32 *pSi
OSL_FAIL(e.message.getStr());
}
return retVal;
-#endif
}
javaFrameworkError SAL_CALL jfw_startVM(
JavaInfo const * pInfo, JavaVMOption * arOptions, sal_Int32 cOptions,
JavaVM ** ppVM, JNIEnv ** ppEnv)
{
-#ifndef SOLAR_JAVA
- (void) pInfo;
- (void) arOptions;
- (void) cOptions;
- (void) ppVM;
- (void) ppEnv;
-
- return JFW_E_JAVA_DISABLED;
-#else
javaFrameworkError errcode = JFW_E_NONE;
if (cOptions > 0 && arOptions == NULL)
return JFW_E_INVALID_ARG;
@@ -484,7 +465,6 @@ javaFrameworkError SAL_CALL jfw_startVM(
}
return errcode;
-#endif
}
/** We do not use here jfw_findAllJREs and then check if a JavaInfo
@@ -495,11 +475,6 @@ javaFrameworkError SAL_CALL jfw_startVM(
*/
javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
{
-#ifndef SOLAR_JAVA
- (void) pInfo;
-
- return JFW_E_JAVA_DISABLED;
-#else
javaFrameworkError errcode = JFW_E_NONE;
try
{
@@ -705,7 +680,6 @@ javaFrameworkError SAL_CALL jfw_findAndSelectJRE(JavaInfo **pInfo)
}
return errcode;
-#endif
}
sal_Bool SAL_CALL jfw_areEqualJavaInfo(
@@ -799,10 +773,6 @@ javaFrameworkError SAL_CALL jfw_getSelectedJRE(JavaInfo **ppInfo)
javaFrameworkError SAL_CALL jfw_isVMRunning(sal_Bool *bRunning)
{
-#ifndef SOLAR_JAVA
- (void) bRunning;
- return JFW_E_JAVA_DISABLED;
-#else
osl::MutexGuard guard(jfw::FwkMutex::get());
if (bRunning == NULL)
return JFW_E_INVALID_ARG;
@@ -811,18 +781,11 @@ javaFrameworkError SAL_CALL jfw_isVMRunning(sal_Bool *bRunning)
else
*bRunning = sal_True;
return JFW_E_NONE;
-#endif
}
javaFrameworkError SAL_CALL jfw_getJavaInfoByPath(
rtl_uString *pPath, JavaInfo **ppInfo)
{
-#ifndef SOLAR_JAVA
- (void) pPath;
- (void) ppInfo;
-
- return JFW_E_JAVA_DISABLED;
-#else
javaFrameworkError errcode = JFW_E_NONE;
try
{
@@ -941,7 +904,6 @@ javaFrameworkError SAL_CALL jfw_getJavaInfoByPath(
}
return errcode;
-#endif
}
@@ -1207,12 +1169,6 @@ javaFrameworkError SAL_CALL jfw_getJRELocations(
javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, sal_Bool *exist)
{
-#ifndef SOLAR_JAVA
- (void) pInfo;
- (void) exist;
-
- return JFW_E_JAVA_DISABLED;
-#else
//get the function jfw_plugin_existJRE
jfw::VendorSettings aVendorSettings;
jfw::CJavaInfo aInfo;
@@ -1250,7 +1206,6 @@ javaFrameworkError jfw_existJRE(const JavaInfo *pInfo, sal_Bool *exist)
ret = JFW_E_ERROR;
}
return ret;
-#endif
}
void SAL_CALL jfw_lock()
diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp
index c24225c00203..9c9ce858339c 100755
--- a/scp2/source/ooo/ure.scp
+++ b/scp2/source/ooo/ure.scp
@@ -303,6 +303,8 @@ Unixlink gid_Unixlink_File_Dl_Store
End
#endif
+#if defined SOLAR_JAVA
+
File gid_File_Dl_Jvmaccess
LIB_FILE_BODY;
Dir = SCP2_URE_DL_DIR;
@@ -339,7 +341,6 @@ Unixlink gid_Unixlink_File_Dl_Jvmfwk
End
#endif
-#if defined SOLAR_JAVA
File gid_File_Dl_Sunjavaplugin
LIB_FILE_BODY;
Dir = SCP2_URE_DL_DIR;
@@ -347,9 +348,7 @@ File gid_File_Dl_Sunjavaplugin
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
// CompID = "0AC6C688-876C-40C5-B24E-9257003FDC3E";
End
-#endif
-#if defined SOLAR_JAVA
File gid_File_Dl_JrepropertiesClass
TXT_FILE_BODY;
Dir = SCP2_URE_DL_DIR;
@@ -357,6 +356,7 @@ File gid_File_Dl_JrepropertiesClass
Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID);
// CompID = "0C4B8DCF-18D1-47D9-8BB7-A5C1D9268016";
End
+
#endif
File gid_File_Dl_Profile_Jvmfwk3rc
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 352a4fe2d928..11047ab1e8c7 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -355,6 +355,7 @@ void SAL_CALL SfxOfficeDispatch::dispatch( const ::com::sun::star::util::URL& aU
// ControllerItem is the Impl class
if ( pControllerItem )
{
+#ifdef SOLAR_JAVA
// The JavaContext contains an interaction handler which is used when
// the creation of a Java Virtual Machine fails. The second parameter
// indicates, that there shall only be one user notification (message box)
@@ -364,7 +365,7 @@ void SAL_CALL SfxOfficeDispatch::dispatch( const ::com::sun::star::util::URL& aU
com::sun::star::uno::ContextLayer layer(
new svt::JavaContext( com::sun::star::uno::getCurrentContext(),
true) );
-
+#endif
pControllerItem->dispatch( aURL, aArgs, ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatchResultListener >() );
}
}
@@ -376,11 +377,12 @@ void SAL_CALL SfxOfficeDispatch::dispatchWithNotification( const ::com::sun::sta
// ControllerItem is the Impl class
if ( pControllerItem )
{
+#ifdef SOLAR_JAVA
// see comment for SfxOfficeDispatch::dispatch
com::sun::star::uno::ContextLayer layer(
new svt::JavaContext( com::sun::star::uno::getCurrentContext(),
true) );
-
+#endif
pControllerItem->dispatch( aURL, aArgs, rListener );
}
}
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
index 36a0175bf7ac..dd9decbf1575 100644
--- a/svl/Library_svl.mk
+++ b/svl/Library_svl.mk
@@ -56,7 +56,8 @@ $(eval $(call gb_Library_use_libraries,svl,\
cppuhelper \
i18nisolang1 \
i18nutil \
- jvmfwk \
+ $(if $(filter TRUE,$(SOLAR_JAVA)), \
+ jvmfwk) \
sal \
sot \
tl \
diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk
index aff7ec4d078a..96cd1b450e82 100644
--- a/svtools/AllLangResTarget_svt.mk
+++ b/svtools/AllLangResTarget_svt.mk
@@ -54,7 +54,8 @@ $(eval $(call gb_SrsTarget_add_files,svt/res,\
svtools/source/dialogs/formats.src \
svtools/source/dialogs/so3res.src \
svtools/source/dialogs/wizardmachine.src \
- svtools/source/java/javaerror.src \
+ $(if $(filter TRUE,$(SOLAR_JAVA)), \
+ svtools/source/java/javaerror.src) \
svtools/source/misc/ehdl.src \
svtools/source/misc/helpagent.src \
svtools/source/misc/imagemgr.src \
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index fddc2993891d..4f6adaeb2f7f 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -45,7 +45,8 @@ $(eval $(call gb_Library_use_libraries,svt,\
cppuhelper \
i18nisolang1 \
i18nutil \
- jvmfwk \
+ $(if $(filter TRUE,$(SOLAR_JAVA)), \
+ jvmfwk) \
salhelper \
sal \
sot \
@@ -155,8 +156,9 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/graphic/provider \
svtools/source/graphic/renderer \
svtools/source/graphic/transformer \
- svtools/source/java/javacontext \
- svtools/source/java/javainteractionhandler \
+ $(if $(filter TRUE,$(SOLAR_JAVA)), \
+ svtools/source/java/javacontext \
+ svtools/source/java/javainteractionhandler) \
svtools/source/misc/acceleratorexecute \
svtools/source/misc/bindablecontrolhelper \
svtools/source/misc/cliplistener \
diff --git a/vcl/Library_desktop_detector.mk b/vcl/Library_desktop_detector.mk
index 88902b4eb940..bce3d93a02b9 100644
--- a/vcl/Library_desktop_detector.mk
+++ b/vcl/Library_desktop_detector.mk
@@ -41,7 +41,8 @@ $(eval $(call gb_Library_use_libraries,desktop_detector,\
cppuhelper \
i18nisolang1 \
i18nutil \
- jvmaccess \
+ $(if $(filter TRUE,$(SOLAR_JAVA)), \
+ jvmaccess) \
cppu \
sal \
))
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index c72f6a9de3bd..c5ad854d83c4 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -90,7 +90,7 @@ $(eval $(call gb_Library_add_libs,vcl,\
))
endif
-ifneq ($(OS),IOS)
+ifeq ($(SOLAR_JAVA),TRUE)
$(eval $(call gb_Library_use_libraries,vcl,\
jvmaccess \
))