23#include <com/sun/star/frame/DispatchResultState.hpp>
24#include <com/sun/star/task/XJobExecutor.hpp>
35 return "com.sun.star.comp.framework.OXTFileHandler";
45 return {
"com.sun.star.frame.ContentHandler" };
92 const css::uno::Sequence< css::beans::PropertyValue >& ,
93 const css::uno::Reference< css::frame::XDispatchResultListener >& xListener )
97 css::uno::Sequence< css::uno::Any > lParams{ css::uno::Any(
aURL.Main) };
99 css::uno::Reference< css::uno::XInterface > xService =
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
"com.sun.star.deployment.ui.PackageManagerDialog", lParams,
m_xContext );
100 css::uno::Reference< css::task::XJobExecutor > xExecutable( xService, css::uno::UNO_QUERY );
101 if ( xExecutable.is() )
102 xExecutable->trigger( OUString() );
104 if ( xListener.is() )
106 css::frame::DispatchResultEvent
aEvent;
107 aEvent.State = css::frame::DispatchResultState::SUCCESS;
108 xListener->dispatchFinished(
aEvent );
113 const css::uno::Sequence< css::beans::PropertyValue >& lArguments )
149 if ( (
nLength > 4 ) && sURL.matchIgnoreAsciiCase(
".oxt",
nLength-4 ) )
156 sTypeName =
"oxt_OpenOffice_Extension";
158 aDescriptor >> lDescriptor;
168extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
170 css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any>
const& )
constexpr OUStringLiteral sServiceName
virtual OUString SAL_CALL detect(css::uno::Sequence< css::beans::PropertyValue > &lDescriptor) override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL dispatchWithNotification(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments, const css::uno::Reference< css::frame::XDispatchResultListener > &xListener) override
Oxt_Handler(css::uno::Reference< css::uno::XComponentContext >)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL dispatch(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments) override
virtual ~Oxt_Handler() override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * framework_Oxt_Handler_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)