uno::Reference<frame::XDispatch> xDisp = xDispatchProvider->queryDispatch(aCommandURL, OUString(), 0); if (!xDisp.is()) returnfalse;
// And do the work... if (rListener.is())
{
uno::Reference<frame::XNotifyingDispatch> xNotifyingDisp(xDisp, uno::UNO_QUERY); if (xNotifyingDisp.is())
{
xNotifyingDisp->dispatchWithNotification(aCommandURL, rArguments, rListener); returntrue;
}
}
xDisp->dispatch(aCommandURL, rArguments);
returntrue;
}
bool dispatchCommand(const OUString& rCommand, const css::uno::Sequence<css::beans::PropertyValue>& rArguments, const uno::Reference<css::frame::XDispatchResultListener>& rListener)
{ // Target where we will execute the .uno: command const uno::Reference<uno::XComponentContext>& xContext = ::comphelper::getProcessComponentContext();
uno::Reference<frame::XDesktop2> xDesktop = frame::Desktop::create(xContext);
uno::Reference<frame::XFrame> xFrame(xDesktop->getActiveFrame()); if (!xFrame.is())
xFrame = xDesktop;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.