[Libreoffice-bugs] [Bug 116079] Opening ODS file rise Incorrect Format exception. Opened well with OpenOffice 4.1.3

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Mar 4 20:59:30 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=116079

--- Comment #11 from Julien Nabet <serval2412 at yahoo.fr> ---
With this patch, I can open the file:
diff --git a/sax/source/fastparser/fastparser.cxx
b/sax/source/fastparser/fastparser.cxx
index f70995763c4c..d2cfb1417afa 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -1044,13 +1044,6 @@ void FastSaxParserImpl::parse()
         nRead = rEntity.maConverter.readAndConvert( seqOut, BUFFER_SIZE );
         if( nRead <= 0 )
         {
-            if( rEntity.mpParser != nullptr )
-            {
-                if( xmlParseChunk( rEntity.mpParser, reinterpret_cast<const
char*>(seqOut.getConstArray()), 0, 1 ) != XML_ERR_OK )
-                    rEntity.throwException( mxDocumentLocator, true );
-                if (rEntity.hasException())
-                    rEntity.throwException(mxDocumentLocator, true);
-            }
             break;
         }

This part has been put with:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=82d08580e368afbc9d73da3613845a36a89b0a8c
author  Luboš Luňák <l.lunak at collabora.com>     2014-11-14 17:13:41 +0100
committer       Luboš Luňák <l.lunak at collabora.com>     2014-11-14 17:20:00
+0100
commit  82d08580e368afbc9d73da3613845a36a89b0a8c (patch)
tree    ef353fcfd8d7b427a0ecf2281eb7c0264f6fc9a6
parent  37800290245fd0462295a8bbaabd9d761929fa65 (diff)
switch saxparser from expat to libxml2

I don't know if it's ok or not.
nRead is sal_Int32 but it seems it can't be negative.

Also perhaps meta.xml with just encoding is ok but another xml file with just
encoding is not ok
=> a bit stuck here.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200304/15e19778/attachment.htm>


More information about the Libreoffice-bugs mailing list