summaryrefslogtreecommitdiff
path: root/sax/source/tools/fastserializer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sax/source/tools/fastserializer.cxx')
-rw-r--r--sax/source/tools/fastserializer.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index 6257853a64a8..9356f3e081d1 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -270,11 +270,18 @@ namespace sax_fastparser {
void FastSaxSerializer::writeId( ::sal_Int32 nElement )
{
if( HAS_NAMESPACE( nElement ) ) {
- writeBytes(mxFastTokenHandler->getUTF8Identifier(NAMESPACE(nElement)));
+ auto const Namespace(mxFastTokenHandler->getUTF8Identifier(NAMESPACE(nElement)));
+ assert(Namespace.getLength() != 0);
+ writeBytes(Namespace);
writeBytes(sColon, N_CHARS(sColon));
- writeBytes(mxFastTokenHandler->getUTF8Identifier(TOKEN(nElement)));
- } else
- writeBytes(mxFastTokenHandler->getUTF8Identifier(nElement));
+ auto const Element(mxFastTokenHandler->getUTF8Identifier(TOKEN(nElement)));
+ assert(Element.getLength() != 0);
+ writeBytes(Element);
+ } else {
+ auto const Element(mxFastTokenHandler->getUTF8Identifier(nElement));
+ assert(Element.getLength() != 0);
+ writeBytes(Element);
+ }
}
#ifdef DBG_UTIL