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
31719b05
Kaydet (Commit)
31719b05
authored
May 17, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
initial test for databar length calculation
Change-Id: I6fb47b7987733e4047008430a62f77d58cc592ad
üst
a8fc2868
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
ucalc.cxx
sc/qa/unit/ucalc.cxx
+47
-0
ucalc.hxx
sc/qa/unit/ucalc.hxx
+2
-0
No files found.
sc/qa/unit/ucalc.cxx
Dosyayı görüntüle @
31719b05
...
...
@@ -5879,6 +5879,53 @@ void Test::testIconSet()
m_pDoc
->
DeleteTab
(
0
);
}
void
Test
::
testDataBarLength
()
{
m_pDoc
->
InsertTab
(
0
,
"Test"
);
ScConditionalFormat
*
pFormat
=
new
ScConditionalFormat
(
1
,
m_pDoc
);
ScRangeList
aRangeList
(
ScRange
(
0
,
0
,
0
,
0
,
7
,
0
));
pFormat
->
SetRange
(
aRangeList
);
ScDataBarFormat
*
pDatabar
=
new
ScDataBarFormat
(
m_pDoc
);
pFormat
->
AddEntry
(
pDatabar
);
ScDataBarFormatData
*
pFormatData
=
new
ScDataBarFormatData
();
pFormatData
->
mpLowerLimit
.
reset
(
new
ScColorScaleEntry
());
pFormatData
->
mpLowerLimit
->
SetValue
(
3
);
pFormatData
->
mpLowerLimit
->
SetType
(
COLORSCALE_VALUE
);
pFormatData
->
mpUpperLimit
.
reset
(
new
ScColorScaleEntry
());
pFormatData
->
mpUpperLimit
->
SetValue
(
7
);
pFormatData
->
mpUpperLimit
->
SetType
(
COLORSCALE_VALUE
);
pDatabar
->
SetDataBarData
(
pFormatData
);
struct
{
double
nVal
;
double
nLength
;
}
aValues
[]
=
{
{
2
,
0
},
{
3
,
0
},
{
4
,
25.0
},
{
5
,
50.0
},
{
6
,
75.0
},
{
7
,
100.0
},
{
8
,
100.0
}
};
for
(
size_t
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aValues
);
++
i
)
{
m_pDoc
->
SetValue
(
0
,
i
,
0
,
aValues
[
i
].
nVal
);
}
for
(
size_t
i
=
0
;
i
<
SAL_N_ELEMENTS
(
aValues
);
++
i
)
{
ScDataBarInfo
*
pInfo
=
pDatabar
->
GetDataBarInfo
(
ScAddress
(
0
,
i
,
0
));
CPPUNIT_ASSERT
(
pInfo
);
ASSERT_DOUBLES_EQUAL
(
aValues
[
i
].
nLength
,
pInfo
->
mnLength
);
}
delete
pFormat
;
m_pDoc
->
DeleteTab
(
0
);
}
void
Test
::
testImportStream
()
{
sc
::
AutoCalcSwitch
aAC
(
*
m_pDoc
,
true
);
// turn on auto calc.
...
...
sc/qa/unit/ucalc.hxx
Dosyayı görüntüle @
31719b05
...
...
@@ -419,6 +419,7 @@ public:
void
testCondCopyPasteSheetBetweenDoc
();
void
testCondCopyPasteSheet
();
void
testIconSet
();
void
testDataBarLength
();
void
testImportStream
();
void
testDeleteContents
();
...
...
@@ -631,6 +632,7 @@ public:
CPPUNIT_TEST
(
testCondCopyPasteSheetBetweenDoc
);
CPPUNIT_TEST
(
testCondCopyPasteSheet
);
CPPUNIT_TEST
(
testIconSet
);
CPPUNIT_TEST
(
testDataBarLength
);
CPPUNIT_TEST
(
testImportStream
);
CPPUNIT_TEST
(
testDeleteContents
);
CPPUNIT_TEST
(
testTransliterateText
);
...
...
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