28#include <com/sun/star/frame/XDispatchProvider.hpp>
29#include <com/sun/star/frame/XFrame.hpp>
30#include <com/sun/star/util/URLTransformer.hpp>
31#include <com/sun/star/frame/ModuleManager.hpp>
32#include <com/sun/star/graphic/GraphicProvider.hpp>
35using namespace css::uno;
40 const OUString& rsImageURL,
41 const OUString& rsHighContrastImageURL,
42 const Reference<frame::XFrame>& rxFrame)
45 return GetImage(rsHighContrastImageURL, rxFrame);
47 return GetImage(rsImageURL, rxFrame);
51 const OUString& rsURL,
52 const Reference<frame::XFrame>& rxFrame)
54 if (rsURL.getLength() > 0)
56 if (rsURL.startsWith(
".uno:"))
61 Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext());
62 Reference<graphic::XGraphicProvider> xProvider(graphic::GraphicProvider::create(xContext));
64 aMediaProperties.
put(
"URL", rsURL);
74 aURL.Complete = rsCommand;
76 const Reference<XComponentContext> xComponentContext (::comphelper::getProcessComponentContext());
77 const Reference<util::XURLTransformer> xParser = util::URLTransformer::create( xComponentContext );
78 xParser->parseStrict(
aURL);
84 const css::uno::Reference<css::frame::XFrame>& rxFrame,
85 const util::URL& rURL)
87 Reference<frame::XDispatchProvider> xProvider (rxFrame, UNO_QUERY_THROW);
88 Reference<frame::XDispatch>
xDispatch (xProvider->queryDispatch(rURL, OUString(), 0));
93 const css::uno::Reference<css::frame::XController>& rxController)
95 if (!rxController.is())
100 const Reference<XComponentContext> xComponentContext (::comphelper::getProcessComponentContext());
101 const Reference<frame::XModuleManager> xModuleManager = frame::ModuleManager::create( xComponentContext );
102 return xModuleManager->identify(rxController);
bool put(const OUString &_rValueName, const VALUE_TYPE &_rValue)
css::uno::Sequence< css::beans::PropertyValue > getPropertyValues() const
Reference< XDispatch > xDispatch
Reference< graphic::XGraphic > GetXGraphicForCommand(const OUString &rsCommandName, const Reference< frame::XFrame > &rxFrame, vcl::ImageType eImageType)