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
2a88873e
Kaydet (Commit)
2a88873e
authored
Nis 16, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add test for tdf#90511
Change-Id: Id4f338d8f19b796be10f035df0bdf28076f6511e
üst
514433a8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
0 deletions
+44
-0
colorscale.hxx
sc/inc/colorscale.hxx
+1
-0
condformat_theme_color.xlsx
sc/qa/unit/data/xlsx/condformat_theme_color.xlsx
+0
-0
subsequent_filters-test.cxx
sc/qa/unit/subsequent_filters-test.cxx
+35
-0
colorscale.cxx
sc/source/core/data/colorscale.cxx
+8
-0
No files found.
sc/inc/colorscale.hxx
Dosyayı görüntüle @
2a88873e
...
@@ -282,6 +282,7 @@ public:
...
@@ -282,6 +282,7 @@ public:
const_iterator
end
()
const
;
const_iterator
end
()
const
;
ScColorScaleEntry
*
GetEntry
(
size_t
nPos
);
ScColorScaleEntry
*
GetEntry
(
size_t
nPos
);
const
ScColorScaleEntry
*
GetEntry
(
size_t
nPos
)
const
;
size_t
size
()
const
;
size_t
size
()
const
;
...
...
sc/qa/unit/data/xlsx/condformat_theme_color.xlsx
0 → 100644
Dosyayı görüntüle @
2a88873e
File added
sc/qa/unit/subsequent_filters-test.cxx
Dosyayı görüntüle @
2a88873e
...
@@ -131,6 +131,7 @@ public:
...
@@ -131,6 +131,7 @@ public:
void
testColorScaleXLSX
();
void
testColorScaleXLSX
();
void
testNewCondFormatODS
();
void
testNewCondFormatODS
();
void
testNewCondFormatXLSX
();
void
testNewCondFormatXLSX
();
void
testCondFormatThemeColorXLSX
();
void
testLiteralInFormulaXLS
();
void
testLiteralInFormulaXLS
();
...
@@ -237,6 +238,7 @@ public:
...
@@ -237,6 +238,7 @@ public:
CPPUNIT_TEST
(
testColorScaleXLSX
);
CPPUNIT_TEST
(
testColorScaleXLSX
);
CPPUNIT_TEST
(
testNewCondFormatODS
);
CPPUNIT_TEST
(
testNewCondFormatODS
);
CPPUNIT_TEST
(
testNewCondFormatXLSX
);
CPPUNIT_TEST
(
testNewCondFormatXLSX
);
CPPUNIT_TEST
(
testCondFormatThemeColorXLSX
);
CPPUNIT_TEST
(
testLiteralInFormulaXLS
);
CPPUNIT_TEST
(
testLiteralInFormulaXLS
);
CPPUNIT_TEST
(
testNumberFormatHTML
);
CPPUNIT_TEST
(
testNumberFormatHTML
);
...
@@ -2342,6 +2344,39 @@ void ScFiltersTest::testNewCondFormatXLSX()
...
@@ -2342,6 +2344,39 @@ void ScFiltersTest::testNewCondFormatXLSX()
xDocSh
->
DoClose
();
xDocSh
->
DoClose
();
}
}
void
ScFiltersTest
::
testCondFormatThemeColorXLSX
()
{
ScDocShellRef
xDocSh
=
ScBootstrapFixture
::
loadDoc
(
"condformat_theme_color."
,
XLSX
);
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load condformat_theme_color.xlsx"
,
xDocSh
.
Is
());
ScDocument
&
rDoc
=
xDocSh
->
GetDocument
();
ScConditionalFormat
*
pFormat
=
rDoc
.
GetCondFormat
(
0
,
0
,
0
);
const
ScFormatEntry
*
pEntry
=
pFormat
->
GetEntry
(
0
);
CPPUNIT_ASSERT
(
pEntry
);
CPPUNIT_ASSERT_EQUAL
(
pEntry
->
GetType
(),
condformat
::
DATABAR
);
const
ScDataBarFormat
*
pDataBar
=
static_cast
<
const
ScDataBarFormat
*>
(
pEntry
);
const
ScDataBarFormatData
*
pDataBarFormatData
=
pDataBar
->
GetDataBarData
();
CPPUNIT_ASSERT_EQUAL
(
Color
(
157
,
195
,
230
),
pDataBarFormatData
->
maPositiveColor
);
CPPUNIT_ASSERT
(
pDataBarFormatData
->
mpNegativeColor
.
get
());
CPPUNIT_ASSERT_EQUAL
(
Color
(
COL_LIGHTRED
),
*
pDataBarFormatData
->
mpNegativeColor
.
get
());
pFormat
=
rDoc
.
GetCondFormat
(
0
,
0
,
1
);
pEntry
=
pFormat
->
GetEntry
(
0
);
CPPUNIT_ASSERT
(
pEntry
);
CPPUNIT_ASSERT_EQUAL
(
pEntry
->
GetType
(),
condformat
::
COLORSCALE
);
const
ScColorScaleFormat
*
pColorScale
=
static_cast
<
const
ScColorScaleFormat
*>
(
pEntry
);
CPPUNIT_ASSERT_EQUAL
(
size_t
(
2
),
pColorScale
->
size
());
const
ScColorScaleEntry
*
pColorScaleEntry
=
pColorScale
->
GetEntry
(
0
);
CPPUNIT_ASSERT
(
pColorScaleEntry
);
CPPUNIT_ASSERT_EQUAL
(
Color
(
255
,
230
,
153
),
pColorScaleEntry
->
GetColor
());
pColorScaleEntry
=
pColorScale
->
GetEntry
(
1
);
CPPUNIT_ASSERT
(
pColorScaleEntry
);
CPPUNIT_ASSERT_EQUAL
(
Color
(
157
,
195
,
230
),
pColorScaleEntry
->
GetColor
());
}
void
ScFiltersTest
::
testLiteralInFormulaXLS
()
void
ScFiltersTest
::
testLiteralInFormulaXLS
()
{
{
ScDocShellRef
xDocSh
=
loadDoc
(
"shared-string/literal-in-formula."
,
XLS
);
ScDocShellRef
xDocSh
=
loadDoc
(
"shared-string/literal-in-formula."
,
XLS
);
...
...
sc/source/core/data/colorscale.cxx
Dosyayı görüntüle @
2a88873e
...
@@ -679,6 +679,14 @@ ScColorScaleEntry* ScColorScaleFormat::GetEntry(size_t nPos)
...
@@ -679,6 +679,14 @@ ScColorScaleEntry* ScColorScaleFormat::GetEntry(size_t nPos)
return
&
maColorScales
[
nPos
];
return
&
maColorScales
[
nPos
];
}
}
const
ScColorScaleEntry
*
ScColorScaleFormat
::
GetEntry
(
size_t
nPos
)
const
{
if
(
maColorScales
.
size
()
<=
nPos
)
return
NULL
;
return
&
maColorScales
[
nPos
];
}
size_t
ScColorScaleFormat
::
size
()
const
size_t
ScColorScaleFormat
::
size
()
const
{
{
return
maColorScales
.
size
();
return
maColorScales
.
size
();
...
...
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