diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx index 71bd4679aca1..29ed1f913e8f 100644 --- a/include/sax/fastattribs.hxx +++ b/include/sax/fastattribs.hxx @@ -80,6 +80,7 @@ public: void clear(); void add( sal_Int32 nToken, const sal_Char* pValue, size_t nValueLength = 0 ); void add( sal_Int32 nToken, const OString& rValue ); + void addNS( sal_Int32 nNamespaceToken, sal_Int32 nToken, const OString& rValue ); void addUnknown( const OUString& rNamespaceURL, const OString& rName, const sal_Char* pValue ); void addUnknown( const OString& rName, const sal_Char* pValue ); 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 ) );