2 ' This file is part of the LibreOffice project.
4 ' This Source Code Form is subject to the terms of the Mozilla Public
5 ' License, v. 2.0. If a copy of the MPL was not distributed with this
6 ' file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 Function doUnitTest() As String
12 On Error GoTo ErrorHandler
' Set up error handler
16 ' Not namespace-well-formed XML, parse is expected to fail
19 Dim XmlByte(1 To XmlLen
) As Byte
21 For Index
= 1 To XmlLen
22 XmlByte(Index
) = Asc(Mid(Xml
, Index
, 1))
25 source
= CreateUnoStruct("com.sun.star.xml.sax.InputSource")
26 source
.aInputStream
= com
.sun
.star
.io
.SequenceInputStream
.createStreamFromSequence(XmlByte
)
28 parser
= CreateUnoService("com.sun.star.xml.sax.FastParser")
29 ' Parse crashed before the fix
30 parser
.ParseStream(source
)
32 ' Shouldn't end up here