 | OO-Snippets: Open Password protected file and displaying Pwd-DialogCommons| Keywords | password proctected, open file, password dialog |
|---|
| Language | Java |
|---|
| Application | Office |
|---|
| Authors | Tom Schindl (initial)
|
|---|
| Supported Versions | |
|---|
| Supported OS | |
|---|
| Question |
How do I open a password protected OO-Document and display the Password dialog
|
|---|
| Answer |
You have to provide an InteractionHandler, which shows the password dialog. You can create such handler by your own .. or
use our global one, which implements every interaction we know. (Andreas Schlüns <andreas.schluens@sun.com>)
|
|---|
XInteractionHandler xHandler = (XInteractionHandler)UnoRuntime.queryInterface( XInteractionHandler.class, xSMGR.createInstance("com.sun.star.task.InteractionHandler"));
PropertyValue[] lArgs = new PropertyValue[1];
lArgs[0] = new PropertyValue();
lArgs[0].Name = "InteractionHandler";
lArgs[0].Value = xHandler;
xDoc = xDesktop.loadComponentFromURL(sURL, sTarget, nSearchFlags, lArgs);
|
Changelog| Date | User | Modification |
|---|
| 2004-06-11 | tomsontom | Intial version |
|