diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2016-09-07 20:10:26 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2016-10-13 20:26:24 +0200 |
commit | 22b0c09f8463b9c6cceb9e2c3addcab79d42aa0b (patch) | |
tree | cfb7d6401c2c0d77c9949cb4bf4281b4301c4ef7 /uui/source/requeststringresolver.cxx | |
parent | 3b6f7f38100c9c9d799756ffddbf281bf49364f4 (diff) |
tdf#74608: Ctor function for css.comp.uui.UUIInteractionRequestStringResolver
Change-Id: I42c0c2cc8797647aa9dd676034137a1430e42fee
Diffstat (limited to 'uui/source/requeststringresolver.cxx')
-rw-r--r-- | uui/source/requeststringresolver.cxx | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/uui/source/requeststringresolver.cxx b/uui/source/requeststringresolver.cxx index d2ed7dc9b7c9..b63b0358f988 100644 --- a/uui/source/requeststringresolver.cxx +++ b/uui/source/requeststringresolver.cxx @@ -19,7 +19,6 @@ #include "requeststringresolver.hxx" #include "iahndl.hxx" -#include <comphelper/processfactory.hxx> #include <cppuhelper/supportsservice.hxx> using namespace css; @@ -39,7 +38,7 @@ OUString SAL_CALL UUIInteractionRequestStringResolver::getImplementationName() throw (uno::RuntimeException, std::exception) { - return OUString::createFromAscii(m_aImplementationName); + return OUString("com.sun.star.comp.uui.UUIInteractionRequestStringResolver"); } sal_Bool SAL_CALL @@ -50,11 +49,12 @@ UUIInteractionRequestStringResolver::supportsService( return cppu::supportsService(this, rServiceName); } + uno::Sequence< OUString > SAL_CALL UUIInteractionRequestStringResolver::getSupportedServiceNames() throw (uno::RuntimeException, std::exception) { - return getSupportedServiceNames_static(); + return { "com.sun.star.task.InteractionRequestStringResolver" }; } beans::Optional< OUString > SAL_CALL @@ -73,29 +73,12 @@ UUIInteractionRequestStringResolver::getStringFromInformationalRequest( } } -char const UUIInteractionRequestStringResolver::m_aImplementationName[] - = "com.sun.star.comp.uui.UUIInteractionRequestStringResolver"; - -uno::Sequence< OUString > -UUIInteractionRequestStringResolver::getSupportedServiceNames_static() -{ - uno::Sequence< OUString > aNames { "com.sun.star.task.InteractionRequestStringResolver" }; - return aNames; -} - -uno::Reference< uno::XInterface > SAL_CALL -UUIInteractionRequestStringResolver::createInstance( - uno::Reference< lang::XMultiServiceFactory > const & - rServiceFactory) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_comp_uui_UUIInteractionRequestStringResolver_get_implementation( + css::uno::XComponentContext *context, + css::uno::Sequence<css::uno::Any> const &) { - try - { - return *new UUIInteractionRequestStringResolver(comphelper::getComponentContext(rServiceFactory)); - } - catch (std::bad_alloc const &) - { - throw uno::RuntimeException("out of memory", nullptr); - } + return cppu::acquire(new UUIInteractionRequestStringResolver(context)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |