Open web page from dialog
Jan Rheinländer
jrheinlaender at gmx.de
Sun Jun 12 19:24:07 UTC 2016
Thanks everybody. This is how it works now:
Reference< XControl > xDialogControl(xDialog, UNO_QUERY_THROW);
Reference< XMultiServiceFactory >
xControlFactory(xDialogControl->getModel(), UNO_QUERY_THROW);
Reference< XPropertySet >
xPSLinkHelp(xControlFactory->createInstance("com.sun.star.awt.UnoControlFixedHyperlinkModel"),
UNO_QUERY_THROW);
xPSLinkHelp->setPropertyValue("PositionX", makeAny(142));
xPSLinkHelp->setPropertyValue("PositionY", makeAny(116));
xPSLinkHelp->setPropertyValue("Width", makeAny(45));
xPSLinkHelp->setPropertyValue("Height", makeAny(15));
xPSLinkHelp->setPropertyValue("Name", makeAny(OU("button_help")));
xPSLinkHelp->setPropertyValue("TabIndex", makeAny(short(7)));
xPSLinkHelp->setPropertyValue("Label", makeAny(OU("Open wiki site")));
xPSLinkHelp->setPropertyValue("URL",
makeAny(OU("http://ooo-imath.sourceforge.net/wiki/index.php/Main_Page")));
Reference< XNameContainer >
xDialogContainer(xDialogControl->getModel(), UNO_QUERY_THROW);
Reference< XControlModel > xLinkHelp(xPSLinkHelp, UNO_QUERY_THROW);
xDialogContainer->insertByName(OU("button_help"), makeAny(xLinkHelp));
Jan
More information about the LibreOffice
mailing list