Hi Yan,

just yesterday Andreas explained the concept to me, again :)

In my previous answers, I assumed that the recovery service would
iterate over all documents registered at the desktop, and use their
XRecovery interface. However, as Andreas reminded me, the plan is that
the recovery services is just a listener at the GlobalEventBroadcaster,
and iterates over all documents known there.

In this case, it is in fact necessary to hide the XRecovery interface
for embedded documents, so please go ahead with this change.


>> So, the save-code in Base would look like
>>   - create a wrapper storage
>>   - save my own content
>>   - create a sub storage for every opened form
>>   - use the form's XRecovery to save it into the sub storage
>>
>> So, the bottom line is: When you remove the XRecovery from embedded
>> forms, this will make final implementations more difficult.
>>
> Does it mean making database document store it's own sub documents is 
> difficult?

No, I just meant that at some point in its own emergency save process,
the form document needs to emergency-save a certain sub document. If
this document had the XRecocery interface, this would be just a matter
of delegating to this interface.

Now when the sub document does not have this interface, then the form
document needs to decide itself what "emergency save" means for the sub
document. At the moment, this decision is still easy: It's just a simple
"XStorage::storeTo" call.

However, there might be points in the future where the implementation of
XRecovery::store (or however you named it) for text documents is
*extended* to be more than a simple "storeTo". In such a case, we would
need to duplicate this extended semantics in form documents, too. In
case XRecovery were still present at the sub documents, this duplicate
would not be necessary.

That said, I am still a little bit unsure whether hiding the XRecovery
interface is the most future-proof solution, but I think you can go
ahead with it.

Ciao
Frank


-- 
- Frank Schönheit, Software Engineer         frank.schoenh...@sun.com -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

Reply via email to