Lines Matching refs:nKey
91 sal_uInt16 SvXMLNamespaceMap::_Add( const OUString& rPrefix, const OUString &rName, sal_uInt16 nKey… in _Add() argument
93 if( XML_NAMESPACE_UNKNOWN == nKey ) in _Add()
96 nKey = XML_NAMESPACE_UNKNOWN_FLAG; in _Add()
99 NameSpaceMap::const_iterator aIter = aNameMap.find ( nKey ); in _Add()
102 nKey++; in _Add()
108 pEntry->nKey = nKey; in _Add()
111 aNameMap [ nKey ] = pEntry; in _Add()
112 return nKey; in _Add()
116 sal_uInt16 nKey ) in Add() argument
118 if( XML_NAMESPACE_UNKNOWN == nKey ) in Add()
119 nKey = GetKeyByName( rName ); in Add()
121 DBG_ASSERT( XML_NAMESPACE_NONE != nKey, in Add()
124 if( XML_NAMESPACE_NONE == nKey ) in Add()
128 nKey = _Add( rPrefix, rName, nKey ); in Add()
130 return nKey; in Add()
135 sal_uInt16 nKey = GetKeyByName( rName ); in AddIfKnown() local
137 DBG_ASSERT( XML_NAMESPACE_NONE != nKey, in AddIfKnown()
140 if( XML_NAMESPACE_NONE == nKey ) in AddIfKnown()
143 if( XML_NAMESPACE_UNKNOWN != nKey ) in AddIfKnown()
147 nKey = _Add( rPrefix, rName, nKey ); in AddIfKnown()
150 return nKey; in AddIfKnown()
157 return (aIter != aNameHash.end()) ? (*aIter).second->nKey : USHRT_MAX; in GetKeyByPrefix()
162 sal_uInt16 nKey = XML_NAMESPACE_UNKNOWN; in GetKeyByName() local
168 nKey = (*aIter).second->nKey; in GetKeyByName()
173 return nKey; in GetKeyByName()
176 const OUString& SvXMLNamespaceMap::GetPrefixByKey( sal_uInt16 nKey ) const in GetPrefixByKey()
178 NameSpaceMap::const_iterator aIter = aNameMap.find (nKey); in GetPrefixByKey()
182 const OUString& SvXMLNamespaceMap::GetNameByKey( sal_uInt16 nKey ) const in GetNameByKey()
184 NameSpaceMap::const_iterator aIter = aNameMap.find (nKey); in GetNameByKey()
188 OUString SvXMLNamespaceMap::GetAttrNameByKey( sal_uInt16 nKey ) const in GetAttrNameByKey()
191 NameSpaceMap::const_iterator aIter = aNameMap.find ( nKey ); in GetAttrNameByKey()
205 OUString SvXMLNamespaceMap::GetQNameByKey( sal_uInt16 nKey, in GetQNameByKey() argument
211 switch ( nKey ) in GetQNameByKey()
245 aQCacheIter = aQNameCache.find ( QNamePair ( nKey, &rLocalName ) ); in GetQNameByKey()
252 NameSpaceMap::const_iterator aIter = aNameMap.find ( nKey ); in GetQNameByKey()
268 … const_cast < QNameCache * > (&aQNameCache)->operator[] ( QNamePair ( nKey, pString ) ) = sString; in GetQNameByKey()
299 sal_uInt16 nKey = XML_NAMESPACE_UNKNOWN; in _GetKeyByAttrName() local
313 nKey = rEntry.nKey; in _GetKeyByAttrName()
316 NameSpaceMap::const_iterator aMapIter = aNameMap.find (nKey); in _GetKeyByAttrName()
347 nKey = xEntry->nKey = (*aIter).second->nKey; in _GetKeyByAttrName()
353 nKey = xEntry->nKey = XML_NAMESPACE_XMLNS; in _GetKeyByAttrName()
356 nKey = xEntry->nKey = XML_NAMESPACE_NONE; in _GetKeyByAttrName()
365 return nKey; in _GetKeyByAttrName()
370 return aNameMap.empty() ? USHRT_MAX : (*aNameMap.begin()).second->nKey; in GetFirstKey()
376 return (++aIter == aNameMap.end()) ? USHRT_MAX : (*aIter).second->nKey; in GetNextKey()
387 sal_uInt16 SvXMLNamespaceMap::GetIndexByKey( sal_uInt16 nKey ) const in GetIndexByKey()
389 return nKey; in GetIndexByKey()
393 return aNameMap.empty() ? USHRT_MAX : (*aNameMap.begin()).second->nKey; in GetFirstIndex()
399 return (++aIter == aNameMap.end()) ? USHRT_MAX : (*aIter).second->nKey; in GetNextIndex()
403 const OUString& rName, sal_uInt16 nKey ) in AddAtIndex() argument
407 if( XML_NAMESPACE_UNKNOWN == nKey ) in AddAtIndex()
408 nKey = GetKeyByName( rName ); in AddAtIndex()
410 DBG_ASSERT( XML_NAMESPACE_NONE != nKey, in AddAtIndex()
412 if( XML_NAMESPACE_NONE != nKey && ! ( aNameHash.count ( rPrefix ) ) ) in AddAtIndex()
414 _Add( rPrefix, rName, nKey ); in AddAtIndex()
421 const sal_Char *pName, sal_uInt16 nKey ) in AddAtIndex() argument
426 return AddAtIndex( nIdx, sPrefix, sName, nKey ); in AddAtIndex()
455 return (aIter != aNameHash.end()) ? (*aIter).second->nKey : USHRT_MAX; in GetIndexByPrefix()