diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-10-31 16:13:54 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-10-31 16:41:05 +0100 |
commit | 70c3a6be0698e36ff80b7fc590d807ff37aab581 (patch) | |
tree | 72c54310e009d4071a9e921ce48843e58c7d7d9e | |
parent | 819b0cb95b38c4c49d34011da68c747e2152059b (diff) |
sc: fix erroneous casts of ScCondFormatItem
These cause valgrind warnings in sc_unoapi.
(regression from d2b49b5b9bffdfa34174af96d85a392fde21fae1)
Change-Id: If3128410bfabc23ff85c24156a8602379b8b7edd
-rw-r--r-- | sc/source/core/data/attarray.cxx | 3 | ||||
-rw-r--r-- | sc/source/core/data/column2.cxx | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index 39658902fd5c..f47bb058237c 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -1320,7 +1320,8 @@ bool ScAttrArray::HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const else if ((SvxCellHorJustify)((const SvxHorJustifyItem&)pPattern-> GetItem( ATTR_HOR_JUSTIFY )).GetValue() == SVX_HOR_JUSTIFY_BLOCK) bFound = true; - else if (((const SfxUInt32Item&)pPattern->GetItem( ATTR_CONDITIONAL )).GetValue()) + + else if (!static_cast<const ScCondFormatItem&>(pPattern->GetItem(ATTR_CONDITIONAL)).GetCondFormatData().empty()) bFound = true; else if (((const SfxInt32Item&)pPattern->GetItem( ATTR_ROTATE_VALUE )).GetValue()) bFound = true; diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 6a74d780d950..d90f79d5936f 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -711,9 +711,12 @@ void ScColumn::GetOptimalHeight( SCROW nStartRow, SCROW nEndRow, sal_uInt16* pHe bStdOnly = !bBreak; // bedingte Formatierung: Zellen durchgehen - if ( bStdOnly && ((const SfxUInt32Item&)pPattern-> - GetItem(ATTR_CONDITIONAL)).GetValue() ) + if (bStdOnly && + !static_cast<const ScCondFormatItem&>(pPattern->GetItem( + ATTR_CONDITIONAL)).GetCondFormatData().empty()) + { bStdOnly = false; + } // gedrehter Text: Zellen durchgehen if ( bStdOnly && ((const SfxInt32Item&)pPattern-> |