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
1e5b495a
Kaydet (Commit)
1e5b495a
authored
Nis 29, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#76912: Write a test for this.
Change-Id: I3b14447130c32d4b21010380f7901c0d20004ffc
üst
ab67b79c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
ucalc_formula.cxx
sc/qa/unit/ucalc_formula.cxx
+23
-0
No files found.
sc/qa/unit/ucalc_formula.cxx
Dosyayı görüntüle @
1e5b495a
...
@@ -1511,6 +1511,29 @@ void Test::testFormulaRefUpdateInsertRows()
...
@@ -1511,6 +1511,29 @@ void Test::testFormulaRefUpdateInsertRows()
if
(
!
checkFormula
(
*
m_pDoc
,
ScAddress
(
1
,
6
,
0
),
"SUM(B4:B6)"
))
if
(
!
checkFormula
(
*
m_pDoc
,
ScAddress
(
1
,
6
,
0
),
"SUM(B4:B6)"
))
CPPUNIT_FAIL
(
"Wrong formula!"
);
CPPUNIT_FAIL
(
"Wrong formula!"
);
// Clear and start over.
clearSheet
(
m_pDoc
,
0
);
// Set raw values in A4:A6.
m_pDoc
->
SetValue
(
ScAddress
(
0
,
3
,
0
),
1.0
);
m_pDoc
->
SetValue
(
ScAddress
(
0
,
4
,
0
),
2.0
);
m_pDoc
->
SetValue
(
ScAddress
(
0
,
5
,
0
),
3.0
);
// Set formula in A3 to reference A4:A6.
m_pDoc
->
SetString
(
ScAddress
(
0
,
2
,
0
),
"=MAX(A4:A6)"
);
CPPUNIT_ASSERT_EQUAL
(
3.0
,
m_pDoc
->
GetValue
(
ScAddress
(
0
,
2
,
0
)));
// Insert 3 rows over 2:4. This should push A3:A6 to A6:A9.
rFunc
.
InsertCells
(
ScRange
(
0
,
1
,
0
,
MAXCOL
,
3
,
0
),
&
aMark
,
INS_INSROWS
,
false
,
true
,
false
);
ScFormulaCell
*
pFC
=
m_pDoc
->
GetFormulaCell
(
ScAddress
(
0
,
5
,
0
));
CPPUNIT_ASSERT
(
pFC
);
CPPUNIT_ASSERT_MESSAGE
(
"This formula cell should not be an error."
,
pFC
->
GetErrCode
()
==
0
);
CPPUNIT_ASSERT_EQUAL
(
3.0
,
m_pDoc
->
GetValue
(
ScAddress
(
0
,
5
,
0
)));
if
(
!
checkFormula
(
*
m_pDoc
,
ScAddress
(
0
,
5
,
0
),
"MAX(A7:A9)"
))
CPPUNIT_FAIL
(
"Wrong formula!"
);
m_pDoc
->
DeleteTab
(
0
);
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