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
bc4f6677
Kaydet (Commit)
bc4f6677
authored
May 08, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add test for xlsx rotated axis title import
Change-Id: Ibfcf7cffe661efc1ce2063e87d38c45d943df69d
üst
13ede60a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
chart2import.cxx
chart2/qa/extras/chart2import.cxx
+34
-0
axis_title_rotated.xlsx
chart2/qa/extras/data/xlsx/axis_title_rotated.xlsx
+0
-0
No files found.
chart2/qa/extras/chart2import.cxx
Dosyayı görüntüle @
bc4f6677
...
@@ -87,6 +87,7 @@ public:
...
@@ -87,6 +87,7 @@ public:
void
testAxisTitleDefaultRotationXLSX
();
void
testAxisTitleDefaultRotationXLSX
();
void
testSecondaryAxisTitleDefaultRotationXLSX
();
void
testSecondaryAxisTitleDefaultRotationXLSX
();
void
testAxisTitleRotationXLSX
();
CPPUNIT_TEST_SUITE
(
Chart2ImportTest
);
CPPUNIT_TEST_SUITE
(
Chart2ImportTest
);
CPPUNIT_TEST
(
Fdo60083
);
CPPUNIT_TEST
(
Fdo60083
);
...
@@ -135,6 +136,7 @@ public:
...
@@ -135,6 +136,7 @@ public:
CPPUNIT_TEST
(
testMinorTickMarksDefaultValue2013XLSX
);
CPPUNIT_TEST
(
testMinorTickMarksDefaultValue2013XLSX
);
CPPUNIT_TEST
(
testAxisTitleDefaultRotationXLSX
);
CPPUNIT_TEST
(
testAxisTitleDefaultRotationXLSX
);
CPPUNIT_TEST
(
testSecondaryAxisTitleDefaultRotationXLSX
);
CPPUNIT_TEST
(
testSecondaryAxisTitleDefaultRotationXLSX
);
CPPUNIT_TEST
(
testAxisTitleRotationXLSX
);
CPPUNIT_TEST_SUITE_END
();
CPPUNIT_TEST_SUITE_END
();
private
:
private
:
...
@@ -1061,6 +1063,38 @@ void Chart2ImportTest::testSecondaryAxisTitleDefaultRotationXLSX()
...
@@ -1061,6 +1063,38 @@ void Chart2ImportTest::testSecondaryAxisTitleDefaultRotationXLSX()
CPPUNIT_ASSERT_EQUAL
(
90.0
,
nRotation
);
CPPUNIT_ASSERT_EQUAL
(
90.0
,
nRotation
);
}
}
void
Chart2ImportTest
::
testAxisTitleRotationXLSX
()
{
load
(
"/chart2/qa/extras/data/xlsx/"
,
"axis_title_rotated.xlsx"
);
Reference
<
chart2
::
XChartDocument
>
xChartDoc
=
getChartDocFromSheet
(
0
,
mxComponent
);
CPPUNIT_ASSERT_MESSAGE
(
"failed to load chart"
,
xChartDoc
.
is
());
{
Reference
<
chart2
::
XAxis
>
xYAxis
=
getAxisFromDoc
(
xChartDoc
,
0
,
1
,
0
);
CPPUNIT_ASSERT
(
xYAxis
.
is
());
Reference
<
chart2
::
XTitled
>
xTitled
(
xYAxis
,
uno
::
UNO_QUERY_THROW
);
Reference
<
chart2
::
XTitle
>
xTitle
=
xTitled
->
getTitleObject
();
CPPUNIT_ASSERT
(
xTitle
.
is
());
Reference
<
beans
::
XPropertySet
>
xPropSet
(
xTitle
,
uno
::
UNO_QUERY_THROW
);
uno
::
Any
aAny
=
xPropSet
->
getPropertyValue
(
"TextRotation"
);
double
nRotation
=
0
;
CPPUNIT_ASSERT
(
aAny
>>=
nRotation
);
CPPUNIT_ASSERT_EQUAL
(
340.0
,
nRotation
);
}
{
Reference
<
chart2
::
XAxis
>
xYAxis
=
getAxisFromDoc
(
xChartDoc
,
0
,
1
,
1
);
CPPUNIT_ASSERT
(
xYAxis
.
is
());
Reference
<
chart2
::
XTitled
>
xTitled
(
xYAxis
,
uno
::
UNO_QUERY_THROW
);
Reference
<
chart2
::
XTitle
>
xTitle
=
xTitled
->
getTitleObject
();
CPPUNIT_ASSERT
(
xTitle
.
is
());
Reference
<
beans
::
XPropertySet
>
xPropSet
(
xTitle
,
uno
::
UNO_QUERY_THROW
);
uno
::
Any
aAny
=
xPropSet
->
getPropertyValue
(
"TextRotation"
);
double
nRotation
=
0
;
CPPUNIT_ASSERT
(
aAny
>>=
nRotation
);
CPPUNIT_ASSERT_EQUAL
(
270.0
,
nRotation
);
}
}
CPPUNIT_TEST_SUITE_REGISTRATION
(
Chart2ImportTest
);
CPPUNIT_TEST_SUITE_REGISTRATION
(
Chart2ImportTest
);
CPPUNIT_PLUGIN_IMPLEMENT
();
CPPUNIT_PLUGIN_IMPLEMENT
();
...
...
chart2/qa/extras/data/xlsx/axis_title_rotated.xlsx
0 → 100644
Dosyayı görüntüle @
bc4f6677
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