Kaydet (Commit) de9a309e authored tarafından Kurt Zenker's avatar Kurt Zenker

INTEGRATION: CWS jl100_DEV300 (1.20.48.1.6); FILE MERGED

2008/05/13 15:08:19 jl 1.20.48.1.6.1: #156271# The package::getMyBackend functions now throw a DisposedException
üst 3be6c92b
......@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: dp_component.cxx,v $
* $Revision: 1.23 $
* $Revision: 1.24 $
*
* This file is part of OpenOffice.org.
*
......@@ -119,9 +119,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
{
class ComponentPackageImpl : public ::dp_registry::backend::Package
{
BackendImpl * getMyBackend() const {
return static_cast<BackendImpl *>(m_myBackend.get());
}
BackendImpl * getMyBackend() const;
const OUString m_loader;
Reference<XComponentContext> m_xRemoteContext;
......@@ -165,9 +163,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
class TypelibraryPackageImpl : public ::dp_registry::backend::Package
{
BackendImpl * getMyBackend() const {
return static_cast<BackendImpl *>(m_myBackend.get());
}
BackendImpl * getMyBackend() const;
const bool m_jarFile;
Reference<container::XHierarchicalNameAccess> m_xTDprov;
......@@ -267,6 +263,22 @@ BackendImpl::ComponentPackageImpl::getRDB() const
return that->m_xCommonRDB;
}
BackendImpl * BackendImpl::ComponentPackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
if (NULL == pBackend)
{
//Throws a DisposedException
check();
//We should never get here...
throw RuntimeException(
OUSTR("Failed to get the BackendImpl"),
static_cast<OWeakObject*>(const_cast<ComponentPackageImpl *>(this)));
}
return pBackend;
}
//______________________________________________________________________________
void BackendImpl::ComponentPackageImpl::disposing()
{
......@@ -1217,6 +1229,20 @@ void BackendImpl::ComponentPackageImpl::processPackage_(
//##############################################################################
// Package
BackendImpl * BackendImpl::TypelibraryPackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
if (NULL == pBackend)
{
//May throw a DisposedException
check();
//We should never get here...
throw RuntimeException(
OUSTR("Failed to get the BackendImpl"),
static_cast<OWeakObject*>(const_cast<TypelibraryPackageImpl *>(this)));
}
return pBackend;
}
//______________________________________________________________________________
beans::Optional< beans::Ambiguous<sal_Bool> >
BackendImpl::TypelibraryPackageImpl::isRegistered_(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment