From 693f1dee0b994b92d1256cdd9a82f642d0c3b5cd Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Wed, 5 Mar 2014 18:46:37 +0100 Subject: sax: FastAttributeList - add attribute in a specific namespace This change is inspired by startElementNS & singleElementNS which have namespace as first parameter to define the namespace of an element. Some attributes of a element can be in different namespace but until now FastAttributeList "add" method did not have a namespace parameter. This commit adds "addNS" which accepts namespace as a first parameter. Change-Id: Iebf8b5e890c17f00a56923efc3506580eed070a9 --- sax/source/tools/fastattribs.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sax') diff --git a/sax/source/tools/fastattribs.cxx b/sax/source/tools/fastattribs.cxx index 03880de70718..e3df6b1aaf04 100644 --- a/sax/source/tools/fastattribs.cxx +++ b/sax/source/tools/fastattribs.cxx @@ -97,6 +97,12 @@ void FastAttributeList::add( sal_Int32 nToken, const OString& rValue ) add( nToken, rValue.getStr(), rValue.getLength() ); } +void FastAttributeList::addNS( sal_Int32 nNamespaceToken, sal_Int32 nToken, const OString& rValue ) +{ + sal_Int32 nCombinedToken = (nNamespaceToken << 16) | nToken; + add( nCombinedToken, rValue ); +} + void FastAttributeList::addUnknown( const OUString& rNamespaceURL, const OString& rName, const sal_Char* pValue ) { maUnknownAttributes.push_back( UnknownAttribute( rNamespaceURL, rName, pValue ) ); -- cgit