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
e0dec4c7
Kaydet (Commit)
e0dec4c7
authored
Kas 10, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
chart2: replace boost::ptr_vector with std::vector<unique_ptr>
Change-Id: Ia5c35cbd54045a79e896832adf2dbe68c5facf1f
üst
126103cd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
22 deletions
+18
-22
GL3DBarChart.cxx
chart2/source/view/charttypes/GL3DBarChart.cxx
+12
-16
GL3DBarChart.hxx
chart2/source/view/inc/GL3DBarChart.hxx
+1
-2
GL3DPlotterBase.hxx
chart2/source/view/inc/GL3DPlotterBase.hxx
+3
-2
ChartView.cxx
chart2/source/view/main/ChartView.cxx
+2
-2
No files found.
chart2/source/view/charttypes/GL3DBarChart.cxx
Dosyayı görüntüle @
e0dec4c7
...
...
@@ -63,17 +63,15 @@ float calculateTextWidth(const OUString& rText)
return
rText
.
getLength
()
*
10
;
}
double
findMaxValue
(
const
boost
::
ptr_vector
<
VDataSeries
>&
rDataSeriesContainer
)
double
findMaxValue
(
const
std
::
vector
<
std
::
unique_ptr
<
VDataSeries
>
>&
rDataSeriesContainer
)
{
double
nMax
=
0.0
;
for
(
boost
::
ptr_vector
<
VDataSeries
>::
const_iterator
itr
=
rDataSeriesContainer
.
begin
(),
itrEnd
=
rDataSeriesContainer
.
end
();
itr
!=
itrEnd
;
++
itr
)
for
(
const
std
::
unique_ptr
<
VDataSeries
>&
rDataSeries
:
rDataSeriesContainer
)
{
const
VDataSeries
&
rDataSeries
=
*
itr
;
sal_Int32
nPointCount
=
rDataSeries
.
getTotalPointCount
();
sal_Int32
nPointCount
=
rDataSeries
->
getTotalPointCount
();
for
(
sal_Int32
nIndex
=
0
;
nIndex
<
nPointCount
;
++
nIndex
)
{
double
nVal
=
rDataSeries
.
getYValue
(
nIndex
);
double
nVal
=
rDataSeries
->
getYValue
(
nIndex
);
nMax
=
std
::
max
(
nMax
,
nVal
);
}
}
...
...
@@ -599,7 +597,7 @@ GL3DBarChart::~GL3DBarChart()
mpWindow
->
setRenderer
(
NULL
);
}
void
GL3DBarChart
::
create3DShapes
(
const
boost
::
ptr_vector
<
VDataSeries
>&
rDataSeriesContainer
,
void
GL3DBarChart
::
create3DShapes
(
const
std
::
vector
<
std
::
unique_ptr
<
VDataSeries
>
>&
rDataSeriesContainer
,
ExplicitCategoriesProvider
&
rCatProvider
)
{
SharedResourceAccess
aResGuard
(
maCond1
,
maCond2
);
...
...
@@ -654,24 +652,22 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
}
else
{
const
VDataSeries
&
rFirstRow
=
*
(
rDataSeriesContainer
.
begin
()
);
const
VDataSeries
&
rFirstRow
=
*
rDataSeriesContainer
.
begin
()
->
get
(
);
mnBarsInRow
=
rFirstRow
.
getTotalPointCount
();
}
for
(
boost
::
ptr_vector
<
VDataSeries
>::
const_iterator
itr
=
rDataSeriesContainer
.
begin
(),
itrEnd
=
rDataSeriesContainer
.
end
();
itr
!=
itrEnd
;
++
itr
)
for
(
const
std
::
unique_ptr
<
VDataSeries
>&
rDataSeries
:
rDataSeriesContainer
)
{
nYPos
=
nSeriesIndex
*
(
BAR_SIZE_Y
+
BAR_DISTANCE_Y
)
+
BAR_DISTANCE_Y
;
const
VDataSeries
&
rDataSeries
=
*
itr
;
sal_Int32
nPointCount
=
rDataSeries
.
getTotalPointCount
();
sal_Int32
nPointCount
=
rDataSeries
->
getTotalPointCount
();
nMaxPointCount
=
std
::
max
(
nMaxPointCount
,
nPointCount
);
bool
bMappedFillProperty
=
rDataSeries
.
hasPropertyMapping
(
"FillColor"
);
bool
bMappedFillProperty
=
rDataSeries
->
hasPropertyMapping
(
"FillColor"
);
// Create series name text object.
OUString
aSeriesName
=
DataSeriesHelper
::
getDataSeriesLabel
(
rDataSeries
.
getModel
(),
mxChartType
->
getRoleOfSequenceForSeriesLabel
());
rDataSeries
->
getModel
(),
mxChartType
->
getRoleOfSequenceForSeriesLabel
());
maSeriesNames
.
push_back
(
aSeriesName
);
...
...
@@ -696,12 +692,12 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
{
if
(
bMappedFillProperty
)
{
double
nPropVal
=
rDataSeries
.
getValueByProperty
(
nIndex
,
"FillColor"
);
double
nPropVal
=
rDataSeries
->
getValueByProperty
(
nIndex
,
"FillColor"
);
if
(
!
rtl
::
math
::
isNan
(
nPropVal
))
nColor
=
static_cast
<
sal_uInt32
>
(
nPropVal
);
}
float
nVal
=
rDataSeries
.
getYValue
(
nIndex
);
float
nVal
=
rDataSeries
->
getYValue
(
nIndex
);
if
(
rtl
::
math
::
isNan
(
nVal
))
continue
;
...
...
chart2/source/view/inc/GL3DBarChart.hxx
Dosyayı görüntüle @
e0dec4c7
...
...
@@ -13,7 +13,6 @@
#include <GL3DPlotterBase.hxx>
#include <vector>
#include <boost/ptr_container/ptr_vector.hpp>
#include "VDataSeries.hxx"
#include <glm/glm.hpp>
...
...
@@ -71,7 +70,7 @@ public:
virtual
~
GL3DBarChart
();
virtual
void
create3DShapes
(
const
boost
::
ptr_vector
<
VDataSeries
>&
rDataSeries
,
virtual
void
create3DShapes
(
const
std
::
vector
<
std
::
unique_ptr
<
VDataSeries
>
>&
rDataSeries
,
ExplicitCategoriesProvider
&
rCatProvider
)
override
;
virtual
void
render
()
override
;
...
...
chart2/source/view/inc/GL3DPlotterBase.hxx
Dosyayı görüntüle @
e0dec4c7
...
...
@@ -10,8 +10,9 @@
#ifndef INCLUDED_CHART2_SOURCE_VIEW_INC_GL3DPLOTTERBASE_HXX
#define INCLUDED_CHART2_SOURCE_VIEW_INC_GL3DPLOTTERBASE_HXX
#include <boost/ptr_container/ptr_vector.hpp>
#include "VDataSeries.hxx"
#include <vector>
#include <memory>
namespace
chart
{
...
...
@@ -22,7 +23,7 @@ class GL3DPlotterBase
public
:
virtual
~
GL3DPlotterBase
();
virtual
void
create3DShapes
(
const
boost
::
ptr_vector
<
VDataSeries
>&
rDataSeries
,
virtual
void
create3DShapes
(
const
std
::
vector
<
std
::
unique_ptr
<
VDataSeries
>
>&
rDataSeries
,
ExplicitCategoriesProvider
&
rCatProvider
)
=
0
;
virtual
void
render
()
=
0
;
};
...
...
chart2/source/view/main/ChartView.cxx
Dosyayı görüntüle @
e0dec4c7
...
...
@@ -3403,7 +3403,7 @@ void ChartView::createShapes3D()
if
(
!
xDataSeriesContainer
.
is
()
)
return
;
boost
::
ptr_vector
<
VDataSeries
>
aDataSeries
;
std
::
vector
<
std
::
unique_ptr
<
VDataSeries
>
>
aDataSeries
;
uno
::
Sequence
<
uno
::
Reference
<
XDataSeries
>
>
aSeriesList
(
xDataSeriesContainer
->
getDataSeries
()
);
for
(
sal_Int32
nS
=
0
;
nS
<
aSeriesList
.
getLength
();
++
nS
)
{
...
...
@@ -3411,7 +3411,7 @@ void ChartView::createShapes3D()
if
(
!
xDataSeries
.
is
())
continue
;
aDataSeries
.
push_back
(
new
VDataSeries
(
xDataSeries
));
aDataSeries
.
push_back
(
std
::
make_unique
<
VDataSeries
>
(
xDataSeries
));
}
std
::
unique_ptr
<
ExplicitCategoriesProvider
>
pCatProvider
(
new
ExplicitCategoriesProvider
(
xCooSys
,
mrChartModel
));
...
...
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