https://issues.apache.org/ooo/show_bug.cgi?id=121665
--- Comment #7 from ptoye <[email protected]> --- You say you don't understand my (rather simple) program. The line which gives an error is clearly marked. The line giving the error is Doc.StoreAsURL(FileURL,EmptyArray). Because the array is empty, the file should not be overwritten, as the default is FALSE. The next line fails to store (as I'd expect) because the file's already there. At the end of your explanation you say that StoreAsURLto the original URL is the same as Store(). This may well be true, but it's not in the XStorable definition, which is what I was going on. It's also not the same as the behaviour of OOWriter using the "Save As" menu item. Try opening a document, clicking "Save As", and choosing the original file name. It (quite rightly in my view) fails. So in this case "SAVE AS" to the original file is NOT the same a "Save", which (equally rightly) overwrites. So, in my view, it's either a documentation bug or a bug in StoreAsURL. Matters aren't helped by http://wiki.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Handling_Documents which says under "Overwrite": "boolean. For storing only: overwrite existing files with the same name, default is true, so an com.sun.star.io.IOException occurs if the target file already exists. If the default is changed and the file exists, the UCB throws an exception. If the file is loaded through API, this exception is transported to the caller or handled by an interaction handler." which says that the default is TRUE. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug.
