summaryrefslogtreecommitdiff
path: root/io/source/stm
diff options
context:
space:
mode:
Diffstat (limited to 'io/source/stm')
-rw-r--r--io/source/stm/odata.cxx108
-rw-r--r--io/source/stm/omark.cxx60
-rw-r--r--io/source/stm/opipe.cxx32
-rw-r--r--io/source/stm/opump.cxx24
4 files changed, 53 insertions, 171 deletions
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx
index 3e802b2d37a5..ed543ab3c795 100644
--- a/io/source/stm/odata.cxx
+++ b/io/source/stm/odata.cxx
@@ -45,8 +45,6 @@ using namespace ::com::sun::star::io;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-#include <services.hxx>
-
namespace io_stm {
namespace {
@@ -392,7 +390,7 @@ Reference < XConnectable > ODataInputStream::getPredecessor()
// XServiceInfo
OUString ODataInputStream::getImplementationName()
{
- return ODataInputStream_getImplementationName();
+ return "com.sun.star.comp.io.stm.DataInputStream";
}
// XServiceInfo
@@ -404,32 +402,14 @@ sal_Bool ODataInputStream::supportsService(const OUString& ServiceName)
// XServiceInfo
Sequence< OUString > ODataInputStream::getSupportedServiceNames()
{
- return ODataInputStream_getSupportedServiceNames();
+ return { "com.sun.star.io.DataInputStream" };
}
-/***
-*
-* registration information
-*
-*
-****/
-
-Reference< XInterface > ODataInputStream_CreateInstance(
- SAL_UNUSED_PARAMETER const Reference < XComponentContext > & )
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+io_ODataInputStream_get_implementation(
+ css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
{
- ODataInputStream *p = new ODataInputStream;
- return Reference< XInterface > ( static_cast<OWeakObject *>(p) );
-}
-
-OUString ODataInputStream_getImplementationName()
-{
- return "com.sun.star.comp.io.stm.DataInputStream";
-}
-
-Sequence<OUString> ODataInputStream_getSupportedServiceNames()
-{
- Sequence<OUString> aRet { "com.sun.star.io.DataInputStream" };
- return aRet;
+ return cppu::acquire(new ODataInputStream());
}
namespace {
@@ -704,7 +684,7 @@ Reference < XConnectable > ODataOutputStream::getPredecessor()
// XServiceInfo
OUString ODataOutputStream::getImplementationName()
{
- return ODataOutputStream_getImplementationName();
+ return "com.sun.star.comp.io.stm.DataOutputStream";
}
// XServiceInfo
@@ -716,27 +696,14 @@ sal_Bool ODataOutputStream::supportsService(const OUString& ServiceName)
// XServiceInfo
Sequence< OUString > ODataOutputStream::getSupportedServiceNames()
{
- return ODataOutputStream_getSupportedServiceNames();
+ return { "com.sun.star.io.DataOutputStream" };
}
-Reference< XInterface > ODataOutputStream_CreateInstance(
- SAL_UNUSED_PARAMETER const Reference < XComponentContext > & )
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+io_ODataOutputStream_get_implementation(
+ css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
{
- ODataOutputStream *p = new ODataOutputStream;
- Reference< XInterface > xService = *p;
- return xService;
-}
-
-
-OUString ODataOutputStream_getImplementationName()
-{
- return "com.sun.star.comp.io.stm.DataOutputStream";
-}
-
-Sequence<OUString> ODataOutputStream_getSupportedServiceNames()
-{
- Sequence<OUString> aRet { "com.sun.star.io.DataOutputStream" };
- return aRet;
+ return cppu::acquire(new ODataOutputStream());
}
namespace {
@@ -974,29 +941,10 @@ sal_Int32 OObjectOutputStream::offsetToMark(sal_Int32 nMark)
return m_rMarkable->offsetToMark( nMark );
}
-
-Reference< XInterface > OObjectOutputStream_CreateInstance(
- SAL_UNUSED_PARAMETER const Reference < XComponentContext > & )
-{
- OObjectOutputStream *p = new OObjectOutputStream;
- return Reference< XInterface > ( static_cast< OWeakObject * >(p) );
-}
-
-OUString OObjectOutputStream_getImplementationName()
-{
- return "com.sun.star.comp.io.stm.ObjectOutputStream";
-}
-
-Sequence<OUString> OObjectOutputStream_getSupportedServiceNames()
-{
- Sequence<OUString> aRet { "com.sun.star.io.ObjectOutputStream" };
- return aRet;
-}
-
// XServiceInfo
OUString OObjectOutputStream::getImplementationName()
{
- return OObjectOutputStream_getImplementationName();
+ return "com.sun.star.comp.io.stm.ObjectOutputStream";
}
// XServiceInfo
@@ -1008,7 +956,14 @@ sal_Bool OObjectOutputStream::supportsService(const OUString& ServiceName)
// XServiceInfo
Sequence< OUString > OObjectOutputStream::getSupportedServiceNames()
{
- return OObjectOutputStream_getSupportedServiceNames();
+ return { "com.sun.star.io.ObjectOutputStream" };
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+io_OObjectOutputStream_get_implementation(
+ css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
+{
+ return cppu::acquire(new OObjectOutputStream());
}
namespace {
@@ -1247,7 +1202,7 @@ sal_Int32 OObjectInputStream::offsetToMark(sal_Int32 nMark)
// XServiceInfo
OUString OObjectInputStream::getImplementationName()
{
- return OObjectInputStream_getImplementationName();
+ return "com.sun.star.comp.io.stm.ObjectInputStream";
}
// XServiceInfo
@@ -1259,26 +1214,17 @@ sal_Bool OObjectInputStream::supportsService(const OUString& ServiceName)
// XServiceInfo
Sequence< OUString > OObjectInputStream::getSupportedServiceNames()
{
- return OObjectInputStream_getSupportedServiceNames();
-}
-
-Reference< XInterface > OObjectInputStream_CreateInstance( const Reference < XComponentContext > & rCtx )
-{
- OObjectInputStream *p = new OObjectInputStream( rCtx );
- return Reference< XInterface> ( static_cast< OWeakObject * >(p) );
+ return { "com.sun.star.io.ObjectInputStream" };
}
-OUString OObjectInputStream_getImplementationName()
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+io_OObjectInputStream_get_implementation(
+ css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
{
- return "com.sun.star.comp.io.stm.ObjectInputStream";
+ return cppu::acquire(new OObjectInputStream(context));
}
-Sequence<OUString> OObjectInputStream_getSupportedServiceNames()
-{
- Sequence<OUString> aRet { "com.sun.star.io.ObjectInputStream" };
- return aRet;
}
-}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx
index 0c7a821423f4..411f6412c830 100644
--- a/io/source/stm/omark.cxx
+++ b/io/source/stm/omark.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/io/XConnectable.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/implbase.hxx>
@@ -47,7 +48,6 @@ using namespace ::com::sun::star::io;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
-#include <services.hxx>
#include "streamhelper.hxx"
namespace io_stm {
@@ -345,7 +345,7 @@ void OMarkableOutputStream::checkMarksAndFlush()
// XServiceInfo
OUString OMarkableOutputStream::getImplementationName()
{
- return OMarkableOutputStream_getImplementationName();
+ return "com.sun.star.comp.io.stm.MarkableOutputStream";
}
// XServiceInfo
@@ -357,32 +357,14 @@ sal_Bool OMarkableOutputStream::supportsService(const OUString& ServiceName)
// XServiceInfo
Sequence< OUString > OMarkableOutputStream::getSupportedServiceNames()
{
- return OMarkableOutputStream_getSupportedServiceNames();
-}
-
-/*------------------------
-*
-* external binding
-*
-*------------------------*/
-Reference< XInterface > OMarkableOutputStream_CreateInstance(
- SAL_UNUSED_PARAMETER const Reference < XComponentContext > & )
-{
- OMarkableOutputStream *p = new OMarkableOutputStream( );
-
- return Reference < XInterface > ( static_cast<OWeakObject *>(p) );
-}
-
-OUString OMarkableOutputStream_getImplementationName()
-{
- return "com.sun.star.comp.io.stm.MarkableOutputStream";
+ return { "com.sun.star.io.MarkableOutputStream" };
}
-Sequence<OUString> OMarkableOutputStream_getSupportedServiceNames()
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+io_OMarkableOutputStream_get_implementation(
+ css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
{
- Sequence<OUString> aRet { "com.sun.star.io.MarkableOutputStream" };
-
- return aRet;
+ return cppu::acquire(new OMarkableOutputStream());
}
@@ -758,7 +740,7 @@ void OMarkableInputStream::checkMarksAndFlush()
// XServiceInfo
OUString OMarkableInputStream::getImplementationName()
{
- return OMarkableInputStream_getImplementationName();
+ return "com.sun.star.comp.io.stm.MarkableInputStream";
}
// XServiceInfo
@@ -770,30 +752,14 @@ sal_Bool OMarkableInputStream::supportsService(const OUString& ServiceName)
// XServiceInfo
Sequence< OUString > OMarkableInputStream::getSupportedServiceNames()
{
- return OMarkableInputStream_getSupportedServiceNames();
-}
-
-/*------------------------
-*
-* external binding
-*
-*------------------------*/
-Reference < XInterface > OMarkableInputStream_CreateInstance(
- SAL_UNUSED_PARAMETER const Reference < XComponentContext > & )
-{
- OMarkableInputStream *p = new OMarkableInputStream( );
- return Reference< XInterface > ( static_cast<OWeakObject *>(p) );
-}
-
-OUString OMarkableInputStream_getImplementationName()
-{
- return "com.sun.star.comp.io.stm.MarkableInputStream";
+ return { "com.sun.star.io.MarkableInputStream" };
}
-Sequence<OUString> OMarkableInputStream_getSupportedServiceNames()
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+io_OMarkableInputStream_get_implementation(
+ css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
{
- Sequence<OUString> aRet { "com.sun.star.io.MarkableInputStream" };
- return aRet;
+ return cppu::acquire(new OMarkableInputStream());
}
}
diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx
index 07331472d5e5..732daafecaed 100644
--- a/io/source/stm/opipe.cxx
+++ b/io/source/stm/opipe.cxx
@@ -42,7 +42,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::io;
using namespace ::com::sun::star::lang;
-#include <services.hxx>
#include "streamhelper.hxx"
namespace com::sun::star::uno { class XComponentContext; }
@@ -334,7 +333,7 @@ Reference < XConnectable > OPipeImpl::getPredecessor()
// XServiceInfo
OUString OPipeImpl::getImplementationName()
{
- return OPipeImpl_getImplementationName();
+ return IMPLEMENTATION_NAME;
}
// XServiceInfo
@@ -346,35 +345,16 @@ sal_Bool OPipeImpl::supportsService(const OUString& ServiceName)
// XServiceInfo
Sequence< OUString > OPipeImpl::getSupportedServiceNames()
{
- return OPipeImpl_getSupportedServiceNames();
-}
-
-/* implementation functions
-*
-*
-*/
-
-
-Reference < XInterface > OPipeImpl_CreateInstance(
- SAL_UNUSED_PARAMETER const Reference < XComponentContext > & )
-{
- OPipeImpl *p = new OPipeImpl;
-
- return Reference < XInterface > ( static_cast< OWeakObject * >(p) );
+ return { "com.sun.star.io.Pipe" };
}
-
-OUString OPipeImpl_getImplementationName()
-{
- return IMPLEMENTATION_NAME;
}
-Sequence<OUString> OPipeImpl_getSupportedServiceNames()
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+io_OPipeImpl_get_implementation(
+ css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
{
- Sequence<OUString> aRet { "com.sun.star.io.Pipe" };
- return aRet;
-}
+ return cppu::acquire(new io_stm::OPipeImpl());
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx
index cba66d3c50fc..b63f1a3a4895 100644
--- a/io/source/stm/opump.cxx
+++ b/io/source/stm/opump.cxx
@@ -27,6 +27,7 @@
#include <com/sun/star/io/XActiveDataControl.hpp>
#include <com/sun/star/io/XConnectable.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/interfacecontainer.hxx>
@@ -42,8 +43,6 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::io;
-#include <services.hxx>
-
namespace io_stm {
namespace {
@@ -421,7 +420,7 @@ Reference< XOutputStream > Pump::getOutputStream()
// XServiceInfo
OUString Pump::getImplementationName()
{
- return OPumpImpl_getImplementationName();
+ return "com.sun.star.comp.io.Pump";
}
// XServiceInfo
@@ -433,26 +432,17 @@ sal_Bool Pump::supportsService(const OUString& ServiceName)
// XServiceInfo
Sequence< OUString > Pump::getSupportedServiceNames()
{
- return OPumpImpl_getSupportedServiceNames();
+ return { "com.sun.star.io.Pump" };
}
-
-Reference< XInterface > OPumpImpl_CreateInstance(
- SAL_UNUSED_PARAMETER const Reference< XComponentContext > & )
-{
- return Reference< XInterface >( *new Pump );
}
-OUString OPumpImpl_getImplementationName()
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+io_Pump_get_implementation(
+ css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
{
- return "com.sun.star.comp.io.Pump";
+ return cppu::acquire(new io_stm::Pump());
}
-Sequence<OUString> OPumpImpl_getSupportedServiceNames()
-{
- return Sequence< OUString > { "com.sun.star.io.Pump" };
-}
-
-}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */