summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-09-09 17:06:55 +0200
committerStephan Bergmann <sbergman@redhat.com>2011-09-09 17:46:39 +0200
commit16ffd2fd242b1c98cbafedb1015107713957c2e9 (patch)
tree40d065efaeb12cedc72d12865877ab9ec8e12a93 /io
parent7275be15191c08009ac9c359163e3eeb1be25ca7 (diff)
sb140: #i117292# use ImplInheritanceHelper
Diffstat (limited to 'io')
-rw-r--r--io/source/TextInputStream/TextInputStream.cxx1
-rw-r--r--io/source/TextOutputStream/TextOutputStream.cxx2
-rw-r--r--io/source/connector/connector.cxx1
-rw-r--r--io/source/stm/odata.cxx141
4 files changed, 5 insertions, 140 deletions
diff --git a/io/source/TextInputStream/TextInputStream.cxx b/io/source/TextInputStream/TextInputStream.cxx
index dc2b5744a7fc..4d8f931d5db1 100644
--- a/io/source/TextInputStream/TextInputStream.cxx
+++ b/io/source/TextInputStream/TextInputStream.cxx
@@ -31,7 +31,6 @@
#include <string.h>
-#include <osl/mutex.hxx>
#include <osl/diagnose.h>
#include <rtl/unload.h>
diff --git a/io/source/TextOutputStream/TextOutputStream.cxx b/io/source/TextOutputStream/TextOutputStream.cxx
index bd4325ab11f2..5952601dd140 100644
--- a/io/source/TextOutputStream/TextOutputStream.cxx
+++ b/io/source/TextOutputStream/TextOutputStream.cxx
@@ -29,8 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_io.hxx"
-
-#include <osl/mutex.hxx>
#include <osl/diagnose.h>
#include <uno/mapping.hxx>
diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx
index 38a44eaa066a..04ef6469228a 100644
--- a/io/source/connector/connector.cxx
+++ b/io/source/connector/connector.cxx
@@ -28,7 +28,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_io.hxx"
-#include <osl/mutex.hxx>
#include "osl/security.hxx"
#include <uno/mapping.hxx>
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx
index 338df98b7e7b..a761947dddfe 100644
--- a/io/source/stm/odata.cxx
+++ b/io/source/stm/odata.cxx
@@ -46,11 +46,8 @@
#include <cppuhelper/weak.hxx> // OWeakObject
#include <cppuhelper/factory.hxx>
+#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase4.hxx>
-#include <cppuhelper/typeprovider.hxx>
-#include <cppuhelper/queryinterface.hxx>
-
-#include <osl/mutex.hxx>
#include <string.h>
@@ -962,10 +959,8 @@ typedef boost::unordered_map
*
*
*--------------------------------------------*/
-class OObjectOutputStream :
- public ODataOutputStream,
- public XObjectOutputStream,
- public XMarkableStream
+class OObjectOutputStream: public ImplInheritanceHelper2<
+ ODataOutputStream, XObjectOutputStream, XMarkableStream >
{
public:
OObjectOutputStream()
@@ -978,11 +973,6 @@ public:
~OObjectOutputStream();
public:
- Any SAL_CALL queryInterface( const Type &type ) throw (::com::sun::star::uno::RuntimeException);
- void SAL_CALL acquire() throw() { ODataOutputStream::acquire(); }
- void SAL_CALL release() throw() { ODataOutputStream::release(); }
-
-public:
// XOutputStream
virtual void SAL_CALL writeBytes(const Sequence< sal_Int8 >& aData)
throw ( NotConnectedException,
@@ -1034,12 +1024,6 @@ public: // XMarkableStream
virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark)
throw (IOException, IllegalArgumentException, RuntimeException);
-public: //XTypeProvider
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
- getTypes( ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
- getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
-
public: // XServiceInfo
OUString SAL_CALL getImplementationName() throw ();
Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw ();
@@ -1059,20 +1043,6 @@ OObjectOutputStream::~OObjectOutputStream()
g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
}
-Any OObjectOutputStream::queryInterface( const Type &aType ) throw (::com::sun::star::uno::RuntimeException)
-{
- Any a = ::cppu::queryInterface(
- aType ,
- SAL_STATIC_CAST( XMarkableStream * , this ),
- SAL_STATIC_CAST( XObjectOutputStream * , this ) );
- if( a.hasValue() )
- {
- return a;
- }
-
- return ODataOutputStream::queryInterface( aType );
-
-}
void OObjectOutputStream::writeObject( const Reference< XPersistObject > & xPObj ) throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
@@ -1237,40 +1207,6 @@ Sequence<OUString> OObjectOutputStream_getSupportedServiceNames(void)
return aRet;
}
-Sequence< Type > SAL_CALL OObjectOutputStream::getTypes(void) throw( RuntimeException )
-{
- static OTypeCollection *pCollection = 0;
- if( ! pCollection )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pCollection )
- {
- static OTypeCollection collection(
- getCppuType( (Reference< XMarkableStream > * ) 0 ),
- getCppuType( (Reference< XObjectOutputStream > * ) 0 ),
- ODataOutputStream::getTypes() );
- pCollection = &collection;
- }
- }
- return (*pCollection).getTypes();
-}
-
-Sequence< sal_Int8 > SAL_CALL OObjectOutputStream::getImplementationId( ) throw( RuntimeException)
-{
- static OImplementationId *pId = 0;
- if( ! pId )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pId )
- {
- static OImplementationId id( sal_False );
- pId = &id;
- }
- }
- return (*pId).getImplementationId();
-}
-
-
// XServiceInfo
OUString OObjectOutputStream::getImplementationName() throw ()
{
@@ -1296,14 +1232,8 @@ Sequence< OUString > OObjectOutputStream::getSupportedServiceNames(void) throw (
return OObjectOutputStream_getSupportedServiceNames();
}
-
-
-
-
-class OObjectInputStream :
- public ODataInputStream,
- public XObjectInputStream,
- public XMarkableStream
+class OObjectInputStream: public ImplInheritanceHelper2<
+ ODataInputStream, XObjectInputStream, XMarkableStream >
{
public:
OObjectInputStream( const Reference < XComponentContext > &r)
@@ -1315,11 +1245,6 @@ public:
}
~OObjectInputStream();
-public:
- Any SAL_CALL queryInterface( const Type &type ) throw();
- void SAL_CALL acquire() throw() { ODataInputStream::acquire(); }
- void SAL_CALL release() throw() { ODataInputStream::release(); }
-
public: // XInputStream
virtual sal_Int32 SAL_CALL readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead)
throw ( NotConnectedException,
@@ -1381,12 +1306,6 @@ public: // XMarkableStream
virtual sal_Int32 SAL_CALL offsetToMark(sal_Int32 nMark)
throw (IOException, IllegalArgumentException, RuntimeException);
-public: //XTypeProvider
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
- getTypes( ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
- getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
-
public: // XServiceInfo
OUString SAL_CALL getImplementationName() throw ();
Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw ();
@@ -1408,21 +1327,6 @@ OObjectInputStream::~OObjectInputStream()
g_moduleCount.modCnt.release( &g_moduleCount.modCnt );
}
-Any OObjectInputStream::queryInterface( const Type &aType ) throw ()
-{
- Any a = ::cppu::queryInterface(
- aType ,
- SAL_STATIC_CAST( XMarkableStream * , this ),
- SAL_STATIC_CAST( XObjectInputStream * , this ) );
- if( a.hasValue() )
- {
- return a;
- }
-
- return ODataInputStream::queryInterface( aType );
-
-}
-
Reference< XPersistObject > OObjectInputStream::readObject() throw (::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException)
{
// check if chain contains a XMarkableStream
@@ -1578,41 +1482,6 @@ sal_Int32 OObjectInputStream::offsetToMark(sal_Int32 nMark)
return m_rMarkable->offsetToMark( nMark );
}
-
-Sequence< Type > SAL_CALL OObjectInputStream::getTypes(void) throw( RuntimeException )
-{
- static OTypeCollection *pCollection = 0;
- if( ! pCollection )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pCollection )
- {
- static OTypeCollection collection(
- getCppuType( (Reference< XMarkableStream > * ) 0 ),
- getCppuType( (Reference< XObjectInputStream > * ) 0 ),
- ODataInputStream::getTypes() );
- pCollection = &collection;
- }
- }
- return (*pCollection).getTypes();
-}
-
-Sequence< sal_Int8 > SAL_CALL OObjectInputStream::getImplementationId( ) throw( RuntimeException)
-{
- static OImplementationId *pId = 0;
- if( ! pId )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pId )
- {
- static OImplementationId id( sal_False );
- pId = &id;
- }
- }
- return (*pId).getImplementationId();
-}
-
-
// XServiceInfo
OUString OObjectInputStream::getImplementationName() throw ()
{