diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-10-05 23:00:16 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-10-06 00:26:42 +0200 |
commit | 1a25d4645ab9cf943cd4153647bfcaa02854d77e (patch) | |
tree | d57968f8881b7f77d81fb49ed42f4b73db4afbf8 /sc | |
parent | 3cb337fdcf0c502875c25405c1012713b1b86152 (diff) |
remaining places in calc core are adapted to overlapping cond formats
Change-Id: I096623d3c531d21eca2f5be29f22a1677a738b0d
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/attarray.cxx | 14 | ||||
-rw-r--r-- | sc/source/core/data/column2.cxx | 4 |
2 files changed, 8 insertions, 10 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index 4820cb1e5a30..1b16d0bcca4f 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -297,7 +297,7 @@ void ScAttrArray::AddCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nInd nTempEndRow = std::min<SCROW>( nPatternEndRow, nEndRow ); const SfxPoolItem* pItem = NULL; - SfxItemState eState = pPattern->GetItemSet().GetItemState( ATTR_CONDITIONAL, true, &pItem ); + pPattern->GetItemSet().GetItemState( ATTR_CONDITIONAL, true, &pItem ); std::vector< sal_uInt32 > aCondFormatData; if(pItem) aCondFormatData = static_cast<const ScCondFormatItem*>(pItem)->GetCondFormatData(); @@ -1229,9 +1229,9 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const } if ( nMask & HASATTR_CONDITIONAL ) { - const SfxUInt32Item* pConditional = - (const SfxUInt32Item*) &pPattern->GetItem( ATTR_CONDITIONAL ); - if ( pConditional->GetValue() != 0 ) + bool bContainsCondFormat = + !static_cast<const ScCondFormatItem&>(pPattern->GetItem( ATTR_CONDITIONAL )).GetCondFormatData().empty(); + if ( bContainsCondFormat ) bFound = true; } if ( nMask & HASATTR_PROTECTED ) @@ -1242,9 +1242,9 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const if ( pProtect->GetProtection() || pProtect->GetHideCell() ) bFoundTemp = true; - const SfxUInt32Item* pConditional = - (const SfxUInt32Item*) &pPattern->GetItem( ATTR_CONDITIONAL ); - if ( pConditional->GetValue() != 0 ) + bool bContainsCondFormat = + !static_cast<const ScCondFormatItem&>(pPattern->GetItem( ATTR_CONDITIONAL )).GetCondFormatData().empty(); + if ( bContainsCondFormat ) { SCROW nRowStartCond = std::max<SCROW>( nRow1, i ? pData[i-1].nRow + 1: 0 ); SCROW nRowEndCond = std::min<SCROW>( nRow2, pData[i].nRow ); diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 435e8b82e99e..b554ff94344f 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -126,9 +126,7 @@ long ScColumn::GetNeededSize( SCROW nRow, OutputDevice* pDev, } // bedingte Formatierung - const SfxItemSet* pCondSet = NULL; - if ( ((const SfxUInt32Item&)pPattern->GetItem(ATTR_CONDITIONAL)).GetValue() ) - pCondSet = pDocument->GetCondResult( nCol, nRow, nTab ); + const SfxItemSet* pCondSet = pDocument->GetCondResult( nCol, nRow, nTab ); // Zeilenumbruch? |