diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-06-06 11:35:07 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-06-06 11:35:07 +0000 |
commit | a9dc6e00d28aa5b0295bb2ccdbf7cc6d868da2b7 (patch) | |
tree | e6f0e3ddf78c301187cd800ce85cc735acfde909 /svx | |
parent | cf6ecf634af244d391977cad5ff34be3c270d667 (diff) |
INTEGRATION: CWS impressodf12 (1.2.12); FILE MERGED
2008/05/29 12:12:28 cl 1.2.12.4: #i75927# bullet rework
2008/04/25 08:59:22 cl 1.2.12.3: RESYNC: (1.2-1.3); FILE MERGED
2008/04/24 15:29:08 cl 1.2.12.2: #i35937# removed property HasLevels
2008/04/10 16:50:56 cl 1.2.12.1: #i35937# allow paragraph depth of -1 to switch of numbering
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/table/cell.cxx | 71 |
1 files changed, 10 insertions, 61 deletions
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 206e91f23778..4ebb761a1820 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: cell.cxx,v $ - * $Revision: 1.3 $ + * $Revision: 1.4 $ * * This file is part of OpenOffice.org. * @@ -87,7 +87,7 @@ static const SfxItemPropertyMap* ImplGetSvxCellPropertyMap() static const SfxItemPropertyMap aSvxCellPropertyMap[] = { FILL_PROPERTIES - { MAP_CHAR_LEN("HasLevels"), OWN_ATTR_HASLEVELS, &::getBooleanCppuType(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, +// { MAP_CHAR_LEN("HasLevels"), OWN_ATTR_HASLEVELS, &::getBooleanCppuType(), ::com::sun::star::beans::PropertyAttribute::READONLY, 0}, { MAP_CHAR_LEN("Style"), OWN_ATTR_STYLE, &::com::sun::star::style::XStyle::static_type(), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, { MAP_CHAR_LEN(UNO_NAME_TEXT_WRITINGMODE), SDRATTR_TEXTDIRECTION, &::getCppuType( (::com::sun::star::text::WritingMode*) 0 ), 0, 0}, { MAP_CHAR_LEN(UNO_NAME_TEXT_HORZADJUST), SDRATTR_TEXT_HORZADJUST, &::getCppuType((const ::com::sun::star::drawing::TextHorizontalAdjust*)0), 0, 0}, \ @@ -219,7 +219,7 @@ namespace sdr sal_uInt32 nParaCount(pOutliner->GetParagraphCount()); - for(sal_uInt32 nPara(0L); nPara < nParaCount; nPara++) + for(sal_uInt16 nPara = 0; nPara < nParaCount; nPara++) { SfxItemSet aSet(pOutliner->GetParaAttribs(nPara)); aSet.Put(rSet); @@ -707,61 +707,6 @@ sdr::properties::TextProperties* Cell::CloneProperties( SdrObject& rNewObj, Cell } // ----------------------------------------------------------------------------- - -/** this method returns true if the outliner para object of this cell has - a paragraph with a level > 0 or if there is a paragraph with the EE_PARA_BULLETSTATE - set to true. This is needed for xml export to decide if we need to export the - level information. -*/ -sal_Bool Cell::hasLevels() -{ - OutlinerParaObject* pOutlinerParaObject = GetOutlinerParaObject(); - if( NULL == pOutlinerParaObject ) - return sal_False; - - USHORT nParaCount = (USHORT)pOutlinerParaObject->Count(); - USHORT nPara; - for( nPara = 0; nPara < nParaCount; nPara++ ) - { - if( pOutlinerParaObject->GetDepth( nPara ) > 0 ) - return sal_True; - } - - sal_Bool bHadBulletStateOnEachPara = sal_True; - - const EditTextObject& rEditTextObject = pOutlinerParaObject->GetTextObject(); - const SfxPoolItem* pItem; - - for( nPara = 0; nPara < nParaCount; nPara++ ) - { - SfxItemSet aSet = rEditTextObject.GetParaAttribs( nPara ); - if( aSet.GetItemState(EE_PARA_BULLETSTATE, sal_False, &pItem) == SFX_ITEM_SET ) - { - if( ((const SfxUInt16Item*) pItem)->GetValue() ) - return sal_True; - } - else - { - bHadBulletStateOnEachPara = sal_False; - } - } - - // if there was at least one paragraph without a bullet state item we - // also need to check the stylesheet for a bullet state item - if( !bHadBulletStateOnEachPara && GetStyleSheet() ) - { - const SfxItemSet& rSet = GetStyleSheet()->GetItemSet(); - if( rSet.GetItemState(EE_PARA_BULLETSTATE, sal_False, &pItem) == SFX_ITEM_SET ) - { - if( ((const SfxUInt16Item*)pItem)->GetValue() ) - return sal_True; - } - } - - return sal_False; -} - -// ----------------------------------------------------------------------------- // XInterface // ----------------------------------------------------------------------------- @@ -1155,10 +1100,12 @@ Any SAL_CALL Cell::getPropertyValue( const OUString& PropertyName ) throw(Unknow { switch( pMap->nWID ) { +/* case OWN_ATTR_HASLEVELS: { return Any( hasLevels() ); } +*/ case OWN_ATTR_STYLE: { return Any( Reference< XStyle >( dynamic_cast< SfxUnoStyleSheet* >( GetStyleSheet() ) ) ); @@ -1371,11 +1318,12 @@ PropertyState SAL_CALL Cell::getPropertyState( const OUString& PropertyName ) th eState = PropertyState_DEFAULT_VALUE; } } - +/* case OWN_ATTR_HASLEVELS: { return PropertyState_DIRECT_VALUE; } +*/ case OWN_ATTR_STYLE: { return PropertyState_DIRECT_VALUE; @@ -1502,7 +1450,7 @@ void SAL_CALL Cell::setPropertyToDefault( const OUString& PropertyName ) throw(U mpProperties->ClearObjectItem( XATTR_FILLBMP_TILE ); break; } - case OWN_ATTR_HASLEVELS: +// case OWN_ATTR_HASLEVELS: case OWN_ATTR_STYLE: break; @@ -1542,9 +1490,10 @@ Any SAL_CALL Cell::getPropertyDefault( const OUString& aPropertyName ) throw(Unk case OWN_ATTR_FILLBMP_MODE: return Any( BitmapMode_NO_REPEAT ); +/* case OWN_ATTR_HASLEVELS: return Any( sal_False ); - +*/ case OWN_ATTR_STYLE: { Reference< XStyle > xStyle; |