summaryrefslogtreecommitdiff
path: root/sc/qa/unit/subsequent_filters-test.cxx
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-08-02 16:13:57 +0200
committerArtur Dorda <artur.dorda+libo@gmail.com>2012-08-15 13:42:13 +0200
commitac2278bb183df946f2007c4db66d0b78729bcc87 (patch)
treea53298579ae4236f69fc15c182916dd3629b2f5e /sc/qa/unit/subsequent_filters-test.cxx
parenta8a19a7b61e88e03db6fc85fd11120daa67b79ce (diff)
Border test in Calc now also checks distance, out- and inWidth in all borders
Change-Id: I196b87fb6e59e182ff1f674dc79428cb53612b94
Diffstat (limited to 'sc/qa/unit/subsequent_filters-test.cxx')
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx66
1 files changed, 47 insertions, 19 deletions
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 7dd0c9b2044b..37f701f59481 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -779,30 +779,46 @@ struct Border
sal_Int32 topWidth;
sal_Int32 rightWidth;
sal_Int32 bottomWidth;
- Border(sal_Int16 col, sal_Int32 r, sal_Int32 lW, sal_Int32 tW, sal_Int32 rW, sal_Int32 bW):
- column(col), row(r), leftWidth(lW), topWidth(tW), rightWidth(rW), bottomWidth(bW) {};
+ sal_uInt16 lOutWidth;
+ sal_uInt16 lInWidth;
+ sal_uInt16 lDistance;
+ sal_uInt16 tOutWidth;
+ sal_uInt16 tInWidth;
+ sal_uInt16 tDistance;
+ sal_uInt16 rOutWidth;
+ sal_uInt16 rInWidth;
+ sal_uInt16 rDistance;
+ sal_uInt16 bOutWidth;
+ sal_uInt16 bInWidth;
+ sal_uInt16 bDistance;
+ // that's a monstrum
+ Border(sal_Int16 col, sal_Int32 r, sal_Int32 lW, sal_Int32 tW, sal_Int32 rW, sal_Int32 bW, sal_uInt16 lOutW, sal_uInt16 lInW,
+ sal_uInt16 lDist, sal_uInt16 tOutW, sal_uInt16 tInW, sal_uInt16 tDist, sal_uInt16 rOutW, sal_uInt16 rInW, sal_uInt16 rDist,
+ sal_uInt16 bOutW, sal_uInt16 bInW, sal_uInt16 bDist):
+ column(col), row(r), leftWidth(lW), topWidth(tW), rightWidth(rW), bottomWidth(bW), lOutWidth(lOutW), lInWidth(lInW), lDistance(lDist),
+ tOutWidth(tOutW), tInWidth(tInW), tDistance(tDist), rOutWidth(rOutW), rInWidth(rInW), rDistance(rDist), bOutWidth(bOutW), bInWidth(bInW), bDistance(bDist) {};
};
void ScFiltersTest::testBordersOoo33()
{
std::vector<Border> borders;
- borders.push_back(Border(1, 1, 22, 22, 22, 22));
- borders.push_back(Border(1, 3, 52, 52, 52, 52));
- borders.push_back(Border(1, 5, 60, 60, 60, 60));
- borders.push_back(Border(1, 7, 150, 150, 150, 150));
- borders.push_back(Border(1, 9, 71, 71, 71, 71));
- borders.push_back(Border(1, 11, 101, 101, 101, 101));
- borders.push_back(Border(1, 13, 131, 131, 131, 131));
- borders.push_back(Border(1, 15, 120, 120, 120, 120));
- borders.push_back(Border(1, 17, 90, 90, 90, 90));
- borders.push_back(Border(1, 19, 180, 180, 180, 180));
- borders.push_back(Border(1, 21, 180, 180, 180, 180));
- borders.push_back(Border(4, 1, 1, 1, 1, 1));
- borders.push_back(Border(4, 3, 10, 10, 10, 10));
- borders.push_back(Border(4, 5, 20, 20, 20, 20));
- borders.push_back(Border(4, 7, 50, 50, 50, 50));
- borders.push_back(Border(4, 9, 80, 80, 80, 80));
- borders.push_back(Border(4, 11, 100, 100, 100, 100));
+ borders.push_back(Border(1, 1, 22, 22, 22, 22, 1, 1, 20, 1, 1, 20, 1, 1, 20, 1, 1, 20));
+ borders.push_back(Border(1, 3, 52, 52, 52, 52, 1, 1, 50, 1, 1, 50, 1, 1, 50, 1, 1, 50));
+ borders.push_back(Border(1, 5, 60, 60, 60, 60, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20));
+ borders.push_back(Border(1, 7, 150, 150, 150, 150, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50));
+ borders.push_back(Border(1, 9, 71, 71, 71, 71, 20, 1, 50, 20, 1, 50, 20, 1, 50, 20, 1, 50));
+ borders.push_back(Border(1, 11, 101, 101, 101, 101, 50, 1, 50, 50, 1, 50, 50, 1, 50, 50, 1, 50));
+ borders.push_back(Border(1, 13, 131, 131, 131, 131, 80, 1, 50, 80, 1, 50, 80, 1, 50, 80, 1, 50));
+ borders.push_back(Border(1, 15, 120, 120, 120, 120, 50, 20, 50, 50, 20, 50, 50, 20, 50, 50, 20, 50));
+ borders.push_back(Border(1, 17, 90, 90, 90, 90, 20, 50, 20, 20, 50, 20, 20, 50, 20, 20, 50, 20));
+ borders.push_back(Border(1, 19, 180, 180, 180, 180, 80, 50, 50, 80, 50, 50, 80, 50, 50, 80, 50, 50));
+ borders.push_back(Border(1, 21, 180, 180, 180, 180, 50, 80, 50, 50, 80, 50, 50, 80, 50, 50, 80, 50));
+ borders.push_back(Border(4, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0));
+ borders.push_back(Border(4, 3, 10, 10, 10, 10, 10, 0, 0, 10, 0, 0, 10, 0, 0, 10, 0, 0));
+ borders.push_back(Border(4, 5, 20, 20, 20, 20, 20, 0, 0, 20, 0, 0, 20, 0, 0, 20, 0, 0));
+ borders.push_back(Border(4, 7, 50, 50, 50, 50, 50, 0, 0, 50, 0, 0, 50, 0, 0, 50, 0, 0));
+ borders.push_back(Border(4, 9, 80, 80, 80, 80, 80, 0, 0, 80, 0, 0, 80, 0, 0, 80, 0, 0));
+ borders.push_back(Border(4, 11, 100, 100, 100, 100, 100, 0, 0, 100, 0, 0, 100, 0, 0, 100, 0, 0));
const rtl::OUString aFileNameBase(RTL_CONSTASCII_USTRINGPARAM("borders_ooo33."));
ScDocShellRef xDocSh = loadDoc( aFileNameBase, 0);
@@ -828,6 +844,18 @@ void ScFiltersTest::testBordersOoo33()
CPPUNIT_ASSERT_EQUAL(borders[temp].topWidth, pTop->GetWidth());
CPPUNIT_ASSERT_EQUAL(borders[temp].rightWidth, pRight->GetWidth());
CPPUNIT_ASSERT_EQUAL(borders[temp].bottomWidth, pBottom->GetWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].lOutWidth, pLeft->GetOutWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].lInWidth, pLeft->GetInWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].lDistance, pLeft->GetDistance());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].tOutWidth, pTop->GetOutWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].tInWidth, pTop->GetInWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].tDistance, pTop->GetDistance());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].rOutWidth, pRight->GetOutWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].rInWidth, pRight->GetInWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].rDistance, pRight->GetDistance());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].bOutWidth, pBottom->GetOutWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].bInWidth, pBottom->GetInWidth());
+ CPPUNIT_ASSERT_EQUAL(borders[temp].bDistance, pBottom->GetDistance());
++temp;
}
}