Oops, sorry. I did it again, I accidentally replied privately rather than
to the list. I'm sorry for that, Robert.
---------- Forwarded message ----------
From: Johnny Rosenberg <email@example.com>
Date: 2017-11-19 23:19 GMT+01:00
Subject: Re: [libreoffice-users] Macro Dim Dialog and Control
To: Robert Großkopf <firstname.lastname@example.org>
2017-11-19 20:00 GMT+01:00 Robert Großkopf <email@example.com>:
This works, but what about oDlg and oCtl? Are there special data types
them too? The documentation I've found so far doesn't give any hints at
all. I tried this:
Dim Dlg As com.sun.star.awt.XDialog ' No error here,
' but next line throws an error:
oDlg = CreateUnoDialog(DialogLibraries.Standard.MyDialogue)
' Error: No access to object.
' Invalid usage of the object.
' Well, something like that, it's actually in Swedish.
What is the name of the dialog? Is ist called "MyDialogue"?.
No, I actually faked it for this mailing list. The real name is in Swedish,
so I figured it would be easier for you guys if I picked an English name
instead, just for this example. But the name isn't the problem anyway. My
question is if there is an ”extended data type” for dialogs and controls,
just like there is for sheets (com.sun.star.sheet.XSpreadsheet) and cells (
com.sun.star.table.XCell). I searched for and while and thought that
com.sun.star.awt.XDialog could be it for dialogs, but as I said, I got that
error message. When I used Object, like you do below, everything worked for
me too, but my question wasn't about getting it working, it was if there is
such a data type. I'm not doing anything particular, I'm just trying to
learn this new stuff about those ”new data types”, that I enable by
selecting Tools → Options… → LibreOffice → Advanced → Activate experimental
features, then restart LibreOffice, then Tools → Options… → LibreOffice →
Basic IDE options → ☒ Use extended data types (give or take some words or
phrases, since this is a translation from Swedish).
When trying to get information I found this page:
However, they only provided two examples of those new data types (the two I
mention above), and there's no link or anything that points to the rest of
them, so it's pretty useless, unfortunately.
appear at the left (catalog of objects - don't konwo if this is the
right name ..) and at the bottom (like the standard "Module1")
Declare the dialog first, out of a sub:
DIM oDialog0 AS OBJECT
Start the dialog:
oDialog0 = createUnoDialog(DialogLibraries.Standard.Dialog0)
Name of the dialog is "Dialog0"
End the dialog:
Yes, that's how I used to do it, and it usually work for me too, but this
wasn't what I asked about. My question is about those new data types,
mentioned on the page I referred to above.
I'm sorry for my confusing English, which obviously isn't my native
Thanks for replying, though! :)
LibreOffice Community: http://robert.familiegrosskopf.de/map_3
To unsubscribe e-mail to: firstname.lastname@example.org
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be