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
a1410ef0
Kaydet (Commit)
a1410ef0
authored
Mar 05, 2012
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
move some auto_ptr to boost::scoped_ptr
üst
3f78f26a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
47 deletions
+27
-47
VCartesianAxis.cxx
chart2/source/view/axes/VCartesianAxis.cxx
+25
-45
VCartesianAxis.hxx
chart2/source/view/axes/VCartesianAxis.hxx
+2
-2
No files found.
chart2/source/view/axes/VCartesianAxis.cxx
Dosyayı görüntüle @
a1410ef0
...
...
@@ -51,7 +51,7 @@
#include <svx/unoshtxt.hxx>
#include <algorithm>
#include <
memory
>
#include <
boost/scoped_ptr.hpp
>
//.............................................................................
namespace
chart
...
...
@@ -553,17 +553,14 @@ void VCartesianAxis::createAllTickInfos( ::std::vector< ::std::vector< TickInfo
VAxisBase
::
createAllTickInfos
(
rAllTickInfos
);
}
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::
std
::
auto_ptr
<
TickIter
>
VCartesianAxis
::
createLabelTickIterator
(
sal_Int32
nTextLevel
)
TickIter
*
VCartesianAxis
::
createLabelTickIterator
(
sal_Int32
nTextLevel
)
{
if
(
nTextLevel
>=
0
&&
nTextLevel
<
static_cast
<
sal_Int32
>
(
m_aAllTickInfos
.
size
())
)
return
::
std
::
auto_ptr
<
TickIter
>
(
new
PureTickIter
(
m_aAllTickInfos
[
nTextLevel
]
)
);
return
::
std
::
auto_ptr
<
TickIter
>
()
;
new
PureTickIter
(
m_aAllTickInfos
[
nTextLevel
]
);
return
NULL
;
}
SAL_WNODEPRECATED_DECLARATIONS_POP
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::
std
::
auto_ptr
<
TickIter
>
VCartesianAxis
::
createMaximumLabelTickIterator
(
sal_Int32
nTextLevel
)
TickIter
*
VCartesianAxis
::
createMaximumLabelTickIterator
(
sal_Int32
nTextLevel
)
{
if
(
isComplexCategoryAxis
()
||
isDateAxis
()
)
{
...
...
@@ -576,13 +573,12 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
if
(
!
m_aAllTickInfos
.
empty
()
)
{
sal_Int32
nLongestLabelIndex
=
m_bUseTextLabels
?
this
->
getIndexOfLongestLabel
(
m_aTextLabels
)
:
0
;
return
::
std
::
auto_ptr
<
TickIter
>
(
new
MaxLabelTickIter
(
m_aAllTickInfos
[
0
],
nLongestLabelIndex
)
);
new
MaxLabelTickIter
(
m_aAllTickInfos
[
0
],
nLongestLabelIndex
);
}
}
}
return
::
std
::
auto_ptr
<
TickIter
>
()
;
return
NULL
;
}
SAL_WNODEPRECATED_DECLARATIONS_POP
sal_Int32
VCartesianAxis
::
getTextLevelCount
()
const
{
...
...
@@ -1332,16 +1328,14 @@ void VCartesianAxis::doStaggeringOfLabels( const AxisLabelProperties& rAxisLabel
B2DVector
aCummulatedLabelsDistance
(
0
,
0
);
for
(
sal_Int32
nTextLevel
=
0
;
nTextLevel
<
nTextLevelCount
;
nTextLevel
++
)
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::
std
::
auto_ptr
<
TickIter
>
apTickIter
=
createLabelTickIterator
(
nTextLevel
);
SAL_WNODEPRECATED_DECLARATIONS_POP
if
(
apTickIter
.
get
())
{
double
fRotationAngleDegree
=
m_aAxisLabelProperties
.
fRotationAngleDegree
;
aCummulatedLabelsDistance
+=
lcl_getLabelsDistance
(
*
apTickIter
.
get
()
,
pTickFactory2D
->
getDistanceAxisTickToText
(
m_aAxisProperties
)
,
fRotationAngleDegree
);
}
boost
::
scoped_ptr
<
TickIter
>
apTickIter
(
createLabelTickIterator
(
nTextLevel
));
if
(
apTickIter
)
{
double
fRotationAngleDegree
=
m_aAxisLabelProperties
.
fRotationAngleDegree
;
aCummulatedLabelsDistance
+=
lcl_getLabelsDistance
(
*
apTickIter
.
get
()
,
pTickFactory2D
->
getDistanceAxisTickToText
(
m_aAxisProperties
)
,
fRotationAngleDegree
);
}
}
}
else
if
(
rAxisLabelProperties
.
getIsStaggered
()
)
...
...
@@ -1367,9 +1361,7 @@ void VCartesianAxis::createLabels()
//create labels
if
(
m_aAxisProperties
.
m_bDisplayLabels
)
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
std
::
auto_ptr
<
TickFactory_2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
SAL_WNODEPRECATED_DECLARATIONS_POP
boost
::
scoped_ptr
<
TickFactory_2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
TickFactory_2D
*
pTickFactory2D
=
apTickFactory2D
.
get
();
if
(
!
pTickFactory2D
)
return
;
...
...
@@ -1388,10 +1380,8 @@ void VCartesianAxis::createLabels()
sal_Int32
nScreenDistanceBetweenTicks
=
-
1
;
for
(
sal_Int32
nTextLevel
=
0
;
nTextLevel
<
nTextLevelCount
;
nTextLevel
++
)
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::
std
::
auto_ptr
<
TickIter
>
apTickIter
=
createLabelTickIterator
(
nTextLevel
);
SAL_WNODEPRECATED_DECLARATIONS_POP
if
(
apTickIter
.
get
())
boost
::
scoped_ptr
<
TickIter
>
apTickIter
(
createLabelTickIterator
(
nTextLevel
));
if
(
apTickIter
)
{
if
(
nTextLevel
==
0
)
{
...
...
@@ -1428,9 +1418,7 @@ void VCartesianAxis::createMaximumLabels()
//create labels
if
(
m_aAxisProperties
.
m_bDisplayLabels
)
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
std
::
auto_ptr
<
TickFactory_2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
SAL_WNODEPRECATED_DECLARATIONS_POP
boost
::
scoped_ptr
<
TickFactory_2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
TickFactory_2D
*
pTickFactory2D
=
apTickFactory2D
.
get
();
if
(
!
pTickFactory2D
)
return
;
...
...
@@ -1450,10 +1438,8 @@ void VCartesianAxis::createMaximumLabels()
sal_Int32
nTextLevelCount
=
getTextLevelCount
();
for
(
sal_Int32
nTextLevel
=
0
;
nTextLevel
<
nTextLevelCount
;
nTextLevel
++
)
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::
std
::
auto_ptr
<
TickIter
>
apTickIter
=
createMaximumLabelTickIterator
(
nTextLevel
);
SAL_WNODEPRECATED_DECLARATIONS_POP
if
(
apTickIter
.
get
())
boost
::
scoped_ptr
<
TickIter
>
apTickIter
(
createMaximumLabelTickIterator
(
nTextLevel
));
if
(
apTickIter
)
{
while
(
!
createTextShapes
(
m_xTextTarget
,
*
apTickIter
.
get
(),
aAxisLabelProperties
,
pTickFactory2D
,
-
1
)
)
{
...
...
@@ -1470,9 +1456,7 @@ void VCartesianAxis::updatePositions()
//update positions of labels
if
(
m_aAxisProperties
.
m_bDisplayLabels
)
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
std
::
auto_ptr
<
TickFactory_2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
SAL_WNODEPRECATED_DECLARATIONS_POP
boost
::
scoped_ptr
<
TickFactory_2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
TickFactory_2D
*
pTickFactory2D
=
apTickFactory2D
.
get
();
if
(
!
pTickFactory2D
)
return
;
...
...
@@ -1567,9 +1551,7 @@ void VCartesianAxis::createShapes()
if
(
!
prepareShapeCreation
()
)
return
;
SAL_WNODEPRECATED_DECLARATIONS_PUSH
std
::
auto_ptr
<
TickFactory_2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
SAL_WNODEPRECATED_DECLARATIONS_POP
boost
::
scoped_ptr
<
TickFactory_2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
TickFactory_2D
*
pTickFactory2D
=
apTickFactory2D
.
get
();
if
(
!
pTickFactory2D
)
return
;
...
...
@@ -1593,10 +1575,8 @@ void VCartesianAxis::createShapes()
sal_Int32
nTextLevelCount
=
getTextLevelCount
();
for
(
sal_Int32
nTextLevel
=
0
;
nTextLevel
<
nTextLevelCount
;
nTextLevel
++
)
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::
std
::
auto_ptr
<
TickIter
>
apTickIter
=
createLabelTickIterator
(
nTextLevel
);
SAL_WNODEPRECATED_DECLARATIONS_POP
if
(
apTickIter
.
get
()
)
boost
::
scoped_ptr
<
TickIter
>
apTickIter
(
createLabelTickIterator
(
nTextLevel
));
if
(
apTickIter
)
{
double
fRotationAngleDegree
=
m_aAxisLabelProperties
.
fRotationAngleDegree
;
B2DVector
aLabelsDistance
(
lcl_getLabelsDistance
(
*
apTickIter
.
get
(),
pTickFactory2D
->
getDistanceAxisTickToText
(
m_aAxisProperties
,
false
),
fRotationAngleDegree
)
);
...
...
chart2/source/view/axes/VCartesianAxis.hxx
Dosyayı görüntüle @
a1410ef0
...
...
@@ -66,8 +66,8 @@ public:
virtual
void
createAllTickInfos
(
::
std
::
vector
<
::
std
::
vector
<
TickInfo
>
>&
rAllTickInfos
);
void
createAllTickInfosFromComplexCategories
(
::
std
::
vector
<
::
std
::
vector
<
TickInfo
>
>&
rAllTickInfos
,
bool
bShiftedPosition
);
::
std
::
auto_ptr
<
TickIter
>
createLabelTickIterator
(
sal_Int32
nTextLevel
);
::
std
::
auto_ptr
<
TickIter
>
createMaximumLabelTickIterator
(
sal_Int32
nTextLevel
);
TickIter
*
createLabelTickIterator
(
sal_Int32
nTextLevel
);
TickIter
*
createMaximumLabelTickIterator
(
sal_Int32
nTextLevel
);
sal_Int32
getTextLevelCount
()
const
;
//-------------------------------------------------------------------------
...
...
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