summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorMartin Gallwey <mtg@openoffice.org>2001-03-19 11:36:40 +0000
committerMartin Gallwey <mtg@openoffice.org>2001-03-19 11:36:40 +0000
commitad086170b8d48dd857cf862475dfa461bea55caa (patch)
tree18d4f5b2b963d0551fe93de7477f183cc77faa78 /package
parent67a5cf1b920e882156a738afd9b0f04789527698 (diff)
allow backwards compatibility to pre-626 builds with an #if SUPD>625 check around the component name
Diffstat (limited to 'package')
-rw-r--r--package/source/zippackage/ZipPackage.cxx27
1 files changed, 25 insertions, 2 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 96235ac476a2..bae431324b19 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ZipPackage.cxx,v $
*
- * $Revision: 1.32 $
+ * $Revision: 1.33 $
*
- * last change: $Author: mtg $ $Date: 2001-03-16 17:11:42 $
+ * last change: $Author: mtg $ $Date: 2001-03-19 12:36:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -704,7 +704,12 @@ extern "C" void SAL_CALL component_getImplementationEnvironment(
Sequence< OUString > ZipPackage_getSupportedServiceNames()
{
Sequence< OUString > seqNames(1);
+#if SUPD>625
seqNames.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.packages.comp.ZipPackage" ) );
+#else
+ seqNames.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.package.Package" ) );
+#endif
+
return seqNames;
}
@@ -752,6 +757,7 @@ extern "C" void * SAL_CALL component_getFactory(
{
void * pRet = 0;
// which implementation is demanded?
+#if SUPD>625
if (pServiceManager && !rtl_str_compare( pImplName, "com.sun.star.packages.comp.ZipPackage" ))
{
OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.packages.comp.ZipPackage") );
@@ -767,6 +773,23 @@ extern "C" void * SAL_CALL component_getFactory(
pRet = xFactory.get();
}
}
+#else
+ if (pServiceManager && !rtl_str_compare( pImplName, "com.sun.star.package.Package" ))
+ {
+ OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.package.Package") );
+ Reference< XSingleServiceFactory > xFactory(
+ cppu::createSingleFactory( // helper function from cppuhelper lib
+ reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.packages.Package") ),
+ ZipPackage_create, ZipPackage_getSupportedServiceNames() ) );
+
+ if (xFactory.is())
+ {
+ xFactory->acquire();
+ pRet = xFactory.get();
+ }
+ }
+#endif
return pRet;
}
//XInterface