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