<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello, I'm DaeHyun Sung, from South Korea.<div><br></div><div>I found the Bugzilla report "tdf#144747 FILEOPEN When opening any Hancom Word hwp document garbage is displayed" </div><div><a href="https://bugs.documentfoundation.org/show_bug.cgi?id=144747">https://bugs.documentfoundation.org/show_bug.cgi?id=144747</a> <br><div><div>(Thanks Ming Hua to inform me. )</div><div><br></div><div>So, I read hwpfilter module on LibreOffice. </div><div><div>LibreOffice only supported hwp v3.0(HWP97 version) file format.</div><div> However, In Korea, Broadly used to hwp v5.0 file format.</div><div>It is zipped Compound File Binary Format. So, I added read & check zipped format</div></div><div><br></div><div>I submitted my works on gerrit (WIP)</div><div><a href="https://gerrit.libreoffice.org/c/core/+/125782">https://gerrit.libreoffice.org/c/core/+/125782</a>  <br></div><div><br></div><div>Though, I added a check zip file format code.</div><div>But, It doesn't check and error.</div><div>Below is added  my code</div><div>===</div><div><div> uno::Reference<uno::XComponentContext> xContext = comphelper::getProcessComponentContext();</div><div>    SAL_WARN("HwpImportFilter::detect", "xContext");</div><div>    uno::Reference<packages::zip::XZipFileAccess2>  xZip(</div><div>        packages::zip::ZipFileAccess::createWithURL(xContext, sURL));</div><div><br></div><div>    if (xZip.is())</div><div>    {</div><div>        SAL_WARN("HwpImportFilter::detect", "That maybe HWP v5.0 format");</div><div>        uno::Reference<io::XInputStream> const isHwpV5FileHeaderStream(xZip->getByName("FileHeader"),</div><div>                                                            uno::UNO_QUERY);</div><div>    }</div></div><div><br></div><div>===</div><div><br></div><div>In my opinion, I found the reading zip module follows LibreOffice core source codes. But It doesn't works.</div><div>So, I have a question.</div><div><br></div><div>How to check Zipped file(It contained Compound File Binary Format) on LibreOffice?</div><div><br></div><div>Check it please!</div><div><br></div><div><br></div><div>Below is after opening hwp v5 file log.</div><div>========</div><div><div>warn:sfx.dialog:157960:158136:sfx2/source/dialog/filtergrouping.cxx:357: already have an element for WordPerfect</div><div>warn:sfx.dialog:157960:158136:sfx2/source/dialog/filtergrouping.cxx:357: already have an element for writerweb8_writer_template</div><div>warn:sfx.dialog:157960:158136:sfx2/source/dialog/filtergrouping.cxx:357: already have an element for writerglobal8</div><div>warn:HwpImportFilter::detect:157960:158136:hwpfilter/source/hwpreader.cxx:4932: HwpImportFilter::detect</div><div>warn:HwpImportFilter::detect:157960:158136:hwpfilter/source/hwpreader.cxx:4947: filter</div><div>warn:HwpImportFilter::detect:157960:158136:hwpfilter/source/hwpreader.cxx:4948: sType</div><div>warn:HwpImportFilter::detect:157960:158136:hwpfilter/source/hwpreader.cxx:4949: sURL file:///C:/Users/dhsung/Downloads/000000000001.hwp</div><div>warn:HwpImportFilter::detect:157960:158136:hwpfilter/source/hwpreader.cxx:4955: xContext</div><div>Throwing InvalidHeaderException</div><div>Throwing InvalidHeaderException</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>Throwing InvalidHeaderException</div><div>Throwing InvalidHeaderException</div><div>AbiDocument::isFileFormatSupported</div><div>Found xml parser severity error Document is empty</div><div><br></div><div>Throwing InvalidHeaderException</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>warn:oox.storage:157960:158136:oox/source/helper/zipstorage.cxx:68: ZipStorage::ZipStorage exception opening input storage com.sun.star.io.IOException</div><div>warn:oox:157960:158136:oox/source/crypto/DocumentDecryption.cxx:166: Encrypted package does not contain DataSpaceMap</div><div>VisioDocument: version 0</div><div>Found xml parser severity error Document is empty</div><div>============</div></div><div><br></div><div>Sincerely, </div><div>DaeHyun Sung(성대현, 成大鉉, <span style="color:rgb(102,102,102);font-family:Roboto,Helvetica,sans-serif;font-size:13px">ソン・デヒョン)</span></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Korean Open Source Developer, Contributor, Translator.<div>LibreOffice, KDE, GNOME Contributor.</div><div>The Document Foundation Member in Korea.</div><div>GNOME Foundation Member in Korea.</div><div>Interested in LibreOffice, KDE, GNOME, Web, etc.</div>LibreOffice – free and open source office suite: <a href="https://www.libreoffice.org" target="_blank">https://www.libreoffice.org</a><br>Respects your privacy, and gives you back control over your data</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>