summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2002-08-20 12:02:47 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2002-08-20 12:02:47 +0000
commita54bf131648f24061ee92b7bedf04846abaf5baa (patch)
tree5f98d7aad9121394c357c603f65adbc83d181a07 /package
parentcebcdd9dfd25eb2c2dea16bfaf537b8c52481080 (diff)
#101685#,#i6886# merge OOO_STABLE_1_PORTS (1.28-1.28.10.1) -> HEAD
Diffstat (limited to 'package')
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx57
1 files changed, 54 insertions, 3 deletions
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index d46ee6a361b8..307944d97919 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ZipPackageStream.cxx,v $
*
- * $Revision: 1.29 $
+ * $Revision: 1.30 $
*
- * last change: $Author: mav $ $Date: 2002-06-18 07:11:35 $
+ * last change: $Author: hr $ $Date: 2002-08-20 13:02:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -85,6 +85,11 @@ using namespace rtl;
Sequence < sal_Int8 > ZipPackageStream::aImplementationId = Sequence < sal_Int8 > ();
+#ifdef MACOSX
+#include <cppuhelper/typeprovider.hxx>
+static ::cppu::OImplementationId * pId = 0;
+#endif
+
ZipPackageStream::ZipPackageStream (ZipPackage & rNewPackage )
: rZipPackage(rNewPackage)
, bToBeCompressed ( sal_True )
@@ -104,7 +109,22 @@ ZipPackageStream::ZipPackageStream (ZipPackage & rNewPackage )
aEntry.nSize = -1;
aEntry.nOffset = -1;
if ( !aImplementationId.getLength() )
- aImplementationId = getImplementationId();
+ {
+#ifdef MACOSX
+ if (! pId)
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if (! pId)
+ {
+ static ::cppu::OImplementationId aId;
+ pId = &aId;
+ }
+ }
+ aImplementationId=pId->getImplementationId();
+#else
+ aImplementationId = getImplementationId();
+#endif
+ }
}
ZipPackageStream::~ZipPackageStream( void )
@@ -124,6 +144,37 @@ void ZipPackageStream::setZipEntry( const ZipEntry &rInEntry)
aEntry.sName = rInEntry.sName;
}
+#ifdef MACOSX
+ //XInterface
+Any SAL_CALL ZipPackageStream::queryInterface( const Type& rType )
+ throw(RuntimeException)
+{
+ return ( ::cppu::queryInterface ( rType ,
+ // OWeakObject interfaces
+ reinterpret_cast< XInterface* > ( this ) ,
+ static_cast< XWeak* > ( this ) ,
+ // ZipPackageEntry interfaces
+ static_cast< container::XNamed* > ( this ) ,
+ static_cast< container::XChild* > ( this ) ,
+ static_cast< XUnoTunnel* > ( this ) ,
+ // My own interfaces
+ static_cast< io::XActiveDataSink* > ( this ) ,
+ static_cast< beans::XPropertySet* > ( this ) ) );
+
+}
+
+void SAL_CALL ZipPackageStream::acquire( )
+ throw()
+{
+ OWeakObject::acquire();
+}
+void SAL_CALL ZipPackageStream::release( )
+ throw()
+{
+ OWeakObject::release();
+}
+#endif
+
// XActiveDataSink
void SAL_CALL ZipPackageStream::setInputStream( const Reference< io::XInputStream >& aStream )
throw(RuntimeException)