summaryrefslogtreecommitdiff
path: root/starmath/inc/unomodel.hxx
diff options
context:
space:
mode:
authorMartin Gallwey <mtg@openoffice.org>2001-05-16 10:56:04 +0000
committerMartin Gallwey <mtg@openoffice.org>2001-05-16 10:56:04 +0000
commitf6c274b36f2b160d6fd365393651bdb11e101cee (patch)
tree20d19efd17d121ff1d0898f1b3a59d6a8b020264 /starmath/inc/unomodel.hxx
parent29b80701a330bb683d2ed80ed5230193a3904ae0 (diff)
#87071# make unomodel use CL's PropertySetHelper as it is faster than the previous implementation
Diffstat (limited to 'starmath/inc/unomodel.hxx')
-rw-r--r--starmath/inc/unomodel.hxx94
1 files changed, 23 insertions, 71 deletions
diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx
index 22b7d3ac20b6..4a1644b6bfe3 100644
--- a/starmath/inc/unomodel.hxx
+++ b/starmath/inc/unomodel.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unomodel.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: mtg $ $Date: 2001-04-24 15:14:09 $
+ * last change: $Author: mtg $ $Date: 2001-05-16 11:56:04 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,49 +79,34 @@
#ifndef _SFX_SFXBASEMODEL_HXX_
#include <sfx2/sfxbasemodel.hxx>
#endif
-#ifndef _CPPUHELPER_IMPLBASE5_HXX_
-#include <cppuhelper/implbase5.hxx> // helper for implementations
+#ifndef _COMPHELPER_PROPERTYSETHELPER_HXX_
+#include <comphelper/propertysethelper.hxx>
#endif
-struct SfxItemPropertyMap;
class SmFormat;
//-----------------------------------------------------------------------------
-typedef
-cppu::WeakImplHelper5
-<
- ::com::sun::star::beans::XPropertySet,
- ::com::sun::star::beans::XMultiPropertySet,
- ::com::sun::star::beans::XPropertyState,
- ::com::sun::star::lang::XServiceInfo,
- ::com::sun::star::lang::XUnoTunnel
->
-SmModelBaseClass;
-class SmModel : public SmModelBaseClass,
- public SfxBaseModel
+class SmModel : public SfxBaseModel,
+ public comphelper::PropertySetHelper,
+ public com::sun::star::lang::XServiceInfo,
+ public com::sun::star::lang::XUnoTunnel
{
-
- SfxItemPropertyMap* _pMap;
- void SAL_CALL _setPropertyValue ( const ::com::sun::star::uno::Any& aValue,
- SfxObjectShell* pObjShell, SmFormat &aFormat, const SfxItemPropertyMap* pMap)
- throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- void SAL_CALL _getPropertyValue ( ::com::sun::star::uno::Any& rValue,
- SfxObjectShell * pObjShell, const SmFormat &aFormat, const SfxItemPropertyMap *pMap )
- throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- void SAL_CALL _getPropertyDefault ( ::com::sun::star::uno::Any& rValue,
- SfxObjectShell * pObjShell, const SmFormat &aFormat, const SfxItemPropertyMap *pMap )
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
+protected:
+ virtual void _setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const ::com::sun::star::uno::Any* pValues )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
+ virtual void _getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, ::com::sun::star::uno::Any* pValue )
+ throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
public:
SmModel( SfxObjectShell *pObjSh = 0 );
virtual ~SmModel();
- const SfxItemPropertyMap * getPropertyMap() const { return _pMap;}
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > SAL_CALL getPropertyValueSequence ( const ::com::sun::star::uno::Sequence < ::rtl::OUString > & rPropertyNames);
//XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL acquire( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL release( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( )
+ throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL release( )
+ throw(::com::sun::star::uno::RuntimeException);
//XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
@@ -131,48 +116,15 @@ public:
//XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
- //XPropertySet
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue )
- throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName )
- throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
- //XMultiPropertySet
- virtual void SAL_CALL setPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues )
- throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames )
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addPropertiesChangeListener( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removePropertiesChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL firePropertiesChangeEvent( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener )
- throw (::com::sun::star::uno::RuntimeException);
-
- //XPropertyState
- virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& PropertyName )
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyName )
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& PropertyName )
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& aPropertyName )
- throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
//XServiceInfo
- virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
- virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
- virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual rtl::OUString SAL_CALL getImplementationName(void)
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName)
+ throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void)
+ throw( ::com::sun::star::uno::RuntimeException );
inline ::rtl::OUString SmModel::getImplementationName_Static() throw( );
-
- void * SAL_CALL operator new( size_t ) throw();
- void SAL_CALL operator delete( void * ) throw();
};
inline ::rtl::OUString SmModel::getImplementationName_Static() throw( )