Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
86b1ccc7
Kaydet (Commit)
86b1ccc7
authored
Kas 02, 2012
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
New unit test for shifting cells.
Change-Id: Ic004490ffaf1da5cdb43f0a1336437eb312813bf
üst
069e4f80
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
ucalc.cxx
sc/qa/unit/ucalc.cxx
+24
-0
No files found.
sc/qa/unit/ucalc.cxx
Dosyayı görüntüle @
86b1ccc7
...
...
@@ -228,6 +228,7 @@ public:
void testFindAreaPosColRight();
void testSort();
void testSortWithFormulaRefs();
void testShiftCells();
void testDeleteRow();
void testDeleteCol();
...
...
@@ -281,6 +282,7 @@ public:
CPPUNIT_TEST(testFindAreaPosColRight);
CPPUNIT_TEST(testSort);
CPPUNIT_TEST(testSortWithFormulaRefs);
CPPUNIT_TEST(testShiftCells);
CPPUNIT_TEST(testDeleteRow);
CPPUNIT_TEST(testDeleteCol);
CPPUNIT_TEST_SUITE_END();
...
...
@@ -5199,6 +5201,28 @@ void Test::testSort()
pDoc->DeleteTab(0);
}
void Test::testShiftCells()
{
m_pDoc->InsertTab(0, "foo");
OUString aTestVal("Some Text");
// Text into cell E5.
m_pDoc->SetString(4, 3, 0, aTestVal);
// Insert cell at D5. This should shift the string cell to right.
m_pDoc->InsertCol(3, 0, 3, 0, 3, 1);
OUString aStr = m_pDoc->GetString(5, 3, 0);
CPPUNIT_ASSERT_MESSAGE("We should have a string cell here.", aStr == aTestVal);
// Delete cell D5, to shift the text cell back into D5.
m_pDoc->DeleteCol(3, 0, 3, 0, 3, 1);
aStr = m_pDoc->GetString(4, 3, 0);
CPPUNIT_ASSERT_MESSAGE("We should have a string cell here.", aStr == aTestVal);
m_pDoc->DeleteTab(0);
}
void Test::testDeleteRow()
{
ScDocument* pDoc = m_xDocShRef->GetDocument();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment