summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorKai Sommerfeld <kso@openoffice.org>2002-06-19 11:50:45 +0000
committerKai Sommerfeld <kso@openoffice.org>2002-06-19 11:50:45 +0000
commit42fa9cf8cef81b34f323a715675f8dda57787ba2 (patch)
treed9bc30eae5d89c302cef4a104183be33af9ff53f /ucb
parent4521a8d581a18e18502f493962abb105b347ff5c (diff)
#99287# - PackageContent now supports interface css::lang::XInitialization.
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/package/pkgcontent.cxx30
-rw-r--r--ucb/source/ucp/package/pkgcontent.hxx17
2 files changed, 40 insertions, 7 deletions
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index 5793106fcdc9..3e8f508ba5d2 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pkgcontent.cxx,v $
*
- * $Revision: 1.43 $
+ * $Revision: 1.44 $
*
- * last change: $Author: mav $ $Date: 2002-05-13 07:59:21 $
+ * last change: $Author: kso $ $Date: 2002-06-19 12:50:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -389,6 +389,10 @@ uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType )
if ( isFolder() )
aRet = cppu::queryInterface(
rType, static_cast< star::ucb::XContentCreator * >( this ) );
+ else
+ aRet = cppu::queryInterface( rType,
+ static_cast< star::ucb::XContentCreator * >( this ),
+ static_cast< lang::XInitialization * >( this ) );
return aRet.hasValue() ? aRet : ContentImplHelper::queryInterface( rType );
}
@@ -426,7 +430,8 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes()
CPPU_TYPE_REF( beans::XPropertyContainer ),
CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ),
CPPU_TYPE_REF( container::XChild ),
- CPPU_TYPE_REF( star::ucb::XContentCreator ) ); // !!
+ CPPU_TYPE_REF( star::ucb::XContentCreator ),
+ CPPU_TYPE_REF( lang::XInitialization ) ); // !!
pCollection = &aCollection;
}
else
@@ -441,7 +446,8 @@ uno::Sequence< uno::Type > SAL_CALL Content::getTypes()
CPPU_TYPE_REF( star::ucb::XCommandInfoChangeNotifier ),
CPPU_TYPE_REF( beans::XPropertyContainer ),
CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ),
- CPPU_TYPE_REF( container::XChild ) );
+ CPPU_TYPE_REF( container::XChild ),
+ CPPU_TYPE_REF( lang::XInitialization ) );
pCollection = &aCollection;
}
}
@@ -842,6 +848,22 @@ Content::createNewContent( const star::ucb::ContentInfo& Info )
//=========================================================================
//
+// XInitialization methods.
+//
+//=========================================================================
+
+// virtual
+void SAL_CALL Content::initialize( const uno::Sequence< uno::Any >& aArguments )
+ throw( uno::Exception, uno::RuntimeException )
+{
+ uno::Reference< lang::XInitialization > xPackageInit =
+ uno::Reference< lang::XInitialization >( getPackage(), uno::UNO_QUERY );
+ if ( xPackageInit.is() )
+ xPackageInit->initialize( aArguments );
+}
+
+//=========================================================================
+//
// Non-interface methods.
//
//=========================================================================
diff --git a/ucb/source/ucp/package/pkgcontent.hxx b/ucb/source/ucp/package/pkgcontent.hxx
index 59b0b24c38cf..1d556766bb73 100644
--- a/ucb/source/ucp/package/pkgcontent.hxx
+++ b/ucb/source/ucp/package/pkgcontent.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pkgcontent.hxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: kso $ $Date: 2001-12-03 17:34:22 $
+ * last change: $Author: kso $ $Date: 2002-06-19 12:50:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,6 +74,9 @@
#ifndef _COM_SUN_STAR_UCB_XCONTENTCREATOR_HPP_
#include <com/sun/star/ucb/XContentCreator.hpp>
#endif
+#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
+#include <com/sun/star/lang/XInitialization.hpp>
+#endif
#ifndef _UCBHELPER_CONTENTHELPER_HXX
#include <ucbhelper/contenthelper.hxx>
@@ -149,7 +152,8 @@ struct ContentProperties
class ContentProvider;
class Content : public ::ucb::ContentImplHelper,
- public com::sun::star::ucb::XContentCreator
+ public com::sun::star::ucb::XContentCreator,
+ public com::sun::star::lang::XInitialization
{
enum ContentState { TRANSIENT, // created via CreateNewContent,
// but did not process "insert" yet
@@ -351,6 +355,13 @@ public:
createNewContent( const com::sun::star::ucb::ContentInfo& Info )
throw( com::sun::star::uno::RuntimeException );
+ // XInitialization
+ virtual void SAL_CALL
+ initialize( const com::sun::star::uno::Sequence<
+ com::sun::star::uno::Any >& aArguments )
+ throw( com::sun::star::uno::Exception,
+ com::sun::star::uno::RuntimeException );
+
//////////////////////////////////////////////////////////////////////
// Non-interface methods.
//////////////////////////////////////////////////////////////////////