summaryrefslogtreecommitdiff
path: root/stoc/source/typeconv/convert.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-02-19 21:21:41 +0100
committerJan Holesovsky <kendy@collabora.com>2015-02-20 10:19:10 +0100
commite1879e6a377fba9ec0f21554de16be8a983553da (patch)
tree13c814f3105b7777250868eb7505df89eed496de /stoc/source/typeconv/convert.cxx
parent17984250e94a04f7989dbe42a5cf5353e3e2b076 (diff)
stocservices.component: The rest of the services + cleanup.
Change-Id: I5156318afde0f56cf3eb8d1c74c6db8d5e378600
Diffstat (limited to 'stoc/source/typeconv/convert.cxx')
-rw-r--r--stoc/source/typeconv/convert.cxx38
1 files changed, 9 insertions, 29 deletions
diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx
index 544243b2540d..5c7586794c43 100644
--- a/stoc/source/typeconv/convert.cxx
+++ b/stoc/source/typeconv/convert.cxx
@@ -42,8 +42,6 @@
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <stocservices.hxx>
-
using namespace css::uno;
using namespace css::lang;
using namespace css::script;
@@ -51,23 +49,6 @@ using namespace css::registry;
using namespace cppu;
using namespace osl;
-#define IMPLNAME "com.sun.star.comp.stoc.TypeConverter"
-
-namespace stoc_services
-{
-Sequence< OUString > tcv_getSupportedServiceNames()
-{
- Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = "com.sun.star.script.Converter";
- return seqNames;
-}
-
-OUString tcv_getImplementationName()
-{
- return OUString(IMPLNAME);
-}
-}
-
namespace stoc_tcv
{
@@ -290,7 +271,7 @@ TypeConverter_Impl::~TypeConverter_Impl() {}
// XServiceInfo
OUString TypeConverter_Impl::getImplementationName() throw( RuntimeException, std::exception )
{
- return stoc_services::tcv_getImplementationName();
+ return OUString("com.sun.star.comp.stoc.TypeConverter");
}
// XServiceInfo
@@ -302,7 +283,9 @@ sal_Bool TypeConverter_Impl::supportsService(const OUString& ServiceName) throw(
// XServiceInfo
Sequence< OUString > TypeConverter_Impl::getSupportedServiceNames(void) throw( RuntimeException, std::exception )
{
- return stoc_services::tcv_getSupportedServiceNames();
+ Sequence< OUString > seqNames(1);
+ seqNames.getArray()[0] = "com.sun.star.script.Converter";
+ return seqNames;
}
@@ -908,17 +891,14 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina
"conversion not possible!",
Reference< XInterface >(), aDestinationClass, FailReason::INVALID, 0 );
}
-}
-namespace stoc_services
-{
+}
-Reference< XInterface > SAL_CALL TypeConverter_Impl_CreateInstance(
- SAL_UNUSED_PARAMETER const Reference< XComponentContext > & )
- throw( RuntimeException )
+extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
+com_sun_star_comp_stoc_TypeConverter_get_implementation(::com::sun::star::uno::XComponentContext*,
+ ::com::sun::star::uno::Sequence<css::uno::Any> const &)
{
- return (OWeakObject *) new stoc_tcv::TypeConverter_Impl();
-}
+ return ::cppu::acquire(new stoc_tcv::TypeConverter_Impl());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */