Commits

vg  committed 76d7abf

CWS-TOOLING: integrate CWS jl111
2009-01-13 13:36:03 +0100 jl r266218 : #i91642# do not localize the error message, just print out the changed text in plain English
2009-01-09 12:54:03 +0100 jl r266075 : Committing changes which have been originally made on cws jl105 but which were not integrated on the master, due to a failed integration procedured. Then only three files were integrated. The files committed fix i80449, i83134, i86079, i91204, i92869
2009-01-07 15:10:52 +0100 jl r265970 : CWS-TOOLING: rebase CWS jl111 to trunk@265758 (milestone: DEV300:m38)
2009-01-06 10:38:21 +0100 jl r265900 : #i93235# #i93946# migrating to svn

  • Participants
  • Parent commits 450062d

Comments (0)

Files changed (6)

File desktop/source/pkgchk/unopkg/unopkg_misc.cxx

  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: unopkg_misc.cxx,v $
- * $Revision: 1.15 $
+ * $Revision: 1.15.52.6 $
  *
  * This file is part of OpenOffice.org.
  *
 #include "rtl/strbuf.hxx"
 #include "rtl/ustrbuf.hxx"
 #include "osl/process.h"
-#include "osl/file.h"
+#include "osl/file.hxx"
 #include "osl/thread.hxx"
 #include "tools/getprocessworkingdir.hxx"
 #include "ucbhelper/contentbroker.hxx"
 #include <stdio.h>
 
 using ::rtl::OUString;
+using ::rtl::OString;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::ucb;
 
 namespace unopkg {
 
+bool getLockFilePath(OUString & out);
 
-::rtl::OString toString( OptionInfo const * info )
+::rtl::OUString toString( OptionInfo const * info )
 {
     OSL_ASSERT( info != 0 );
-    ::rtl::OStringBuffer buf;
-    buf.append( RTL_CONSTASCII_STRINGPARAM("--") );
-    buf.append( info->m_name, info->m_name_length );
+    ::rtl::OUStringBuffer buf;
+    buf.appendAscii("--");
+    buf.appendAscii(info->m_name);
     if (info->m_short_option != '\0')
     {
-        buf.append( RTL_CONSTASCII_STRINGPARAM(" (short -") );
-        buf.append( static_cast< char >(info->m_short_option) );
-        buf.append( ')' );
+        buf.appendAscii(" (short -" );
+        buf.append(info->m_short_option );
+        buf.appendAscii(")");
     }
     if (info->m_has_argument)
-        buf.append( RTL_CONSTASCII_STRINGPARAM(" <argument>") );
+        buf.appendAscii(" <argument>" );
     return buf.makeStringAndClear();
 }
 
     if (len == 2 && arg[ 1 ] == option_info->m_short_option)
     {
         ++(*pIndex);
-#if OSL_DEBUG_LEVEL > 1
-        OSL_TRACE(
-            __FILE__": identified option \'%c\'", option_info->m_short_option );
-#endif
+        dp_misc::TRACE(OUSTR(__FILE__": identified option \'")
+            + OUSTR("\'") + OUString( option_info->m_short_option ) + OUSTR("\n"));
         return true;
     }
     if (arg[ 1 ] == '-' && rtl_ustr_ascii_compare(
             arg.pData->buffer + 2, option_info->m_name ) == 0)
     {
         ++(*pIndex);
-#if OSL_DEBUG_LEVEL > 1
-        OSL_TRACE( __FILE__": identified option \'%s\'", option_info->m_name );
-#endif
+        dp_misc::TRACE(OUSTR( __FILE__": identified option \'") 
+            + OUString::createFromAscii(option_info->m_name) + OUSTR("\'\n"));
         return true;
     }
     return false;
         {
             OSL_ASSERT( pValue != 0 );
             osl_getCommandArg( *pIndex, &pValue->pData );
-#if OSL_DEBUG_LEVEL > 1
-            OSL_TRACE(
-                __FILE__": argument value: %s\n",
-                ::rtl::OUStringToOString(
-                    *pValue, osl_getThreadTextEncoding() ).getStr() );
-#endif
+            dp_misc::TRACE(OUSTR( __FILE__": argument value: ")
+                + *pValue + OUSTR("\n"));
             ++(*pIndex);
             return true;
         }
 inline void printf_space( sal_Int32 space )
 {
     while (space--)
-        printf( "  " );
+        dp_misc::writeConsole("  ");
 }
 
 //------------------------------------------------------------------------------
 void printf_line(
     OUString const & name, OUString const & value, sal_Int32 level )
 {
-    rtl_TextEncoding textenc = osl_getThreadTextEncoding();
-    printf_space( level );
-    printf( "%s: %s\n",
-            ::rtl::OUStringToOString( name, textenc ).getStr(),
-            ::rtl::OUStringToOString( value, textenc ).getStr() );
+   printf_space( level );
+    dp_misc::writeConsole(name + OUSTR(": ") + value + OUSTR("\n"));
 }
 
 //------------------------------------------------------------------------------
         Sequence< Reference<deployment::XPackage> > seq(
             xPackage->getBundle( Reference<task::XAbortChannel>(), xCmdEnv ) );
         printf_space( level + 1 );
-        printf( "bundled Packages: {\n" );
+        dp_misc::writeConsole("bundled Packages: {\n");
         printf_packages( seq, xCmdEnv, level + 2 );
         printf_space( level + 1 );
-        printf( "}\n" );
+        dp_misc::writeConsole("}\n");
     }
 }
 
     Reference< deployment::XPackage > const * p = seq.getConstArray();
     if (len == 0) {
         printf_space( level );
-        printf( "<none>\n" );
+        dp_misc::writeConsole("<none>\n");
     }
     else {
         for ( sal_Int32 pos = 0; pos < len; ++pos )
     
     if (verbose)
     {
-        rtl_TextEncoding textenc = osl_getThreadTextEncoding();
-        printf( "Raising process: %s\nArguments: -nologo -nodefault %s\n",
-                ::rtl::OUStringToOString( appURL, textenc ).getStr(),
-                ::rtl::OUStringToOString( args[ 2 ], textenc ).getStr() );
+        dp_misc::writeConsole(
+            OUSTR("Raising process: ") + 
+            appURL +
+            OUSTR("\nArguments: -nologo -nodefault ") +
+            args[2] + 
+            OUSTR("\n"));
     }
     
     ::dp_misc::raiseProcess( appURL, args );
     
     if (verbose)
-        printf( "Ok.  Connecting..." );
+        dp_misc::writeConsole("Ok.  Connecting...");
     
     OSL_ASSERT( buf.getLength() == 0 );
     buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("uno:pipe,name=") );
             buf.makeStringAndClear(), xLocalComponentContext ),
         UNO_QUERY_THROW );
     if (verbose)
-        printf( "Ok.\n" );
+        dp_misc::writeConsole("Ok.\n");
     
     return xRet;
 }
 
 } // anon namespace
 
+/** returns the path to the lock file used by unopkg.
+    @return the path. An empty string signifies an error.
+*/
+OUString getLockFilePath()
+{   
+    OUString ret;
+    OUString sBootstrap(RTL_CONSTASCII_USTRINGPARAM("${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}"));
+    rtl::Bootstrap::expandMacros(sBootstrap);
+    OUString sAbs;
+    if (::osl::File::E_None ==  ::osl::File::getAbsoluteFileURL(
+        sBootstrap, OUSTR(".lock"), sAbs))
+    {
+        if (::osl::File::E_None == 
+            ::osl::File::getSystemPathFromFileURL(sAbs, sBootstrap))
+        {
+            ret = sBootstrap;
+        }
+    }
+
+    return ret;
+}
 //==============================================================================
 Reference<XComponentContext> getUNO( 
     DisposeGuard & disposeGuard, bool verbose, bool shared, bool bGui,
     {
         if (! s_lockfile.check( 0 ))
         {
-            String sMsg(ResId(RID_STR_CONCURRENTINSTANCE, *DeploymentResMgr::get()));
+            //String sMsg(ResId(RID_STR_CONCURRENTINSTANCE, *DeploymentResMgr::get()));
+            OUString sMsg(RTL_CONSTASCII_USTRINGPARAM(
+                              "unopkg cannot be started. The lock file indicates it as already running. "
+                              "If this does not apply, delete the lock file at:"));	
+
+            sMsg = sMsg + OUSTR("\n") + getLockFilePath();
+
             if (bGui)
             {
                 //We show a message box or print to the console that there
                 }
                 DeInitVCL();
             }
-            else
-            {
-                ::rtl::OString soMsg = ::rtl::OUStringToOString(sMsg, osl_getThreadTextEncoding());
-                fprintf(stdout,"%s\n", soMsg.getStr());
-             
-            }
-            throw RuntimeException(
-                OUSTR("Lock file indicates that a concurrent Office process "
-                    "is running!"), Reference<XInterface>() );
+
+//            String sError(ResId(RID_STR_UNOPKG_ERROR, *DeploymentResMgr::get())); 
+            throw LockFileException(
+                OUSTR("\n") + OUSTR("ERROR: ") + sMsg + OUSTR("\n"));
         }
     }
     

File jvmfwk/distributions/OpenOfficeorg/javavendors_freebsd.xml

+<?xml version="1.0" encoding="UTF-8"?>
+
+<javaSelection xmlns="http://openoffice.org/2004/java/framework/1.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ 
+ <updated>2008-08-27</updated>
+ 
+ <vendorInfos> 
+  <vendor name="Sun Microsystems Inc.">
+    <minVersion>1.3.1</minVersion>
+  </vendor>
+  <vendor name="The FreeBSD Foundation">
+    <minVersion>1.6.0</minVersion>
+  </vendor>
+  <vendor name="Free Software Foundation, Inc.">
+    <minVersion>1.4.2</minVersion>
+  </vendor>
+ </vendorInfos>
+
+ <plugins>
+  <library vendor="Sun Microsystems Inc.">vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.so</library>
+  <library vendor="The FreeBSD Foundation">vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.so</library>
+  <library vendor="Free Software Foundation, Inc.">vnd.sun.star.expand:$URE_INTERNAL_LIB_DIR/sunjavaplugin.so</library>
+ </plugins>
+</javaSelection>

File jvmfwk/distributions/OpenOfficeorg/makefile.mk

 #
 # $RCSfile: makefile.mk,v $
 #
-# $Revision: 1.9 $
+# $Revision: 1.9.28.1 $
 #
 # This file is part of OpenOffice.org.
 #
 .IF "$(SOLAR_JAVA)"!=""
 $(BIN)$/javavendors.xml: javavendors_unx.xml javavendors_wnt.xml javavendors_macosx.xml javavendors_linux.xml
 .IF "$(GUI)"=="UNX"
-.IF "$(OS)"=="MACOSX"
+.IF "$(OS)"=="FREEBSD"
+	-$(COPY) javavendors_freebsd.xml $(BIN)$/javavendors.xml
+.ELIF "$(OS)"=="MACOSX"
 	-$(COPY) javavendors_macosx.xml $(BIN)$/javavendors.xml
-.ELIF "$(OS)"=="LINUX" || "$(OS)"=="FREEBSD"
+.ELIF "$(OS)"=="LINUX"
 	-$(COPY) javavendors_linux.xml $(BIN)$/javavendors.xml
 .ELSE
 	-$(COPY) javavendors_unx.xml $(BIN)$/javavendors.xml

File jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx

  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: javaldx.cxx,v $
- * $Revision: 1.15.26.1 $
  *
  * This file is part of OpenOffice.org.
  *
     rtl::OUString sVendor5(RTL_CONSTASCII_USTRINGPARAM("Apple Computer, Inc."));
     rtl::OUString sVendor6(RTL_CONSTASCII_USTRINGPARAM("BEA Systems, Inc."));
     rtl::OUString sVendor7(RTL_CONSTASCII_USTRINGPARAM("Free Software Foundation, Inc."));
+    rtl::OUString sVendor8(RTL_CONSTASCII_USTRINGPARAM("The FreeBSD Foundation"));
     if ( ! (sVendor1.equals(pInfo->sVendor) == sal_True
             || sVendor2.equals(pInfo->sVendor) == sal_True
             || sVendor3.equals(pInfo->sVendor) == sal_True
             || sVendor4.equals(pInfo->sVendor) == sal_True
             || sVendor5.equals(pInfo->sVendor) == sal_True
             || sVendor6.equals(pInfo->sVendor) == sal_True
-	    || sVendor7.equals(pInfo->sVendor) == sal_True))
+            || sVendor7.equals(pInfo->sVendor) == sal_True
+            || sVendor8.equals(pInfo->sVendor) == sal_True))
         return 0;
     
     rtl::OString sPaths = getLD_LIBRARY_PATH(pInfo->arVendorData);

File jvmfwk/plugins/sunmajor/pluginlib/vendorlist.cxx

  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: vendorlist.cxx,v $
- * $Revision: 1.10 $
+ * $Revision: 1.10.28.1 $
  *
  * This file is part of OpenOffice.org.
  *
     VENDOR_MAP_ENTRY("Apple Computer, Inc.", OtherInfo)
     VENDOR_MAP_ENTRY("BEA Systems, Inc.", OtherInfo)
     VENDOR_MAP_ENTRY("Free Software Foundation, Inc.", GnuInfo)
+    VENDOR_MAP_ENTRY("The FreeBSD Foundation", OtherInfo)
 END_VENDOR_MAP()    
 
 

File svtools/source/java/javainteractionhandler.cxx

  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: javainteractionhandler.cxx,v $
- * $Revision: 1.7 $
+ * $Revision: 1.7.152.1 $
  *
  * This file is part of OpenOffice.org.
  *
 namespace svt
 {
 
-JavaInteractionHandler::JavaInteractionHandler()
+JavaInteractionHandler::JavaInteractionHandler():
+    m_aRefCount(0),
+    m_bShowErrorsOnce(false),
+    m_bJavaDisabled_Handled(false),
+    m_bInvalidSettings_Handled(false),
+    m_bJavaNotFound_Handled(false),
+    m_bVMCreationFailure_Handled(false),
+    m_bRestartRequired_Handled(false),
+    m_nResult_JavaDisabled(RET_NO)
 {
-    JavaInteractionHandler(false);
 }
 
 JavaInteractionHandler::JavaInteractionHandler(bool bReportErrorOnce) :