summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docfunc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell/docfunc.cxx')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx49
1 files changed, 23 insertions, 26 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index ff9f8c2713dd..3e8752b4954b 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -471,33 +471,30 @@ bool ScDocFunc::DetectiveRefresh( bool bAutomatic )
size_t nCount = pList->Count();
for (size_t i=0; i < nCount; ++i)
{
- const ScDetOpData* pData = pList->GetObject(i);
- if (pData)
+ const ScDetOpData& rData = pList->GetObject(i);
+ ScAddress aPos = rData.GetPos();
+ ScDetectiveFunc aFunc( &rDoc, aPos.Tab() );
+ SCCOL nCol = aPos.Col();
+ SCROW nRow = aPos.Row();
+ switch (rData.GetOperation())
{
- ScAddress aPos = pData->GetPos();
- ScDetectiveFunc aFunc( &rDoc, aPos.Tab() );
- SCCOL nCol = aPos.Col();
- SCROW nRow = aPos.Row();
- switch (pData->GetOperation())
- {
- case SCDETOP_ADDSUCC:
- aFunc.ShowSucc( nCol, nRow );
- break;
- case SCDETOP_DELSUCC:
- aFunc.DeleteSucc( nCol, nRow );
- break;
- case SCDETOP_ADDPRED:
- aFunc.ShowPred( nCol, nRow );
- break;
- case SCDETOP_DELPRED:
- aFunc.DeletePred( nCol, nRow );
- break;
- case SCDETOP_ADDERROR:
- aFunc.ShowError( nCol, nRow );
- break;
- default:
- OSL_FAIL("falsche Op bei DetectiveRefresh");
- }
+ case SCDETOP_ADDSUCC:
+ aFunc.ShowSucc( nCol, nRow );
+ break;
+ case SCDETOP_DELSUCC:
+ aFunc.DeleteSucc( nCol, nRow );
+ break;
+ case SCDETOP_ADDPRED:
+ aFunc.ShowPred( nCol, nRow );
+ break;
+ case SCDETOP_DELPRED:
+ aFunc.DeletePred( nCol, nRow );
+ break;
+ case SCDETOP_ADDERROR:
+ aFunc.ShowError( nCol, nRow );
+ break;
+ default:
+ OSL_FAIL("falsche Op bei DetectiveRefresh");
}
}