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
13941df2
Kaydet (Commit)
13941df2
authored
Tem 24, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add test for moving the formula cells that reference stationary range.
Change-Id: I6f996e4c8535371c57c9d43012baa6118160f834
üst
cdc9c6d5
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 @
13941df2
...
@@ -884,6 +884,29 @@ void Test::testFormulaRefUpdateMove()
...
@@ -884,6 +884,29 @@ void Test::testFormulaRefUpdateMove()
if
(
!
checkFormula
(
*
m_pDoc
,
ScAddress
(
0
,
11
,
0
),
"$D$6"
))
if
(
!
checkFormula
(
*
m_pDoc
,
ScAddress
(
0
,
11
,
0
),
"$D$6"
))
CPPUNIT_FAIL
(
"Wrong formula."
);
CPPUNIT_FAIL
(
"Wrong formula."
);
// Move A9:A12 to B10:B13.
bMoved
=
rFunc
.
MoveBlock
(
ScRange
(
0
,
8
,
0
,
0
,
11
,
0
),
ScAddress
(
1
,
9
,
0
),
true
,
false
,
false
,
false
);
CPPUNIT_ASSERT_MESSAGE
(
"Failed to move A9:A12 to B10:B13"
,
bMoved
);
// The results of these formula cells should still stay the same.
CPPUNIT_ASSERT_EQUAL
(
6.0
,
m_pDoc
->
GetValue
(
1
,
9
,
0
));
CPPUNIT_ASSERT_EQUAL
(
6.0
,
m_pDoc
->
GetValue
(
1
,
10
,
0
));
CPPUNIT_ASSERT_EQUAL
(
2.0
,
m_pDoc
->
GetValue
(
1
,
11
,
0
));
CPPUNIT_ASSERT_EQUAL
(
3.0
,
m_pDoc
->
GetValue
(
1
,
12
,
0
));
// Displayed formulas should stay the same since the referenced range hasn't moved.
if
(
!
checkFormula
(
*
m_pDoc
,
ScAddress
(
1
,
9
,
0
),
"SUM(D4:D6)"
))
CPPUNIT_FAIL
(
"Wrong formula."
);
if
(
!
checkFormula
(
*
m_pDoc
,
ScAddress
(
1
,
10
,
0
),
"SUM($D$4:$D$6)"
))
CPPUNIT_FAIL
(
"Wrong formula."
);
if
(
!
checkFormula
(
*
m_pDoc
,
ScAddress
(
1
,
11
,
0
),
"D5"
))
CPPUNIT_FAIL
(
"Wrong formula."
);
if
(
!
checkFormula
(
*
m_pDoc
,
ScAddress
(
1
,
12
,
0
),
"$D$6"
))
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