Apache OpenOffice (AOO) Bugzilla – Issue 107830
XStorable.storeAsURL() fails if try to overwrite a file
Last modified: 2017-05-20 11:33:34 UTC
Create an empty file (0 bytes) long and now try to overwrite this file by storeAsURL(file, empty propertyvalues) It will fail. Create a property 'Overwrite=true' and storeAsURL(file, Property("Overwrite=TRUE")) It will fail. simple remove the file. storeAsURL() works as expected. - Conclusion: - The returned exception are not very helpful. There is no message. - Overwrite=true should work, but it doesn't.
Created attachment 66761 [details] complex test for such problem
The attached file contains a simple complex test for such problem. Directory structure in the test: qa/complex/loadandstore The test: - create a new document - create an empty temp file - store document to temp file via storeAsURL() with property 'Overwrite=TRUE' - reopen the temp file - check if the content is the same as before.
Tested on Windows XP, OOo 3.1.1 : no such error. I used a simple Basic macro instead of the java example. So if confirmed, it is a regression on OOo320m8 and should be considered as a stopper. Put this macro in "My Macro", open a new document, run the macro. Sub Main ThisComponent.storeAsURL(ConvertToURL("C:\Tests\EmptyFile.odt"), array() ) End Sub
Sorry I've forgot to mention: It only occurs within java. Basic is ok. This is the reason I wrote a java complex test.
Reset assigne to the default "issues@openoffice.apache.org".