diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-04-17 16:43:13 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-04-22 18:25:42 +0200 |
commit | 5275ed805a6e42f56c59d1c5876a7994625905a9 (patch) | |
tree | 0a802c2ce8bbf54c047ada5c303a403b51ba8136 /desktop | |
parent | f21d1faf6d5a8d9df84b48becbc137175d56ad79 (diff) |
Revert "Revert "WIP: Experimental new binary type.rdb format""
This reverts commit 67e69a55820f50973ca0de75ccab2bb07d0bada8, applying a band-
aid fix to cli_ure/source/climaker for now.
Conflicts:
stoc/inc/bootstrapservices.hxx
stoc/source/tdmanager/lrucache.hxx
stoc/source/tdmanager/tdmgr.cxx
stoc/source/tdmanager/tdmgr_common.hxx
stoc/source/tdmanager/tdmgr_tdenumeration.cxx
stoc/source/tdmanager/tdmgr_tdenumeration.hxx
Change-Id: Iae669985d0194f06fa349a4a39f0ebd230bc5d28
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/deployment/registry/component/dp_component.cxx | 57 |
1 files changed, 12 insertions, 45 deletions
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index e72aa32883a0..66cfd4b9bb89 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -35,7 +35,6 @@ #include "svl/inettype.hxx" #include "com/sun/star/lang/WrappedTargetRuntimeException.hpp" #include "com/sun/star/container/XNameContainer.hpp" -#include "com/sun/star/container/XHierarchicalNameAccess.hpp" #include "com/sun/star/container/XSet.hpp" #include "com/sun/star/registry/XSimpleRegistry.hpp" #include "com/sun/star/registry/XImplementationRegistration.hpp" @@ -183,7 +182,6 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend BackendImpl * getMyBackend() const; const bool m_jarFile; - Reference<container::XHierarchicalNameAccess> m_xTDprov; virtual void SAL_CALL disposing(); @@ -400,7 +398,6 @@ void BackendImpl::ComponentPackageImpl::disposing() //______________________________________________________________________________ void BackendImpl::TypelibraryPackageImpl::disposing() { - m_xTDprov.clear(); Package::disposing(); } @@ -1532,37 +1529,12 @@ void BackendImpl::TypelibraryPackageImpl::processPackage_( } else // RDB: { - Reference<XComponentContext> const & xContext = - that->getComponentContext(); - if (! m_xTDprov.is()) - { - m_xTDprov.set( that->getObject( url ), UNO_QUERY ); - if (! m_xTDprov.is()) - { - const Reference<registry::XSimpleRegistry> xReg( - xContext->getServiceManager() - ->createInstanceWithContext("com.sun.star.registry.SimpleRegistry", - xContext ), UNO_QUERY_THROW ); - xReg->open( expandUnoRcUrl(url), - true /* read-only */, false /* ! create */ ); - const Any arg(xReg); - Reference<container::XHierarchicalNameAccess> xTDprov( - xContext->getServiceManager() - ->createInstanceWithArgumentsAndContext( - "com.sun.star.comp.stoc.RegistryTypeDescriptionProvider", - Sequence<Any>( &arg, 1 ), xContext ), UNO_QUERY ); - OSL_ASSERT( xTDprov.is() ); - if (xTDprov.is()) - m_xTDprov.set( that->insertObject( url, xTDprov ), - UNO_QUERY_THROW ); - } - } - if (m_xTDprov.is()) { - Reference<container::XSet> xSet( - xContext->getValueByName( "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ), - UNO_QUERY_THROW ); - xSet->insert( Any(m_xTDprov) ); - } + css::uno::Reference< css::container::XSet >( + that->getComponentContext()->getValueByName( + "/singletons" + "/com.sun.star.reflection.theTypeDescriptionManager"), + css::uno::UNO_QUERY_THROW)->insert( + css::uno::makeAny(expandUnoRcUrl(url))); } that->addToUnoRc( m_jarFile ? RCITEM_JAR_TYPELIB : RCITEM_RDB_TYPELIB, @@ -1574,18 +1546,13 @@ void BackendImpl::TypelibraryPackageImpl::processPackage_( m_jarFile ? RCITEM_JAR_TYPELIB : RCITEM_RDB_TYPELIB, url, xCmdEnv ); // revoking types at runtime, possible, sensible? - if (!m_xTDprov.is()) - m_xTDprov.set( that->getObject( url ), UNO_QUERY ); - if (m_xTDprov.is()) { - // remove live: - const Reference<container::XSet> xSet( + if (!m_jarFile) { + css::uno::Reference< css::container::XSet >( that->getComponentContext()->getValueByName( - "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ), - UNO_QUERY_THROW ); - xSet->remove( Any(m_xTDprov) ); - - that->releaseObject( url ); - m_xTDprov.clear(); + "/singletons" + "/com.sun.star.reflection.theTypeDescriptionManager"), + css::uno::UNO_QUERY_THROW)->remove( + css::uno::makeAny(expandUnoRcUrl(url))); } } } |