diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-01-07 18:52:36 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-01-07 18:52:36 +0100 |
commit | 67791d91c26061b34a0084ca4011d58a0f8ff3c5 (patch) | |
tree | a39ec564a1d90f573a96d3cbd539fc95c8ac6cda /editeng/source/uno/unoipset.cxx | |
parent | aed3f1817f4de6314285efed1e48dc7c305e4f67 (diff) |
#i107450#: make svx buildable with new editeng lib
Diffstat (limited to 'editeng/source/uno/unoipset.cxx')
-rw-r--r-- | editeng/source/uno/unoipset.cxx | 55 |
1 files changed, 3 insertions, 52 deletions
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx index adab5fc3817c..b6a5876a25af 100644 --- a/editeng/source/uno/unoipset.cxx +++ b/editeng/source/uno/unoipset.cxx @@ -114,33 +114,8 @@ void SvxItemPropertySet::AddUsrAnyForID(const uno::Any& rAny, sal_uInt16 nWID) pCombiList->Insert(pNew); } -/** this function checks if a SFX_METRIC_ITEM realy needs to be converted. - This check is for items that store either metric values if theire positiv - or percentage if theire negativ. -*/ -#if 0 -sal_Bool SvxUnoCheckForConversion( const SfxItemSet&, sal_Int32 nWID, const uno::Any& rVal ) -{ - sal_Bool bConvert = sal_True; // the default is that all metric items must be converted - - switch( nWID ) - { - case XATTR_FILLBMP_SIZEX: - case XATTR_FILLBMP_SIZEY: - { - sal_Int32 nValue = 0; - if( rVal >>= nValue ) - bConvert = nValue > 0; - break; - } - } - - // the default is to always - return bConvert; -} -#endif //---------------------------------------------------------------------- -uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet, bool bSearchInParent, bool bConvert ) const +uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet, bool bSearchInParent ) const { uno::Any aVal; if(!pMap || !pMap->nWID) @@ -150,7 +125,6 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* const SfxPoolItem* pItem = 0; SfxItemPool* pPool = rSet.GetPool(); - // pMap->nWID != SDRATTR_XMLATTRIBUTES rSet.GetItemState( pMap->nWID, bSearchInParent, &pItem ); if( NULL == pItem && pPool ) @@ -169,19 +143,8 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* { pItem->QueryValue( aVal, nMemberId ); - if( pMap->nMemberId & SFX_METRIC_ITEM ) - { - // check for needed metric translation - if ( bConvert ) -// if(pMap->nMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM) - { -// if( SvxUnoCheckForConversion( rSet, pMap->nWID, aVal ) ) - SvxUnoConvertToMM( eMapUnit, aVal ); - } - } // convert typeless SfxEnumItem to enum type - else if ( pMap->pType->getTypeClass() == uno::TypeClass_ENUM && - aVal.getValueType() == ::getCppuType((const sal_Int32*)0) ) + if ( !(pMap->nMemberId & SFX_METRIC_ITEM) && pMap->pType->getTypeClass() == uno::TypeClass_ENUM && aVal.getValueType() == ::getCppuType((const sal_Int32*)0) ) { sal_Int32 nEnum; aVal >>= nEnum; @@ -198,7 +161,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry* } //---------------------------------------------------------------------- -void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal, SfxItemSet& rSet, bool bConvert ) const +void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMap, const uno::Any& rVal, SfxItemSet& rSet ) const { if(!pMap || !pMap->nWID) return; @@ -227,18 +190,6 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa uno::Any aValue( rVal ); const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((USHORT)pMap->nWID) : SFX_MAPUNIT_100TH_MM; - - if( pMap->nMemberId & SFX_METRIC_ITEM ) - { - // check for needed metric translation - if ( bConvert ) -// if(pMap->nMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM) - { -// if( SvxUnoCheckForConversion( rSet, pMap->nWID, aValue ) ) - SvxUnoConvertFromMM( eMapUnit, aValue ); - } - } - pNewItem = pItem->Clone(); BYTE nMemberId = pMap->nMemberId & (~SFX_METRIC_ITEM); |