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
fd9151e1
Kaydet (Commit)
fd9151e1
authored
Eki 08, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
TickFactory_2D -> TickFactory2D.
For consistent naming. Change-Id: Ic94681d4d18c0330ea5a8393c1b3d863c81e1ea8
üst
a66ab02f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
31 deletions
+31
-31
Tickmarks.cxx
chart2/source/view/axes/Tickmarks.cxx
+10
-10
Tickmarks.hxx
chart2/source/view/axes/Tickmarks.hxx
+3
-3
VCartesianAxis.cxx
chart2/source/view/axes/VCartesianAxis.cxx
+14
-14
VCartesianAxis.hxx
chart2/source/view/axes/VCartesianAxis.hxx
+4
-4
No files found.
chart2/source/view/axes/Tickmarks.cxx
Dosyayı görüntüle @
fd9151e1
...
...
@@ -135,7 +135,7 @@ void TickFactory::getAllTicksShifted( ::std::vector< ::std::vector< TickInfo > >
}
// ___TickFactory_2D___
TickFactory
_2D
::
TickFactory_
2D
(
TickFactory
2D
::
TickFactory
2D
(
const
ExplicitScaleData
&
rScale
,
const
ExplicitIncrementData
&
rIncrement
//, double fStrech_SceneToScreen, double fOffset_SceneToScreen )
,
const
B2DVector
&
rStartScreenPos
,
const
B2DVector
&
rEndScreenPos
...
...
@@ -164,21 +164,21 @@ TickFactory_2D::TickFactory_2D(
}
}
TickFactory
_2D
::~
TickFactory_
2D
()
TickFactory
2D
::~
TickFactory
2D
()
{
}
bool
TickFactory
_
2D
::
isHorizontalAxis
()
const
bool
TickFactory2D
::
isHorizontalAxis
()
const
{
return
(
m_aAxisStartScreenPosition2D
.
getY
()
==
m_aAxisEndScreenPosition2D
.
getY
()
);
}
bool
TickFactory
_
2D
::
isVerticalAxis
()
const
bool
TickFactory2D
::
isVerticalAxis
()
const
{
return
(
m_aAxisStartScreenPosition2D
.
getX
()
==
m_aAxisEndScreenPosition2D
.
getX
()
);
}
//static
sal_Int32
TickFactory
_
2D
::
getTickScreenDistance
(
TickIter
&
rIter
)
sal_Int32
TickFactory2D
::
getTickScreenDistance
(
TickIter
&
rIter
)
{
//return the positive distance between the two first tickmarks in screen values
//if there are less than two tickmarks -1 is returned
...
...
@@ -191,7 +191,7 @@ sal_Int32 TickFactory_2D::getTickScreenDistance( TickIter& rIter )
return
pFirstTickInfo
->
getScreenDistanceBetweenTicks
(
*
pSecondTickInfo
);
}
B2DVector
TickFactory
_
2D
::
getTickScreenPosition2D
(
double
fScaledLogicTickValue
)
const
B2DVector
TickFactory2D
::
getTickScreenPosition2D
(
double
fScaledLogicTickValue
)
const
{
B2DVector
aRet
(
m_aAxisStartScreenPosition2D
);
aRet
+=
(
m_aAxisEndScreenPosition2D
-
m_aAxisStartScreenPosition2D
)
...
...
@@ -199,7 +199,7 @@ B2DVector TickFactory_2D::getTickScreenPosition2D( double fScaledLogicTickValue
return
aRet
;
}
void
TickFactory
_
2D
::
addPointSequenceForTickLine
(
drawing
::
PointSequenceSequence
&
rPoints
void
TickFactory2D
::
addPointSequenceForTickLine
(
drawing
::
PointSequenceSequence
&
rPoints
,
sal_Int32
nSequenceIndex
,
double
fScaledLogicTickValue
,
double
fInnerDirectionSign
,
const
TickmarkProperties
&
rTickmarkProperties
...
...
@@ -228,7 +228,7 @@ void TickFactory_2D::addPointSequenceForTickLine( drawing::PointSequenceSequence
rPoints
[
nSequenceIndex
][
1
].
Y
=
static_cast
<
sal_Int32
>
(
aEnd
.
getY
());
}
B2DVector
TickFactory
_
2D
::
getDistanceAxisTickToText
(
const
AxisProperties
&
rAxisProperties
,
bool
bIncludeFarAwayDistanceIfSo
,
bool
bIncludeSpaceBetweenTickAndText
)
const
B2DVector
TickFactory2D
::
getDistanceAxisTickToText
(
const
AxisProperties
&
rAxisProperties
,
bool
bIncludeFarAwayDistanceIfSo
,
bool
bIncludeSpaceBetweenTickAndText
)
const
{
bool
bFarAwayLabels
=
false
;
if
(
::
com
::
sun
::
star
::
chart
::
ChartAxisLabelPosition_OUTSIDE_START
==
rAxisProperties
.
m_eLabelPos
...
...
@@ -281,7 +281,7 @@ B2DVector TickFactory_2D::getDistanceAxisTickToText( const AxisProperties& rAxis
return
aLabelDirection
;
}
void
TickFactory
_
2D
::
createPointSequenceForAxisMainLine
(
drawing
::
PointSequenceSequence
&
rPoints
)
const
void
TickFactory2D
::
createPointSequenceForAxisMainLine
(
drawing
::
PointSequenceSequence
&
rPoints
)
const
{
rPoints
[
0
].
realloc
(
2
);
rPoints
[
0
][
0
].
X
=
static_cast
<
sal_Int32
>
(
m_aAxisStartScreenPosition2D
.
getX
());
...
...
@@ -290,7 +290,7 @@ void TickFactory_2D::createPointSequenceForAxisMainLine( drawing::PointSequenceS
rPoints
[
0
][
1
].
Y
=
static_cast
<
sal_Int32
>
(
m_aAxisEndScreenPosition2D
.
getY
());
}
void
TickFactory
_
2D
::
updateScreenValues
(
::
std
::
vector
<
::
std
::
vector
<
TickInfo
>
>&
rAllTickInfos
)
const
void
TickFactory2D
::
updateScreenValues
(
::
std
::
vector
<
::
std
::
vector
<
TickInfo
>
>&
rAllTickInfos
)
const
{
//get the transformed screen values for all tickmarks in rAllTickInfos
::
std
::
vector
<
::
std
::
vector
<
TickInfo
>
>::
iterator
aDepthIter
=
rAllTickInfos
.
begin
();
...
...
chart2/source/view/axes/Tickmarks.hxx
Dosyayı görüntüle @
fd9151e1
...
...
@@ -103,16 +103,16 @@ protected: //member
double
m_fScaledVisibleMax
;
};
class
TickFactory
_
2D
:
public
TickFactory
class
TickFactory2D
:
public
TickFactory
{
public
:
TickFactory
_
2D
(
TickFactory2D
(
const
ExplicitScaleData
&
rScale
,
const
ExplicitIncrementData
&
rIncrement
,
const
::
basegfx
::
B2DVector
&
rStartScreenPos
,
const
::
basegfx
::
B2DVector
&
rEndScreenPos
,
const
::
basegfx
::
B2DVector
&
rAxisLineToLabelLineShift
);
//, double fStrech_SceneToScreen, double fOffset_SceneToScreen );
virtual
~
TickFactory
_
2D
();
virtual
~
TickFactory2D
();
static
sal_Int32
getTickScreenDistance
(
TickIter
&
rIter
);
...
...
chart2/source/view/axes/VCartesianAxis.cxx
Dosyayı görüntüle @
fd9151e1
...
...
@@ -601,7 +601,7 @@ bool VCartesianAxis::createTextShapes(
const
Reference
<
drawing
::
XShapes
>&
xTarget
,
TickIter
&
rTickIter
,
AxisLabelProperties
&
rAxisLabelProperties
,
TickFactory
_
2D
*
pTickFactory
,
TickFactory2D
*
pTickFactory
,
sal_Int32
nScreenDistanceBetweenTicks
)
{
//returns true if the text shapes have been created successfully
...
...
@@ -1249,7 +1249,7 @@ TickFactory* VCartesianAxis::createTickFactory()
return
createTickFactory2D
();
}
TickFactory
_
2D
*
VCartesianAxis
::
createTickFactory2D
()
TickFactory2D
*
VCartesianAxis
::
createTickFactory2D
()
{
B2DVector
aStart
,
aEnd
;
get2DAxisMainLine
(
aStart
,
aEnd
,
getAxisIntersectionValue
()
);
...
...
@@ -1257,7 +1257,7 @@ TickFactory_2D* VCartesianAxis::createTickFactory2D()
B2DVector
aLabelLineStart
,
aLabelLineEnd
;
get2DAxisMainLine
(
aLabelLineStart
,
aLabelLineEnd
,
getLabelLineIntersectionValue
()
);
return
new
TickFactory
_
2D
(
m_aScale
,
m_aIncrement
,
aStart
,
aEnd
,
aLabelLineStart
-
aStart
);
return
new
TickFactory2D
(
m_aScale
,
m_aIncrement
,
aStart
,
aEnd
,
aLabelLineStart
-
aStart
);
}
void
lcl_hideIdenticalScreenValues
(
TickIter
&
rTickIter
)
...
...
@@ -1327,7 +1327,7 @@ sal_Int32 VCartesianAxis::estimateMaximumAutoMainIncrementCount()
return
nRet
;
}
void
VCartesianAxis
::
doStaggeringOfLabels
(
const
AxisLabelProperties
&
rAxisLabelProperties
,
TickFactory
_
2D
*
pTickFactory2D
)
void
VCartesianAxis
::
doStaggeringOfLabels
(
const
AxisLabelProperties
&
rAxisLabelProperties
,
TickFactory2D
*
pTickFactory2D
)
{
if
(
!
pTickFactory2D
)
return
;
...
...
@@ -1376,8 +1376,8 @@ void VCartesianAxis::createLabels()
if
(
!
m_aAxisProperties
.
m_bDisplayLabels
)
return
;
boost
::
scoped_ptr
<
TickFactory
_
2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
TickFactory
_
2D
*
pTickFactory2D
=
apTickFactory2D
.
get
();
boost
::
scoped_ptr
<
TickFactory2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
TickFactory2D
*
pTickFactory2D
=
apTickFactory2D
.
get
();
if
(
!
pTickFactory2D
)
return
;
...
...
@@ -1398,7 +1398,7 @@ void VCartesianAxis::createLabels()
{
if
(
nTextLevel
==
0
)
{
nScreenDistanceBetweenTicks
=
TickFactory
_
2D
::
getTickScreenDistance
(
*
apTickIter
.
get
()
);
nScreenDistanceBetweenTicks
=
TickFactory2D
::
getTickScreenDistance
(
*
apTickIter
.
get
()
);
if
(
nTextLevelCount
>
1
)
nScreenDistanceBetweenTicks
*=
2
;
//the above used tick iter does contain also the sub ticks -> thus the given distance is only the half
}
...
...
@@ -1430,8 +1430,8 @@ void VCartesianAxis::createMaximumLabels()
if
(
!
m_aAxisProperties
.
m_bDisplayLabels
)
return
;
boost
::
scoped_ptr
<
TickFactory
_
2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
TickFactory
_
2D
*
pTickFactory2D
=
apTickFactory2D
.
get
();
boost
::
scoped_ptr
<
TickFactory2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
TickFactory2D
*
pTickFactory2D
=
apTickFactory2D
.
get
();
if
(
!
pTickFactory2D
)
return
;
...
...
@@ -1467,8 +1467,8 @@ void VCartesianAxis::updatePositions()
if
(
!
m_aAxisProperties
.
m_bDisplayLabels
)
return
;
boost
::
scoped_ptr
<
TickFactory
_
2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
TickFactory
_
2D
*
pTickFactory2D
=
apTickFactory2D
.
get
();
boost
::
scoped_ptr
<
TickFactory2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
TickFactory2D
*
pTickFactory2D
=
apTickFactory2D
.
get
();
if
(
!
pTickFactory2D
)
return
;
...
...
@@ -1532,7 +1532,7 @@ void VCartesianAxis::updatePositions()
doStaggeringOfLabels
(
m_aAxisLabelProperties
,
pTickFactory2D
);
}
void
VCartesianAxis
::
createTickMarkLineShapes
(
::
std
::
vector
<
TickInfo
>&
rTickInfos
,
const
TickmarkProperties
&
rTickmarkProperties
,
TickFactory
_
2D
&
rTickFactory2D
,
bool
bOnlyAtLabels
)
void
VCartesianAxis
::
createTickMarkLineShapes
(
::
std
::
vector
<
TickInfo
>&
rTickInfos
,
const
TickmarkProperties
&
rTickmarkProperties
,
TickFactory2D
&
rTickFactory2D
,
bool
bOnlyAtLabels
)
{
sal_Int32
nPointCount
=
rTickInfos
.
size
();
drawing
::
PointSequenceSequence
aPoints
(
2
*
nPointCount
);
...
...
@@ -1568,8 +1568,8 @@ void VCartesianAxis::createShapes()
if
(
!
prepareShapeCreation
()
)
return
;
boost
::
scoped_ptr
<
TickFactory
_
2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
TickFactory
_
2D
*
pTickFactory2D
=
apTickFactory2D
.
get
();
boost
::
scoped_ptr
<
TickFactory2D
>
apTickFactory2D
(
this
->
createTickFactory2D
()
);
TickFactory2D
*
pTickFactory2D
=
apTickFactory2D
.
get
();
if
(
!
pTickFactory2D
)
return
;
...
...
chart2/source/view/axes/VCartesianAxis.hxx
Dosyayı görüntüle @
fd9151e1
...
...
@@ -103,16 +103,16 @@ protected: //methods
::
com
::
sun
::
star
::
drawing
::
XShapes
>&
xTarget
,
TickIter
&
rTickIter
,
AxisLabelProperties
&
rAxisLabelProperties
,
TickFactory
_
2D
*
pTickFactory
,
TickFactory2D
*
pTickFactory
,
sal_Int32
nScreenDistanceBetweenTicks
);
void
createTickMarkLineShapes
(
::
std
::
vector
<
TickInfo
>&
rTickInfos
,
const
TickmarkProperties
&
rTickmarkProperties
,
TickFactory
_
2D
&
rTickFactory2D
,
bool
bOnlyAtLabels
);
void
createTickMarkLineShapes
(
::
std
::
vector
<
TickInfo
>&
rTickInfos
,
const
TickmarkProperties
&
rTickmarkProperties
,
TickFactory2D
&
rTickFactory2D
,
bool
bOnlyAtLabels
);
TickFactory
_
2D
*
createTickFactory2D
();
TickFactory2D
*
createTickFactory2D
();
void
hideIdenticalScreenValues
(
::
std
::
vector
<
::
std
::
vector
<
TickInfo
>
>&
rTickInfos
)
const
;
void
doStaggeringOfLabels
(
const
AxisLabelProperties
&
rAxisLabelProperties
,
TickFactory
_
2D
*
pTickFactory2D
);
,
TickFactory2D
*
pTickFactory2D
);
bool
isAutoStaggeringOfLabelsAllowed
(
const
AxisLabelProperties
&
rAxisLabelProperties
,
bool
bIsHorizontalAxis
,
bool
bIsVerticalAxis
);
bool
isBreakOfLabelsAllowed
(
const
AxisLabelProperties
&
rAxisLabelProperties
,
bool
bIsHorizontalAxis
);
...
...
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