Ask Your Question
1

How to iterate over dialogs

asked 2016-12-04 08:43:58 +0100

owlbrudder gravatar image

I would like to iterate over the dialogs available but I don't know the object models involved. Something of the following style is what I want:

for each dialog library print library.name for each dialog print dialog.name next dialogue next library

Is this even possible?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
2

answered 2016-12-04 12:32:33 +0100

karolus gravatar image

updated 2016-12-04 12:34:39 +0100

Hallo

use mri for introspection!

as a startingpoint:

sub scripts_and_dialogs
    scriptlibs = createUnoService("com.sun.star.script.ApplicationScriptLibraryContainer")
    for each name in scriptlibs.ElementNames
        print name
    next
    dialogs = createUnoService("com.sun.star.script.ApplicationDialogLibraryContainer")
    mri(dialogs)
end sub
edit flag offensive delete link more

Comments

How does one install mri? I went to https://github.com/hanya/MRI/wiki and clicked on Installation and I got: https://github.com/hanya/MRI/wiki/Ins...

It says: "Install MRI extension package using Extension Manager from Tools - Extension Manager entry of main menu bar." So I opened LO and went to Tools | Extension Manager and searched for MRI and click on it. Then it says: "Install Instructions Fill in the install instructions" Hun? lol

EasyTrieve gravatar imageEasyTrieve ( 2016-12-04 19:44:00 +0100 )edit

@EasyTrieve: If the OS is Window$, just right-click the file and the rest will be self-explanatory. I think it'll work that way on Linux too, and pretty sure on OS X.

rautamiekka gravatar imagerautamiekka ( 2016-12-04 20:08:01 +0100 )edit

Thanks but I'm on Linux, and "the rest" is unfortunately not obvious to me.

EasyTrieve gravatar imageEasyTrieve ( 2016-12-04 21:52:50 +0100 )edit

please click on the link in my answer, and look out for the huge Button with the obvious Label Download Extension

karolus gravatar imagekarolus ( 2016-12-04 22:40:12 +0100 )edit

@karolus & @rautamiekka, I appreciate your help. I downloaded this hours ago, before I asked my first question above. So I've got "MRI-1.3.3.oxt"; so what do I do with this file? I'm guessing but not sure if I download and save it. At the moment all of my downloads go to ~/Downloads. ..This brings up an additional question. Why is it that so much of the time with Linux I have to spend so much time trying to figure out how to simply install a download? It almost seems like this is deliberate.???

EasyTrieve gravatar imageEasyTrieve ( 2016-12-05 05:04:38 +0100 )edit

BTW, I just tried opening this downloaded file with Tools - Extension Manager, and it hung my LO.

EasyTrieve gravatar imageEasyTrieve ( 2016-12-05 05:14:30 +0100 )edit

Now if I discard the crashed LO, and restart, and look at the Extension Manager, it shows, "MRI - UNO Object Inspection Tool 1.3.3; [Orange/yellow warming triangular icon with "!"]; Error: The status of this extension is unknown; MRI - UNO Object Inspection Tool Enable | Remove"

EasyTrieve gravatar imageEasyTrieve ( 2016-12-05 05:19:32 +0100 )edit

I also found: https://forum.openoffice.org/en/forum... But when I click Help in Extension Manager it just gives me nonsense: https://help.libreoffice.org/sdatabas...

EasyTrieve gravatar imageEasyTrieve ( 2016-12-05 05:39:47 +0100 )edit

Here are the extension installation instructions: https://www.libreoffice.org/assets/Up... I'll file a documentation bug report to try and get the Help button to point to this.

EasyTrieve gravatar imageEasyTrieve ( 2016-12-05 07:36:30 +0100 )edit

I tried the same file on my computer and LO5.2.2.2 just froze until I terminated it, so that addon is broken for 5.x.

rautamiekka gravatar imagerautamiekka ( 2016-12-05 12:48:54 +0100 )edit
0

answered 2016-12-06 10:07:30 +0100

owlbrudder gravatar image

updated 2016-12-14 09:14:04 +0100

Thank you again Karolus - I have looked at the on-line documentation and it is exactly what I wanted - in fact it is more detailed than I hoped.

Cheers, Doug

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-12-04 08:43:58 +0100

Seen: 121 times

Last updated: Dec 14 '16