Kaydet (Commit) 177fa119 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Eike Rathke

drop XPersistObject support from SvNumberFormatsSupplierService

why should css.util.NumberFormatsSupplier support XPersistObject and need
read/write support ?

Change-Id: I62bc2fa3a0adef6cf5b7006f4e2bf3a9a157043d
Reviewed-on: https://gerrit.libreoffice.org/12281Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarEike Rathke <erack@redhat.com>
üst 3c8330ce
......@@ -63,7 +63,6 @@ Any SAL_CALL SvNumberFormatsSupplierServiceObject::queryAggregation( const Type&
{
Any aReturn = ::cppu::queryInterface(_rType,
static_cast< XInitialization* >(this),
static_cast< XPersistObject* >(this),
static_cast< XServiceInfo* >(this)
);
......@@ -131,34 +130,6 @@ Sequence< OUString > SAL_CALL SvNumberFormatsSupplierServiceObject::getSupported
return aSupported;
}
OUString SAL_CALL SvNumberFormatsSupplierServiceObject::getServiceName( ) throw(RuntimeException, std::exception)
{
return PERSISTENT_SERVICE_NAME;
}
void SAL_CALL SvNumberFormatsSupplierServiceObject::write( const Reference< XObjectOutputStream >& _rxOutStream ) throw(IOException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( getSharedMutex() );
implEnsureFormatter();
Reference< XOutputStream > xStream(_rxOutStream.get());
SvLockBytesRef aLockBytes = new SvOutputStreamOpenLockBytes(xStream);
SvStream aSvOutputSteam(aLockBytes);
m_pOwnFormatter->Save(aSvOutputSteam);
}
void SAL_CALL SvNumberFormatsSupplierServiceObject::read( const Reference< XObjectInputStream >& _rxInStream ) throw(IOException, RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( getSharedMutex() );
implEnsureFormatter();
Reference< XInputStream > xStream(_rxInStream.get());
SvInputStream aSvInputSteam(xStream);
m_pOwnFormatter->Load(aSvInputSteam);
}
Reference< XPropertySet > SAL_CALL SvNumberFormatsSupplierServiceObject::getNumberFormatSettings() throw(RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( getSharedMutex() );
......
......@@ -24,14 +24,12 @@
#include <svl/zforlist.hxx>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/io/XPersistObject.hpp>
#include <registerservices.hxx>
/**
* SvNumberFormatsSupplierServiceObject - a number formats supplier which
* - can be instantiated as an service
* - supports the ::com::sun::star::io::XPersistObject interface
* - works with it's own SvNumberFormatter instance
* - can be initialized (::com::sun::star::lang::XInitialization)
* with a specific language (i.e. ::com::sun::star::lang::Locale)
......@@ -39,7 +37,6 @@
class SvNumberFormatsSupplierServiceObject
:protected SvNumberFormatsSupplierObj
,public ::com::sun::star::lang::XInitialization
,public ::com::sun::star::io::XPersistObject
,public ::com::sun::star::lang::XServiceInfo
{ // don't want the Set-/GetNumberFormatter to be accessible from outside
......@@ -73,11 +70,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XPersistObject
virtual OUString SAL_CALL getServiceName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL write( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream >& OutStream ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
virtual void SAL_CALL read( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream >& InStream ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
// XNumberFormatsSupplier
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL
getNumberFormatSettings() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment