From 4c1a4f0fc858b18633e8c5e2477d639f6604ad3b Mon Sep 17 00:00:00 2001 From: Mathias Bauer Date: Fri, 22 Jan 2010 18:23:36 +0100 Subject: #i107450#: make code more explicit to avoid mistakes --- editeng/inc/editeng/unoipset.hxx | 4 ++-- editeng/source/uno/unotext.cxx | 6 +++--- svx/source/table/cell.cxx | 2 +- svx/source/unodraw/unoshape.cxx | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/editeng/inc/editeng/unoipset.hxx b/editeng/inc/editeng/unoipset.hxx index b3dbccf81e..f316689e36 100644 --- a/editeng/inc/editeng/unoipset.hxx +++ b/editeng/inc/editeng/unoipset.hxx @@ -57,8 +57,8 @@ public: ~SvxItemPropertySet(); // Methoden, die direkt mit dem ItemSet arbeiten - ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet, bool bSearchInParent=true, bool bDontConvertNegativeValues=false ) const; - void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal, SfxItemSet& rSet, bool bDontConvertNegativeValues=false ) const; + ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet, bool bSearchInParent, bool bDontConvertNegativeValues ) const; + void setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& rVal, SfxItemSet& rSet, bool bDontConvertNegativeValues ) const; // Methoden, die stattdessen Any benutzen ::com::sun::star::uno::Any getPropertyValue( const SfxItemPropertySimpleEntry* pMap ) const; diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 3ad334bccb..c235a29653 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -541,7 +541,7 @@ void SvxUnoTextRangeBase::setPropertyValue( const SfxItemPropertySimpleEntry* pM // Fuer Teile von zusammengesetzten Items mit mehreren Properties (z.B. Hintergrund) // muss vorher das alte Item aus dem Dokument geholt werden rNewSet.Put(rOldSet.Get(pMap->nWID)); // altes Item in neuen Set - mpPropSet->setPropertyValue(pMap, rValue, rNewSet ); + mpPropSet->setPropertyValue(pMap, rValue, rNewSet, false ); } } @@ -712,7 +712,7 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pM default: if(!GetPropertyValueHelper( *((SfxItemSet*)(&rSet)), pMap, rAny, &maSelection, GetEditSource() )) - rAny = mpPropSet->getPropertyValue(pMap, rSet, false ); + rAny = mpPropSet->getPropertyValue(pMap, rSet, true, false ); } } @@ -1329,7 +1329,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp { SfxItemSet aSet( *pPool, pMap->nWID, pMap->nWID); aSet.Put(pPool->GetDefaultItem(pMap->nWID)); - return mpPropSet->getPropertyValue(pMap, aSet, false ); + return mpPropSet->getPropertyValue(pMap, aSet, true, false ); } } } diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 9127fc5fb1..f54a1a10a7 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -1122,7 +1122,7 @@ void SAL_CALL Cell::setPropertyValue( const OUString& rPropertyName, const Any& if( aSet.GetItemState( pMap->nWID ) == SFX_ITEM_SET ) { - mpPropSet->setPropertyValue( pMap, rValue, aSet ); + SvxItemPropertySet_setPropertyValue( *mpPropSet, pMap, rValue, aSet ); } } } diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 8da1851418..2b477e5fdf 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -1952,8 +1952,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const if( pSet->GetItemState( pMap->nWID ) == SFX_ITEM_SET ) { - mpPropSet->setPropertyValue( pMap, rVal, *pSet ); - + SvxItemPropertySet_setPropertyValue( *mpPropSet, pMap, rVal, *pSet ); } } -- cgit v1.2.3