summaryrefslogtreecommitdiff
path: root/sax/source
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-03-05 18:46:37 +0100
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-03-05 20:24:01 +0100
commit693f1dee0b994b92d1256cdd9a82f642d0c3b5cd (patch)
tree404fe81a1764d679a6f1c269f720b2ae7c2518b1 /sax/source
parent7452e530c01193de2dedf54b2f91e797f341f19e (diff)
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
Diffstat (limited to 'sax/source')
-rw-r--r--sax/source/tools/fastattribs.cxx6
1 files changed, 6 insertions, 0 deletions
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 ) );