summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-11-01 14:41:51 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-11-01 16:30:04 -0400
commitb10833d4db6046f2d32ea44a60cb19a626d80447 (patch)
treeb042decf3f1dbec270bf9c2758564da1aa1c3f05 /sc/qa
parentcf0a88962f5c7835d417fb272e4792fb921139af (diff)
No more "increase / decrease of recalc level" for drawing objects.
That scheme made it extremely hard to determine when the object's positions get recalculated. It's better to figure out when to recalc drawing objects' positions, and call SetDrawPageSize() manually at that point (and only once!) Change-Id: I05d9b693cfc9310f5472ed8287c7a2e36646f4d7
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/ucalc.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index b489cb752e8b..247a75fc3e77 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4078,19 +4078,23 @@ void Test::testGraphicsInGroup()
//Use a range of rows guaranteed to include all of the square
m_pDoc->ShowRows(0, 100, 0, false);
+ m_pDoc->SetDrawPageSize(0);
CPPUNIT_ASSERT_MESSAGE("Should not change when page anchored", aOrigRect == rNewRect);
m_pDoc->ShowRows(0, 100, 0, true);
+ m_pDoc->SetDrawPageSize(0);
CPPUNIT_ASSERT_MESSAGE("Should not change when page anchored", aOrigRect == rNewRect);
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0);
CPPUNIT_ASSERT_MESSAGE("That shouldn't change size or positioning", aOrigRect == rNewRect);
m_pDoc->ShowRows(0, 100, 0, false);
+ m_pDoc->SetDrawPageSize(0);
CPPUNIT_ASSERT_MESSAGE("Left and Right should be unchanged",
aOrigRect.nLeft == rNewRect.nLeft && aOrigRect.nRight == rNewRect.nRight);
CPPUNIT_ASSERT_MESSAGE("Height should be minimum allowed height",
(rNewRect.nBottom - rNewRect.nTop) <= 1);
m_pDoc->ShowRows(0, 100, 0, true);
+ m_pDoc->SetDrawPageSize(0);
CPPUNIT_ASSERT_MESSAGE("Should not change when page anchored", aOrigRect == rNewRect);
}
@@ -4109,6 +4113,7 @@ void Test::testGraphicsInGroup()
// Insert 2 rows at the top. This should push the circle object down.
m_pDoc->InsertRow(0, 0, MAXCOL, 0, 0, 2);
+ m_pDoc->SetDrawPageSize(0);
// Make sure the size of the circle is still identical.
CPPUNIT_ASSERT_MESSAGE("Size of the circle has changed, but shouldn't!",
@@ -4116,6 +4121,7 @@ void Test::testGraphicsInGroup()
// Delete 2 rows at the top. This should bring the circle object to its original position.
m_pDoc->DeleteRow(0, 0, MAXCOL, 0, 0, 2);
+ m_pDoc->SetDrawPageSize(0);
CPPUNIT_ASSERT_MESSAGE("Failed to move back to its original position.", aOrigRect == rNewRect);
}
@@ -4139,6 +4145,7 @@ void Test::testGraphicsInGroup()
// Insert 2 rows at the top and delete them immediately.
m_pDoc->InsertRow(0, 0, MAXCOL, 0, 0, 2);
m_pDoc->DeleteRow(0, 0, MAXCOL, 0, 0, 2);
+ m_pDoc->SetDrawPageSize(0);
CPPUNIT_ASSERT_MESSAGE("Size of a line object changed after row insertion and removal.",
aOrigRect == rNewRect);