summaryrefslogtreecommitdiff
path: root/sc/qa/unit/ucalc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/qa/unit/ucalc.cxx')
-rw-r--r--sc/qa/unit/ucalc.cxx44
1 files changed, 22 insertions, 22 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 0dcd60215edc..68b83625acb2 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -2707,12 +2707,12 @@ void Test::testGraphicsInGroup()
{
//Add a square
- Rectangle aOrigRect(2,2,100,100);
+ tools::Rectangle aOrigRect(2,2,100,100);
SdrRectObj *pObj = new SdrRectObj(aOrigRect);
pPage->InsertObject(pObj);
- const Rectangle &rNewRect = pObj->GetLogicRect();
+ const tools::Rectangle &rNewRect = pObj->GetLogicRect();
CPPUNIT_ASSERT_EQUAL_MESSAGE("must have equal position and size",
- static_cast<const Rectangle &>(aOrigRect), rNewRect);
+ static_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
ScDrawLayer::SetPageAnchored(*pObj);
@@ -2720,15 +2720,15 @@ void Test::testGraphicsInGroup()
m_pDoc->ShowRows(0, 100, 0, false);
m_pDoc->SetDrawPageSize(0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should not change when page anchored",
- static_cast<const Rectangle &>(aOrigRect), rNewRect);
+ static_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
m_pDoc->ShowRows(0, 100, 0, true);
m_pDoc->SetDrawPageSize(0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should not change when page anchored",
- static_cast<const Rectangle &>(aOrigRect), rNewRect);
+ static_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("That shouldn't change size or positioning",
- static_cast<const Rectangle &>(aOrigRect), rNewRect);
+ static_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
m_pDoc->ShowRows(0, 100, 0, false);
m_pDoc->SetDrawPageSize(0);
@@ -2739,21 +2739,21 @@ void Test::testGraphicsInGroup()
m_pDoc->ShowRows(0, 100, 0, true);
m_pDoc->SetDrawPageSize(0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should not change when page anchored",
- static_cast<const Rectangle &>(aOrigRect), rNewRect);
+ static_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
}
{
// Add a circle.
- Rectangle aOrigRect = Rectangle(10,10,210,210); // 200 x 200
+ tools::Rectangle aOrigRect = tools::Rectangle(10,10,210,210); // 200 x 200
SdrCircObj* pObj = new SdrCircObj(OBJ_CIRC, aOrigRect);
pPage->InsertObject(pObj);
- const Rectangle& rNewRect = pObj->GetLogicRect();
+ const tools::Rectangle& rNewRect = pObj->GetLogicRect();
CPPUNIT_ASSERT_EQUAL_MESSAGE("Position and size of the circle shouldn't change when inserted into the page.",
- static_cast<const Rectangle &>(aOrigRect), rNewRect);
+ static_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Size changed when cell anchored. Not good.",
- static_cast<const Rectangle &>(aOrigRect), rNewRect);
+ static_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
// Insert 2 rows at the top. This should push the circle object down.
m_pDoc->InsertRow(0, 0, MAXCOL, 0, 0, 2);
@@ -2767,33 +2767,33 @@ void Test::testGraphicsInGroup()
m_pDoc->DeleteRow(0, 0, MAXCOL, 0, 0, 2);
m_pDoc->SetDrawPageSize(0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Failed to move back to its original position.",
- static_cast<const Rectangle &>(aOrigRect), rNewRect);
+ static_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
}
{
// Add a line.
basegfx::B2DPolygon aTempPoly;
Point aStartPos(10,300), aEndPos(110,200); // bottom-left to top-right.
- Rectangle aOrigRect(10,200,110,300); // 100 x 100
+ tools::Rectangle aOrigRect(10,200,110,300); // 100 x 100
aTempPoly.append(basegfx::B2DPoint(aStartPos.X(), aStartPos.Y()));
aTempPoly.append(basegfx::B2DPoint(aEndPos.X(), aEndPos.Y()));
SdrPathObj* pObj = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aTempPoly));
pObj->NbcSetLogicRect(aOrigRect);
pPage->InsertObject(pObj);
- const Rectangle& rNewRect = pObj->GetLogicRect();
+ const tools::Rectangle& rNewRect = pObj->GetLogicRect();
CPPUNIT_ASSERT_EQUAL_MESSAGE("Size differ.",
- static_cast<const Rectangle &>(aOrigRect), rNewRect);
+ static_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Size changed when cell-anchored. Not good.",
- static_cast<const Rectangle &>(aOrigRect), rNewRect);
+ static_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
// 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_EQUAL_MESSAGE("Size of a line object changed after row insertion and removal.",
- static_cast<const Rectangle &>(aOrigRect), rNewRect);
+ static_cast<const tools::Rectangle &>(aOrigRect), rNewRect);
sal_Int32 n = pObj->GetPointCount();
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be exactly 2 points in a line object.", static_cast<sal_Int32>(2), n);
@@ -2817,7 +2817,7 @@ void Test::testGraphicsOnSheetMove()
CPPUNIT_ASSERT_MESSAGE("No page instance for the 1st sheet.", pPage);
// Insert an object.
- Rectangle aObjRect(2,2,100,100);
+ tools::Rectangle aObjRect(2,2,100,100);
SdrObject* pObj = new SdrRectObj(aObjRect);
pPage->InsertObject(pObj);
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0);
@@ -5647,9 +5647,9 @@ void Test::testAnchoredRotatedShape()
m_pDoc->SetColWidth( nCol, 0, sc::HMMToTwips( 1000 ) );
{
//Add a rect
- Rectangle aRect( 4000, 5000, 10000, 7000 );
+ tools::Rectangle aRect( 4000, 5000, 10000, 7000 );
- Rectangle aRotRect( 6000, 3000, 8000, 9000 );
+ tools::Rectangle aRotRect( 6000, 3000, 8000, 9000 );
SdrRectObj *pObj = new SdrRectObj(aRect);
pPage->InsertObject(pObj);
Point aRef1(pObj->GetSnapRect().Center());
@@ -5660,7 +5660,7 @@ void Test::testAnchoredRotatedShape()
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0);
- Rectangle aSnap = pObj->GetSnapRect();
+ tools::Rectangle aSnap = pObj->GetSnapRect();
CPPUNIT_ASSERT_EQUAL( true, testEqualsWithTolerance( aRotRect.GetHeight(), aSnap.GetHeight(), TOLERANCE ) );
CPPUNIT_ASSERT_EQUAL( true, testEqualsWithTolerance( aRotRect.GetWidth(), aSnap.GetWidth(), TOLERANCE ) );
CPPUNIT_ASSERT_EQUAL( true, testEqualsWithTolerance( aRotRect.Left(), aSnap.Left(), TOLERANCE ) );
@@ -6427,7 +6427,7 @@ void Test::testUndoDataAnchor()
CPPUNIT_ASSERT_MESSAGE("No page instance for the 1st sheet.", pPage);
// Insert an object.
- Rectangle aObjRect(2,1000,100,1100);
+ tools::Rectangle aObjRect(2,1000,100,1100);
SdrObject* pObj = new SdrRectObj(aObjRect);
pPage->InsertObject(pObj);
ScDrawLayer::SetCellAnchoredFromPosition(*pObj, *m_pDoc, 0);