diff options
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/tools/fastserializer.cxx | 4 | ||||
-rw-r--r-- | sax/source/tools/fshelper.cxx | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx index d8857689a543..38766095e5fc 100644 --- a/sax/source/tools/fastserializer.cxx +++ b/sax/source/tools/fastserializer.cxx @@ -113,7 +113,7 @@ namespace sax_fastparser { void FastSaxSerializer::write( const char* pStr, sal_Int32 nLen, bool bEscape ) { - if (nLen == 0) + if (nLen == -1) nLen = strlen(pStr); if (!bEscape) @@ -251,7 +251,7 @@ namespace sax_fastparser { writeBytes(sEqualSignAndQuote, N_CHARS(sEqualSignAndQuote)); - write(maTokenValues[j].pValue, 0, true); + write(maTokenValues[j].pValue, -1, true); writeBytes(sQuote, N_CHARS(sQuote)); } diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index e0ed75186629..801be108bc07 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -102,7 +102,7 @@ void FastSerializerHelper::singleElement(sal_Int32 elementTokenId, XFastAttribut FastSerializerHelper* FastSerializerHelper::write(const char* value) { - mpSerializer->write(value, 0, false); + mpSerializer->write(value, -1, false); return this; } @@ -132,13 +132,14 @@ FastSerializerHelper* FastSerializerHelper::write(double value) FastSerializerHelper* FastSerializerHelper::writeEscaped(const char* value) { - mpSerializer->write(value, 0, true); + mpSerializer->write(value, -1, true); return this; } FastSerializerHelper* FastSerializerHelper::writeEscaped(const OUString& value) { - mpSerializer->write(value, true); + if (!value.isEmpty()) + mpSerializer->write(value, true); return this; } |