diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2014-11-12 16:09:42 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2014-11-12 16:18:38 +0100 |
commit | 8a75dafbe19b19fe8b39e4e85f5ffa47da23f41e (patch) | |
tree | a46316e71b5a3aca07ba3629888e816838c7a159 /include/sax | |
parent | 95cec52515a51a96e58fae9aa11ca2459365e66d (diff) |
make FastAttributeList's unknown attribute value be passed as OString
Since that's how it's internally stored anyway, and I have a use case
where it's useful to limit the length by passing it to OString ctor.
Change-Id: I5903ea4f1b2cdb48c1bbceac6b8e21eb5882d377
Diffstat (limited to 'include/sax')
-rw-r--r-- | include/sax/fastattribs.hxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx index 39f5a5f814a2..a2fe1b9c77ba 100644 --- a/include/sax/fastattribs.hxx +++ b/include/sax/fastattribs.hxx @@ -40,9 +40,8 @@ struct UnknownAttribute OString maName; OString maValue; - UnknownAttribute( const OUString& rNamespaceURL, const OString& rName, const sal_Char* pValue ); - - UnknownAttribute( const OString& rName, const sal_Char* pValue ); + UnknownAttribute( const OUString& rNamespaceURL, const OString& rName, const OString& value ); + UnknownAttribute( const OString& rName, const OString& value ); void FillAttribute( ::com::sun::star::xml::Attribute* pAttrib ) const; }; @@ -84,8 +83,8 @@ public: void add( sal_Int32 nToken, const sal_Char* pValue, size_t nValueLength ); 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 ); + void addUnknown( const OUString& rNamespaceURL, const OString& rName, const OString& value ); + void addUnknown( const OString& rName, const OString& value ); 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; } |