connectivity/CppunitTest_connectivity_commontools.mk | 3 - connectivity/Library_dbtools.mk | 3 - connectivity/inc/connectivity/CommonTools.hxx | 6 ++ connectivity/source/commontools/CommonTools.cxx | 11 +--- cui/Library_cui.mk | 6 +- cui/source/options/treeopt.cxx | 2 dbaccess/source/filter/xml/xmlfilter.cxx | 6 ++ dbaccess/source/ui/dlg/ConnectionPage.cxx | 4 + dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 8 ++- dbaccess/source/ui/dlg/TextConnectionHelper.cxx | 2 dbaccess/source/ui/dlg/detailpages.cxx | 5 +- desktop/Library_migrationoo2.mk | 6 +- desktop/source/app/app.cxx | 3 - desktop/source/app/desktopcontext.cxx | 2 ios/Executable_LibreOffice.mk | 5 ++ ios/experimental/LibreOffice/LibreOffice/lo.mm | 2 jvmaccess/Module_jvmaccess.mk | 4 + jvmaccess/inc/jvmaccess/classpath.hxx | 6 -- jvmaccess/inc/jvmaccess/virtualmachine.hxx | 9 --- jvmaccess/source/classpath.cxx | 17 ------- jvmaccess/source/unovirtualmachine.cxx | 8 --- jvmaccess/source/virtualmachine.cxx | 9 --- jvmfwk/Module_jvmfwk.mk | 4 - jvmfwk/inc/jvmfwk/framework.h | 6 -- jvmfwk/inc/jvmfwk/vendorplugin.h | 2 jvmfwk/source/framework.cxx | 45 ------------------- sal/osl/all/log.cxx | 6 +- scp2/source/ooo/ure.scp | 6 +- sfx2/source/control/unoctitm.cxx | 6 +- svl/Library_svl.mk | 3 - svtools/AllLangResTarget_svt.mk | 3 - svtools/Library_svt.mk | 8 ++- sw/inc/viewopt.hxx | 42 +++++++++++++++-- sw/source/ui/uiview/viewport.cxx | 12 ----- vcl/Library_desktop_detector.mk | 3 - vcl/Library_vcl.mk | 2 36 files changed, 119 insertions(+), 156 deletions(-)
New commits: commit 6afeb7e00c4cb4bc7fee17cf460a37952a1384a9 Author: Tor Lillqvist <t...@iki.fi> Date: Fri Apr 5 00:15:06 2013 +0300 Simpler and cleaner way to get rid of rulers and scrollbars for non-DESKTOP Modify the IsView*() inline functions in the viewoprt.hxx header to always return sal_False for non-DESKTOP. No ifdefs in the source files. Presumably when optimizing the compiler will notice that the inlined function always returns false and not generate code for the unwanted case. Change-Id: I07a4bc57cd621f63839d8e8bf551d40250fd9078 diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx index 8efc3d4..6e99bdd 100644 --- a/sw/inc/viewopt.hxx +++ b/sw/inc/viewopt.hxx @@ -16,8 +16,12 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ + #ifndef _VIEWOPT_HXX #define _VIEWOPT_HXX + +#include <config_features.h> + #include <tools/gen.hxx> #include <tools/string.hxx> #include <tools/color.hxx> @@ -441,9 +445,21 @@ public: ----------------------------------------------------------------------------*/ sal_Bool IsViewVScrollBar() const - { return nUIOptions & VIEWOPT_2_VSCROLLBAR ? sal_True : sal_False; } + { +#if HAVE_FEATURE_DESKTOP + return nUIOptions & VIEWOPT_2_VSCROLLBAR ? sal_True : sal_False; +#else + return sal_False; +#endif + } sal_Bool IsViewHScrollBar() const - { return nUIOptions & VIEWOPT_2_HSCROLLBAR ? sal_True : sal_False; } + { +#if HAVE_FEATURE_DESKTOP + return nUIOptions & VIEWOPT_2_HSCROLLBAR ? sal_True : sal_False; +#else + return sal_False; +#endif + } sal_Bool IsKeepRatio() const { return nUIOptions & VIEWOPT_2_KEEPASPECTRATIO ? sal_True : sal_False; } sal_Bool IsGrfKeepZoom() const @@ -479,25 +495,37 @@ public: const Color& GetRetoucheColor() const { return aRetoucheColor;} void SetRetoucheColor(const Color&r) { aRetoucheColor = r; } - sal_Bool IsViewAnyRuler() const {return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER);} + sal_Bool IsViewAnyRuler() const + { +#if HAVE_FEATURE_DESKTOP + return 0 != (nUIOptions & VIEWOPT_2_ANY_RULER); +#else + return sal_False; +#endif + } void SetViewAnyRuler(sal_Bool bSet) { bSet ? (nUIOptions |= VIEWOPT_2_ANY_RULER) : (nUIOptions &= ~VIEWOPT_2_ANY_RULER);} - sal_Bool IsViewHRuler(sal_Bool bDirect = sal_False) const + sal_Bool IsViewHRuler(sal_Bool bDirect = sal_False) const { +#if HAVE_FEATURE_DESKTOP sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect ? 0 != (nUIOptions & VIEWOPT_2_H_RULER) : !bReadonly ? (nUIOptions & (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_H_RULER) : sal_False ); return bRet; - +#else + (void) bDirect; + return sal_False; +#endif } void SetViewHRuler (sal_Bool b) { b ? (nUIOptions |= VIEWOPT_2_H_RULER ) : ( nUIOptions &= ~VIEWOPT_2_H_RULER);} sal_Bool IsViewVRuler(sal_Bool bDirect = sal_False) const { +#if HAVE_FEATURE_DESKTOP sal_Bool bRet = sal::static_int_cast< sal_Bool >( bDirect ? 0 !=(nUIOptions & VIEWOPT_2_V_RULER) : !bReadonly ? @@ -505,6 +533,10 @@ public: (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER)) == (VIEWOPT_2_ANY_RULER|VIEWOPT_2_V_RULER) : sal_False ); return bRet; +#else + (void) bDirect; + return sal_False; +#endif } void SetViewVRuler (sal_Bool b) { b ? (nUIOptions |= VIEWOPT_2_V_RULER ) : ( nUIOptions &= ~VIEWOPT_2_V_RULER);} diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index 586016e..d4aab18 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <config_features.h> - #include "hintids.hxx" #include <vcl/help.hxx> #include <svx/ruler.hxx> @@ -1057,7 +1055,6 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) return; m_bInOuterResizePixel = sal_True; -#if HAVE_FEATURE_DESKTOP // feststellen, ob Scrollbars angezeigt werden duerfen sal_Bool bShowH = sal_True, bShowV = sal_True, @@ -1092,10 +1089,7 @@ void SwView::OuterResizePixel( const Point &rOfst, const Size &rSize ) if(m_pVScrollbar->IsVisible(sal_False) != bShowV && !bAuto) ShowVScrollbar(bShowV); m_pVScrollbar->SetAuto(bAuto); -#else - const sal_Bool bAuto = sal_False; - const sal_Bool bHAuto = sal_False; -#endif + SET_CURR_SHELL( m_pWrtShell ); sal_Bool bRepeat = sal_False; long nCnt = 0; @@ -1204,9 +1198,6 @@ void SwView::SetZoomFactor( const Fraction &rX, const Fraction &rY ) sal_Bool SwView::UpdateScrollbars() { -#if !HAVE_FEATURE_DESKTOP - return sal_True; -#else sal_Bool bRet = sal_False; if ( !m_aVisArea.IsEmpty() ) { @@ -1251,7 +1242,6 @@ sal_Bool SwView::UpdateScrollbars() } } return bRet; -#endif } void SwView::Move() commit 8facc8e9863a87890c62c97158fceb5c9bbb6c21 Author: Tor Lillqvist <t...@iki.fi> Date: Thu Apr 4 21:49:33 2013 +0300 List more libraries in an attempt to make tinderbox builds work Change-Id: I21e6affaf08322f9e9cf1554e76f935f2c3e29b3 diff --git a/ios/Executable_LibreOffice.mk b/ios/Executable_LibreOffice.mk index badc09f..07c040e 100644 --- a/ios/Executable_LibreOffice.mk +++ b/ios/Executable_LibreOffice.mk @@ -40,11 +40,16 @@ $(eval $(call gb_Executable_add_objcobjects,LibreOffice,\ # it likely that all necessary libraries are built before this # executable is. $(eval $(call gb_Executable_use_libraries,LibreOffice,\ + for \ + msfilter \ msword \ + oox \ sal \ sc \ scfilt \ sdfilt \ + svt \ + svx \ swui \ )) commit 85b104712b8bd4cf5247d5226260dd1528b7f57a Author: Tor Lillqvist <t...@iki.fi> Date: Thu Apr 4 21:45:15 2013 +0300 No need to setenv SAL_LOG in the code for iOS One can set environment variables to be used when debugging an app in Xcode, which is when it is interesting to see SAL_INFO output anyway. (This is very different from Android, where one can't set environment variables "before" an app starts, as apps there aren't separate programs that would be exec'ed.) Change-Id: I3971d1b2d1a849deac2722a90271ef2458db1643 diff --git a/ios/experimental/LibreOffice/LibreOffice/lo.mm b/ios/experimental/LibreOffice/LibreOffice/lo.mm index 193a01f..5c791f7 100644 --- a/ios/experimental/LibreOffice/LibreOffice/lo.mm +++ b/ios/experimental/LibreOffice/LibreOffice/lo.mm @@ -133,8 +133,6 @@ extern "C" void lo_initialize(void) { - setenv("SAL_LOG", "+WARN+INFO.vcl.headless+INFO.vcl.coretext+INFO.vcl.ios", 1); - const char *argv[] = { "placeholder-exe", "-env:URE_INTERNAL_LIB_DIR=file:///", diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx index 6106ac3..a79f131 100644 --- a/sal/osl/all/log.cxx +++ b/sal/osl/all/log.cxx @@ -97,10 +97,10 @@ char const * toString(sal_detail_LogLevel level) { #endif -// getenv is not thread safe, so minimize use of result; except on Android and -// iOS, see 60628799633ffde502cb105b98d3f254f93115aa "Notice if SAL_LOG is +// getenv is not thread safe, so minimize use of result; except on Android, +// see 60628799633ffde502cb105b98d3f254f93115aa "Notice if SAL_LOG is // changed while the process is running": -#if defined ANDROID || defined IOS +#if defined ANDROID char const * getEnvironmentVariable() { return std::getenv("SAL_LOG"); commit b7525f1f1d123084b60269f420300afdd405b0d1 Author: Tor Lillqvist <t...@iki.fi> Date: Thu Apr 4 22:46:53 2013 +0200 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 diff --git a/connectivity/CppunitTest_connectivity_commontools.mk b/connectivity/CppunitTest_connectivity_commontools.mk index e0f7752..3ececdd 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 1e063ea..2d65ea9 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 fa7ab75..a2c4e60 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 75015c7..909e411 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 1966b7f..c5e8609 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 eb38208..b7bc0b8 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 2bb5679..96ea9ed 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 688b089..77504d9 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 06584cf..f1cfea4 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 05d5485..0d1dad0 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 56780f8..b396360 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 f624d18..89b73d3 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 32c8b55..96809e7 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 0320786..26cd03b 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 39eb4ad..912c48f 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 3fb17f3..507af76 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 f425dae..57ac5ea 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 f051335..4891cc2 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 dc2d680..66c181d 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 f6500f9..23192ab 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 719bf79..dae1b6f 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 638bd96..dbc10ac 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 11fc6aa..5ca5e10 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 5111de0..7a3975b 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 c24225c..9c9ce85 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 352a4fe..11047ab 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 36a0175..dd9decb 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 aff7ec4..96cd1b4 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 fddc299..4f6adae 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 88902b4..bce3d93 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 c72f6a9..c5ad854 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 \ )) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits