Hi Felix,

please take a look to the following issue
http://qa.openoffice.org/issues/show_bug.cgi?id=97969

The most interesting comment there is the last one ( from mru ). The problem is that the functionality tries to overwrite file that is currently locked by office, since the template is being edited. The solution would be to let the template temporarily switch to a temporary medium.

As first step please take a look to the file sfx2/source/doc/doctemplates.cxx in method "SfxDocTplService_Impl::storeTemplate()". The problem there is that storeToURL() is not allowed to overwrite the currently used file, since storeToURL() let the document stay based on the current medium and changing of this medium using the mentioned method is not allowed. So the solution is to check whether the target URL is the same as the URL from the document ( can be retrieved using XStorable::getLocation() ). The URLs should be compared using the method SfxMedium::EqualURLs().

Best regards,
Mikhail.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@framework.openoffice.org
For additional commands, e-mail: dev-h...@framework.openoffice.org

Reply via email to