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
23de8cfe
Kaydet (Commit)
23de8cfe
authored
Nis 20, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add tests for trendline default values
Change-Id: Id1ff3b7dd10f6d200a0f2cd86ef7f8fa47722344
üst
4e35dfb3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
0 deletions
+57
-0
chart2import.cxx
chart2/qa/extras/chart2import.cxx
+57
-0
trendline.xlsx
chart2/qa/extras/data/xlsx/trendline.xlsx
+0
-0
trendline2007.xlsx
chart2/qa/extras/data/xlsx/trendline2007.xlsx
+0
-0
No files found.
chart2/qa/extras/chart2import.cxx
Dosyayı görüntüle @
23de8cfe
...
...
@@ -12,6 +12,7 @@
#include <com/sun/star/chart2/CurveStyle.hpp>
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart/XChartDocument.hpp>
#include <com/sun/star/chart/XChartData.hpp>
...
...
@@ -73,6 +74,8 @@ public:
void
testSmoothDefaultValue2007XLSX
();
void
testSmoothDefaultValue2013XLSX
();
void
testTrendlineDefaultValue2007XLSX
();
void
testTrendlineDefaultValue2013XLSX
();
CPPUNIT_TEST_SUITE
(
Chart2ImportTest
);
CPPUNIT_TEST
(
Fdo60083
);
...
...
@@ -110,6 +113,8 @@ public:
CPPUNIT_TEST
(
testDispBlanksAsDefaultValue2013XLSX
);
CPPUNIT_TEST
(
testSmoothDefaultValue2007XLSX
);
CPPUNIT_TEST
(
testSmoothDefaultValue2013XLSX
);
CPPUNIT_TEST
(
testTrendlineDefaultValue2007XLSX
);
CPPUNIT_TEST
(
testTrendlineDefaultValue2013XLSX
);
CPPUNIT_TEST_SUITE_END
();
private
:
...
...
@@ -853,6 +858,58 @@ void Chart2ImportTest::testSmoothDefaultValue2013XLSX()
CPPUNIT_ASSERT
(
eCurveStyle
!=
chart2
::
CurveStyle_LINES
);
}
void
Chart2ImportTest
::
testTrendlineDefaultValue2007XLSX
()
{
load
(
"/chart2/qa/extras/data/xlsx/"
,
"trendline2007.xlsx"
);
Reference
<
chart2
::
XChartDocument
>
xChartDoc
=
getChartDocFromSheet
(
0
,
mxComponent
);
CPPUNIT_ASSERT_MESSAGE
(
"failed to load chart"
,
xChartDoc
.
is
());
CPPUNIT_ASSERT
(
xChartDoc
.
is
());
Reference
<
chart2
::
XDataSeries
>
xDataSeries
=
getDataSeriesFromDoc
(
xChartDoc
,
0
);
CPPUNIT_ASSERT
(
xDataSeries
.
is
());
Reference
<
chart2
::
XRegressionCurveContainer
>
xRegressionCurveContainer
(
xDataSeries
,
UNO_QUERY_THROW
);
Sequence
<
Reference
<
chart2
::
XRegressionCurve
>
>
xRegressionCurveSequence
=
xRegressionCurveContainer
->
getRegressionCurves
();
CPPUNIT_ASSERT_EQUAL
((
sal_Int32
)
1
,
xRegressionCurveSequence
.
getLength
());
Reference
<
chart2
::
XRegressionCurve
>
xCurve
=
xRegressionCurveSequence
[
0
];
Reference
<
beans
::
XPropertySet
>
xPropSet
(
xCurve
->
getEquationProperties
(),
uno
::
UNO_QUERY_THROW
);
uno
::
Any
aAny
=
xPropSet
->
getPropertyValue
(
"ShowEquation"
);
bool
bShowEquation
=
true
;
CPPUNIT_ASSERT
(
aAny
>>=
bShowEquation
);
CPPUNIT_ASSERT
(
!
bShowEquation
);
aAny
=
xPropSet
->
getPropertyValue
(
"ShowCorrelationCoefficient"
);
bool
bShowCorrelation
=
true
;
CPPUNIT_ASSERT
(
aAny
>>=
bShowCorrelation
);
CPPUNIT_ASSERT
(
!
bShowCorrelation
);
}
void
Chart2ImportTest
::
testTrendlineDefaultValue2013XLSX
()
{
load
(
"/chart2/qa/extras/data/xlsx/"
,
"trendline.xlsx"
);
Reference
<
chart2
::
XChartDocument
>
xChartDoc
=
getChartDocFromSheet
(
0
,
mxComponent
);
CPPUNIT_ASSERT_MESSAGE
(
"failed to load chart"
,
xChartDoc
.
is
());
CPPUNIT_ASSERT
(
xChartDoc
.
is
());
Reference
<
chart2
::
XDataSeries
>
xDataSeries
=
getDataSeriesFromDoc
(
xChartDoc
,
0
);
CPPUNIT_ASSERT
(
xDataSeries
.
is
());
Reference
<
chart2
::
XRegressionCurveContainer
>
xRegressionCurveContainer
(
xDataSeries
,
UNO_QUERY_THROW
);
Sequence
<
Reference
<
chart2
::
XRegressionCurve
>
>
xRegressionCurveSequence
=
xRegressionCurveContainer
->
getRegressionCurves
();
CPPUNIT_ASSERT_EQUAL
((
sal_Int32
)
1
,
xRegressionCurveSequence
.
getLength
());
Reference
<
chart2
::
XRegressionCurve
>
xCurve
=
xRegressionCurveSequence
[
0
];
Reference
<
beans
::
XPropertySet
>
xPropSet
(
xCurve
->
getEquationProperties
(),
uno
::
UNO_QUERY_THROW
);
uno
::
Any
aAny
=
xPropSet
->
getPropertyValue
(
"ShowEquation"
);
bool
bShowEquation
=
false
;
CPPUNIT_ASSERT
(
aAny
>>=
bShowEquation
);
CPPUNIT_ASSERT
(
bShowEquation
);
aAny
=
xPropSet
->
getPropertyValue
(
"ShowCorrelationCoefficient"
);
bool
bShowCorrelation
=
false
;
CPPUNIT_ASSERT
(
aAny
>>=
bShowCorrelation
);
CPPUNIT_ASSERT
(
bShowCorrelation
);
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Chart2ImportTest
);
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
chart2/qa/extras/data/xlsx/trendline.xlsx
0 → 100644
Dosyayı görüntüle @
23de8cfe
File added
chart2/qa/extras/data/xlsx/trendline2007.xlsx
0 → 100644
Dosyayı görüntüle @
23de8cfe
File added
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