<div dir="ltr"><div><div><div>It works okay, except when you try to Save a Copy to docx, then:<br></div><div> You can't open the copy file unless you close the original.<br></div><div> If you modify the original and try to save it, LO will ask you if you really<br>
</div><div> want to save to docx format, regardless what's the original file's format,<br></div><div> closing and reopening solves this too.<br><br>First patch that got pushed out:<br><a href="https://gerrit.libreoffice.org/#/c/2829/">https://gerrit.libreoffice.org/#/c/2829/</a><br>
<br></div><div>The idea here was to copy Save as, except the dialog title and call storeToURL<br>instead of saveAsURL, it's in an unfinished state, but it works with the<br>above mentioned bug. I worked on it more later, but the situation didn't improve,<br>
so, I rewrote it.<br></div><div><br>As it currently stands:<br><a href="https://gerrit.libreoffice.org/#/c/3355/">https://gerrit.libreoffice.org/#/c/3355/</a><br><br></div><div>Same idea but with using export and a bit better execution.<br>
</div><div>The code works by, when a SID_SAVEACOPY request is received,<br>it sends out an SID_EXPORTDOC request with an SfxBoolItem set to true, to<br></div><div>later identify it in guisaveas.cxx at GUIStoreModel and OutputFileDialog method.<br>
</div><div>The flags are set to the one that SaveTo uses, with the addition of a<br>SAVEACOPY_REQUESTED to set the dialog title in<span class=""> filedlghelper.cxx</span></div><div><br></div></div>Both patches have the same bugs, I have wasted quite some time trying to<br>
figure out what's missing, so I would like to know if the problem lies in my code,<br></div><div>or that docx saving isn't prepared for use with storeToURL.<br></div></div>