Hi Kohei,

The password dialog, that is shown during storing of OOo document formats, had got new UI design and had to be reimplemented. It was also moved to InteractionHandler to simplify UNO API control over the dialog, although it was just a collateral change.

The change should not affect the implementation in Excel filter, so the implementation there could stay as it is. Actually it can not be changed for OOo3.1 anyway because of the UI-freeze.

If you would like to switch the Excel export implementation to the usage of InteractionHandler, please take a look to the API documentation of the InteractionHandler service
http://api.openoffice.org/docs/common/ref/com/sun/star/task/InteractionHandler.html

The new interaction would need a new interaction request, com.sun.star.task.DocumentPasswordRequest is a good example probably. All the special settings for the dialog, as for example stored document name or the minimal length of the password, should be provided in the request.

Additionally a small implementation for the com.sun.star.task.XInteractionRequest is required. Please see "RequestDocumentPassword" class implementation in svtools/source/misc1/docpasswdrequest.cxx.

The interaction itself should be implemented in uui/source/iahndl.cxx, it would look similar to the implementation related to the DocumentPasswordRequest.

Hope that helps.

Best regards,
Mikhail.

On 12/30/08 06:31, Kohei Yoshida wrote:
Hi Mathias,

On Sat, 2008-12-27 at 01:27 +0100, Mathias Bauer wrote:
Hi Kohei,

Kohei Yoshida schrieb:

Hi there,

I've noticed, after resyncing scsheetprotection02 to m38, that you guys
now use a new way to set a document password for encryption.  The old
way was to use SfxPasswordDialog class and the new way is to use UNO's
interaction handler (of sort).

Now, to get the Excel export encryption to work properly, I need to set
1-15 character length restriction to the password.  It was relatively
easy to set it with SfxPasswordDialog, but how can I do the same using
the new interaction handler?
I think that you need to have a particular exception and a particular
interaction for this. I'm sure Mikhail and Andreas will explain that
with more details when they are back from vacation. The interaction will
be more or less an encapsulation of your current code, nothing complicated.

Thanks for your answer.  I know you were (and still are) probably on
vacation, so I appreciate you taking the time to write a reply.

Meanwhile, I noticed a new module 'uui' that probably implements those
interaction handlers.  I should probably read up that code to see what
it does.

IIRC the move to the interaction handler was necessary to support
scenarios where popping up dialogs is unwanted.

This makes sense.  Suppressing pop-up dialogs is probably useful in some
sort of automation scripts to mass-convert documents etc.

Thanks,

Kohei


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

Reply via email to