diff options
author | Christian Lippka <cl@openoffice.org> | 2002-11-15 14:38:51 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2002-11-15 14:38:51 +0000 |
commit | c64a22338e8088af89c91a75f54373fc48242d06 (patch) | |
tree | 3bfbd2b92690f96c21a691e23127bf3f33ba584e | |
parent | 51f456cb4c6868c7f1baae154a23007896f2a7bb (diff) |
#102531# writer wants to have less properties for drawing pool api
-rw-r--r-- | svx/inc/unopool.hxx | 9 | ||||
-rw-r--r-- | svx/source/unodraw/unopool.cxx | 26 | ||||
-rw-r--r-- | svx/source/unodraw/unoprov.cxx | 8 |
3 files changed, 32 insertions, 11 deletions
diff --git a/svx/inc/unopool.hxx b/svx/inc/unopool.hxx index 2ecf7cd9c259..36ad513ebc80 100644 --- a/svx/inc/unopool.hxx +++ b/svx/inc/unopool.hxx @@ -2,9 +2,9 @@ * * $RCSfile: unopool.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: hr $ $Date: 2001-10-16 17:14:12 $ + * last change: $Author: cl $ $Date: 2002-11-15 15:33:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,6 +89,9 @@ class SvxUnoDrawPool : public ::cppu::OWeakAggObject, public comphelper::PropertySetHelper { public: + SvxUnoDrawPool( SdrModel* pModel, sal_Int32 nServiceId ) throw(); + + /** deprecated */ SvxUnoDrawPool( SdrModel* pModel ) throw(); virtual ~SvxUnoDrawPool() throw(); @@ -121,6 +124,8 @@ public: virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ); protected: + void init(); + 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 comphelper::PropertyMapEntry* pEntry, const ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException); diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index 493558f0fe47..d55531d5a520 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unopool.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: oj $ $Date: 2002-08-23 11:39:12 $ + * last change: $Author: cl $ $Date: 2002-11-15 15:35:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -123,9 +123,26 @@ using namespace ::com::sun::star::beans; using namespace ::rtl; using namespace ::cppu; +SvxUnoDrawPool::SvxUnoDrawPool( SdrModel* pModel, sal_Int32 nServiceId ) throw() +: PropertySetHelper( SvxPropertySetInfoPool::getOrCreate( nServiceId ) ), mpModel( pModel ) +{ + init(); +} + +/* deprecated */ SvxUnoDrawPool::SvxUnoDrawPool( SdrModel* pModel ) throw() : PropertySetHelper( SvxPropertySetInfoPool::getOrCreate( SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS ) ), mpModel( pModel ) { + init(); +} + +SvxUnoDrawPool::~SvxUnoDrawPool() throw() +{ + delete mpDefaultsPool; +} + +void SvxUnoDrawPool::init() +{ mpDefaultsPool = new SdrItemPool(SDRATTR_START, SDRATTR_END ); SfxItemPool* pOutlPool=EditEngine::CreatePool(); mpDefaultsPool->SetSecondaryPool(pOutlPool); @@ -136,11 +153,6 @@ SvxUnoDrawPool::SvxUnoDrawPool( SdrModel* pModel ) throw() mpDefaultsPool->FreezeIdRanges(); } -SvxUnoDrawPool::~SvxUnoDrawPool() throw() -{ - delete mpDefaultsPool; -} - SfxItemPool* SvxUnoDrawPool::getModelPool( sal_Bool bReadOnly ) throw() { if( mpModel ) diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index f4103bcb0e20..10e1b33b3c03 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoprov.cxx,v $ * - * $Revision: 1.46 $ + * $Revision: 1.47 $ * - * last change: $Author: cl $ $Date: 2002-10-01 13:57:31 $ + * last change: $Author: cl $ $Date: 2002-11-15 15:35:11 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1300,6 +1300,10 @@ comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nSer case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS: mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS]->add( ImplGetSvxDrawingDefaultsPropertyMap() ); break; + case SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER: + mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->add( ImplGetSvxDrawingDefaultsPropertyMap() ); + mpInfos[SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER]->remove( OUString( RTL_CONSTASCII_USTRINGPARAM( UNO_NAME_EDIT_PARA_IS_HANGING_PUNCTUATION ) ) ); + break; default: DBG_ERROR( "unknown service id!" ); |