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
029bd007
Kaydet (Commit)
029bd007
authored
Kas 04, 2016
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
unit test for tdf#103684, calculate status bar function across sheets
Change-Id: I8205cf56628b6b4d4b5d655386df994a9c02a1ad
üst
334a03d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
ucalc.cxx
sc/qa/unit/ucalc.cxx
+30
-0
No files found.
sc/qa/unit/ucalc.cxx
Dosyayı görüntüle @
029bd007
...
...
@@ -676,6 +676,36 @@ void Test::testSelectionFunction()
}
}
// Calculate function across selected sheets.
clearSheet(m_pDoc, 0);
m_pDoc->InsertTab(1, "Test2");
m_pDoc->InsertTab(2, "Test3");
// Set values at B2 and C3 on each sheet.
m_pDoc->SetValue(ScAddress(1,1,0), 1.0);
m_pDoc->SetValue(ScAddress(2,2,0), 2.0);
m_pDoc->SetValue(ScAddress(1,1,1), 4.0);
m_pDoc->SetValue(ScAddress(2,2,1), 8.0);
m_pDoc->SetValue(ScAddress(1,1,2), 16.0);
m_pDoc->SetValue(ScAddress(2,2,2), 32.0);
// Mark B2 and C3 on first sheet.
aRanges.RemoveAll();
aRanges.Append(ScRange(1,1,0)); // B2
aRanges.Append(ScRange(2,2,0)); // C3
aMark.MarkFromRangeList(aRanges, true);
// Additionally select third sheet.
aMark.SelectTable(2, true);
{
double fRes = 0.0;
bool bRes = m_pDoc->GetSelectionFunction( SUBTOTAL_FUNC_SUM, ScAddress(), aMark, fRes);
CPPUNIT_ASSERT_MESSAGE("Failed to fetch selection function result.", bRes);
CPPUNIT_ASSERT_EQUAL_MESSAGE("1+2+16+32=", 51.0, fRes);
}
m_pDoc->DeleteTab(2);
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
}
...
...
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