Mathias Bauer wrote:

> Hello Kohei,
> 
> Kohei Yoshida wrote:
> 
>> On Wed, 2008-05-21 at 15:45 +0200, Mikhail Voitenko wrote:
>>> Hi Kohei,
>>> 
>>> The suggested solution is easy, but it is a hack.
>> 
>> Ah ok. :-P
>> 
>>>  There is no guarantee 
>>> that it will work in future, since the item might be lost during the 
>>> conversion to MediaDescriptor representation.
>> 
>> I see.  So I'll need to add more code to correctly convert this
>> information during the conversion, I guess.
>> 
>>> At which moment of time ( which part of storing process ) do you need to 
>>> get the information that it is SaveAs or Save action?
>> 
>> I need this information in Calc's Excel binary exporter code, which is
>> still implemented as a conventional non-UNO filter.  So, I need it after
>> the code path reaches past the ScDocShell::ConvertTo() call in the sc
>> module.
>> 
>> Whether the action is Save or SaveAs determines whether I should use the
>> password stored in the medium itself (the one the user typed in the
>> dialog), or the password stored in Calc's document model (the original
>> password used to decrypt the document in the first place).
> 
> I agree with Mikhail that for a future proof version we need to do a
> little bit more.
> 
> If it's only for your current problem - it should be sufficient to do
> something comparable in the SfxObjectShell::SaveTo_Impl() method where
> you could add the item immediately before ConvertTo() is called. The
> information whether "Save" or "SaveAs" (or "SaveTo") is used is
> available here as the local variable "bCopyTo".

Ah, I'm sorry. It's not "bCopyTo", it's "pImp->bIsSaving". As this is a
hack I hesitate to export this in a methid "IsSaving". But for the time
being passing this explicitly to ConvertTo() could solve your problem.

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