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
170616e9
Kaydet (Commit)
170616e9
authored
Ara 12, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#86572: Write test for this.
Change-Id: I00c3eaac473f0464e923e785cc50ad6769c78d41
üst
52781a55
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
0 deletions
+38
-0
ucalc.hxx
sc/qa/unit/ucalc.hxx
+2
-0
ucalc_sharedformula.cxx
sc/qa/unit/ucalc_sharedformula.cxx
+36
-0
No files found.
sc/qa/unit/ucalc.hxx
Dosyayı görüntüle @
170616e9
...
...
@@ -327,6 +327,7 @@ public:
void
testSharedFormulaMoveBlock
();
void
testSharedFormulaUpdateOnNamedRangeChange
();
void
testSharedFormulaUpdateOnDBChange
();
void
testSharedFormulaAbsCellListener
();
void
testFormulaPosition
();
void
testMixData
();
...
...
@@ -563,6 +564,7 @@ public:
CPPUNIT_TEST
(
testSharedFormulaInsertColumn
);
CPPUNIT_TEST
(
testSharedFormulaUpdateOnNamedRangeChange
);
CPPUNIT_TEST
(
testSharedFormulaUpdateOnDBChange
);
CPPUNIT_TEST
(
testSharedFormulaAbsCellListener
);
CPPUNIT_TEST
(
testFormulaPosition
);
CPPUNIT_TEST
(
testMixData
);
CPPUNIT_TEST
(
testJumpToPrecedentsDependents
);
...
...
sc/qa/unit/ucalc_sharedformula.cxx
Dosyayı görüntüle @
170616e9
...
...
@@ -1656,4 +1656,40 @@ void Test::testSharedFormulaUpdateOnDBChange()
m_pDoc
->
DeleteTab
(
0
);
}
void
Test
::
testSharedFormulaAbsCellListener
()
{
sc
::
AutoCalcSwitch
aACSwitch
(
*
m_pDoc
,
true
);
// turn on auto calc.
m_pDoc
->
InsertTab
(
0
,
"Test"
);
m_pDoc
->
SetValue
(
ScAddress
(
0
,
0
,
0
),
1.0
);
const
char
*
pData
[][
1
]
=
{
{
"=$A$1"
},
{
"=$A$1"
},
{
"=$A$1"
}
};
insertRangeData
(
m_pDoc
,
ScAddress
(
1
,
0
,
0
),
pData
,
SAL_N_ELEMENTS
(
pData
));
// A1 should have 3 listeners listening into it.
const
SvtBroadcaster
*
pBC
=
m_pDoc
->
GetBroadcaster
(
ScAddress
(
0
,
0
,
0
));
CPPUNIT_ASSERT
(
pBC
);
CPPUNIT_ASSERT_EQUAL
(
static_cast
<
size_t
>
(
3
),
pBC
->
GetAllListeners
().
size
());
// Check the formula results.
CPPUNIT_ASSERT_EQUAL
(
1.0
,
m_pDoc
->
GetValue
(
ScAddress
(
1
,
0
,
0
)));
CPPUNIT_ASSERT_EQUAL
(
1.0
,
m_pDoc
->
GetValue
(
ScAddress
(
1
,
1
,
0
)));
CPPUNIT_ASSERT_EQUAL
(
1.0
,
m_pDoc
->
GetValue
(
ScAddress
(
1
,
2
,
0
)));
// Change the value of A1 and make sure B1:B3 follows.
m_pDoc
->
SetValue
(
ScAddress
(
0
,
0
,
0
),
2.5
);
CPPUNIT_ASSERT_EQUAL
(
2.5
,
m_pDoc
->
GetValue
(
ScAddress
(
1
,
0
,
0
)));
CPPUNIT_ASSERT_EQUAL
(
2.5
,
m_pDoc
->
GetValue
(
ScAddress
(
1
,
1
,
0
)));
CPPUNIT_ASSERT_EQUAL
(
2.5
,
m_pDoc
->
GetValue
(
ScAddress
(
1
,
2
,
0
)));
m_pDoc
->
DeleteTab
(
0
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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