summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-03-25 12:17:56 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-03-26 01:41:19 -0400
commit1772a834134fab77dd671c4255aa3cf6ff3755af (patch)
tree8e5758f7b79fc90dd4efb0c6b51caf8de9a38aa9 /sc
parentQuery content cell type directly from ScCellIterator. (diff)
downloadcore-1772a834134fab77dd671c4255aa3cf6ff3755af.tar.gz
core-1772a834134fab77dd671c4255aa3cf6ff3755af.zip
Reduce indentation level.
Change-Id: I13ca8c4815d8a674c2e4e33741678e8bf7c7ed4d
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/chgtrack.cxx51
1 files changed, 26 insertions, 25 deletions
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 655246576780..6d98741a0c3e 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2681,31 +2681,32 @@ void ScChangeTrack::AppendOneDeleteRange( const ScRange& rOrgRange,
void ScChangeTrack::LookUpContents( const ScRange& rOrgRange,
ScDocument* pRefDoc, SCsCOL nDx, SCsROW nDy, SCsTAB nDz )
{
- if ( pRefDoc )
- {
- ScAddress aPos;
- ScBigAddress aBigPos;
- ScCellIterator aIter( pRefDoc, rOrgRange );
- for (bool bHas = aIter.first(); bHas; bHas = aIter.next())
- {
- if (ScChangeActionContent::GetContentCellType(aIter))
- {
- aBigPos.Set( aIter.GetPos().Col() + nDx, aIter.GetPos().Row() + nDy,
- aIter.GetPos().Tab() + nDz );
- ScChangeActionContent* pContent = SearchContentAt( aBigPos, NULL );
- if ( !pContent )
- { // nicht getrackte Contents
- aPos.Set( aIter.GetPos().Col() + nDx, aIter.GetPos().Row() + nDy,
- aIter.GetPos().Tab() + nDz );
-
- ScBaseCell* pCell = aIter.getHackedBaseCell();
- GenerateDelContent( aPos, pCell, pRefDoc );
- //! der Content wird hier _nicht_ per AddContent hinzugefuegt,
- //! sondern in UpdateReference, um z.B. auch kreuzende Deletes
- //! korrekt zu erfassen
- }
- }
- }
+ if (!pRefDoc)
+ return;
+
+ ScAddress aPos;
+ ScBigAddress aBigPos;
+ ScCellIterator aIter( pRefDoc, rOrgRange );
+ for (bool bHas = aIter.first(); bHas; bHas = aIter.next())
+ {
+ if (!ScChangeActionContent::GetContentCellType(aIter))
+ continue;
+
+ aBigPos.Set( aIter.GetPos().Col() + nDx, aIter.GetPos().Row() + nDy,
+ aIter.GetPos().Tab() + nDz );
+ ScChangeActionContent* pContent = SearchContentAt( aBigPos, NULL );
+ if (pContent)
+ continue;
+
+ // nicht getrackte Contents
+ aPos.Set( aIter.GetPos().Col() + nDx, aIter.GetPos().Row() + nDy,
+ aIter.GetPos().Tab() + nDz );
+
+ ScBaseCell* pCell = aIter.getHackedBaseCell();
+ GenerateDelContent( aPos, pCell, pRefDoc );
+ //! der Content wird hier _nicht_ per AddContent hinzugefuegt,
+ //! sondern in UpdateReference, um z.B. auch kreuzende Deletes
+ //! korrekt zu erfassen
}
}