summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/documen4.cxx5
-rw-r--r--sc/source/core/data/table4.cxx5
-rw-r--r--sc/source/ui/unoobj/docuno.cxx7
-rw-r--r--sc/source/ui/view/viewdata.cxx7
4 files changed, 14 insertions, 10 deletions
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 74a66449ec40..c450e698ecba 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -747,9 +747,10 @@ const SfxPoolItem* ScDocument::GetEffItem(
if ( pPattern )
{
const SfxItemSet& rSet = pPattern->GetItemSet();
- if ( rSet.GetItemState( ATTR_CONDITIONAL ) == SfxItemState::SET )
+ const ScCondFormatItem* pConditionalItem = nullptr;
+ if ( rSet.GetItemState( ATTR_CONDITIONAL, true, &pConditionalItem ) == SfxItemState::SET )
{
- const ScCondFormatIndexes& rIndex = pPattern->GetItem(ATTR_CONDITIONAL).GetCondFormatData();
+ const ScCondFormatIndexes& rIndex = pConditionalItem->GetCondFormatData();
ScConditionalFormatList* pCondFormList = GetCondFormList( nTab );
if (!rIndex.empty() && pCondFormList)
{
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index a400762d1ca2..56588d6df5fb 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -279,9 +279,10 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
for (SCSIZE i = 0; i < nCount; ++i)
{
const ScPatternAttr* pPattern = GetPattern(nColCurr, nRowCurr);
+ const ScMergeFlagAttr* pMergeFlagItem = nullptr;
bool bOverlapped
- = pPattern->GetItemSet().GetItemState(ATTR_MERGE_FLAG, false) == SfxItemState::SET
- && pPattern->GetItem(ATTR_MERGE_FLAG).IsOverlapped();
+ = pPattern->GetItemSet().GetItemState(ATTR_MERGE_FLAG, false, &pMergeFlagItem) == SfxItemState::SET
+ && pMergeFlagItem->IsOverlapped();
if (bOverlapped)
bHasOverlappedCells = true;
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 421733bfecdb..24f9a5270361 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1237,12 +1237,13 @@ OString ScPostIt::NoteRangeToJsonString(const ScDocument& rDoc, const ScAddress&
SCROW nY(rPos.Row());
OString aStartCellAddress(OString::number(nX) + " " + OString::number(nY));
const ScPatternAttr* pMarkPattern = rDoc.GetPattern(nX, nY, rPos.Tab());
- if (pMarkPattern && pMarkPattern->GetItemSet().GetItemState(ATTR_MERGE, false) == SfxItemState::SET)
+ const ScMergeAttr* pMergeItem = nullptr;
+ if (pMarkPattern && pMarkPattern->GetItemSet().GetItemState(ATTR_MERGE, false, &pMergeItem) == SfxItemState::SET)
{
- SCCOL nCol = pMarkPattern->GetItem(ATTR_MERGE).GetColMerge();
+ SCCOL nCol = pMergeItem->GetColMerge();
if (nCol > 1)
nX += nCol - 1;
- SCROW nRow = pMarkPattern->GetItem(ATTR_MERGE).GetRowMerge();
+ SCROW nRow = pMergeItem->GetRowMerge();
if (nRow > 1)
nY += nRow - 1;
}
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 40e9ce7a9d5a..102c7ad9adb1 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1158,10 +1158,11 @@ ScMarkType ScViewData::GetSimpleArea( ScRange & rRange, ScMarkData & rNewMark )
if (eMarkType == SC_MARK_NONE)
eMarkType = SC_MARK_SIMPLE;
const ScPatternAttr* pMarkPattern = mrDoc.GetPattern(GetCurX(), GetCurY(), GetTabNo());
- if (pMarkPattern && pMarkPattern->GetItemSet().GetItemState(ATTR_MERGE, false) == SfxItemState::SET)
+ const ScMergeAttr* pMergeItem = nullptr;
+ if (pMarkPattern && pMarkPattern->GetItemSet().GetItemState(ATTR_MERGE, false, &pMergeItem) == SfxItemState::SET)
{
- SCROW nRow = pMarkPattern->GetItem(ATTR_MERGE).GetRowMerge();
- SCCOL nCol = pMarkPattern->GetItem(ATTR_MERGE).GetColMerge();
+ SCROW nRow = pMergeItem->GetRowMerge();
+ SCCOL nCol = pMergeItem->GetColMerge();
if ( nRow < 1 || nCol < 1 )
{
// This kind of cells do exist. Not sure if that is intended or a bug.