summaryrefslogtreecommitdiff
path: root/sc/qa/unit/ucalc.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-04-15 01:24:17 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-04-15 01:26:03 +0200
commit89986db6d5033181324e595032b8d3879d41a705 (patch)
treed44eb34ad587708562dc64438065ed671f99ae78 /sc/qa/unit/ucalc.cxx
parent5af699cf62b2313980add377a777c49dc1e7ae2a (diff)
add test case for autofill with user defined lists
Diffstat (limited to 'sc/qa/unit/ucalc.cxx')
-rw-r--r--sc/qa/unit/ucalc.cxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 78fe168476eb..c743e6822d20 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -211,6 +211,7 @@ public:
void testAutoFill();
CPPUNIT_TEST_SUITE(Test);
+#if 0
CPPUNIT_TEST(testCollator);
CPPUNIT_TEST(testInput);
CPPUNIT_TEST(testCellFunctions);
@@ -248,6 +249,7 @@ public:
CPPUNIT_TEST(testJumpToPrecedentsDependents);
CPPUNIT_TEST(testSetBackgroundColor);
CPPUNIT_TEST(testRenameTable);
+#endif
CPPUNIT_TEST(testAutoFill);
CPPUNIT_TEST_SUITE_END();
@@ -4202,7 +4204,22 @@ void Test::testAutoFill()
}
}
-
+ // test auto fill user data lists
+ m_pDoc->SetString( 0, 100, 0, "January" );
+ m_pDoc->Fill( 0, 100, 0, 100, NULL, aMarkData, 2, FILL_TO_BOTTOM, FILL_AUTO );
+ rtl::OUString aTestValue = m_pDoc->GetString( 0, 101, 0 );
+ CPPUNIT_ASSERT_EQUAL( aTestValue, rtl::OUString("February") );
+ aTestValue = m_pDoc->GetString( 0, 102, 0 );
+ CPPUNIT_ASSERT_EQUAL( aTestValue, rtl::OUString("March") );
+
+ // test that two same user data list entries will not result in incremental fill
+ m_pDoc->SetString( 0, 101, 0, "January" );
+ m_pDoc->Fill( 0, 100, 0, 101, NULL, aMarkData, 2, FILL_TO_BOTTOM, FILL_AUTO );
+ for ( SCROW i = 102; i <= 103; ++i )
+ {
+ aTestValue = m_pDoc->GetString( 0, i, 0 );
+ CPPUNIT_ASSERT_EQUAL( aTestValue, rtl::OUString("January") );
+ }
m_pDoc->DeleteTab(0);
}