tdf#74608 Constructor function for SequenceInputStreamService

Added ctor funtion for SequenceInputStream(Service) in comphelper.

Change-Id: I043e46aa283709f316e7ad794e15438f6b2d955f
Reviewed-on: https://gerrit.libreoffice.org/23564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Steven Guo 2016-03-27 23:56:20 -07:00 committed by Stephan Bergmann
parent 21fb7dd464
commit e81ad8c8ed
4 changed files with 8 additions and 27 deletions

View File

@ -24,7 +24,6 @@
void createRegistryInfo_Map(); void createRegistryInfo_Map();
void createRegistryInfo_OPropertyBag(); void createRegistryInfo_OPropertyBag();
void createRegistryInfo_SequenceInputStream();
void createRegistryInfo_SequenceOutputStream(); void createRegistryInfo_SequenceOutputStream();
void createRegistryInfo_UNOMemoryStream(); void createRegistryInfo_UNOMemoryStream();

View File

@ -36,7 +36,6 @@ namespace comphelper { namespace module
{ {
createRegistryInfo_OPropertyBag(); createRegistryInfo_OPropertyBag();
createRegistryInfo_SequenceOutputStream(); createRegistryInfo_SequenceOutputStream();
createRegistryInfo_SequenceInputStream();
createRegistryInfo_UNOMemoryStream(); createRegistryInfo_UNOMemoryStream();
createRegistryInfo_Map(); createRegistryInfo_Map();
} }

View File

@ -55,11 +55,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString & ServiceName ) throw ( uno::RuntimeException, std::exception ) override; virtual sal_Bool SAL_CALL supportsService( const OUString & ServiceName ) throw ( uno::RuntimeException, std::exception ) override;
virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw ( uno::RuntimeException, std::exception ) override; virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw ( uno::RuntimeException, std::exception ) override;
// XServiceInfo - static versions (used for component registration)
static OUString SAL_CALL getImplementationName_static();
static uno::Sequence< OUString > SAL_CALL getSupportedServiceNames_static();
static uno::Reference< uno::XInterface > SAL_CALL Create( const uno::Reference< uno::XComponentContext >& );
// css::io::XInputStream: // css::io::XInputStream:
virtual ::sal_Int32 SAL_CALL readBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) override; virtual ::sal_Int32 SAL_CALL readBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) override;
virtual ::sal_Int32 SAL_CALL readSomeBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nMaxBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) override; virtual ::sal_Int32 SAL_CALL readSomeBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nMaxBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) override;
@ -91,11 +86,6 @@ SequenceInputStreamService::SequenceInputStreamService()
// com.sun.star.uno.XServiceInfo: // com.sun.star.uno.XServiceInfo:
OUString SAL_CALL SequenceInputStreamService::getImplementationName() throw ( uno::RuntimeException, std::exception ) OUString SAL_CALL SequenceInputStreamService::getImplementationName() throw ( uno::RuntimeException, std::exception )
{
return getImplementationName_static();
}
OUString SAL_CALL SequenceInputStreamService::getImplementationName_static()
{ {
return OUString ( "com.sun.star.comp.SequenceInputStreamService" ); return OUString ( "com.sun.star.comp.SequenceInputStreamService" );
} }
@ -106,22 +96,11 @@ sal_Bool SAL_CALL SequenceInputStreamService::supportsService( OUString const &
} }
uno::Sequence< OUString > SAL_CALL SequenceInputStreamService::getSupportedServiceNames() throw ( uno::RuntimeException, std::exception ) uno::Sequence< OUString > SAL_CALL SequenceInputStreamService::getSupportedServiceNames() throw ( uno::RuntimeException, std::exception )
{
return getSupportedServiceNames_static();
}
uno::Sequence< OUString > SAL_CALL SequenceInputStreamService::getSupportedServiceNames_static()
{ {
uno::Sequence<OUString> s { "com.sun.star.io.SequenceInputStream" }; uno::Sequence<OUString> s { "com.sun.star.io.SequenceInputStream" };
return s; return s;
} }
uno::Reference< uno::XInterface > SAL_CALL SequenceInputStreamService::Create(
SAL_UNUSED_PARAMETER const uno::Reference< uno::XComponentContext >& )
{
return static_cast< ::cppu::OWeakObject * >( new SequenceInputStreamService() );
}
// css::io::XInputStream: // css::io::XInputStream:
::sal_Int32 SAL_CALL SequenceInputStreamService::readBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception ) ::sal_Int32 SAL_CALL SequenceInputStreamService::readBytes( uno::Sequence< ::sal_Int8 > & aData, ::sal_Int32 nBytesToRead ) throw ( uno::RuntimeException, io::NotConnectedException, io::BufferSizeExceededException, io::IOException, std::exception )
{ {
@ -229,9 +208,12 @@ void SAL_CALL SequenceInputStreamService::initialize( const uno::Sequence< css::
} // anonymous namespace } // anonymous namespace
void createRegistryInfo_SequenceInputStream() extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
com_sun_star_comp_SequenceInputStreamService(
css::uno::XComponentContext *,
css::uno::Sequence<css::uno::Any> const &)
{ {
static ::comphelper::module::OAutoRegistration< SequenceInputStreamService > aAutoRegistration; return cppu::acquire(new SequenceInputStreamService());
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@ -34,7 +34,8 @@
<implementation name="com.sun.star.comp.MemoryStream"> <implementation name="com.sun.star.comp.MemoryStream">
<service name="com.sun.star.comp.MemoryStream"/> <service name="com.sun.star.comp.MemoryStream"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.SequenceInputStreamService"> <implementation name="com.sun.star.comp.SequenceInputStreamService"
constructor="com_sun_star_comp_SequenceInputStreamService">
<service name="com.sun.star.io.SequenceInputStream"/> <service name="com.sun.star.io.SequenceInputStream"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.SequenceOutputStreamService"> <implementation name="com.sun.star.comp.SequenceOutputStreamService">