diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 09:04:58 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 09:04:58 +0000 |
commit | 3b2b8f91ff22b93050b9b1aa3da5bd4359182499 (patch) | |
tree | 3e37aa664496da562640735b168da4dcc08bb737 | |
parent | CWS-TOOLING: integrate CWS cloph11 (diff) | |
download | core-3b2b8f91ff22b93050b9b1aa3da5bd4359182499.tar.gz core-3b2b8f91ff22b93050b9b1aa3da5bd4359182499.zip |
CWS-TOOLING: integrate CWS sb93
43 files changed, 249 insertions, 536 deletions
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/call.s b/bridges/source/cpp_uno/cc50_solaris_sparc/call.s index c328160927c8..be4027fda070 100644 --- a/bridges/source/cpp_uno/cc50_solaris_sparc/call.s +++ b/bridges/source/cpp_uno/cc50_solaris_sparc/call.s @@ -1,16 +1,3 @@ -.global doFlushCode -.type doFlushCode,2 -doFlushCode: -.L: flush %o0 - deccc %o1 - bne .L - add %o0, 8, %o0 - retl - nop -.size doFlushCode,(.-doFlushCode) -.align 8 - - .global privateSnippetExecutor .type privateSnippetExecutor,2 privateSnippetExecutor: diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.cxx b/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.cxx index 211147f8e49f..e69de29bb2d1 100644 --- a/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.cxx +++ b/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.cxx @@ -1,52 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: flushcode.cxx,v $ - * $Revision: 1.5 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_bridges.hxx" - -#include "sal/config.h" - -#include "flushcode.hxx" - -extern "C" void doFlushCode(unsigned long address, unsigned long count); - -namespace bridges { namespace cpp_uno { namespace cc50_solaris_sparc { - -void flushCode(void const * begin, void const * end) { - unsigned long n = - static_cast< char const * >(end) - static_cast< char const * >(begin); - if (n != 0) { - unsigned long adr = reinterpret_cast< unsigned long >(begin); - unsigned long off = adr & 7; - doFlushCode(adr - off, (n + off + 7) >> 3); - } -} - -} } } diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx b/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx index 11b7d18b119d..2945bd3648d6 100644 --- a/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx +++ b/bridges/source/cpp_uno/cc50_solaris_sparc/flushcode.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: flushcode.hxx,v $ - * $Revision: 1.4 $ + * $Revision: 1.4.20.1 $ * * This file is part of OpenOffice.org. * @@ -33,12 +33,18 @@ #include "sal/config.h" +extern "C" void sync_instruction_memory(caddr_t addr, int len); // from libc + namespace bridges { namespace cpp_uno { namespace cc50_solaris_sparc { /** * Flush a region of memory into which code has been written dynamically. */ -void flushCode(void const * begin, void const * end); +inline void flushCode(void const * begin, void const * end) { + sync_instruction_memory( + static_cast< caddr_t >(const_cast< void * >(begin)), + static_cast< char const * >(end) - static_cast< char const * >(begin)); +} } } } diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk b/bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk index ee3c69d70ce4..2e569d4f008f 100644 --- a/bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk +++ b/bridges/source/cpp_uno/cc50_solaris_sparc/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.17 $ +# $Revision: 1.17.12.1 $ # # This file is part of OpenOffice.org. # @@ -58,8 +58,7 @@ SLOFILES= \ $(SLO)$/cpp2uno.obj \ $(SLO)$/uno2cpp.obj \ $(SLO)$/except.obj \ - $(SLO)$/call.obj \ - $(SLO)$/flushcode.obj + $(SLO)$/call.obj SHL1TARGET= $(TARGET) diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.hxx index f21c82e3ba2b..e69de29bb2d1 100644 --- a/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.hxx +++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.hxx @@ -1,39 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: doflushcode.hxx,v $ - * - * $Revision: 1.3 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_CC5_SOLARIS_SPARC64_DOFLUSHCODE_HXX -#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_CC5_SOLARIS_SPARC64_DOFLUSHCODE_HXX - -#include "sal/config.h" - -extern "C" void doFlushCode(unsigned long address, unsigned long count); - -#endif diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.s b/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.s index 9f7ab2ec0b0d..e69de29bb2d1 100644 --- a/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.s +++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/doflushcode.s @@ -1,42 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: doflushcode.s,v $ - * - * $Revision: 1.3 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -.global doFlushCode -.align 8 -doFlushCode: - flush %o0 - deccc %o1 - bne,pt %xcc, doFlushCode - add %o0, 8, %o0 - retl - nop -.size doFlushCode, . - doFlushCode -.type doFlushCode, #function diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.cxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.cxx index 92096de85162..e69de29bb2d1 100644 --- a/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.cxx +++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.cxx @@ -1,50 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: flushcode.cxx,v $ - * - * $Revision: 1.3 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "precompiled_bridges.hxx" -#include "sal/config.h" - -#include "doflushcode.hxx" -#include "flushcode.hxx" - -namespace bridges { namespace cpp_uno { namespace cc5_solaris_sparc64 { - -void flushCode(void const * begin, void const * end) { - unsigned long n = - static_cast< char const * >(end) - static_cast< char const * >(begin); - if (n != 0) { - unsigned long adr = reinterpret_cast< unsigned long >(begin); - unsigned long off = adr & 7; - doFlushCode(adr - off, (n + off + 7) >> 3); - } -} - -} } } diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx b/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx index fdfe65016457..ac87b8200c30 100644 --- a/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx +++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/flushcode.hxx @@ -8,7 +8,7 @@ * * $RCSfile: flushcode.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.3.18.1 $ * * This file is part of OpenOffice.org. * @@ -34,12 +34,18 @@ #include "sal/config.h" +extern "C" void sync_instruction_memory(caddr_t addr, int len); // from libc + namespace bridges { namespace cpp_uno { namespace cc5_solaris_sparc64 { /** * Flush a region of memory into which code has been written dynamically. */ -void flushCode(void const * begin, void const * end); +inline void flushCode(void const * begin, void const * end) { + sync_instruction_memory( + static_cast< caddr_t >(const_cast< void * >(begin)), + static_cast< char const * >(end) - static_cast< char const * >(begin)); +} } } } diff --git a/bridges/source/cpp_uno/cc5_solaris_sparc64/makefile.mk b/bridges/source/cpp_uno/cc5_solaris_sparc64/makefile.mk index 94efd7253a2a..f1f98f32ca7d 100644 --- a/bridges/source/cpp_uno/cc5_solaris_sparc64/makefile.mk +++ b/bridges/source/cpp_uno/cc5_solaris_sparc64/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.4 $ +# $Revision: 1.4.12.1 $ # # This file is part of OpenOffice.org. # @@ -42,9 +42,7 @@ SHL1TARGET = $(TARGET) SHL1OBJS = \ $(SLO)$/callvirtualmethod.obj \ $(SLO)$/cpp2uno.obj \ - $(SLO)$/doflushcode.obj \ $(SLO)$/exceptions.obj \ - $(SLO)$/flushcode.obj \ $(SLO)$/fp.obj \ $(SLO)$/isdirectreturntype.obj \ $(SLO)$/uno2cpp.obj \ diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx index 5b45ff65a806..a804fd17addc 100644 --- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: except.cxx,v $ - * $Revision: 1.14 $ + * $Revision: 1.14.20.1 $ * * This file is part of OpenOffice.org. * @@ -32,6 +32,7 @@ #include "precompiled_bridges.hxx" #include <stdio.h> +#include <string.h> #include <dlfcn.h> #include <cxxabi.h> #include <hash_map> diff --git a/bridges/source/remote/urp/urp_dispatch.cxx b/bridges/source/remote/urp/urp_dispatch.cxx index b8b224d34bb7..c5ba6a93140d 100644 --- a/bridges/source/remote/urp/urp_dispatch.cxx +++ b/bridges/source/remote/urp/urp_dispatch.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: urp_dispatch.cxx,v $ - * $Revision: 1.17 $ + * $Revision: 1.17.20.1 $ * * This file is part of OpenOffice.org. * @@ -74,8 +74,6 @@ void SAL_CALL urp_sendCloseConnection( uno_Environment *pEnvRemote ) } pImpl->m_pWriter->sendEmptyMessage(); - // no more data via this connection ! - pImpl->m_pWriter->abort(); } } extern "C" void SAL_CALL urp_sendRequest( diff --git a/bridges/source/remote/urp/urp_environment.cxx b/bridges/source/remote/urp/urp_environment.cxx index 3b1278946607..5d1c4b9ab741 100644 --- a/bridges/source/remote/urp/urp_environment.cxx +++ b/bridges/source/remote/urp/urp_environment.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: urp_environment.cxx,v $ - * $Revision: 1.21 $ + * $Revision: 1.21.20.2 $ * * This file is part of OpenOffice.org. * @@ -212,8 +212,6 @@ void SAL_CALL allThreadsAreGone( uno_Environment * pEnvRemote ) } else { - ::osl::MutexGuard guard( pImpl->m_disposingMutex ); - pImpl->m_cndWaitForThreads.set(); } @@ -278,7 +276,9 @@ static void SAL_CALL RemoteEnvironment_thisDispose( uno_Environment *pEnvRemote // close the connection - urp_sendCloseConnection( pEnvRemote ); + uno_threadpool_dispose( pImpl->m_hThreadPool ); + pImpl->m_pWriter->abortThread(); + pContext->m_pConnection->close( pContext->m_pConnection ); if( osl_getThreadIdentifier(0) == (oslThreadIdentifier) pImpl->m_pReader->getIdentifier() ) @@ -286,6 +286,7 @@ static void SAL_CALL RemoteEnvironment_thisDispose( uno_Environment *pEnvRemote // This is the reader thread. Let the thread destroy itself // the reader thread object must also release the connection at this stage ! pImpl->m_pReader->destroyYourself(); + pImpl->m_pReader = 0; } else { @@ -295,11 +296,6 @@ static void SAL_CALL RemoteEnvironment_thisDispose( uno_Environment *pEnvRemote pImpl->m_pReader->join(); } - // from now on, no calls can be delivered via the bridge - uno_threadpool_dispose( pImpl->m_hThreadPool ); - - pContext->m_pConnection->close( pContext->m_pConnection ); - // wait for the writer thread pImpl->m_pWriter->join(); @@ -309,7 +305,6 @@ static void SAL_CALL RemoteEnvironment_thisDispose( uno_Environment *pEnvRemote if( 0 != pImpl->m_nRemoteThreads ) { // Wait for all threads - pImpl->m_cndWaitForThreads.reset(); guard.clear(); pImpl->m_cndWaitForThreads.wait(); OSL_ASSERT( ! pImpl->m_nRemoteThreads ); @@ -333,13 +328,12 @@ static void SAL_CALL RemoteEnvironment_thisDispose( uno_Environment *pEnvRemote delete pImpl->m_pWriter; pImpl->m_pWriter = 0; - if( osl_getThreadIdentifier(0) != - (oslThreadIdentifier) pImpl->m_pReader->getIdentifier() ) + if( pImpl->m_pReader != 0 ) { // This is not the reader thread, so the thread object is deleted delete pImpl->m_pReader; + pImpl->m_pReader = 0; } - pImpl->m_pReader = 0; // delete the stubs releaseStubs( pEnvRemote ); @@ -358,6 +352,7 @@ static void SAL_CALL RemoteEnvironment_thisDisposing( if( ! pImpl->m_bDisposed ) { guard.clear(); + urp_sendCloseConnection( pEnvRemote ); RemoteEnvironment_thisDispose( pEnvRemote ); } } @@ -417,7 +412,6 @@ void SAL_CALL uno_initEnvironment( uno_Environment * pEnvRemote ) // take the bridgepointer as id pImpl->m_properties.seqBridgeID = ByteSequence( (sal_Int8*)&pEnvRemote , sizeof( pEnvRemote ) ); - pImpl->m_cndWaitForThreads.reset(); pImpl->m_allThreadsAreGone = allThreadsAreGone; pImpl->m_sendRequest = urp_sendRequest; pImpl->m_nRemoteThreads = 0; diff --git a/bridges/source/remote/urp/urp_propertyobject.cxx b/bridges/source/remote/urp/urp_propertyobject.cxx index 4f4f52ec0d46..fa5fd4252490 100644 --- a/bridges/source/remote/urp/urp_propertyobject.cxx +++ b/bridges/source/remote/urp/urp_propertyobject.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: urp_propertyobject.cxx,v $ - * $Revision: 1.11 $ + * $Revision: 1.11.20.1 $ * * This file is part of OpenOffice.org. * @@ -32,7 +32,6 @@ #include "precompiled_bridges.hxx" #include <stdlib.h> #include <osl/diagnose.h> -#include <osl/process.h> #include <rtl/random.h> @@ -494,14 +493,8 @@ sal_Int32 SAL_CALL PropertyObject::localRequestChange( ) if( bCall ) { - // gather some more random data - oslProcessInfo data; - data.Size = sizeof( data ); - osl_getProcessInfo( 0 , osl_Process_HEAPUSAGE | osl_Process_IDENTIFIER , &data ); - // calulate random number rtlRandomPool pool = rtl_random_createPool (); - rtl_random_addBytes( pool, &data , sizeof( data ) ); rtl_random_getBytes( pool , &m_nRandomNumberOfRequest, sizeof( m_nRandomNumberOfRequest ) ); rtl_random_destroyPool( pool ); } diff --git a/bridges/source/remote/urp/urp_reader.cxx b/bridges/source/remote/urp/urp_reader.cxx index 5a7644d39b17..dd9ff0af80ec 100644 --- a/bridges/source/remote/urp/urp_reader.cxx +++ b/bridges/source/remote/urp/urp_reader.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: urp_reader.cxx,v $ - * $Revision: 1.18 $ + * $Revision: 1.18.20.1 $ * * This file is part of OpenOffice.org. * @@ -298,7 +298,6 @@ inline sal_Bool OReaderThread::readBlock( sal_Int32 *pnMessageCount ) s.append( sal_Unicode( ')' ) ); m_pBridgeImpl->addError( s.makeStringAndClear() ); OSL_ENSURE( 0 , "urp bridge: Packet-size too big" ); - disposeEnvironment(); return sal_False; } diff --git a/bridges/source/remote/urp/urp_reader.hxx b/bridges/source/remote/urp/urp_reader.hxx index eee5fd9e26f1..9cb36e629c07 100644 --- a/bridges/source/remote/urp/urp_reader.hxx +++ b/bridges/source/remote/urp/urp_reader.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: urp_reader.hxx,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.20.1 $ * * This file is part of OpenOffice.org. * @@ -49,16 +49,17 @@ public: OWriterThread *pWriterThread ); ~OReaderThread(); - virtual void SAL_CALL run(); - virtual void SAL_CALL onTerminated(); - // may only be called in the callstack of this thread !!!!! // run() -> disposeEnvironment() -> dispose() -> destroyYourself() void destroyYourself(); +private: + virtual void SAL_CALL run(); + virtual void SAL_CALL onTerminated(); + inline sal_Bool readBlock( sal_Int32 *pnMessageCount ); inline sal_Bool readFlags( struct MessageFlags *pFlags ); -private: + void disposeEnvironment(); inline sal_Bool getMemberTypeDescription( diff --git a/bridges/source/remote/urp/urp_writer.cxx b/bridges/source/remote/urp/urp_writer.cxx index eed2c3612ec5..248be6c37098 100644 --- a/bridges/source/remote/urp/urp_writer.cxx +++ b/bridges/source/remote/urp/urp_writer.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: urp_writer.cxx,v $ - * $Revision: 1.17 $ + * $Revision: 1.17.20.1 $ * * This file is part of OpenOffice.org. * @@ -111,7 +111,7 @@ void OWriterThread::touch( sal_Bool bImmediately ) } -void OWriterThread::abort() +void OWriterThread::abortThread() { MutexGuard guard( m_pBridgeImpl->m_marshalingMutex ); @@ -150,10 +150,7 @@ void OWriterThread::sendEmptyMessage() { // must be called with locked marshaling mutex sal_Int32 a[2] = {0,0}; - if( m_pConnection ) - { m_pConnection->write( m_pConnection , (sal_Int8*) a , sizeof( sal_Int32) *2 ); - } } void OWriterThread::insertReleaseRemoteCall( diff --git a/bridges/source/remote/urp/urp_writer.hxx b/bridges/source/remote/urp/urp_writer.hxx index 34c867660343..f5cafe261280 100644 --- a/bridges/source/remote/urp/urp_writer.hxx +++ b/bridges/source/remote/urp/urp_writer.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: urp_writer.hxx,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.20.1 $ * * This file is part of OpenOffice.org. * @@ -63,7 +63,7 @@ namespace bridges_urp void touch( sal_Bool bImmediately ); void sendEmptyMessage(); - void abort(); + void abortThread(); void SAL_CALL insertReleaseRemoteCall ( rtl_uString *pOid,typelib_TypeDescriptionReference *pTypeRef); diff --git a/bridges/test/java_uno/any/TestAny.java b/bridges/test/java_uno/any/TestAny.java index 3913fe8eba4b..ec9ac5fb4162 100644 --- a/bridges/test/java_uno/any/TestAny.java +++ b/bridges/test/java_uno/any/TestAny.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: TestAny.java,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.20.1 $ * * This file is part of OpenOffice.org. * @@ -2044,6 +2044,16 @@ final class TestAny { new DerivedInterface() {}), new CompareBoxed()); + // Misc: + try { + transport.mapAny(new Object()); + System.out.println("BAD mapAny(Object), no exception"); + success = false; + } catch (StackOverflowError e) { + System.out.println("BAD mapAny(Object): " + e); + success = false; + } catch (RuntimeException e) {} + return success; } diff --git a/cli_ure/qa/climaker/makefile.mk b/cli_ure/qa/climaker/makefile.mk index 09e589811767..cde3f4066142 100644 --- a/cli_ure/qa/climaker/makefile.mk +++ b/cli_ure/qa/climaker/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.8 $ +# $Revision: 1.8.8.1 $ # # This file is part of OpenOffice.org. # @@ -41,7 +41,7 @@ CLIMAKER*=$(WRAPCMD) $(BIN)$/climaker #----- compile .java files ----------------------------------------- -JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar OOoRunner.jar +JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar JAVAFILES = ClimakerTestCase.java JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) diff --git a/cli_ure/qa/versioning/makefile.mk b/cli_ure/qa/versioning/makefile.mk index ab2e51f2b6ee..ce32ac6555a5 100644 --- a/cli_ure/qa/versioning/makefile.mk +++ b/cli_ure/qa/versioning/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.7 $ +# $Revision: 1.7.14.1 $ # # This file is part of OpenOffice.org. # @@ -41,7 +41,7 @@ PACKAGE = cliversion #----- compile .java files ----------------------------------------- -JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar jut.jar java_uno.jar OOoRunner.jar +JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar JAVAFILES = VersionTestCase.java JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index e673c4c575fe..9622c25c4c4e 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: cpputype.cxx,v $ - * $Revision: 1.46 $ + * $Revision: 1.46.4.1 $ * * This file is part of OpenOffice.org. * @@ -2805,8 +2805,10 @@ void StructureType::dumpComprehensiveGetCppuType(FileStream & out) { type, static_cast< sal_uInt32 >(types.size()))). second) { - if (codemaker::UnoType::getSort(type) - == codemaker::UnoType::SORT_COMPLEX) + if ((codemaker::UnoType::getSort(type) == + codemaker::UnoType::SORT_COMPLEX) && + codemaker::UnoType::decompose(type) != m_typeName) + // take care of recursion like struct S { sequence<S> x; }; { out << indent() << "::cppu::UnoType< "; dumpType(out, type, false, false, false, true); diff --git a/cppu/qa/makefile.mk b/cppu/qa/makefile.mk index c0a1f1df0542..4051dd6d82ec 100644 --- a/cppu/qa/makefile.mk +++ b/cppu/qa/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.6 $ +# $Revision: 1.6.14.1 $ # # This file is part of OpenOffice.org. # @@ -62,7 +62,14 @@ SHL3VERSIONMAP = version.map SHL3IMPLIB = i$(SHL3TARGET) DEF3NAME = $(SHL3TARGET) -SLOFILES = $(SHL1OBJS) $(SHL2OBJS) $(SHL3OBJS) +SHL4TARGET = $(TARGET)_recursion +SHL4OBJS = $(SLO)$/test_recursion.obj +SHL4STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) +SHL4VERSIONMAP = version.map +SHL4IMPLIB = i$(SHL4TARGET) +DEF4NAME = $(SHL4TARGET) + +SLOFILES = $(SHL1OBJS) $(SHL2OBJS) $(SHL3OBJS) $(SHL4OBJS) .INCLUDE: target.mk @@ -84,7 +91,8 @@ $(MISC)$/$(TARGET)$/types.urd: types.idl - $(MKDIR) $(MISC)$/$(TARGET) $(IDLC) -O$(MISC)$/$(TARGET) -I$(SOLARIDLDIR) -cid -we $< -test .PHONY: $(SHL1TARGETN) $(SHL2TARGETN) $(SHL3TARGETN) +test .PHONY: $(SHL1TARGETN) $(SHL2TARGETN) $(SHL3TARGETN) $(SHL4TARGETN) testshl2 $(SHL1TARGETN) testshl2 $(SHL2TARGETN) testshl2 $(SHL3TARGETN) + testshl2 $(SHL4TARGETN)
\ No newline at end of file diff --git a/cppu/qa/types.idl b/cppu/qa/types.idl index 8df58e68ad48..1d62b5c33b26 100644 --- a/cppu/qa/types.idl +++ b/cppu/qa/types.idl @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: types.idl,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.14.1 $ * * This file is part of OpenOffice.org. * @@ -45,6 +45,8 @@ struct Struct2b: Struct2a { long member3; }; struct Poly< T > { long member; }; +struct Rec { sequence< Rec > x; }; + exception Exception1: com::sun::star::uno::Exception { long member; }; exception Exception2: com::sun::star::uno::Exception { long member; }; diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx index dd2de4e59bc9..a27b29d1ddbe 100644 --- a/cppu/source/typelib/typelib.cxx +++ b/cppu/source/typelib/typelib.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: typelib.cxx,v $ - * $Revision: 1.35 $ + * $Revision: 1.35.6.1 $ * * This file is part of OpenOffice.org. * @@ -875,13 +875,25 @@ void newTypeDescription( = pStructMembers[i].aBase.pMemberName ); } // write offset - typelib_TypeDescription * pTD = 0; - TYPELIB_DANGER_GET( &pTD, pTmp->ppTypeRefs[i] ); - OSL_ENSURE( pTD->nSize, "### void member?" ); - nOffset = newAlignedSize( - nOffset, pTD->nSize, pTD->nAlignment ); - pTmp->pMemberOffsets[i] = nOffset - pTD->nSize; - TYPELIB_DANGER_RELEASE( pTD ); + sal_Int32 size; + sal_Int32 alignment; + if (pTmp->ppTypeRefs[i]->eTypeClass == + typelib_TypeClass_SEQUENCE) + { + // Take care of recursion like + // struct S { sequence<S> x; }; + size = sizeof(void *); + alignment = adjustAlignment(size); + } else { + typelib_TypeDescription * pTD = 0; + TYPELIB_DANGER_GET( &pTD, pTmp->ppTypeRefs[i] ); + OSL_ENSURE( pTD->nSize, "### void member?" ); + size = pTD->nSize; + alignment = pTD->nAlignment; + TYPELIB_DANGER_RELEASE( pTD ); + } + nOffset = newAlignedSize( nOffset, size, alignment ); + pTmp->pMemberOffsets[i] = nOffset - size; if (polymorphic) { reinterpret_cast< typelib_StructTypeDescription * >( diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index 95356633d9f1..bfa0eef0ca25 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: factory.cxx,v $ - * $Revision: 1.28 $ + * $Revision: 1.28.22.1 $ * * This file is part of OpenOffice.org. * @@ -838,82 +838,63 @@ Reference< XInterface > ORegistryFactoryHelper::createInstanceWithArgumentsAndCo Reference< XInterface > ORegistryFactoryHelper::createModuleFactory() throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { - Reference< XInterface > xFactory; - try - { - OUString aActivatorUrl; - OUString aActivatorName; - OUString aLocation; + OUString aActivatorUrl; + OUString aActivatorName; + OUString aLocation; - Reference<XRegistryKey > xActivatorKey = xImplementationKey->openKey( - OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/ACTIVATOR") ) ); - if( xActivatorKey.is() && xActivatorKey->getValueType() == RegistryValueType_ASCII ) - { - aActivatorUrl = xActivatorKey->getAsciiValue(); + Reference<XRegistryKey > xActivatorKey = xImplementationKey->openKey( + OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/ACTIVATOR") ) ); + if( xActivatorKey.is() && xActivatorKey->getValueType() == RegistryValueType_ASCII ) + { + aActivatorUrl = xActivatorKey->getAsciiValue(); - OUString tmpActivator(aActivatorUrl.getStr()); - sal_Int32 nIndex = 0; - aActivatorName = tmpActivator.getToken(0, ':', nIndex ); + OUString tmpActivator(aActivatorUrl.getStr()); + sal_Int32 nIndex = 0; + aActivatorName = tmpActivator.getToken(0, ':', nIndex ); - Reference<XRegistryKey > xLocationKey = xImplementationKey->openKey( - OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/LOCATION") ) ); - if( xLocationKey.is() && xLocationKey->getValueType() == RegistryValueType_ASCII ) - aLocation = xLocationKey->getAsciiValue(); - } - else + Reference<XRegistryKey > xLocationKey = xImplementationKey->openKey( + OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/LOCATION") ) ); + if( xLocationKey.is() && xLocationKey->getValueType() == RegistryValueType_ASCII ) + aLocation = xLocationKey->getAsciiValue(); + } + else + { + // old style"url" + // the location of the program code of the implementation + Reference<XRegistryKey > xLocationKey = xImplementationKey->openKey( + OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/URL") ) ); + // is the the key of the right type ? + if( xLocationKey.is() && xLocationKey->getValueType() == RegistryValueType_ASCII ) { - // old style"url" - // the location of the program code of the implementation - Reference<XRegistryKey > xLocationKey = xImplementationKey->openKey( - OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/URL") ) ); - // is the the key of the right type ? - if( xLocationKey.is() && xLocationKey->getValueType() == RegistryValueType_ASCII ) - { - // one implementation found -> try to activate - aLocation = xLocationKey->getAsciiValue(); - - // search protocol delemitter - sal_Int32 nPos = aLocation.indexOf( - OUString( RTL_CONSTASCII_USTRINGPARAM("://") ) ); - if( nPos != -1 ) - { - aActivatorName = aLocation.copy( 0, nPos ); - if( aActivatorName.compareToAscii( "java" ) == 0 ) - aActivatorName = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.Java") ); - else if( aActivatorName.compareToAscii( "module" ) == 0 ) - aActivatorName = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary") ); - aLocation = aLocation.copy( nPos + 3 ); - } - } - } + // one implementation found -> try to activate + aLocation = xLocationKey->getAsciiValue(); - if( aActivatorName.getLength() != 0 ) - { - Reference<XInterface > x = xSMgr->createInstance( aActivatorName ); - Reference<XImplementationLoader > xLoader( x, UNO_QUERY ); - Reference<XInterface > xMF; - if (xLoader.is()) + // search protocol delemitter + sal_Int32 nPos = aLocation.indexOf( + OUString( RTL_CONSTASCII_USTRINGPARAM("://") ) ); + if( nPos != -1 ) { - // JSC: This exception must not be catched if a concept for exception handling - // is specified, implemented and used. - try - { - xFactory = xLoader->activate( aImplementationName, aActivatorUrl, aLocation, xImplementationKey ); - } - catch( CannotActivateFactoryException& e) - { - OString msg( OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US) ); - OSL_TRACE(msg.getStr() ); - } + aActivatorName = aLocation.copy( 0, nPos ); + if( aActivatorName.compareToAscii( "java" ) == 0 ) + aActivatorName = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.Java") ); + else if( aActivatorName.compareToAscii( "module" ) == 0 ) + aActivatorName = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary") ); + aLocation = aLocation.copy( nPos + 3 ); } } } - catch (InvalidRegistryException & e) + + Reference< XInterface > xFactory; + if( aActivatorName.getLength() != 0 ) { - OString msg( OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US) ); - OSL_TRACE(msg.getStr() ); + Reference<XInterface > x = xSMgr->createInstance( aActivatorName ); + Reference<XImplementationLoader > xLoader( x, UNO_QUERY ); + Reference<XInterface > xMF; + if (xLoader.is()) + { + xFactory = xLoader->activate( aImplementationName, aActivatorUrl, aLocation, xImplementationKey ); + } } - return xFactory; } diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java b/jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java index 0837df025ac9..0895903de75e 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/Marshal.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: Marshal.java,v $ - * $Revision: 1.20 $ + * $Revision: 1.20.8.1 $ * * This file is part of OpenOffice.org. * @@ -286,6 +286,10 @@ final class Marshal { throw new RuntimeException(e.toString()); } value = any.getObject(); + } else if (value.getClass() == Object.class) { + // Avoid StackOverflowError: + throw new IllegalArgumentException( + "Object instance does not represent UNO value"); } else { type = TypeDescription.getTypeDescription(value.getClass()); } diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx index 7c20824f2219..4d0d2d93bc5d 100755 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: javaldx.cxx,v $ - * $Revision: 1.15 $ + * $Revision: 1.15.26.1 $ * * This file is part of OpenOffice.org. * @@ -49,16 +49,6 @@ static sal_Bool hasOption(char const * szOption, int argc, char** argv); static rtl::OString getLD_LIBRARY_PATH(const rtl::ByteSequence & vendorData); //static sal_Bool printPaths(const OUString& sPathFile); -#ifdef MACOSX -#define HELP_TEXT \ -"\njavaldx is necessary to make Java work on some UNIX platforms." \ -"It prints a string to std out that consists of directories which " \ -"have to be included into the DYLD_LIBRARY_PATH variable.The setting of " \ -"the variable usually occurs in a shell script that runs javaldx.\n" \ -"The directories are from the chosen java installation. \n" \ -"Options are: \n"\ -"--help or -h\n" -#else #define HELP_TEXT \ "\njavaldx is necessary to make Java work on some UNIX platforms." \ "It prints a string to std out that consists of directories which " \ @@ -67,7 +57,6 @@ static rtl::OString getLD_LIBRARY_PATH(const rtl::ByteSequence & vendorData); "The directories are from the chosen java installation. \n" \ "Options are: \n"\ "--help or -h\n" -#endif SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk b/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk index 08d4548a880e..34b322c194c1 100755 --- a/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk +++ b/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.7 $ +# $Revision: 1.7.26.1 $ # # This file is part of OpenOffice.org. # @@ -44,17 +44,10 @@ ENABLE_EXCEPTIONS=true .INCLUDE : settings.mk -.IF "$(OS)"=="MACOSX" -STDLIBCUIMT+=-lstdc++ -.ENDIF - -.IF "$(SOLAR_JAVA)"=="" -nojava: - @echo "Not building jvmfwk/plugins/javaenvsetup/ because Java is disabled" -.ENDIF - # --- Files -------------------------------------------------------- +.IF "$(OS)" != "MACOSX" && "$(SOLAR_JAVA)" != "" + OBJFILES=$(OBJ)$/javaldx.obj APP1TARGET=javaldx @@ -62,6 +55,8 @@ APP1OBJS=$(OBJFILES) APP1STDLIBS=$(SALLIB) $(CPPULIB) $(CPPUHELPERLIB) $(JVMFWKLIB) APP1RPATH=UREBIN +.ENDIF + # --- Targets ------------------------------------------------------ .INCLUDE : target.mk diff --git a/offapi/com/sun/star/configuration/backend/PolicyLayerBackend.idl b/offapi/com/sun/star/configuration/backend/PolicyLayerBackend.idl index 6cfe967bca37..e69de29bb2d1 100644 --- a/offapi/com/sun/star/configuration/backend/PolicyLayerBackend.idl +++ b/offapi/com/sun/star/configuration/backend/PolicyLayerBackend.idl @@ -1,63 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: PolicyLayerBackend.idl,v $ - * $Revision: 1.4 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef __com_sun_star_configuration_backend_PolicyLayerBackend_idl__ -#define __com_sun_star_configuration_backend_PolicyLayerBackend_idl__ - -#ifndef __com_sun_star_configuration_backend_XBackend_idl__ -#include <com/sun/star/configuration/backend/XBackend.idl> -#endif - - -//============================================================================= - -module com { module sun { module star { module configuration { module backend { - -//============================================================================= - -/** - provides access to multi layers of configuration data -*/ -service PolicyLayerBackend -{ - //------------------------------------------------------------------------- - /** - provides access to the layer data. - */ - interface XBackend ; - - //------------------------------------------------------------------------- - -} ; - -//============================================================================= - -} ; } ; } ; } ; } ; - -#endif diff --git a/offapi/com/sun/star/configuration/backend/makefile.mk b/offapi/com/sun/star/configuration/backend/makefile.mk index d12cbf1cbcbc..52e4d7df3c86 100644 --- a/offapi/com/sun/star/configuration/backend/makefile.mk +++ b/offapi/com/sun/star/configuration/backend/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.9 $ +# $Revision: 1.9.102.1 $ # # This file is part of OpenOffice.org. # @@ -66,7 +66,6 @@ IDLFILES = \ LdapMultiLayerStratum.idl \ SchemaSupplier.idl \ LocalSchemaSupplier.idl \ - PolicyLayerBackend.idl \ PlatformBackend.idl \ SystemIntegration.idl \ LayerDescriber.idl \ diff --git a/remotebridges/source/bridge/bridge_provider.cxx b/remotebridges/source/bridge/bridge_provider.cxx index edac3dc38489..0e8016d88f3b 100644 --- a/remotebridges/source/bridge/bridge_provider.cxx +++ b/remotebridges/source/bridge/bridge_provider.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: bridge_provider.cxx,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.8.1 $ * * This file is part of OpenOffice.org. * @@ -33,6 +33,7 @@ #include "remote_bridge.hxx" #include <osl/diagnose.h> +#include <rtl/ustrbuf.hxx> #include <uno/mapping.hxx> #include <uno/environment.h> @@ -125,18 +126,18 @@ namespace remotebridges_bridge *ppRemoteI = 0; } + OUString sCppuName( RTL_CONSTASCII_USTRINGPARAM( CPPU_CURRENT_LANGUAGE_BINDING_NAME ) ); + + uno_Environment *pEnvThis = 0; + uno_getEnvironment( &pEnvThis , + sCppuName.pData , + 0 ); + Mapping map( pEnvThis , pEnvRemote ); + pEnvThis->release( pEnvThis ); + if( OUString( pType->aBase.pTypeName ) == getCppuType( (Reference<XInterface>*)0).getTypeName() ) { - OUString sCppuName( RTL_CONSTASCII_USTRINGPARAM( CPPU_CURRENT_LANGUAGE_BINDING_NAME ) ); - - uno_Environment *pEnvThis = 0; - uno_getEnvironment( &pEnvThis , - sCppuName.pData , - 0 ); - Mapping map( pEnvThis , pEnvRemote ); - pEnvThis->release( pEnvThis ); - try { Reference< XInterface > r = m->m_rProvider->getInstance( @@ -167,5 +168,15 @@ namespace remotebridges_bridge } } + else + { + OUStringBuffer msg; + msg.appendAscii( + RTL_CONSTASCII_STRINGPARAM( + "getInstance expected XInterface but got ")); + msg.append(pType->aBase.pTypeName); + convertToRemoteRuntimeException( + ppException, msg.getStr(), Reference< XInterface >(), map); + } } } diff --git a/sal/osl/unx/thread.c b/sal/osl/unx/thread.c index 40b94028a946..20272c5f4a28 100644 --- a/sal/osl/unx/thread.c +++ b/sal/osl/unx/thread.c @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: thread.c,v $ - * $Revision: 1.31 $ + * $Revision: 1.31.48.1 $ * * This file is part of OpenOffice.org. * @@ -67,6 +67,7 @@ #define THREADIMPL_FLAGS_SUSPENDED 0x00004 #define THREADIMPL_FLAGS_ACTIVE 0x00008 #define THREADIMPL_FLAGS_ATTACHED 0x00010 +#define THREADIMPL_FLAGS_DESTROYED 0x00020 typedef struct osl_thread_impl_st { @@ -197,28 +198,30 @@ static void osl_thread_destruct_Impl (Thread_Impl ** ppImpl) /*****************************************************************************/ static void osl_thread_cleanup_Impl (void* pData) { - int active; + pthread_t thread; + int attached; + int destroyed; Thread_Impl* pImpl= (Thread_Impl*)pData; pthread_mutex_lock (&(pImpl->m_Lock)); - if (pImpl->m_Flags & THREADIMPL_FLAGS_ATTACHED) - { - pImpl->m_Flags &= ~THREADIMPL_FLAGS_ATTACHED; - pthread_detach (pImpl->m_hThread); - } - - active = ((pImpl->m_Flags & THREADIMPL_FLAGS_ACTIVE) > 0); - pImpl->m_Flags &= ~THREADIMPL_FLAGS_ACTIVE; + thread = pImpl->m_hThread; + attached = (pImpl->m_Flags & THREADIMPL_FLAGS_ATTACHED) != 0; + destroyed = (pImpl->m_Flags & THREADIMPL_FLAGS_DESTROYED) != 0; + pImpl->m_Flags &= ~(THREADIMPL_FLAGS_ACTIVE | THREADIMPL_FLAGS_ATTACHED); pthread_mutex_unlock (&(pImpl->m_Lock)); - if (!active) + /* release oslThreadIdentifier @@@ see TODO @@@ */ + removeThreadId (thread); + + if (attached) { - /* release oslThreadIdentifier @@@ see TODO @@@ */ - removeThreadId (pImpl->m_hThread); + pthread_detach (thread); + } - /* free memory */ + if (destroyed) + { osl_thread_destruct_Impl (&pImpl); } } @@ -354,7 +357,15 @@ oslThread osl_createSuspendedThread ( void SAL_CALL osl_destroyThread(oslThread Thread) { if (Thread != NULL) { - osl_thread_cleanup_Impl(Thread); + Thread_Impl * impl = (Thread_Impl *) Thread; + int active; + pthread_mutex_lock(&impl->m_Lock); + active = (impl->m_Flags & THREADIMPL_FLAGS_ACTIVE) != 0; + impl->m_Flags |= THREADIMPL_FLAGS_DESTROYED; + pthread_mutex_unlock(&impl->m_Lock); + if (!active) { + osl_thread_destruct_Impl(&impl); + } } } @@ -434,6 +445,7 @@ sal_Bool SAL_CALL osl_isThreadRunning(const oslThread Thread) /*****************************************************************************/ void SAL_CALL osl_joinWithThread(oslThread Thread) { + pthread_t thread; int attached; Thread_Impl* pImpl= (Thread_Impl*)Thread; @@ -449,6 +461,7 @@ void SAL_CALL osl_joinWithThread(oslThread Thread) return; /* EDEADLK */ } + thread = pImpl->m_hThread; attached = ((pImpl->m_Flags & THREADIMPL_FLAGS_ATTACHED) > 0); pImpl->m_Flags &= ~THREADIMPL_FLAGS_ATTACHED; @@ -458,10 +471,10 @@ void SAL_CALL osl_joinWithThread(oslThread Thread) { /* install cleanup handler to ensure consistent flags and state */ pthread_cleanup_push ( - osl_thread_join_cleanup_Impl, (void*)(pImpl->m_hThread)); + osl_thread_join_cleanup_Impl, (void*)thread); /* join */ - pthread_join (pImpl->m_hThread, NULL); + pthread_join (thread, NULL); /* remove cleanup handler */ pthread_cleanup_pop (0); diff --git a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx index 1e791ba2eaf1..85efcfa55b34 100644 --- a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx +++ b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: rtl_Bootstrap.cxx,v $ - * $Revision: 1.11 $ + * $Revision: 1.10.20.2 $ * * This file is part of OpenOffice.org. * @@ -785,6 +785,16 @@ namespace rtl_Bootstrap t2.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("src680_test"))); } + void testNonexisting() { + rtl::OUString t( + RTL_CONSTASCII_USTRINGPARAM( + "${$ORIGIN/" SAL_CONFIGFILE("none") ":MYVAR}")); + Bootstrap::expandMacros(t); + CPPUNIT_ASSERT_MESSAGE( + "nonexisting", + t.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("src680_test"))); + } + void testSection() { rtl::OUStringBuffer b; b.appendAscii(RTL_CONSTASCII_STRINGPARAM("${")); @@ -817,6 +827,7 @@ namespace rtl_Bootstrap CPPUNIT_TEST(testRecursion); CPPUNIT_TEST(testLink); CPPUNIT_TEST(testOverride); + CPPUNIT_TEST(testNonexisting); CPPUNIT_TEST(testSection); CPPUNIT_TEST_SUITE_END(); }; // class expandMacrosFrom diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx index 004ddb60a9ed..d73b704cca60 100644 --- a/sal/rtl/source/bootstrap.cxx +++ b/sal/rtl/source/bootstrap.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: bootstrap.cxx,v $ - * $Revision: 1.44 $ + * $Revision: 1.43.20.1 $ * * This file is part of OpenOffice.org. * @@ -891,9 +891,9 @@ rtl::OUString lookup( Bootstrap_Impl const * file, bool override, rtl::OUString const & key, ExpandRequestLink const * requestStack) { - OSL_ASSERT(file != NULL); rtl::OUString v; - file->getValue(key, &v.pData, NULL, override, requestStack); + (file == NULL ? get_static_bootstrap_handle() : file)->getValue( + key, &v.pData, NULL, override, requestStack); return v; } @@ -979,14 +979,11 @@ rtl::OUString expandMacros( } catch (rtl::MalformedUriException &) {} } } else { - rtl::Bootstrap b(seg[0]); - Bootstrap_Impl * f = static_cast< Bootstrap_Impl * >( - b.getHandle()); - // Silently ignore bootstrap files that cannot be opened - // (is that good?): - if (f != NULL) { - buf.append(lookup(f, false, seg[1], requestStack)); - } + buf.append( + lookup( + static_cast< Bootstrap_Impl * >( + rtl::Bootstrap(seg[0]).getHandle()), + false, seg[1], requestStack)); } } else if (seg[0].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(".override"))) @@ -994,10 +991,7 @@ rtl::OUString expandMacros( rtl::Bootstrap b(seg[1]); Bootstrap_Impl * f = static_cast< Bootstrap_Impl * >( b.getHandle()); - buf.append( - lookup( - f == NULL ? get_static_bootstrap_handle() : f, - f != NULL, seg[2], requestStack)); + buf.append(lookup(f, f != NULL, seg[2], requestStack)); } else { // Going through osl::Profile, this code erroneously does // not recursively expand macros in the resulting diff --git a/stoc/source/corereflection/corefl.xml b/stoc/source/corereflection/corefl.xml index 8bf757a2ae32..5dba80b6abff 100644 --- a/stoc/source/corereflection/corefl.xml +++ b/stoc/source/corereflection/corefl.xml @@ -15,6 +15,7 @@ The service provides reflection and access to all uno types <status value="final"/> <supported-service> com.sun.star.reflection.CoreReflection </supported-service> <service-dependency> ... </service-dependency> + <type>com.sun.star.lang.DisposedException</type> <type> com.sun.star.reflection.XTypeDescription </type> <type> com.sun.star.reflection.XIdlReflection </type> <type> com.sun.star.reflection.XIdlClass </type> diff --git a/stoc/source/inspect/insp.xml b/stoc/source/inspect/insp.xml index d0ec9c1b3076..48b46d273cb1 100644 --- a/stoc/source/inspect/insp.xml +++ b/stoc/source/inspect/insp.xml @@ -16,6 +16,7 @@ <status value="final"/> <supported-service> com.sun.star.beans.Introspection </supported-service> <service-dependency> com.sun.star.reflection.CoreReflection </service-dependency> + <type>com.sun.star.lang.DisposedException</type> <type> com.sun.star.beans.XIntrospection </type> <type> com.sun.star.beans.XIntrospectionAccess </type> <type> com.sun.star.beans.XPropertySet </type> diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 2650b2620a50..22c8dc780b89 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: javavm.cxx,v $ - * $Revision: 1.78 $ + * $Revision: 1.78.14.1 $ * * This file is part of OpenOffice.org. * @@ -31,49 +31,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_stoc.hxx" -/* - Code generation bug within Sun CC 5.2 on solaris sparc - Please check the following code against your compiler version before enabling - the optimization (when the program runs correct, it should print - 1 - 2 - ), otherwise nothing. The bug has crashed the - initVMConfiguration function, which can be found in this file. - -#include <stdio.h> - -static void b() {}; -struct E { ~E(){ b(); } }; - -void a() -{ - throw 42; -} - - -int main( int argc, char * argv[]) -{ - E e1; - try - { - a(); - } - catch( int i ) - { - } - try - { - // this output never appears with CC -O test.cxx - fprintf( stderr,"1\n" ); - } - catch( E & e ) - { - } - // this output never appears with CC -O test.cxx - fprintf( stderr, "2\n" ); -} -*/ - #include "javavm.hxx" #include "interact.hxx" diff --git a/stoc/source/javavm/jen.xml b/stoc/source/javavm/jen.xml index 4d324e0f3802..29ceb09db110 100644 --- a/stoc/source/javavm/jen.xml +++ b/stoc/source/javavm/jen.xml @@ -16,6 +16,10 @@ the existing vm given back. <status value="final"/> <supported-service> com.sun.star.java.JavaVirtualMachine </supported-service> <service-dependency> ... </service-dependency> + <type>com.sun.star.beans.NamedValue</type> + <type>com.sun.star.java.XJavaThreadRegister_11</type> + <type>com.sun.star.uri/ExternalUriReferenceTranslator</type> + <type>com.sun.star.util.XMacroExpander</type> <type> com.sun.star.java.XJavaVM </type> <type> com.sun.star.java.XJavaVM </type> <type> com.sun.star.container.XNameAccess </type> diff --git a/stoc/source/javavm/makefile.mk b/stoc/source/javavm/makefile.mk index da3461ceed2d..ffd00418b050 100644 --- a/stoc/source/javavm/makefile.mk +++ b/stoc/source/javavm/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.23 $ +# $Revision: 1.23.14.1 $ # # This file is part of OpenOffice.org. # @@ -57,14 +57,6 @@ SLOFILES= \ $(SLO)$/jvmargs.obj \ $(SLO)$/interact.obj -.IF "$(COM)"=="C52" -# Code generation bug in conjunction with exception handling -# You can find a codesample in javavm.cxx in a comment -# at the top of the file -NOOPTFILES= \ - $(SLO)$/javavm.obj -.ENDIF # "$(COM)"=="C52" - SHL1TARGET= $(TARGET) SHL1VERSIONMAP = jen.map SHL1STDLIBS= \ diff --git a/stoc/source/namingservice/namingservice.xml b/stoc/source/namingservice/namingservice.xml index 23cbee74ee55..2b9d9365ea62 100644 --- a/stoc/source/namingservice/namingservice.xml +++ b/stoc/source/namingservice/namingservice.xml @@ -12,6 +12,7 @@ The naming service allows the registration and retrieval of objects. <language> c++ </language> <status value="final"/> <supported-service> com.sun.star.uno.NamingService </supported-service> + <type>com.sun.star.lang.DisposedException</type> <type> com.sun.star.lang.XComponent </type> <type> com.sun.star.lang.IllegalArgumentException </type> <type> com.sun.star.lang.XInitialization </type> diff --git a/ure/source/README b/ure/source/README index f8dfbbc39da8..6528c58a537a 100644 --- a/ure/source/README +++ b/ure/source/README @@ -8,7 +8,7 @@ # # $RCSfile: README,v $ # -# $Revision: 1.17 $ +# $Revision: 1.17.2.2 $ # # This file is part of OpenOffice.org. # @@ -53,8 +53,6 @@ Linux x86, Solaris x86, and Solaris SPARC: /opt/openoffice.org/ure/lib/libuno_salhelperC52.so.3 [Solaris only] /opt/openoffice.org/ure/lib/libstlport_gcc.so [Linux x86 only] /opt/openoffice.org/ure/lib/libstlport_sunpro.so [Solaris only] -/opt/openoffice.org/ure/lib/libuno_purpenvhelpergcc3.so.3 [Linux x86 only] -/opt/openoffice.org/ure/lib/libuno_purpenvhelperC52.so.3 [Solaris only] /opt/openoffice.org/ure/share/java/unoloader.jar /opt/openoffice.org/ure/share/java/juh.jar /opt/openoffice.org/ure/share/java/jurt.jar @@ -106,8 +104,6 @@ Linux x86, Solaris x86, and Solaris SPARC: /opt/openoffice.org/ure/lib/uuresolver.uno.so [private] /opt/openoffice.org/ure/share/java/java_uno.jar [private] /opt/openoffice.org/ure/share/misc/javavendors.xml [private] -/opt/openoffice.org/ure/lib/libunsafe_uno_uno.so [private] -/opt/openoffice.org/ure/lib/libaffine_uno_uno.so [private] Windows: @@ -124,7 +120,6 @@ Program Files\URE\bin\purpenvhelper3MSC.dll Program Files\URE\bin\sal3.dll Program Files\URE\bin\salhelper3MSC.dll Program Files\URE\bin\stlport_vc7145.dll -Program Files\URE\bin\purpenvhelper3MSC.dll Program Files\URE\java\unoloader.jar Program Files\URE\java\juh.jar Program Files\URE\java\jurt.jar @@ -132,7 +127,6 @@ Program Files\URE\java\ridl.jar Program Files\URE\misc\types.rdb Program Files\URE\misc\services.rdb Program Files\URE\bin\libxml2.dll [external] -Program Files\URE\bin\msvcr71.dll [external] Program Files\URE\bin\uno.ini [private] Program Files\URE\bin\reg3.dll [private] Program Files\URE\bin\rmcxt3.dll [private] @@ -169,13 +163,10 @@ Program Files\URE\bin\textinstream.uno.dll [private] Program Files\URE\bin\textoutstream.uno.dll [private] Program Files\URE\bin\stocservices.uno.dll [private] Program Files\URE\bin\uuresolver.uno.dll [private] -Program Files\URE\bin\msvcp71.dll [private] Program Files\URE\bin\unicows.dll [private] Program Files\URE\bin\uwinapi.dll [private] Program Files\URE\java\java_uno.jar [private] Program Files\URE\misc\javavendors.xml [private] -Program Files\URE\bin\unsafe_uno_uno.dll [private] -Program Files\URE\bin\affine_uno_uno.dll [private] %windir%\assembly\cli_basetypes.dll [GAC] %windir%\assembly\cli_ure.dll [GAC] diff --git a/ure/source/startup.sh b/ure/source/startup.sh index ecac68693e66..a4ec42ded460 100644 --- a/ure/source/startup.sh +++ b/ure/source/startup.sh @@ -9,7 +9,7 @@ # # $RCSfile: startup.sh,v $ # -# $Revision: 1.4 $ +# $Revision: 1.4.10.1 $ # # This file is part of OpenOffice.org. # @@ -40,10 +40,12 @@ done # Extend the LD_LIBRARY_PATH for Java: epath=`dirname "$0"` -jpath=`"${epath}/javaldx" $my_envargs` -if [ -n "${jpath}" ]; then - LD_LIBRARY_PATH=${jpath}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}} - export LD_LIBRARY_PATH +if [ -x "${epath}/javaldx" ] ; then + jpath=`"${epath}/javaldx" $my_envargs` + if [ -n "${jpath}" ]; then + LD_LIBRARY_PATH=${jpath}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}} + export LD_LIBRARY_PATH + fi fi exec "$0.bin" "$@" diff --git a/ure/source/uretest/Makefile.pln b/ure/source/uretest/Makefile.pln index 8c004adb1efe..62c95797a8ca 100644 --- a/ure/source/uretest/Makefile.pln +++ b/ure/source/uretest/Makefile.pln @@ -8,7 +8,7 @@ # # $RCSfile: Makefile.pln,v $ # -# $Revision: 1.7 $ +# $Revision: 1.7.10.1 $ # # This file is part of OpenOffice.org. # @@ -139,14 +139,14 @@ out.pln/cppserver.o: cppserver.cc out.pln/cpputypes.cppumaker.flag \ out.pln/cpputypes.cppumaker.flag: | out.pln - LD_LIBRARY_PATH=$(URE_HOME)/lib $(SDK_HOME)/linux/bin/cppumaker \ + LD_LIBRARY_PATH=$(URE_HOME)/lib $(SDK_HOME)/bin/cppumaker \ -O./out.pln/include/cpputypes \ '-Tcom.sun.star.lang.DisposedException;com.sun.star.lang.EventObject;com.sun.star.lang.XMain;com.sun.star.lang.XMultiComponentFactory;com.sun.star.lang.XMultiServiceFactory;com.sun.star.lang.XSingleComponentFactory;com.sun.star.lang.XSingleServiceFactory;com.sun.star.lang.XTypeProvider;com.sun.star.registry.XRegistryKey;com.sun.star.uno.DeploymentException;com.sun.star.uno.Exception;com.sun.star.uno.RuntimeException;com.sun.star.uno.XAggregation;com.sun.star.uno.XComponentContext;com.sun.star.uno.XCurrentContext;com.sun.star.uno.XInterface;com.sun.star.uno.XWeak' \ -B/UCR $(URE_HOME)/share/misc/types.rdb touch $@ out.pln/types.cppumaker.flag: out.pln/types.rdb | out.pln - LD_LIBRARY_PATH=$(URE_HOME)/lib $(SDK_HOME)/linux/bin/cppumaker \ + LD_LIBRARY_PATH=$(URE_HOME)/lib $(SDK_HOME)/bin/cppumaker \ -O./out.pln/include/types -B/UCR $< \ -X$(URE_HOME)/share/misc/types.rdb touch $@ @@ -270,7 +270,7 @@ out.pln/types.mf: types.mf.template | out.pln out.pln/types.javamaker.flag: out.pln/types.rdb | out.pln out.pln/class rm -rf out.pln/class/types - LD_LIBRARY_PATH=$(URE_HOME)/lib $(SDK_HOME)/linux/bin/javamaker \ + LD_LIBRARY_PATH=$(URE_HOME)/lib $(SDK_HOME)/bin/javamaker \ -O./out.pln/class/types -B/UCR $< -X$(URE_HOME)/share/misc/types.rdb touch $@ @@ -279,7 +279,7 @@ out.pln/types.rdb: out.pln/types.urd | out.pln $(URE_HOME)/bin/regmerge $@ /UCR $< out.pln/types.urd: types.idl | out.pln - LD_LIBRARY_PATH=$(URE_HOME)/lib $(SDK_HOME)/linux/bin/idlc -O$(@D) \ + LD_LIBRARY_PATH=$(URE_HOME)/lib $(SDK_HOME)/bin/idlc -O$(@D) \ -I$(SDK_HOME)/idl -cid -we $< |