[Solved] Accessing macro code for dialog GUI

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
PairOdachs
Posts: 31
Joined: Mon Aug 11, 2008 1:10 pm

[Solved] Accessing macro code for dialog GUI

Post by PairOdachs »

I'm sure this is really, really easy, but I'm not seeing how to do it :( ...

Once I create a dialog in the Dialog Editor (http://wiki.openoffice.org/wiki/Documen ... log_Editor), how can I access the underlying code? For example, I can set a field's "Max. text length" value through the Dialog Editor, or I could set it in macro code via .Max (http://wiki.openoffice.org/wiki/Documen ... Text_Field), so theoretically I should be able to access the macro code set via the Dialog Editor.
 Edit: The solution is that the functionality doesn't exist. :cry: 
Last edited by PairOdachs on Fri May 03, 2013 5:34 pm, edited 1 time in total.
OOo 3.4.1 on Mac OS X 10.6.8
B Marcelly
Volunteer
Posts: 1160
Joined: Mon Oct 08, 2007 1:26 am
Location: France, Paris area

Re: Accessing macro code for dialog GUI

Post by B Marcelly »

Hi,
PairOdachs wrote:Once I create a dialog in the Dialog Editor, how can I access the underlying code?
You can't. The settings of the dialog editor are stored in a *.xdl file, example Dialog1.xdl. This xml file is read and interpreted by the routine CreateUnoDialog.
Bernard

OpenOffice.org 1.1.5 / Apache OpenOffice 4.1.1 / LibreOffice 5.0.5
MS-Windows 7 Home SP1
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Accessing macro code for dialog GUI

Post by RoryOF »

You can try opening it with a plain text editor; if it opens, manipulation will require detailed knowledge of XML.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
PairOdachs
Posts: 31
Joined: Mon Aug 11, 2008 1:10 pm

Re: Accessing macro code for dialog GUI

Post by PairOdachs »

Well that's depressing. :cry I had figured out how to access the xdl, but didn't want to have to manually convert the XML to Basic, and it seems like such a simple and useful development feature that assumed it must be there. :(
OOo 3.4.1 on Mac OS X 10.6.8
User avatar
jza
Posts: 239
Joined: Mon Nov 03, 2008 11:33 am
Location: Cancún, Mexico

Re: [Solved] Accessing macro code for dialog GUI

Post by jza »

You could make the XML gui like, in a similar fashion that Eclipse do with the XML manipulations.

Basically you pass from XML to a table where users can assign or choose different values. Example, width, height, position on the screen, etc.
That said, AOO already do this on the control dialog. So you will basically be cloning the functionality.
Image
AOO 4.1.1 on Arch Linux
Post Reply