Hi Christoph, > Is there another way to veto on saveAs-actions for specific targets?
I don't think so ... > I want to veto on a saveAs-action using the document event OnSaveAs. > The veto should be done only for specific target URLs (save-as > filename), the user has chosen in the SaveAs-Dialog. But how do I get > the URL of the save-target? The eventObject only contains the fields > EventName and Source. The Source is the Document that should be > stored, but I couln't found some informations about the save-target. if you allow me some digressing ... The css.document.EventObject (and XEventBroadcaster/XEventListener) API is pretty sparse, and listeners get way too few information passed ... For 3.1, there will be css.document.XDocumentEventBroadcaster/Listener + DocumentEvent, which are able to hold more information (an XController2 for the view which the event applies to, if any; and an Any taking arbitrary supplemental information). For the moment (in the CWS where this API currently still lingers), only database documents support this new API, "sfx-based" documents (Writer, Calc, Draw, Impress, Math) don't. Not sure this will change until the release. However, even if the API were implemented for all document types, I am not sure whether it should be designed to be vetoable. Vetoing operations is a very specific thing, and I don't think that such a "broad" API like X(Document)EventBroadcaster, which can be used to broadcast arbitrary (and usually heavily underspecified) events, should allow vetoing - this would open the door for all kind of misunderstandings (what's the meaning of somebody vetoing the "OnSaveAsFinished" event, which usually is even notified asyncrhonously?) That said, I'd always prefer some dedicated XSomeOperationBroadcaster/Listener interfaces, which have a dedicated "onDoingSomething() throws VetoException" (or "XVeto onDoingSomething()") method. All that said (completely off-topic, I fear), I find the idea of passing the the URL, which a document is stored to, pretty interesting - I will implement this right away for my database document's XDocumentEventBroadcaster :) Ciao Frank --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
