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

INTEGRATION: CWS jl100_DEV300 (1.2.40); FILE MERGED

2008/05/13 15:08:20 jl 1.2.40.1: #156271# The package::getMyBackend functions now throw a DisposedException
üst eaea529e
......@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: dp_help.cxx,v $
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* This file is part of OpenOffice.org.
*
......@@ -61,9 +61,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
{
class PackageImpl : public ::dp_registry::backend::Package
{
BackendImpl * getMyBackend() const {
return static_cast< BackendImpl * >(m_myBackend.get());
}
BackendImpl * getMyBackend() const;
// Package
virtual beans::Optional< beans::Ambiguous<sal_Bool> > isRegistered_(
......@@ -172,6 +170,21 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
//##############################################################################
// Package
BackendImpl * BackendImpl::PackageImpl::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<PackageImpl *>(this)));
}
return pBackend;
}
//______________________________________________________________________________
beans::Optional< beans::Ambiguous<sal_Bool> >
BackendImpl::PackageImpl::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