To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=47888
------- Additional comments from [EMAIL PROTECTED] Sun Jul 17 11:17:32 -0700
2005 -------
I ran into this same problem in NeoOffice/J with Java 1.4.x and I have code that
fixes this problem.
The NeoOffice/J code is intermixed with a lot of code that you won't want. So,
below is a stripped down version of the code changes that you will need. Note: I
haven't tested this code as I don't have an OOo 2.0 build so someone who has
such a build will have to try this code out:
1. In vcl/unx/inc/salinst.h, add the following new function declaration:
#ifndef _SV_SVAPP_HXX
#include <svapp.hxx>
#endif
void ExecuteApplicationMain( Application *pApp );
2. In vcl/source/app/svmain.cxx, in the SVMain() function replace the following
line:
pSVData->mpApp->Main();
with the following lines:
#ifdef MACOSX
ExecuteApplicationMain( pSVData->mpApp );
#else // MACOSX
pSVData->mpApp->Main();
#endif // MACOSX
3. In vcl/unx/source/app/salinst.cxx, add the following code:
#include <CoreFoundation/CoreFoundation.h>
class SVMainThread : public ::vos::OThread
{
Application* mpApp;
CFRunLoopRef maRunLoop;
public:
SVMainThread( Application* pApp, CFRunLoopRef
aRunLoop ) : ::vos::OThread(), mpApp( pApp ), maRunLoop( aRunLoop ) {}
virtual void run();
};
void SVMainThread::run()
{
Application::GetSolarMutex().acquire();
mpApp->Main();
CFRunLoopStop( maRunLoop );
Application::GetSolarMutex().release();
}
void sourceCallBack( void *info ) {}
void ExecuteApplicationMain( Application *pApp )
{
// TODO: Determine if we are running Java 1.3.1 as this code is currently
hardcoded for Java 1.4 or higher
jint jniVersion = JNI_VERSION_1_4;
if ( jniVersion >= JNI_VERSION_1_4 )
{
// Create the thread to run the Main() method in
SVMainThread aSVMainThread( pApp, CFRunLoopGetCurrent() );
aSVMainThread.create();
ULONG nCount = Application::ReleaseSolarMutex();
// Start the CFRunLoop
sourceContext.version = 0;
sourceContext.info = NULL;
sourceContext.retain = NULL;
sourceContext.release = NULL;
sourceContext.copyDescription = NULL;
sourceContext.equal = NULL;
sourceContext.hash = NULL;
sourceContext.schedule = NULL;
sourceContext.cancel = NULL;
sourceContext.perform = &sourceCallBack;
CFRunLoopSourceRef sourceRef = CFRunLoopSourceCreate( NULL, 0,
&sourceContext );
CFRunLoopAddSource(
CFRunLoopGetCurrent(),sourceRef,kCFRunLoopCommonModes );
CFRunLoopRun();
aSVMainThread.join();
Application::AcquireSolarMutex( nCount );
}
else
{
pApp->Main();
}
return;
}
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]