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
f19b9144
Kaydet (Commit)
f19b9144
authored
Tem 20, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
WaE: -Werror=shadow and -Werror=unused-but-set-variable
Change-Id: Ic42d506db8fe065cb8f01e17f18a1238d1eff651
üst
d7374d48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
GL3DBarChart.cxx
chart2/source/view/charttypes/GL3DBarChart.cxx
+15
-15
No files found.
chart2/source/view/charttypes/GL3DBarChart.cxx
Dosyayı görüntüle @
f19b9144
...
@@ -146,7 +146,7 @@ GL3DBarChart::GL3DBarChart(
...
@@ -146,7 +146,7 @@ GL3DBarChart::GL3DBarChart(
if
(
mpWindow
)
if
(
mpWindow
)
{
{
mpWindow
->
setRenderer
(
this
);
mpWindow
->
setRenderer
(
this
);
Size
aSize
=
mpWindow
->
GetSizePixel
();
aSize
=
mpWindow
->
GetSizePixel
();
}
}
mpRenderer
->
SetSize
(
aSize
);
mpRenderer
->
SetSize
(
aSize
);
mpRenderer
->
init
();
mpRenderer
->
init
();
...
@@ -222,9 +222,9 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
...
@@ -222,9 +222,9 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
float
nXEnd
=
0.0
;
float
nXEnd
=
0.0
;
float
nYPos
=
0.0
;
float
nYPos
=
0.0
;
const
Color
aSeriesColor
[]
=
{
//
const Color aSeriesColor[] = {
COL_RED
,
COL_GREEN
,
COL_YELLOW
,
COL_BROWN
,
COL_BLUE
//
COL_RED, COL_GREEN, COL_YELLOW, COL_BROWN, COL_BLUE
};
//
};
maCategories
.
clear
();
maCategories
.
clear
();
maSeriesNames
.
clear
();
maSeriesNames
.
clear
();
...
@@ -246,7 +246,7 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
...
@@ -246,7 +246,7 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
sal_Int32
nPointCount
=
rDataSeries
.
getTotalPointCount
();
sal_Int32
nPointCount
=
rDataSeries
.
getTotalPointCount
();
nMaxPointCount
=
std
::
max
(
nMaxPointCount
,
nPointCount
);
nMaxPointCount
=
std
::
max
(
nMaxPointCount
,
nPointCount
);
bool
bMappedFillProperty
=
rDataSeries
.
hasPropertyMapping
(
"FillColor"
);
//
bool bMappedFillProperty = rDataSeries.hasPropertyMapping("FillColor");
// Create series name text object.
// Create series name text object.
OUString
aSeriesName
=
OUString
aSeriesName
=
...
@@ -271,22 +271,22 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
...
@@ -271,22 +271,22 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
p
->
setPosition
(
aTopLeft
,
aTopRight
,
aBottomRight
);
p
->
setPosition
(
aTopLeft
,
aTopRight
,
aBottomRight
);
}
}
sal_Int32
nColor
=
aSeriesColor
[
nSeriesIndex
%
SAL_N_ELEMENTS
(
aSeriesColor
)].
GetColor
();
//
sal_Int32 nColor = aSeriesColor[nSeriesIndex % SAL_N_ELEMENTS(aSeriesColor)].GetColor();
for
(
sal_Int32
nIndex
=
0
;
nIndex
<
nPointCount
;
++
nIndex
)
for
(
sal_Int32
nIndex
=
0
;
nIndex
<
nPointCount
;
++
nIndex
)
{
{
if
(
bMappedFillProperty
)
//
if(bMappedFillProperty)
{
//
{
double
nPropVal
=
rDataSeries
.
getValueByProperty
(
nIndex
,
"FillColor"
);
//
double nPropVal = rDataSeries.getValueByProperty(nIndex, "FillColor");
if
(
!
rtl
::
math
::
isNan
(
nPropVal
))
//
if(!rtl::math::isNan(nPropVal))
nColor
=
static_cast
<
sal_uInt32
>
(
nPropVal
);
//
nColor = static_cast<sal_uInt32>(nPropVal);
}
//
}
float
nVal
=
rDataSeries
.
getYValue
(
nIndex
);
float
nVal
=
rDataSeries
.
getYValue
(
nIndex
);
float
nXPos
=
nIndex
*
(
BAR_SIZE_X
+
BAR_DISTANCE_X
)
+
BAR_DISTANCE_X
;
float
nXPos
=
nIndex
*
(
BAR_SIZE_X
+
BAR_DISTANCE_X
)
+
BAR_DISTANCE_X
;
glm
::
mat4
aScaleMatrix
=
glm
::
scale
(
glm
::
vec3
(
BAR_SIZE_X
,
BAR_SIZE_Y
,
float
(
nVal
/
nMaxVal
)));
//
glm::mat4 aScaleMatrix = glm::scale(glm::vec3(BAR_SIZE_X, BAR_SIZE_Y, float(nVal/nMaxVal)));
glm
::
mat4
aTranslationMatrix
=
glm
::
translate
(
glm
::
vec3
(
nXPos
,
nYPos
,
0.0
f
));
//
glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(nXPos, nYPos, 0.0f));
glm
::
mat4
aBarPosition
=
aTranslationMatrix
*
aScaleMatrix
;
//
glm::mat4 aBarPosition = aTranslationMatrix * aScaleMatrix;
maBarMap
.
insert
(
std
::
pair
<
sal_uInt32
,
BarInformation
>
(
nId
,
maBarMap
.
insert
(
std
::
pair
<
sal_uInt32
,
BarInformation
>
(
nId
,
BarInformation
(
glm
::
vec3
(
nXPos
,
nYPos
,
float
(
nVal
/
nMaxVal
)),
BarInformation
(
glm
::
vec3
(
nXPos
,
nYPos
,
float
(
nVal
/
nMaxVal
)),
...
...
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