Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Hi Fernand,

thank you for the tip with UnoControlFixedHyperlinkModel. Now this is
what I have:

Reference<XDialog> xDialog; // Created from XDialogProvider somewhere
earlier in the code

First question: How do I get a MultiServiceFactory from XDialog to
create the control? If I use the MultiComponentFactory the properties
like "PositionX" etc. are not present

Now assuming I get this MultiServiceFactory from somewhere:

Reference< XPropertySet >
xPSHyperlink(xMultiServiceFactory->createInstanceWithContext("com.sun.star.awt.UnoControlFixedHyperlinkModel",
xCC), UNO_QUERY_THROW);
xPSHyperlink->setPropertyValue("PositionX", makeAny(50));
xPSHyperlink->setPropertyValue("PositionY", makeAny(30));
xPSHyperlink->setPropertyValue("Width", makeAny(50));
xPSHyperlink->setPropertyValue("Height", makeAny(14));
xPSHyperlink->setPropertyValue("Label", makeAny(OU("Help")));
xPSHyperlink->setPropertyValue("URL",
makeAny(OU("http://ooo-imath.sourceforge.net/wiki/index.php/Main_Page";)));

Second question: How do I get a XControl from the
UnoControlFixedHyperlinkModel  to add to the ControlContainer?

Reference< XControlContainer > xControlContainer(xDialog, UNO_QUERY_THROW);
xControlContainer->addControl(OU("button_help"), xHyperlinkControl);

I have looked all over the UNO API but am not getting anywhere.

Thanks,
Jan

oDialogModel.createInstance( 
"com.sun.star.awt.UnoControlFixedHyperlinkModel")

On Jun 11, 2016, at 3:24 PM, "Jan Rheinländer" <jrheinlaender@gmx.de
<mailto:jrheinlaender@gmx.de>> wrote:

    Hi,

    is it possible to open a website in the user's preferred browser from a
    dialog (or from a Basic macro, or through the UNO API)?

    I see that the "Help" - "About" dialog does this, but it is defined in
    the source in Glade format, different to the Basic dialogs.

    Thanks for any ideas!

    Jan

    ------------------------------------------------------------------------

    LibreOffice mailing list
    LibreOffice@lists.freedesktop.org
    https://lists.freedesktop.org/mailman/listinfo/libreoffice


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.