Kaydet (Commit) 693f1dee authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

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
üst 7452e530
......@@ -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 );
......
......@@ -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 ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment