diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-06-16 13:07:36 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-06-16 13:07:36 +0000 |
commit | 337856da104aba7d76f6803418aa450040a2516f (patch) | |
tree | e5d487c2147c41b7f4bcf88ed9efb9c2ad9fb78b /configmgr | |
parent | d9890e2beed67a78626149e651801726461b487a (diff) |
INTEGRATION: CWS sb88 (1.23.10); FILE MERGED
2008/06/03 15:29:54 sb 1.23.10.1: #i89553 applied patch by cmc
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/treemgr/templateimpl.cxx | 52 |
1 files changed, 4 insertions, 48 deletions
diff --git a/configmgr/source/treemgr/templateimpl.cxx b/configmgr/source/treemgr/templateimpl.cxx index f3b659d9ed50..3608ca51e499 100644 --- a/configmgr/source/treemgr/templateimpl.cxx +++ b/configmgr/source/treemgr/templateimpl.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: templateimpl.cxx,v $ - * $Revision: 1.23 $ + * $Revision: 1.24 $ * * This file is part of OpenOffice.org. * @@ -56,31 +56,26 @@ namespace configmgr { //----------------------------------------------------------------------------- -Name TemplateName::makeSimpleTypeName(UnoType const& aType) -{ - OUString sTypeName = toTemplateName(aType); - return makeName(sTypeName, Name::NoValidate()); -} -//----------------------------------------------------------------------------- - UnoType TemplateName::resolveSimpleTypeName(Name const& aName) { OUString sTypeName = aName.toString(); return parseTemplateName(sTypeName); } //----------------------------------------------------------------------------- - +#if OSL_DEBUG_LEVEL > 0 Name TemplateName::makeNativeTypeModuleName() { OUString aModuleName( TEMPLATE_MODULE_NATIVE_VALUE ); return makeName(aModuleName, Name::NoValidate()); } + //----------------------------------------------------------------------------- Name TemplateName::makeLocalizedTypeModuleName() { OUString aModuleName( TEMPLATE_MODULE_LOCALIZED_VALUE ); return makeName(aModuleName, Name::NoValidate()); } +#endif //----------------------------------------------------------------------------- bool TemplateName::isSimpleTypeName() const { @@ -117,18 +112,6 @@ TemplateHolder TemplateImplHelper::createNew (TemplateName const& aNames,UnoType } //----------------------------------------------------------------------------- -TemplateHolder TemplateImplHelper::makeSpecialTemplate (TemplateName const& aNames, SpecialTemplateProvider const& aProvider, UnoType const& aType) -{ - OSL_ENSURE(aProvider.m_aImpl.is(), "Cannot find a template without a provider"); - - if (aProvider.m_aImpl.is()) - return aProvider.m_aImpl->makeTemplate(aNames,aType); - - else - return TemplateHolder(0); -} -//----------------------------------------------------------------------------- - TemplateHolder TemplateImplHelper::makeElementTemplateWithType(TemplateName const& _aNames, TemplateProvider const& _aProvider, data::SetNodeAccess const& _aSet) { OSL_ENSURE(_aProvider.m_aImpl.is(), "ERROR: Cannot find a template without a provider"); @@ -154,33 +137,6 @@ void TemplateImplHelper::assignActualType (Template& aTemplate,UnoType const& aT //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -// class SpecialTemplateProvider_Impl -//----------------------------------------------------------------------------- - -SpecialTemplateProvider_Impl::SpecialTemplateProvider_Impl() -: m_aRepository() -{ -} -//----------------------------------------------------------------------------- - -TemplateHolder SpecialTemplateProvider_Impl::makeTemplate (TemplateName const& aNames, UnoType const& aType) -{ - typedef TemplateRepository::value_type Entry; - - TemplateRepository::iterator it = m_aRepository.find(aNames); - if (it == m_aRepository.end()) - it = m_aRepository.insert( Entry( aNames, TemplateImplHelper::createNew(aNames,aType) ) ).first; - - else if (!it->second->isInstanceTypeKnown()) - TemplateImplHelper::assignActualType(*it->second, aType); - - OSL_ENSURE(it->second->isInstanceTypeKnown(), "No type assigned to Template"); - OSL_ENSURE(it->second->getInstanceType() == aType, "Inconsistent type found for Template"); - return it->second; - -} - -//----------------------------------------------------------------------------- // class TemplateProvider_Impl //----------------------------------------------------------------------------- |