<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Calc changes .XLS password on save (Save as works)"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114221#c13">Comment # 13</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Calc changes .XLS password on save (Save as works)"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114221">bug 114221</a>
              from <span class="vcard"><a class="email" href="mailto:baron@caesar.elte.hu" title="Aron Budea <baron@caesar.elte.hu>"> <span class="fn">Aron Budea</span></a>
</span></b>
        <pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=138338" name="attach_138338" title="File with bug - recovered">attachment 138338</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=138338&action=edit" title="File with bug - recovered">[details]</a></span>
File with bug - recovered

(In reply to francis-marylene from <a href="show_bug.cgi?id=114221#c10">comment #10</a>)
<span class="quote">> What about the file which is corrupted (CA2017)? I really would like to open
> it again. Do you have a way to recover it?</span >
I have good news for you, the file is recoverable, I'm attaching it, it's
unencrypted now.

When the user simply saves the file, it saves as an unencrypted file, but sets
encryption mode for it, thus it fails decryption. I could open the bad file by
setting a breakpoint at the following line, and skipping to the end of the
function:

rStrm.SetDecrypter( xDecr );
<a href="https://opengrok.libreoffice.org/xref/core/sc/source/filter/excel/xicontent.cxx#1247">https://opengrok.libreoffice.org/xref/core/sc/source/filter/excel/xicontent.cxx#1247</a>

Then the file could be saved, and is saved unencrypted.

The bug only affects files having this newer encryption (>= MS Office 2013),
when they are saved (via save as, since that works), the scheme reverts to the
older one, opening and saving those files keeps the format and encryption.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>