diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-09-28 00:09:16 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-10-23 11:53:18 +0200 |
commit | 406062334a4891094928149711fcbb98fccc3fff (patch) | |
tree | dc5d868fe6a21ea5518bd7390191f5b93d290032 /include/sax | |
parent | FastSerializer: Use FastAttributeList directly to write faster. (diff) | |
download | core-406062334a4891094928149711fcbb98fccc3fff.tar.gz core-406062334a4891094928149711fcbb98fccc3fff.zip |
FastSerializer: avoid some more OStrings
Change-Id: I2d5dbe9adccdd231cc16a1f83a90a4adeb965c64
Diffstat (limited to 'include/sax')
-rw-r--r-- | include/sax/fastattribs.hxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx index 525548105cbd..85a1218e8616 100644 --- a/include/sax/fastattribs.hxx +++ b/include/sax/fastattribs.hxx @@ -87,6 +87,7 @@ public: void addUnknown( const OString& rName, const sal_Char* pValue ); const std::vector< sal_Int32 >& getFastAttributeTokens() const { return maAttributeTokens; } const char* getFastAttributeValue(size_t nIndex) const { return mpChunk + maAttributeValues[nIndex]; } + sal_Int32 AttributeValueLength(size_t i) const { return maAttributeValues[i + 1] - maAttributeValues[i] - 1; } // performance sensitive shortcuts to avoid allocation ... bool getAsInteger( sal_Int32 nToken, sal_Int32 &rInt); @@ -103,9 +104,6 @@ public: virtual ::com::sun::star::uno::Sequence< ::com::sun::star::xml::FastAttribute > SAL_CALL getFastAttributes() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; private: - inline sal_Int32 AttributeValueLength(sal_Int32 i); - -private: sal_Char *mpChunk; ///< buffer to store all attribute values - null terminated strings sal_Int32 mnChunkLength; ///< size of allocated memory for mpChunk // maAttributeValues stores pointers, relative to mpChunk, for each attribute value string |