diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2007-11-23 13:47:00 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2007-11-23 13:47:00 +0000 |
commit | c3c8635e7463eb46dc4c0880a59bdb7d84baebe1 (patch) | |
tree | 04442a002497e8e7cdc93d8be3b7a9d3da060edf | |
parent | d57c9368488f5243b07e61bf908e6f1ce2fbd6d5 (diff) |
INTEGRATION: CWS configrefactor01 (1.21.24); FILE MERGED
2007/01/12 14:50:48 mmeeks 1.21.24.2: Another big prune of memory::Accessor ...
2007/01/11 10:35:40 mmeeks 1.21.24.1: Submitted by: mmeeks
Large scale re-factoring, remove fine-grained locking in favor of a simple,
single global lock (still in progress).
Identify and fix various hot-spots.
Remove otherwise empty / non-compiled files.
Kill UpdateAccessor
-rw-r--r-- | configmgr/source/treemgr/templateimpl.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/configmgr/source/treemgr/templateimpl.cxx b/configmgr/source/treemgr/templateimpl.cxx index e406ffe7164c..d5cad2756510 100644 --- a/configmgr/source/treemgr/templateimpl.cxx +++ b/configmgr/source/treemgr/templateimpl.cxx @@ -4,9 +4,9 @@ * * $RCSfile: templateimpl.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: obo $ $Date: 2006-09-16 15:32:00 $ + * last change: $Author: ihi $ $Date: 2007-11-23 14:47:00 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -222,12 +222,12 @@ TemplateProvider_Impl::TemplateProvider_Impl(TemplateManagerRef const & xProvide } //----------------------------------------------------------------------------- -data::TreeSegment TemplateProvider_Impl::instantiate(data::Accessor const& _aSourceAccessor, TemplateHolder const& aTemplate) +data::TreeSegment TemplateProvider_Impl::instantiate(TemplateHolder const& aTemplate) { data::TreeSegment pRet; if (aTemplate.is()) { - data::TreeAccessor aTemplateData = m_xProvider->requestTemplate(_aSourceAccessor, aTemplate->getName(), aTemplate->getModule()); + data::TreeAccessor aTemplateData = m_xProvider->requestTemplate(aTemplate->getName(), aTemplate->getModule()); pRet = cloneExpandedForLocale(aTemplateData, m_aOptions.getLocale()); } @@ -261,12 +261,12 @@ namespace private: // NodeAction implementation Result handle(ValueNodeAccess const& _aValueNode); - Result handle(NodeAccessRef const& _aNonValueNode); + Result handle(NodeAccess const& _aNonValueNode); }; //----------------------------------------------------------------------------- static UnoType detectNodeType(TreeAccessor const& _aElement) { - if (!_aElement.isValid()) + if (_aElement == NULL) throw configuration::Exception("Could not load required template to detect set elements"); TypeDetector aDetector; @@ -343,7 +343,7 @@ TemplateHolder TemplateProvider_Impl::makeElementTemplateWithType(TemplateName c OSL_ASSERT(_aNames.aName == _aSet.getElementTemplateName()); OSL_ASSERT(_aNames.aModule == _aSet.getElementTemplateModule()); - data::TreeAccessor aTemplateData = m_xProvider->requestTemplate(_aSet.accessor(), _aNames.aName, _aNames.aModule); + data::TreeAccessor aTemplateData = m_xProvider->requestTemplate(_aNames.aName, _aNames.aModule); aType = detectNodeType(aTemplateData); // throws if necessary } @@ -417,7 +417,7 @@ namespace return CONTINUE; // always continue to detect errors in data } //----------------------------------------------------------------------------- - TypeDetector::Result TypeDetector::handle(NodeAccessRef const& _aNonValueNode) + TypeDetector::Result TypeDetector::handle(NodeAccess const& _aNonValueNode) { { (void)_aNonValueNode; } OSL_ENSURE(!ValueNodeAccess::isInstance(_aNonValueNode),"Value node dipatched to wrong handler"); |