On 08/15/2012 12:05 PM, Kohei Yoshida wrote:
On 08/15/2012 12:02 PM, Kohei Yoshida wrote:
On 08/15/2012 11:05 AM, Kohei Yoshida wrote:
I'll go a little deeper in the type detection chain (I'm at
SwIoSystem::IsFileFilter at the moment) to confirm this theory.

I've now deduced it to aHdr.Load( *pStream ) (aHdr being StgHeader) in
Storage::IsStorageFile() failing with Large-Word.doc, whereas this
succeeds with normal .doc files.

Here is a link to the method (for your convenience)
http://opengrok.libreoffice.org/xref/core/sot/source/sdstor/stg.cxx#344

The culprit is on line 352, where bRet = 0 though it should be bRet = 1.

Ah. Now I know. Ultimately the failure is due to StgHeader::Check() returning false on Large-Word.doc.

http://opengrok.libreoffice.org/xref/core/sot/source/sdstor/stgelem.cxx#186

Changing this method to always return true leads to Writer loading the file correctly.

Now, what would be the right fix for this?  I'm not sure....

Kohei

--
Kohei Yoshida, LibreOffice hacker, Calc
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to