Kaydet (Commit) a9b1723d authored tarafından Christian Lippka's avatar Christian Lippka

moved propertyset helper from unotools to comphelper

üst 7feeea2f
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: unopool.hxx,v $ * $RCSfile: unopool.hxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: rt $ $Date: 2001-03-06 08:47:29 $ * last change: $Author: cl $ $Date: 2001-03-14 16:38:38 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#endif #endif
#ifndef _UTL_PROPERTYSETHELPER_HXX_ #ifndef _COMPHELPER_PROPERTYSETHELPER_HXX_
#include <unotools/propertysethelper.hxx> #include <comphelper/propertysethelper.hxx>
#endif #endif
#ifndef _CPPUHELPER_IMPLBASE4_HXX_ #ifndef _CPPUHELPER_IMPLBASE4_HXX_
...@@ -86,7 +86,7 @@ class SfxItemPool; ...@@ -86,7 +86,7 @@ class SfxItemPool;
class SvxUnoDrawPool : public ::cppu::OWeakAggObject, class SvxUnoDrawPool : public ::cppu::OWeakAggObject,
public ::com::sun::star::lang::XServiceInfo, public ::com::sun::star::lang::XServiceInfo,
public ::com::sun::star::lang::XTypeProvider, public ::com::sun::star::lang::XTypeProvider,
public utl::PropertySetHelper public comphelper::PropertySetHelper
{ {
public: public:
SvxUnoDrawPool( SdrModel* pModel ) throw(); SvxUnoDrawPool( SdrModel* pModel ) throw();
...@@ -97,13 +97,13 @@ public: ...@@ -97,13 +97,13 @@ public:
*/ */
virtual SfxItemPool* getModelPool( sal_Bool bReadOnly ) throw(); virtual SfxItemPool* getModelPool( sal_Bool bReadOnly ) throw();
// overiden helpers from utl::PropertySetHelper // overiden helpers from comphelper::PropertySetHelper
virtual void _setPropertyValues( const utl::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 _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 utl::PropertyMapEntry** ppEntries, ::com::sun::star::uno::Any* pValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::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 );
virtual void _getPropertyStates( const utl::PropertyMapEntry** ppEntries, ::com::sun::star::beans::PropertyState* pStates ) throw(::com::sun::star::beans::UnknownPropertyException ); virtual void _getPropertyStates( const comphelper::PropertyMapEntry** ppEntries, ::com::sun::star::beans::PropertyState* pStates ) throw(::com::sun::star::beans::UnknownPropertyException );
virtual void _setPropertyToDefault( const utl::PropertyMapEntry* pEntry ) throw(::com::sun::star::beans::UnknownPropertyException ); virtual void _setPropertyToDefault( const comphelper::PropertyMapEntry* pEntry ) throw(::com::sun::star::beans::UnknownPropertyException );
virtual ::com::sun::star::uno::Any _getPropertyDefault( const utl::PropertyMapEntry* pEntry ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException ); virtual ::com::sun::star::uno::Any _getPropertyDefault( const comphelper::PropertyMapEntry* pEntry ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
// XInterface // XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
...@@ -121,8 +121,8 @@ public: ...@@ -121,8 +121,8 @@ public:
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
protected: protected:
virtual void getAny( SfxItemPool* pPool, const utl::PropertyMapEntry* pEntry, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException); virtual void getAny( SfxItemPool* pPool, const comphelper::PropertyMapEntry* pEntry, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException);
virtual void putAny( SfxItemPool* pPool, const utl::PropertyMapEntry* pEntry, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException); virtual void putAny( SfxItemPool* pPool, const comphelper::PropertyMapEntry* pEntry, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException);
protected: protected:
SdrModel* mpModel; SdrModel* mpModel;
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: unopool.cxx,v $ * $RCSfile: unopool.cxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: cl $ $Date: 2001-03-05 12:54:58 $ * last change: $Author: cl $ $Date: 2001-03-14 16:39:05 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
#include <com/sun/star/beans/PropertyState.hpp> #include <com/sun/star/beans/PropertyState.hpp>
#endif #endif
#include <unotools/propertysetinfo.hxx> #include <comphelper/propertysetinfo.hxx>
#ifndef _RTL_UUID_H_ #ifndef _RTL_UUID_H_
#include <rtl/uuid.h> #include <rtl/uuid.h>
...@@ -139,10 +139,10 @@ SfxItemPool* SvxUnoDrawPool::getModelPool( sal_Bool bReadOnly ) throw() ...@@ -139,10 +139,10 @@ SfxItemPool* SvxUnoDrawPool::getModelPool( sal_Bool bReadOnly ) throw()
} }
} }
void SvxUnoDrawPool::getAny( SfxItemPool* pPool, const utl::PropertyMapEntry* pEntry, Any& rValue ) void SvxUnoDrawPool::getAny( SfxItemPool* pPool, const comphelper::PropertyMapEntry* pEntry, Any& rValue )
throw(UnknownPropertyException) throw(UnknownPropertyException)
{ {
switch( pEntry->mnWhich ) switch( pEntry->mnHandle )
{ {
case OWN_ATTR_FILLBMP_MODE: case OWN_ATTR_FILLBMP_MODE:
{ {
...@@ -163,12 +163,12 @@ void SvxUnoDrawPool::getAny( SfxItemPool* pPool, const utl::PropertyMapEntry* pE ...@@ -163,12 +163,12 @@ void SvxUnoDrawPool::getAny( SfxItemPool* pPool, const utl::PropertyMapEntry* pE
break; break;
} }
default: default:
pPool->GetDefaultItem( pEntry->mnWhich ).QueryValue( rValue, pEntry->mnMemberId ); pPool->GetDefaultItem( pEntry->mnHandle ).QueryValue( rValue, pEntry->mnMemberId );
} }
// check for needed metric translation // check for needed metric translation
const SfxMapUnit eMapUnit = pPool->GetMetric(pEntry->mnWhich); const SfxMapUnit eMapUnit = pPool->GetMetric(pEntry->mnHandle);
if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM) if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM)
{ {
// map the metric of the itempool to 100th mm // map the metric of the itempool to 100th mm
...@@ -215,12 +215,12 @@ void SvxUnoDrawPool::getAny( SfxItemPool* pPool, const utl::PropertyMapEntry* pE ...@@ -215,12 +215,12 @@ void SvxUnoDrawPool::getAny( SfxItemPool* pPool, const utl::PropertyMapEntry* pE
} }
} }
void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const utl::PropertyMapEntry* pEntry, const Any& rValue ) void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEntry* pEntry, const Any& rValue )
throw(UnknownPropertyException, IllegalArgumentException) throw(UnknownPropertyException, IllegalArgumentException)
{ {
Any aValue( rValue ); Any aValue( rValue );
const SfxMapUnit eMapUnit = pPool->GetMetric(pEntry->mnWhich); const SfxMapUnit eMapUnit = pPool->GetMetric(pEntry->mnHandle);
if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM) if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM)
{ {
switch(eMapUnit) switch(eMapUnit)
...@@ -244,7 +244,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const utl::PropertyMapEntry* pE ...@@ -244,7 +244,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const utl::PropertyMapEntry* pE
} }
} }
const sal_uInt16 nWhich = pEntry->mnWhich; const sal_uInt16 nWhich = pEntry->mnHandle;
switch( nWhich ) switch( nWhich )
{ {
case OWN_ATTR_FILLBMP_MODE: case OWN_ATTR_FILLBMP_MODE:
...@@ -276,7 +276,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const utl::PropertyMapEntry* pE ...@@ -276,7 +276,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const utl::PropertyMapEntry* pE
} }
} }
void SvxUnoDrawPool::_setPropertyValues( const utl::PropertyMapEntry** ppEntries, const Any* pValues ) void SvxUnoDrawPool::_setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const Any* pValues )
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException ) throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
{ {
vos::OGuard aGuard( Application::GetSolarMutex() ); vos::OGuard aGuard( Application::GetSolarMutex() );
...@@ -291,7 +291,7 @@ void SvxUnoDrawPool::_setPropertyValues( const utl::PropertyMapEntry** ppEntries ...@@ -291,7 +291,7 @@ void SvxUnoDrawPool::_setPropertyValues( const utl::PropertyMapEntry** ppEntries
putAny( pPool, *ppEntries++, *pValues++ ); putAny( pPool, *ppEntries++, *pValues++ );
} }
void SvxUnoDrawPool::_getPropertyValues( const utl::PropertyMapEntry** ppEntries, Any* pValue ) void SvxUnoDrawPool::_getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, Any* pValue )
throw(UnknownPropertyException, WrappedTargetException ) throw(UnknownPropertyException, WrappedTargetException )
{ {
vos::OGuard aGuard( Application::GetSolarMutex() ); vos::OGuard aGuard( Application::GetSolarMutex() );
...@@ -306,7 +306,7 @@ void SvxUnoDrawPool::_getPropertyValues( const utl::PropertyMapEntry** ppEntries ...@@ -306,7 +306,7 @@ void SvxUnoDrawPool::_getPropertyValues( const utl::PropertyMapEntry** ppEntries
getAny( pPool, *ppEntries++, *pValue++ ); getAny( pPool, *ppEntries++, *pValue++ );
} }
void SvxUnoDrawPool::_getPropertyStates( const utl::PropertyMapEntry** ppEntries, PropertyState* pStates ) void SvxUnoDrawPool::_getPropertyStates( const comphelper::PropertyMapEntry** ppEntries, PropertyState* pStates )
throw(UnknownPropertyException ) throw(UnknownPropertyException )
{ {
vos::OGuard aGuard( Application::GetSolarMutex() ); vos::OGuard aGuard( Application::GetSolarMutex() );
...@@ -317,7 +317,7 @@ void SvxUnoDrawPool::_getPropertyStates( const utl::PropertyMapEntry** ppEntries ...@@ -317,7 +317,7 @@ void SvxUnoDrawPool::_getPropertyStates( const utl::PropertyMapEntry** ppEntries
{ {
while( *ppEntries ) while( *ppEntries )
{ {
const sal_uInt16 nWhich = (*ppEntries)->mnWhich; const sal_uInt16 nWhich = (*ppEntries)->mnHandle;
switch( nWhich ) switch( nWhich )
{ {
...@@ -358,7 +358,7 @@ void SvxUnoDrawPool::_getPropertyStates( const utl::PropertyMapEntry** ppEntries ...@@ -358,7 +358,7 @@ void SvxUnoDrawPool::_getPropertyStates( const utl::PropertyMapEntry** ppEntries
} }
} }
void SvxUnoDrawPool::_setPropertyToDefault( const utl::PropertyMapEntry* pEntry ) void SvxUnoDrawPool::_setPropertyToDefault( const comphelper::PropertyMapEntry* pEntry )
throw(UnknownPropertyException ) throw(UnknownPropertyException )
{ {
vos::OGuard aGuard( Application::GetSolarMutex() ); vos::OGuard aGuard( Application::GetSolarMutex() );
...@@ -366,10 +366,10 @@ void SvxUnoDrawPool::_setPropertyToDefault( const utl::PropertyMapEntry* pEntry ...@@ -366,10 +366,10 @@ void SvxUnoDrawPool::_setPropertyToDefault( const utl::PropertyMapEntry* pEntry
SfxItemPool* pPool = getModelPool( sal_True ); SfxItemPool* pPool = getModelPool( sal_True );
if( pPool && pPool != mpDefaultsPool ) if( pPool && pPool != mpDefaultsPool )
pPool->Put( mpDefaultsPool->GetDefaultItem( pEntry->mnWhich ), pEntry->mnWhich ); pPool->Put( mpDefaultsPool->GetDefaultItem( pEntry->mnHandle ), pEntry->mnHandle );
} }
Any SvxUnoDrawPool::_getPropertyDefault( const utl::PropertyMapEntry* pEntry ) Any SvxUnoDrawPool::_getPropertyDefault( const comphelper::PropertyMapEntry* pEntry )
throw(UnknownPropertyException, WrappedTargetException ) throw(UnknownPropertyException, WrappedTargetException )
{ {
vos::OGuard aGuard( Application::GetSolarMutex() ); vos::OGuard aGuard( Application::GetSolarMutex() );
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: unoprov.cxx,v $ * $RCSfile: unoprov.cxx,v $
* *
* $Revision: 1.19 $ * $Revision: 1.20 $
* *
* last change: $Author: cl $ $Date: 2001-03-07 14:28:57 $ * last change: $Author: cl $ $Date: 2001-03-14 16:39:05 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#endif #endif
#include <unotools/propertysetinfo.hxx> #include <comphelper/propertysetinfo.hxx>
#ifndef _SVX_DIALMGR_HXX #ifndef _SVX_DIALMGR_HXX
#include "dialmgr.hxx" #include "dialmgr.hxx"
...@@ -458,9 +458,9 @@ SfxItemPropertyMap* ImplGetSvxPageShapePropertyMap() ...@@ -458,9 +458,9 @@ SfxItemPropertyMap* ImplGetSvxPageShapePropertyMap()
return aPageShapePropertyMap_Impl; return aPageShapePropertyMap_Impl;
} }
utl::PropertyMapEntry* ImplGetSvxDrawingDefaultsPropertyMap() comphelper::PropertyMapEntry* ImplGetSvxDrawingDefaultsPropertyMap()
{ {
static utl::PropertyMapEntry aSvxDrawingDefaultsPropertyMap_Impl[] = static comphelper::PropertyMapEntry aSvxDrawingDefaultsPropertyMap_Impl[] =
{ {
SHADOW_PROPERTIES SHADOW_PROPERTIES
LINE_PROPERTIES_DEFAULTS LINE_PROPERTIES_DEFAULTS
...@@ -1013,7 +1013,7 @@ void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString& ...@@ -1013,7 +1013,7 @@ void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString&
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
utl::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId ) throw() comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId ) throw()
{ {
vos::OGuard aGuard( Application::GetSolarMutex() ); vos::OGuard aGuard( Application::GetSolarMutex() );
...@@ -1025,7 +1025,7 @@ utl::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId ...@@ -1025,7 +1025,7 @@ utl::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId
if( mpInfos[ nServiceId ] == NULL ) if( mpInfos[ nServiceId ] == NULL )
{ {
mpInfos[nServiceId] = new utl::PropertySetInfo(); mpInfos[nServiceId] = new comphelper::PropertySetInfo();
mpInfos[nServiceId]->acquire(); mpInfos[nServiceId]->acquire();
switch( nServiceId ) switch( nServiceId )
...@@ -1042,5 +1042,5 @@ utl::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId ...@@ -1042,5 +1042,5 @@ utl::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nServiceId
return mpInfos[ nServiceId ]; return mpInfos[ nServiceId ];
} }
utl::PropertySetInfo* SvxPropertySetInfoPool::mpInfos[SVXUNO_SERVICEID_LASTID+1] = { NULL }; comphelper::PropertySetInfo* SvxPropertySetInfoPool::mpInfos[SVXUNO_SERVICEID_LASTID+1] = { NULL };
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