Thanks for the hint.
I found the method "StoreDocument" inside the Tools/ModuleControls
library, which would do the trick I guess.
I've got a problem to pass the arguments though.
Following macro function:
Function StoreDocument(oDocument as Object, FilterNames() as String,
DefaultName as String, DisplayDirectory as String, Optional
iAddProcedure as Integer)
And I'd like to call this function when clicking on a button in my java
component. So I added the following in my Addons.xcu:
<value>macro:///Tools.ModuleControls.StoreDocument(com.sun.star.text.TextDocument,
"TEST", "default", "file:///")</value>
It actually calls the function but crashes OpenOffice. I don't really
understand why but I guess some parameter must be wrong. TEST is the
name of my filter.
Any further hints here?
thanks jimmy
Berend Cornelius schrieb:
Hi Jimmy,
unfortunately the FilePicker that is raised by the
UnoControlFileControlModel is not configurable.
I have set up Issue 71041 to take care of this problem.
As an alternative you can implement
a text field and a command button instead of a file control and assign
a macro to the button which instantiates the file dialog
com.sun.star.ui.dialogs.FilePicker at runtime. In the OpenOffice Basic
library "Tools" there are some examples how to use the file picker.
Best regards
Berend
Jimmy schrieb:
I implemented a dialog for exporting the current writer document with
my custom xml filter. The dialog has a "Browse" button with which it
should be possible to browse the file system, browse to a folder,
specify or reuse a given filename.
I've implemented a UnoControlFileControlModel which isn't what I was
looking for since it's something like an "open" dialog where you can
specify a new filename. Is there any chance I can change this behaviour?
If not - is there a chance I can call the export dialog and only
give the option to chose my xml filter for saving purposes?
Thanks for any hint
Jimmy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]