diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-10-25 14:53:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-25 16:56:14 +0100 |
commit | 4d08aba74b572287a7a0b21a0d8895cad515470a (patch) | |
tree | 99d6a10e029d5b052ad4313bfef507c764c508be /sax | |
parent | 35d78b36b97db8e3d140841b1b47c937cd4bf9ac (diff) |
coverity#1249457 writeFastAttributeList never takes NULL
and
coverity#1249456
Change-Id: If1f6ef550290d3b6bb53ae87389b466c7d7a31f1
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/tools/fastserializer.cxx | 10 | ||||
-rw-r--r-- | sax/source/tools/fastserializer.hxx | 2 | ||||
-rw-r--r-- | sax/source/tools/fshelper.cxx | 1 |
3 files changed, 6 insertions, 7 deletions
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx index ac8376b3be84..9209bd803c39 100644 --- a/sax/source/tools/fastserializer.cxx +++ b/sax/source/tools/fastserializer.cxx @@ -202,7 +202,7 @@ namespace sax_fastparser { writeId(Element); if (pAttrList) - writeFastAttributeList(pAttrList); + writeFastAttributeList(*pAttrList); else writeTokenValueList(); @@ -237,7 +237,7 @@ namespace sax_fastparser { writeId(Element); if (pAttrList) - writeFastAttributeList(pAttrList); + writeFastAttributeList(*pAttrList); else writeTokenValueList(); @@ -277,12 +277,12 @@ namespace sax_fastparser { maTokenValues.clear(); } - void FastSaxSerializer::writeFastAttributeList( FastAttributeList* pAttrList ) + void FastSaxSerializer::writeFastAttributeList(FastAttributeList& rAttrList) { #ifdef DBG_UTIL ::std::set<OString> DebugAttributes; #endif - const std::vector< sal_Int32 >& Tokens = pAttrList->getFastAttributeTokens(); + const std::vector< sal_Int32 >& Tokens = rAttrList.getFastAttributeTokens(); for (size_t j = 0; j < Tokens.size(); j++) { writeBytes(sSpace, N_CHARS(sSpace)); @@ -299,7 +299,7 @@ namespace sax_fastparser { writeBytes(sEqualSignAndQuote, N_CHARS(sEqualSignAndQuote)); - write(pAttrList->getFastAttributeValue(j), pAttrList->AttributeValueLength(j), true); + write(rAttrList.getFastAttributeValue(j), rAttrList.AttributeValueLength(j), true); writeBytes(sQuote, N_CHARS(sQuote)); } diff --git a/sax/source/tools/fastserializer.hxx b/sax/source/tools/fastserializer.hxx index 8500b680f65d..95e631c355d2 100644 --- a/sax/source/tools/fastserializer.hxx +++ b/sax/source/tools/fastserializer.hxx @@ -220,7 +220,7 @@ private: #endif void writeTokenValueList(); - void writeFastAttributeList( FastAttributeList* pAttrList ); + void writeFastAttributeList(FastAttributeList& rAttrList); /** Forward the call to the output stream, or write to the stack. diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index 15a5efa0f518..438aef75c48a 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -92,7 +92,6 @@ void FastSerializerHelper::startElement(sal_Int32 elementTokenId, XFastAttribute mpSerializer->startFastElement(elementTokenId, pAttrList); } - void FastSerializerHelper::singleElement(sal_Int32 elementTokenId, XFastAttributeListRef xAttrList) { FastAttributeList* pAttrList = dynamic_cast< FastAttributeList* >(xAttrList.get()); |