Apache OpenOffice (AOO) Bugzilla – Issue 22829
com::sun::star::frame::XStorable::dropLocation()
Last modified: 2013-02-24 21:07:16 UTC
Currently there is no way, after calling XStorable::storeToURL(), for returning a document into virgin state (not loaded and not saved), that is, making hasLocation() return false. I suggest adding XStorable::dropLocation().
XStorable cannot be extended, it would be incompatible. Thus, only a new interface would be possible. But what is the real difference to load a new document with the appropriate factory URL? Ok, you will get a new document object, but the advantage is so minor that I don't think I can find support from the applications to implement this feature.
assigning back to reporter
http://www.openoffice.org/issues/show_bug.cgi?id=22743
(Oops, ignore my previous comment, wrong button.) First,s/storeToURL/storeAsURL/ in my initial message. Next, there's a situation where storeAsURL is required, but that can't be undone without XStorable2::dropLocation(): http://api.openoffice.org/servlets/ReadMsg?msgId=953025&listName=dev
There might be a situation where an Add-on wants to disable Save and Reload, forcing the user to Save-As. (Poor man's templates.)
you can explicitely disable "save" from UI with an XDispatchInterceptor, this feature is redundant
Apparently, you only looked at my last comment. Disabling "Save" doesn't help for this problem: There's a situation where storeAsURL is required, but that can't be undone without XStorable2::dropLocation(): http://api.openoffice.org/servlets/ReadMsg?msgId=953025&listName=dev
I may have misunderstood what you actually want. Your term "virgin state" confused me. If you want just to make the document think it has no location attached withouth actuelly clearing it, then this might be a proper requirement. But I would not call that "virgin". .
forwarding to responsible developer
Why can't you use storeToURL instead of storeAsURL? This wouldn't need a "dropLocation". I don't see the meaning in using a method that explicitly sets a location and remove that location afterwards if there is another method that does exactly the same but doesn't set a location. Whith a dispatch interceptor you could even convert our "SaveAs" GUI function to use storeToURL instead of storeAsURL.
.
Left without any reaction I decided to close this by myself.