From 3f03cb71c31da316686c7fa67b16888da27376ab Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Tue, 6 Jul 2004 16:03:34 +0000 Subject: INTEGRATION: CWS docking1 (1.2.4); FILE MERGED 2004/04/21 07:08:54 cd 1.2.4.1: #i24937# Added new factory definition schema to support an addon toolbar factory --- framework/source/uifactory/uielementfactorymanager.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'framework') diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx index 52f493b96970..50133e4dc16f 100644 --- a/framework/source/uifactory/uielementfactorymanager.cxx +++ b/framework/source/uifactory/uielementfactorymanager.cxx @@ -2,9 +2,9 @@ * * $RCSfile: uielementfactorymanager.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: kz $ $Date: 2004-02-25 17:53:25 $ + * last change: $Author: obo $ $Date: 2004-07-06 17:03:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -273,6 +273,16 @@ rtl::OUString ConfigurationAccess_UIElementFactoryManager::getFactorySpecifierFr return pIter->second; else { + // Support factories which uses a defined prefix before the ui name. + sal_Int32 nIndex = rName.indexOf( '_' ); + if ( nIndex > 0 ) + { + rtl::OUString aName = rName.copy( 0, nIndex+1 ); + pIter = m_aUIElementFactoryManagerMap.find( getHashKeyFromStrings( rType, aName, rtl::OUString() )); + if ( pIter != m_aUIElementFactoryManagerMap.end() ) + return pIter->second; + } + pIter = m_aUIElementFactoryManagerMap.find( getHashKeyFromStrings( rType, rtl::OUString(), rtl::OUString() )); if ( pIter != m_aUIElementFactoryManagerMap.end() ) return pIter->second; -- cgit