diff -x CVS -urN ooo_SRC680_m187_src.orig/canvas/source/java/aqua/WindowAdapter.java ooo_SRC680_m187_src.aquavcl01/canvas/source/java/aqua/WindowAdapter.java
--- ooo_SRC680_m187_src.orig/canvas/source/java/aqua/WindowAdapter.java 1970-01-01 01:00:00.000000000 +0100
+++ ooo_SRC680_m187_src.aquavcl01/canvas/source/java/aqua/WindowAdapter.java 2006-01-31 01:07:05.000000000 +0100
@@ -0,0 +1,175 @@
+// UNO
+import com.sun.star.uno.UnoRuntime;
+import com.sun.star.uno.XComponentContext;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.lang.XInitialization;
+import com.sun.star.lib.uno.helper.WeakBase;
+
+// OOo AWT
+import com.sun.star.awt.*;
+
+// system-dependent stuff
+import sun.awt.*;
+
+//Apple specifics
+import apple.awt.*;
+
+
+public class WindowAdapter
+// defacto implementing the interface, but not deriving from it, since
+// we're no real XInterface here
+// implements com.sun.star.awt.XWindow
+{
+ public java.awt.Frame frame;
+ private boolean fullscreen;
+
+ public WindowAdapter( int windowHandle,
+ boolean _fullscreen )
+ {
+ fullscreen = false;
+
+ if( _fullscreen )
+ {
+ // create a normal Java frame, and set it into fullscreen mode
+ frame = new javax.swing.JFrame( "Presentation" );
+ frame.setUndecorated( true );
+ frame.setVisible( true );
+
+ java.awt.Graphics2D graphics = (java.awt.Graphics2D)frame.getGraphics();
+ if( graphics.getDeviceConfiguration().getDevice().isFullScreenSupported() )
+ {
+ CanvasUtils.printLog( "WindowAdapter(Aqua): entering fullscreen mode" );
+ graphics.getDeviceConfiguration().getDevice().setFullScreenWindow( frame );
+ fullscreen = true;
+ }
+ else
+ {
+ CanvasUtils.printLog( "WindowAdapter(Aqua): fullscreen not supported" );
+ }
+
+ graphics.dispose();
+ }
+ else
+ {
+ // we're initialized with the operating system window handle
+ // as the parameter. We then generate a dummy Java frame with
+ // that window as the parent, to fake a root window for the
+ // Java implementation.
+
+ // now, we're getting slightly system dependent here.
+ String os = (String) System.getProperty("os.name");
+
+ // create the embedded frame
+ if( os.startsWith("Mac OS X") )
+ frame = new apple.awt.CEmbeddedFrame( windowHandle );
+ else
+ throw new com.sun.star.uno.RuntimeException();
+
+
+// frame = new javax.swing.JFrame( "Test window" );
+
+// // resize it according to the given bounds
+// frame.setBounds( boundRect );
+// frame.setVisible( true );
+ }
+ }
+
+ //----------------------------------------------------------------------------------
+
+ public void dispose()
+ {
+ if( fullscreen )
+ {
+ java.awt.Graphics2D graphics = (java.awt.Graphics2D)frame.getGraphics();
+ if( graphics.getDeviceConfiguration().getDevice().isFullScreenSupported() )
+ {
+ CanvasUtils.printLog( "WindowAdapter(Aqua): leaving fullscreen mode" );
+ graphics.getDeviceConfiguration().getDevice().setFullScreenWindow( null );
+ }
+ graphics.dispose();
+ }
+
+ if( frame != null )
+ frame.dispose();
+ }
+
+ //----------------------------------------------------------------------------------
+
+ //
+ // XWindow interface
+ // =================
+ //
+ public void setPosSize( int X, int Y, int Width, int Height, short Flags )
+ {
+ frame.setBounds( new java.awt.Rectangle( X, Y, Width, Height ) );
+ }
+
+ public com.sun.star.awt.Rectangle getPosSize( )
+ {
+ java.awt.Rectangle bounds = frame.getBounds();
+
+ return new com.sun.star.awt.Rectangle( bounds.x, bounds.y, bounds.width, bounds.height );
+ }
+
+ public void setVisible( boolean visible )
+ {
+ frame.setVisible( visible );
+ }
+
+ public void setEnable( boolean enable )
+ {
+ frame.setEnabled( enable );
+ }
+
+ public void setFocus()
+ {
+ }
+
+ public void addWindowListener( XWindowListener xListener )
+ {
+ }
+
+ public void removeWindowListener( XWindowListener xListener )
+ {
+ }
+
+ public void addFocusListener( XFocusListener xListener )
+ {
+ }
+
+ public void removeFocusListener( XFocusListener xListener )
+ {
+ }
+
+ public void addKeyListener( XKeyListener xListener )
+ {
+ }
+
+ public void removeKeyListener( XKeyListener xListener )
+ {
+ }
+
+ public void addMouseListener( XMouseListener xListener )
+ {
+ }
+
+ public void removeMouseListener( XMouseListener xListener )
+ {
+ }
+
+ public void addMouseMotionListener( XMouseMotionListener xListener )
+ {
+ }
+
+ public void removeMouseMotionListener( XMouseMotionListener xListener )
+ {
+ }
+
+ public void addPaintListener( XPaintListener xListener )
+ {
+ }
+
+ public void removePaintListener( XPaintListener xListener )
+ {
+ }
+}
diff -x CVS -urN ooo_SRC680_m187_src.orig/canvas/source/java/makefile.mk ooo_SRC680_m187_src.aquavcl01/canvas/source/java/makefile.mk
--- ooo_SRC680_m187_src.orig/canvas/source/java/makefile.mk 2006-08-14 18:14:56.000000000 +0200
+++ ooo_SRC680_m187_src.aquavcl01/canvas/source/java/makefile.mk 2006-08-22 00:09:13.000000000 +0200
@@ -68,15 +68,19 @@
BezierPolyPolygon.java \
SpriteRunner.java
-.IF "$(GUIBASE)"!="unx"
+.IF "$(GUIBASE)"=="unx"
-JAVAFILES += win/WindowAdapter.java
+JAVAFILES += x11/WindowAdapter.java
-.ELSE # "$(GUIBASE)"!="unx"
+.ELIF "$(GUIBASE)"=="aqua"
-JAVAFILES += x11/WindowAdapter.java
+JAVAFILES += aqua/WindowAdapter.java
+
+.ELSE
+
+JAVAFILES += win/WindowAdapter.java
-.ENDIF # "$(GUIBASE)"!="unx"
+.ENDIF # "$(GUIBASE)"=="unx"
JARFILES = jurt.jar unoil.jar ridl.jar juh.jar java_uno.jar
#JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
diff -x CVS -urN ooo_SRC680_m187_src.orig/dtrans/source/aqua/dtransaqua.xml ooo_SRC680_m187_src.aquavcl01/dtrans/source/aqua/dtransaqua.xml
--- ooo_SRC680_m187_src.orig/dtrans/source/aqua/dtransaqua.xml 2003-03-25 15:05:32.000000000 +0100
+++ ooo_SRC680_m187_src.aquavcl01/dtrans/source/aqua/dtransaqua.xml 2005-11-27 11:12:33.000000000 +0100
@@ -1,55 +1,48 @@
-
-
-
-
-
- Tino Rachui
-
- com.sun.star.comp.datatransfer.clipboard
-
-
- The win32 implementation of the datatransfer service.
-
-
- sysdtrans
-
- com.sun.star.loader.SharedLibrary
-
- c++
-
-
-
- com.sun.star.datatransfer.clipboard.SystemClipboard
-
- ...
-
- cppuhelper
- cppu
- sal
-
- cppuhelper
- cppu2
- sal2
-
- com.sun.star.datatransfer.clipboard.XClipboardEx
- com.sun.star.datatransfer.XTransferable
- com.sun.star.datatransfer.XTransferableEx
- com.sun.star.datatransfer.clipboard.XClipboardOwner
- com.sun.star.datatransfer.clipboard.XClipboardListener
- com.sun.star.datatransfer.clipboard.XClipboardNotifier
- com.sun.star.datatransfer.XTransferDataAccess
- com.sun.star.lang.XComponent
- com.sun.star.lang.XMultiServiceFactory
- com.sun.star.lang.XSingleServiceFactory
- com.sun.star.lang.XServiceInfo
- com.sun.star.lang.XTypeProvider
- com.sun.star.lang.IllegalArgumentException
- com.sun.star.uno.TypeClass
- com.sun.star.uno.XWeak
- com.sun.star.uno.XAggregation
- com.sun.star.registry.XRegistryKey
- com.sun.star.container.XSet
-
-
-
+
+
+
+ dtransaqua
+
+ Tino Rachui
+ com.sun.star.comp.datatransfer.aqua
+
+ The aqua implementation of the datatransfer service.
+
+ com.sun.star.loader.SharedLibrary
+ c++
+
+ com.sun.star.datatransfer.clipboard.SystemClipboard
+ ...
+ com.sun.star.datatransfer.clipboard.XClipboardEx
+ com.sun.star.datatransfer.XTransferable
+ com.sun.star.datatransfer.clipboard.RenderingCapabilities
+ com.sun.star.datatransfer.clipboard.XClipboardOwner
+ com.sun.star.datatransfer.clipboard.XClipboardListener
+ com.sun.star.datatransfer.clipboard.XClipboardNotifier
+ com.sun.star.datatransfer.dnd.XDropTargetDropContext
+ com.sun.star.datatransfer.dnd.XDropTargetDragContext
+ com.sun.star.datatransfer.dnd.XDropTarget
+ com.sun.star.datatransfer.dnd.DNDConstants
+ com.sun.star.datatransfer.dnd.XDragSource
+ com.sun.star.datatransfer.dnd.XDragSourceContext
+ com.sun.star.awt.XDisplayConnection
+ com.sun.star.lang.DisposedException
+ com.sun.star.lang.IllegalArgumentException
+ com.sun.star.lang.XComponent
+ com.sun.star.lang.XMultiServiceFactory
+ com.sun.star.lang.XSingleServiceFactory
+ com.sun.star.lang.XServiceInfo
+ com.sun.star.lang.XTypeProvider
+ com.sun.star.uno.TypeClass
+ com.sun.star.uno.XWeak
+ com.sun.star.uno.XAggregation
+ com.sun.star.registry.XRegistryKey
+ com.sun.star.container.XSet
+
+ cppuhelper
+ cppu
+ sal
+ cppuhelper
+ cppu2
+ sal2
+
diff -x CVS -urN ooo_SRC680_m187_src.orig/dtrans/source/aqua/makefile.mk ooo_SRC680_m187_src.aquavcl01/dtrans/source/aqua/makefile.mk
--- ooo_SRC680_m187_src.orig/dtrans/source/aqua/makefile.mk 2006-05-24 16:32:51.000000000 +0200
+++ ooo_SRC680_m187_src.aquavcl01/dtrans/source/aqua/makefile.mk 2006-08-07 20:28:22.000000000 +0200
@@ -93,9 +93,7 @@
# --- Targets ------------------------------------------------------
ALL : ALLTAR
-# hjs - do *not* call deliver out of makefiles
-# +deliver.pl
- +regcomp -register -r $(BIN)$/$(COMP1TYPELIST).rdb -c $(SHL1TARGET)
+ +cd $(LB) && regcomp -register -r ../bin/$(COMP1TYPELIST).rdb -c $(SHL1TARGET)
.INCLUDE : target.mk
diff -x CVS -urN ooo_SRC680_m187_src.orig/extensions/prj/build.lst ooo_SRC680_m187_src.aquavcl01/extensions/prj/build.lst
--- ooo_SRC680_m187_src.orig/extensions/prj/build.lst 2006-08-10 17:45:19.000000000 +0200
+++ ooo_SRC680_m187_src.aquavcl01/extensions/prj/build.lst 2006-08-22 00:20:47.000000000 +0200
@@ -11,10 +11,11 @@
ex extensions\source\resource nmake - all ex_resrc NULL
ex extensions\source\installation nmake - w ex_inst NULL
ex extensions\source\installation\office\protchk nmake - all ex_pchk NULL
+ex extensions\source\plugin\aqua nmake - u ex_plaqua ex_plbase NULL
ex extensions\source\plugin\base nmake - all ex_plbase NULL
ex extensions\source\plugin\win nmake - w ex_plwin ex_plbase NULL
ex extensions\source\plugin\unx nmake - u ex_plunx NULL
-ex extensions\source\plugin\util nmake - all ex_plutil ex_plbase ex_plunx.u ex_plwin.w NULL
+ex extensions\source\plugin\util nmake - all ex_plutil ex_plbase ex_plunx.u ex_plwin.w ex_plaqua.u NULL
ex extensions\source\scanner nmake - all ex_scan ex_resrc NULL
ex extensions\source\svg nmake - all ex_svg ex_scan NULL
ex extensions\source\packer nmake - all ex_pck NULL
diff -x CVS -urN ooo_SRC680_m187_src.orig/extensions/source/plugin/aqua/macmgr.cxx ooo_SRC680_m187_src.aquavcl01/extensions/source/plugin/aqua/macmgr.cxx
--- ooo_SRC680_m187_src.orig/extensions/source/plugin/aqua/macmgr.cxx 1970-01-01 01:00:00.000000000 +0100
+++ ooo_SRC680_m187_src.aquavcl01/extensions/source/plugin/aqua/macmgr.cxx 2006-08-25 14:26:41.000000000 +0200
@@ -0,0 +1,273 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile$
+ *
+ * $Revision$
+ *
+ * last change: $Author$ $Date$
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+
+using namespace rtl;
+using namespace std;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::plugin;
+
+// Unix specific implementation
+static bool CheckPlugin( const ByteString& rPath, list< PluginDescription* >& rDescriptions )
+{
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "Trying plugin %s ... ", rPath.GetBuffer() );
+#endif
+
+ xub_StrLen nPos = rPath.SearchBackward( '/' );
+ if( nPos == STRING_NOTFOUND )
+ {
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "no absolute path to plugin\n" );
+#endif
+ return false;
+ }
+
+ ByteString aBaseName = rPath.Copy( nPos+1 );
+ if( aBaseName.Equals( "libnullplugin.so" ) )
+ {
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "don't like %s\n", aBaseName.GetBuffer() );
+#endif
+ return false;
+ }
+
+ struct stat aStat;
+ if( stat( rPath.GetBuffer(), &aStat ) || ! S_ISREG( aStat.st_mode ) )
+ {
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "%s is not a regular file\n", rPath.GetBuffer() );
+#endif
+ return false;
+ }
+
+
+ rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
+
+ ByteString aCommand( "pluginapp.bin \"" );
+ aCommand.Append( rPath );
+ aCommand.Append( '"' );
+
+ FILE* pResult = popen( aCommand.GetBuffer(), "r" );
+ int nDescriptions = 0;
+ if( pResult )
+ {
+ OStringBuffer aMIME;
+ char buf[256];
+ while( fgets( buf, sizeof( buf ), pResult ) )
+ {
+ for( int i = 0; i < sizeof(buf) && buf[i]; ++i )
+ {
+ if( buf[i] == '\n' )
+ buf[i] = ';';
+ }
+ aMIME.append( buf );
+ }
+ pclose( pResult );
+
+ if( aMIME.getLength() > 0 )
+ {
+ OString aLine = aMIME.makeStringAndClear();
+
+ sal_Int32 nIndex = 0;
+ while( nIndex != -1 )
+ {
+ OString aType = aLine.getToken( 0, ';', nIndex );
+
+ sal_Int32 nTypeIndex = 0;
+ OString aMimetype = aType.getToken( 0, ':', nTypeIndex );
+ OString aExtLine = aType.getToken( 0, ':', nTypeIndex );
+ if( nTypeIndex < 0 ) // ensure at least three tokens
+ continue;
+ OString aDesc = aType.getToken( 0, ':', nTypeIndex );
+
+ // create extension list string
+ sal_Int32 nExtIndex = 0;
+ OStringBuffer aExtension;
+ while( nExtIndex != -1 )
+ {
+ OString aExt = aExtLine.getToken( 0, ',', nExtIndex);
+ if( aExt.indexOf( "*." ) != 0 )
+ aExtension.append( "*." );
+ aExtension.append( aExt );
+ if( nExtIndex != -1 )
+ aExtension.append( ';' );
+ }
+
+ PluginDescription* pNew = new PluginDescription;
+ // set plugin name (path to library)
+ pNew->PluginName = OStringToOUString( rPath, aEncoding );
+ // set mimetype
+ pNew->Mimetype = OStringToOUString( aMimetype, aEncoding );
+ // set extension line
+ pNew->Extension = OStringToOUString( aExtension.makeStringAndClear(), aEncoding );
+ // set description
+ pNew->Description= OStringToOUString( aDesc, aEncoding );
+ rDescriptions.push_back( pNew );
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "Mimetype: %s\nExtension: %s\n"
+ "Description: %s\n",
+ OUStringToOString( pNew->Mimetype, aEncoding ).getStr(),
+ OUStringToOString( pNew->Extension, aEncoding ).getStr(),
+ OUStringToOString( pNew->Description, aEncoding ).getStr()
+ );
+#endif
+ }
+ }
+#if OSL_DEBUG_LEVEL > 1
+ else
+ fprintf( stderr, "result of \"%s\" contains no mimtype\n",
+ aCommand.GetBuffer() );
+#endif
+ }
+#if OSL_DEBUG_LEVEL > 1
+ else
+ fprintf( stderr, "command \"%s\" failed\n", aCommand.GetBuffer() );
+#endif
+ return nDescriptions > 0;
+}
+
+Sequence XPluginManager_Impl::getPluginDescriptions() throw()
+{
+ static Sequence aDescriptions;
+ static BOOL bHavePlugins = FALSE;
+ if( ! bHavePlugins )
+ {
+ rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
+ list aPlugins;
+ int i;
+
+ // unix: search for plugins in /usr/lib/netscape/plugins,
+ // ~/.netscape/plugins und NPX_PLUGIN_PATH
+ // additionally: search in PluginsPath
+ static const char* pHome = getenv( "HOME" );
+ static const char* pNPXPluginPath = getenv( "NPX_PLUGIN_PATH" );
+
+ ByteString aSearchPath( "/usr/lib/netscape/plugins" );
+ if( pHome )
+ {
+ aSearchPath.Append( ':' );
+ aSearchPath.Append( pHome );
+ aSearchPath += "/.netscape/plugins";
+ }
+ if( pNPXPluginPath )
+ {
+ aSearchPath.Append( ':' );
+ aSearchPath += pNPXPluginPath;
+ }
+
+ const Sequence< ::rtl::OUString >& rPaths( PluginManager::getAdditionalSearchPaths() );
+ for( i = 0; i < rPaths.getLength(); i++ )
+ {
+ aSearchPath += ":";
+ aSearchPath += ByteString( String( rPaths.getConstArray()[i] ), aEncoding );
+ }
+
+
+ long aBuffer[ sizeof( struct dirent ) + _PC_NAME_MAX +1 ];
+ int nPaths = aSearchPath.GetTokenCount( ':' );
+ for( i = 0; i < nPaths; i++ )
+ {
+ ByteString aPath( aSearchPath.GetToken( i, ':' ) );
+ if( aPath.Len() )
+ {
+ DIR* pDIR = opendir( aPath.GetBuffer() );
+ struct dirent* pDirEnt = NULL;
+ while( pDIR && ! readdir_r( pDIR, (struct dirent*)aBuffer, &pDirEnt ) && pDirEnt )
+ {
+ char* pBaseName = ((struct dirent*)aBuffer)->d_name;
+ if( pBaseName[0] != '.' ||
+ pBaseName[1] != '.' ||
+ pBaseName[2] != 0 )
+ {
+ ByteString aFileName( aPath );
+ aFileName += "/";
+ aFileName += pBaseName;
+ CheckPlugin( aFileName, aPlugins );
+ }
+ }
+ if( pDIR )
+ closedir( pDIR );
+ }
+ }
+
+ // try ~/.mozilla/pluginreg.dat
+ ByteString aMozPluginreg( pHome );
+ aMozPluginreg.Append( "/.mozilla/pluginreg.dat" );
+ FILE* fp = fopen( aMozPluginreg.GetBuffer(), "r" );
+ if( fp )
+ {
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "parsing %s\n", aMozPluginreg.GetBuffer() );
+#endif
+ char aLine[1024];
+ while( fgets( aLine, sizeof( aLine ), fp ) )
+ {
+ int nLineLen = strlen( aLine );
+ int nDotPos;
+ for( nDotPos = nLineLen-1; nDotPos > 0 && aLine[nDotPos] != ':'; nDotPos-- )
+ ;
+ if( aLine[0] == '/' && aLine[nDotPos] == ':' && aLine[nDotPos+1] == '$' )
+ CheckPlugin( ByteString( aLine, nDotPos ), aPlugins );
+ }
+ fclose( fp );
+ }
+
+ // create return value
+ aDescriptions = Sequence( aPlugins.size() );
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "found %d plugins\n", aPlugins.size() );
+#endif
+ list::iterator iter;
+ for( iter = aPlugins.begin(), i=0; iter != aPlugins.end(); ++iter ,i++ )
+ {
+ aDescriptions.getArray()[ i ] = **iter;
+ delete *iter;
+ }
+ aPlugins.clear();
+ bHavePlugins = TRUE;
+ }
+ return aDescriptions;
+}
+
diff -x CVS -urN ooo_SRC680_m187_src.orig/extensions/source/plugin/aqua/makefile.mk ooo_SRC680_m187_src.aquavcl01/extensions/source/plugin/aqua/makefile.mk
--- ooo_SRC680_m187_src.orig/extensions/source/plugin/aqua/makefile.mk 1970-01-01 01:00:00.000000000 +0100
+++ ooo_SRC680_m187_src.aquavcl01/extensions/source/plugin/aqua/makefile.mk 2006-09-22 10:14:12.000000000 +0200
@@ -0,0 +1,79 @@
+#*************************************************************************
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile$
+#
+# $Revision$
+#
+# last change: $Author$ $Date$
+#
+# The Contents of this file are made available subject to
+# the terms of GNU Lesser General Public License Version 2.1.
+#
+#
+# GNU Lesser General Public License Version 2.1
+# =============================================
+# Copyright 2005 by Sun Microsystems, Inc.
+# 901 San Antonio Road, Palo Alto, CA 94303, USA
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License version 2.1, as published by the Free Software Foundation.
+#
+# This library 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 for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+#*************************************************************************
+PRJ=..$/..$/..
+
+PRJNAME=extensions
+TARGET=plaqua
+#ENABLE_EXCEPTIONS=TRUE
+#TARGETTYPE=CUI
+
+.INCLUDE : ..$/util$/makefile.pmk
+
+.IF "$(GUIBASE)"!="aqua" || "$(WITH_MOZILLA)"=="NO"
+
+dummy:
+ @echo "Nothing to build for GUIBASE $(GUIBASE)."
+
+.ELSE
+
+# --- Files --------------------------------------------------------
+
+INCPRE+=-I$(SOLARINCDIR)$/mozilla$/plugin
+.IF "$(SOLAR_JAVA)" != ""
+INCPRE+=-I$(SOLARINCDIR)$/mozilla$/java
+INCPRE+=-I$(SOLARINCDIR)$/mozilla$/nspr
+INCPRE+=-I$(SOLARINCDIR)$/npsdk
+CDEFS+=-DOJI
+.ENDIF
+
+SLOFILES=\
+ $(SLO)$/macmgr.obj \
+ $(SLO)$/sysplug.obj
+
+#APP1TARGET=pluginapp.bin
+#APP1OBJS=$(OBJFILES)
+#APP1STDLIBS=\
+# $(TOOLSLIB) \
+# $(VOSLIB) \
+# $(SALLIB)
+
+#APP1DEF= $(MISC)$/$(TARGET).def
+
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.ENDIF # $(GUIBASE)==aqua
diff -x CVS -urN ooo_SRC680_m187_src.orig/extensions/source/plugin/aqua/sysplug.cxx ooo_SRC680_m187_src.aquavcl01/extensions/source/plugin/aqua/sysplug.cxx
--- ooo_SRC680_m187_src.orig/extensions/source/plugin/aqua/sysplug.cxx 1970-01-01 01:00:00.000000000 +0100
+++ ooo_SRC680_m187_src.aquavcl01/extensions/source/plugin/aqua/sysplug.cxx 2006-08-25 14:26:41.000000000 +0200
@@ -0,0 +1,220 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile$
+ *
+ * $Revision$
+ *
+ * last change: $Author$ $Date$
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+
+int MacPluginComm::nConnCounter = 0;
+
+MacPluginComm::MacPluginComm(
+ const String& mimetype,
+ const String& library,
+ WindowRef aParent,
+ int nDescriptor1,
+ int nDescriptor2
+ ) :
+PluginComm( ::rtl::OUStringToOString( library, osl_getThreadTextEncoding() ) )/*,
+PluginConnector( nDescriptor2 )*/
+{
+ //char pDesc[32];
+// char pWindow[32];
+// sprintf( pWindow, "%d", aParent );
+// sprintf( pDesc, "%d", nDescriptor1 );
+// ByteString aLib( library, osl_getThreadTextEncoding() );
+//
+// char* pArgs[5];
+// pArgs[0] = "pluginapp.bin";
+// pArgs[1] = pDesc;
+// pArgs[2] = const_cast(aLib.GetBuffer());
+// pArgs[3] = pWindow;
+// pArgs[4] = NULL;
+//
+//#if OSL_DEBUG_LEVEL > 1
+// m_nCommPID = 10;
+// fprintf( stderr, "Try to launch: %s %s %s %s, descriptors are %d, %d\n", pArgs[0], pArgs[1], pArgs[2], pArgs[3], nDescriptor1, nDescriptor2 );
+//#endif
+//
+// if( ! ( m_nCommPID = fork() ) )
+// {
+// execvp( pArgs[0], pArgs );
+// fprintf( stderr, "Error: could not exec %s\n", pArgs[0] );
+// _exit(255);
+// }
+//
+// if( m_nCommPID != -1 )
+// {
+// // wait for pluginapp.bin to start up
+// if( ! WaitForMessage( 5000 ) )
+// {
+// fprintf( stderr, "Timeout on command: %s %s %s %s\n", pArgs[0], pArgs[1], pArgs[2], pArgs[3] );
+// invalidate();
+// }
+// else
+// {
+// MediatorMessage* pMessage = GetNextMessage( TRUE );
+// Respond( pMessage->m_nID,
+// "init ack",8,
+// NULL );
+// delete pMessage;
+// NPP_Initialize();
+// }
+// }
+}
+
+MacPluginComm::~MacPluginComm()
+{
+ NPP_Shutdown();
+ if( m_nCommPID != -1 && m_nCommPID != 0 )
+ {
+ int status = 16777216;
+ pid_t nExit = waitpid( m_nCommPID, &status, WUNTRACED );
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "child %d (plugin app child %d) exited with status %d\n", nExit, m_nCommPID, WEXITSTATUS(status) );
+#endif
+ }
+}
+
+NPError MacPluginComm::NPP_Destroy( NPP instance,
+ NPSavedData** save )
+{
+ return 0;
+}
+
+NPError MacPluginComm::NPP_DestroyStream( NPP instance,
+ NPStream* stream,
+ NPError reason )
+{
+ return 0;
+}
+
+jref MacPluginComm::NPP_GetJavaClass()
+{
+ return 0;
+}
+
+NPError MacPluginComm::NPP_Initialize()
+{
+ return 0;
+}
+
+NPError MacPluginComm::NPP_New( NPMIMEType pluginType,
+ NPP instance,
+ uint16 mode,
+ int16 argc,
+ char* argn[],
+ char* argv[],
+ NPSavedData *saved )
+{
+ return 0;
+}
+
+NPError MacPluginComm::NPP_NewStream( NPP instance,
+ NPMIMEType type,
+ NPStream* stream,
+ NPBool seekable,
+ uint16* stype )
+{
+ return 0;
+}
+
+void MacPluginComm::NPP_Print( NPP instance,
+ NPPrint* platformPrint )
+{
+
+}
+
+NPError MacPluginComm::NPP_SetWindow( NPP instance,
+ NPWindow* window )
+{
+ return 0;
+}
+
+void MacPluginComm::NPP_Shutdown()
+{
+
+}
+
+void MacPluginComm::NPP_StreamAsFile( NPP instance,
+ NPStream* stream,
+ const char* fname )
+{
+
+}
+
+void MacPluginComm::NPP_URLNotify( NPP instance,
+ const char* url,
+ NPReason reason,
+ void* notifyData )
+{
+
+}
+
+int32 MacPluginComm::NPP_Write( NPP instance,
+ NPStream* stream,
+ int32 offset,
+ int32 len,
+ void* buffer )
+{
+ return 0;
+}
+
+int32 MacPluginComm::NPP_WriteReady( NPP instance,
+ NPStream* stream )
+{
+ return 0;
+}
+
+char* MacPluginComm::NPP_GetMIMEDescription()
+{
+ return "";
+}
+
+NPError MacPluginComm::NPP_GetValue( NPP instance, NPPVariable variable, void* value )
+{
+ return 0;
+}
+
+NPError MacPluginComm::NPP_SetValue( NPP instance,
+ NPNVariable variable,
+ void *value)
+{
+ return 0;
+}
+
diff -x CVS -urN ooo_SRC680_m187_src.orig/extensions/source/plugin/base/xplugin.cxx ooo_SRC680_m187_src.aquavcl01/extensions/source/plugin/base/xplugin.cxx
--- ooo_SRC680_m187_src.orig/extensions/source/plugin/base/xplugin.cxx 2006-09-16 15:09:27.000000000 +0200
+++ ooo_SRC680_m187_src.aquavcl01/extensions/source/plugin/base/xplugin.cxx 2006-10-14 01:02:52.000000000 +0200
@@ -61,6 +61,11 @@
#ifdef UNX
#include
#include
+#ifdef QUARTZ
+#include
+#include
+#include
+#endif //QUARTZ
#endif
#if OSL_DEBUG_LEVEL > 1
@@ -526,7 +531,7 @@
}
}
const SystemEnvData* pEnvData = getSysChildSysData();
-#ifdef UNX
+#if defined( UNX ) && !(defined(QUARTZ))
XSync( (Display*)pEnvData->pDisplay, False );
#endif
if( ! getPluginComm() )
@@ -538,12 +543,21 @@
PluginComm* pComm = NULL;
int sv[2];
if( !socketpair( AF_UNIX, SOCK_STREAM, 0, sv ) )
+#ifdef QUARTZ
+ pComm = new MacPluginComm( m_aDescription.Mimetype,
+ m_aDescription.PluginName,
+ (WindowRef)pEnvData->aWindow,
+ sv[0],
+ sv[1]
+ );
+#else
pComm = new UnxPluginComm( m_aDescription.Mimetype,
m_aDescription.PluginName,
(XLIB_Window)pEnvData->aWindow,
sv[0],
sv[1]
);
+#endif //QUARTZ
#elif (defined WNT || defined OS2)
PluginComm* pComm = new PluginComm_Impl( m_aDescription.Mimetype,
m_aDescription.PluginName,
@@ -565,13 +579,17 @@
(char**)(m_nArgs ? m_pArgv : NULL),
NULL );
-#ifdef UNX
+#if defined( UNX ) && !defined(QUARTZ)
XSync( (Display*)pEnvData->pDisplay, False );
#endif
#ifdef UNX
m_aNPWindow.window = (void*)pEnvData->aWindow;
+#if !defined(QUARTZ)
m_aNPWindow.ws_info = NULL;
#else
+ m_aNPWindow.type = NPWindowTypeWindow;
+#endif //QUARTZ
+#else
m_aNPWindow.window = (void*)pEnvData->hWnd;
#endif
com::sun::star::awt::Rectangle aPosSize = getPosSize();
diff -x CVS -urN ooo_SRC680_m187_src.orig/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx ooo_SRC680_m187_src.aquavcl01/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx
--- ooo_SRC680_m187_src.orig/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx 1970-01-01 01:00:00.000000000 +0100
+++ ooo_SRC680_m187_src.aquavcl01/extensions/source/plugin/inc/plugin/aqua/sysplug.hxx 2006-09-22 10:18:40.000000000 +0200
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile$
+ *
+ * $Revision$
+ *
+ * last change: $Author$ $Date$
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+#ifndef __PLUGIN_INC_MACPLUG_HXX
+#define __PLUGIN_INC_MACPLUG_HXX
+
+#include
+
+#include
+#include
+#include
+
+#include
+#include