Hi Mikhail and Kohei,

Mikhail Voitenko wrote:

> Hi Kohei,
> 
> The suggested by Mathias solution will work. I am just curious why 
> should it be handled in the filter. Isn't it better just to set the 
> correct password to the target MediaDescriptor represented by ItemSet in 
> the target SfxMedium and use it always from the target medium?
> 
> I mean that in case of Save scenario the password should be just 
> transported to the medium from the current document and in case of 
> SaveAs scenario the password would be set from the dialog. All this 
> would be done in sfx2, where the information regarding the current 
> action is available ( if I am not wrong, it should even be done already, 
> although in case of Excel filter it might need some adjustments ). And 
> the filter would use the password from the target MediaDescriptor. This 
> solution would be definitely no hack and could be used as a final one. 
> It is already done so for the OOo document format filters.

So the password to use always would be in the SfxMedium passed in
ConvertTo(), right?

So what about the password that Calc seems to store in its internal data?

First I would like to see why this is necessary. Perhaps this is done
currently only because it is not passed to the Medium? In that case it
could be removed from the Calc internal model data and instead stored in
the Medium/MediaDescriptor as we do it for our own format.

In case Calc also needs to know the password for other purposes
internally I assume that the new password must be taken over by Calc
also. The right place for that would be the SaveCompleted() call at the
ScDocShell.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to