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
65b09ff5
Kaydet (Commit)
65b09ff5
authored
Agu 15, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Annotate code & remove unnecessary scope.
Change-Id: I4b8ccef5125c52c48e5d9757bb1f245bf73d0629
üst
5cc38c1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
PieChart.cxx
chart2/source/view/charttypes/PieChart.cxx
+9
-7
No files found.
chart2/source/view/charttypes/PieChart.cxx
Dosyayı görüntüle @
65b09ff5
...
...
@@ -46,7 +46,7 @@ struct PieChart::ShapeParam
double
mfUnitCircleOuterRadius
;
double
mfUnitCircleInnerRadius
;
double
mfExplodePercentage
;
double
mfLogicYSum
;
double
mfLogicYSum
;
// sum of all Y values in a single series.
double
mfLogicZ
;
double
mfDepth
;
...
...
@@ -227,6 +227,7 @@ void PieChart::createTextLabelShape(
VDataSeries
&
rSeries
,
sal_Int32
nPointIndex
,
ShapeParam
&
rParam
)
{
if
(
!
rSeries
.
getDataPointLabelIfLabel
(
nPointIndex
))
// There is no text label for this data point. Nothing to do.
return
;
if
(
!
rtl
::
math
::
approxEqual
(
rParam
.
mfExplodePercentage
,
0.0
))
...
...
@@ -254,6 +255,7 @@ void PieChart::createTextLabelShape(
nScreenValueOffsetInRadiusDirection
=
(
3
!=
m_nDimension
)
?
150
:
0
;
//todo maybe calculate this font height dependent
else
if
(
nLabelPlacement
==
::
com
::
sun
::
star
::
chart
::
DataLabelPlacement
::
INSIDE
)
nScreenValueOffsetInRadiusDirection
=
(
3
!=
m_nDimension
)
?
-
150
:
0
;
//todo maybe calculate this font height dependent
PolarLabelPositionHelper
aPolarPosHelper
(
m_pPosHelper
,
m_nDimension
,
m_xLogicTarget
,
m_pShapeFactory
);
awt
::
Point
aScreenPosition2D
(
aPolarPosHelper
.
getLabelScreenPositionAndAlignmentForUnitCircleValues
(
eAlignment
,
nLabelPlacement
...
...
@@ -438,6 +440,7 @@ void PieChart::createShapes()
bool
bHasFillColorMapping
=
pSeries
->
hasPropertyMapping
(
"FillColor"
);
// Counter-clockwise offset from the 3 o'clock position.
m_pPosHelper
->
m_fAngleDegreeOffset
=
pSeries
->
getStartingAngle
();
//iterate through all points to get the sum
...
...
@@ -456,6 +459,7 @@ void PieChart::createShapes()
}
if
(
aParam
.
mfLogicYSum
==
0.0
)
// Total sum of all Y values in this series is zero. Skip the whole series.
continue
;
double
fLogicYForNextPoint
=
0.0
;
...
...
@@ -507,13 +511,11 @@ void PieChart::createShapes()
//point color:
boost
::
scoped_ptr
<
tPropertyNameValueMap
>
apOverwritePropertiesMap
(
NULL
);
if
(
!
pSeries
->
hasPointOwnColor
(
nPointIndex
)
&&
m_xColorScheme
.
is
())
{
if
(
!
pSeries
->
hasPointOwnColor
(
nPointIndex
)
&&
m_xColorScheme
.
is
())
{
apOverwritePropertiesMap
.
reset
(
new
tPropertyNameValueMap
()
);
(
*
apOverwritePropertiesMap
)[
"FillColor"
]
=
uno
::
makeAny
(
m_xColorScheme
->
getColorByIndex
(
nPointIndex
));
}
apOverwritePropertiesMap
.
reset
(
new
tPropertyNameValueMap
()
);
(
*
apOverwritePropertiesMap
)[
"FillColor"
]
=
uno
::
makeAny
(
m_xColorScheme
->
getColorByIndex
(
nPointIndex
));
}
//create data point
...
...
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