diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-09-27 21:46:36 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-10-23 11:53:18 +0200 |
commit | 50d2ffd2a107ae8fd5c3e53f4f75234ad37081ea (patch) | |
tree | 605ca6436b643779c59992c02d9bfdc4e335c42c /sax/source/tools/fastattribs.cxx | |
parent | e1c503a2e3309d9f738d7f702a562509899fdb3f (diff) |
FastSerializer: Use FastAttributeList directly to write faster.
Change-Id: I28085d4e060bcf052e6aa97a0822a4d653d7c066
Diffstat (limited to 'sax/source/tools/fastattribs.cxx')
-rw-r--r-- | sax/source/tools/fastattribs.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sax/source/tools/fastattribs.cxx b/sax/source/tools/fastattribs.cxx index 45887b5754aa..67f3196b12c9 100644 --- a/sax/source/tools/fastattribs.cxx +++ b/sax/source/tools/fastattribs.cxx @@ -129,7 +129,7 @@ sal_Int32 FastAttributeList::getValueToken( ::sal_Int32 Token ) throw (SAXExcept if (maAttributeTokens[i] == Token) return FastTokenHandlerBase::getTokenFromChars( mxTokenHandler, mpTokenHandler, - mpChunk + maAttributeValues[ i ], + getFastAttributeValue(i), AttributeValueLength( i ) ); throw SAXException(); @@ -141,7 +141,7 @@ sal_Int32 FastAttributeList::getOptionalValueToken( ::sal_Int32 Token, ::sal_Int if (maAttributeTokens[i] == Token) return FastTokenHandlerBase::getTokenFromChars( mxTokenHandler, mpTokenHandler, - mpChunk + maAttributeValues[ i ], + getFastAttributeValue(i), AttributeValueLength( i ) ); return Default; @@ -154,7 +154,7 @@ bool FastAttributeList::getAsInteger( sal_Int32 nToken, sal_Int32 &rInt) for (size_t i = 0; i < maAttributeTokens.size(); ++i) if (maAttributeTokens[i] == nToken) { - rInt = rtl_str_toInt32( mpChunk + maAttributeValues[i], 10 ); + rInt = rtl_str_toInt32( getFastAttributeValue(i), 10 ); return true; } return false; @@ -166,7 +166,7 @@ bool FastAttributeList::getAsDouble( sal_Int32 nToken, double &rDouble) for (size_t i = 0; i < maAttributeTokens.size(); ++i) if (maAttributeTokens[i] == nToken) { - rDouble = rtl_str_toDouble( mpChunk + maAttributeValues[i] ); + rDouble = rtl_str_toDouble( getFastAttributeValue(i) ); return true; } return false; @@ -191,7 +191,7 @@ OUString FastAttributeList::getValue( ::sal_Int32 Token ) throw (SAXException, R { for (size_t i = 0; i < maAttributeTokens.size(); ++i) if (maAttributeTokens[i] == Token) - return OUString( mpChunk + maAttributeValues[i], AttributeValueLength(i), RTL_TEXTENCODING_UTF8 ); + return OUString( getFastAttributeValue(i), AttributeValueLength(i), RTL_TEXTENCODING_UTF8 ); throw SAXException(); } @@ -200,7 +200,7 @@ OUString FastAttributeList::getOptionalValue( ::sal_Int32 Token ) throw (Runtime { for (size_t i = 0; i < maAttributeTokens.size(); ++i) if (maAttributeTokens[i] == Token) - return OUString( mpChunk + maAttributeValues[i], AttributeValueLength(i), RTL_TEXTENCODING_UTF8 ); + return OUString( getFastAttributeValue(i), AttributeValueLength(i), RTL_TEXTENCODING_UTF8 ); return OUString(); } @@ -219,7 +219,7 @@ Sequence< FastAttribute > FastAttributeList::getFastAttributes( ) throw (Runtim for (size_t i = 0; i < maAttributeTokens.size(); ++i) { pAttr->Token = maAttributeTokens[i]; - pAttr->Value = OUString( mpChunk + maAttributeValues[i], AttributeValueLength(i), RTL_TEXTENCODING_UTF8 ); + pAttr->Value = OUString( getFastAttributeValue(i), AttributeValueLength(i), RTL_TEXTENCODING_UTF8 ); pAttr++; } return aSeq; |