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
a66097b7
Kaydet (Commit)
a66097b7
authored
Eki 07, 2013
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
only one createInstance call left
Change-Id: Iabefaea11e9190f84cecc1991585c4a958802fae
üst
a3604b24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
25 deletions
+19
-25
CandleStickChart.cxx
chart2/source/view/charttypes/CandleStickChart.cxx
+19
-25
No files found.
chart2/source/view/charttypes/CandleStickChart.cxx
Dosyayı görüntüle @
a66097b7
...
@@ -231,37 +231,33 @@ void CandleStickChart::createShapes()
...
@@ -231,37 +231,33 @@ void CandleStickChart::createShapes()
//create min-max line
//create min-max line
if
(
isValidPosition
(
aPosMiddleMinimum
)
&&
isValidPosition
(
aPosMiddleMaximum
)
)
if
(
isValidPosition
(
aPosMiddleMinimum
)
&&
isValidPosition
(
aPosMiddleMaximum
)
)
{
{
uno
::
Reference
<
drawing
::
XShape
>
xShape
(
drawing
::
PolyPolygonShape3D
aPoly
;
m_xShapeFactory
->
createInstance
(
"com.sun.star.drawing.PolyLineShape"
),
sal_Int32
nLineIndex
=
0
;
uno
::
UNO_QUERY
);
AddPointToPoly
(
aPoly
,
aPosMiddleMinimum
,
nLineIndex
);
xPointGroupShape_Shapes
->
add
(
xShape
);
AddPointToPoly
(
aPoly
,
aPosMiddleMaximum
,
nLineIndex
);
uno
::
Reference
<
beans
::
XPropertySet
>
xProp
(
xShape
,
uno
::
UNO_QUERY
);
if
(
xProp
.
is
())
uno
::
Reference
<
drawing
::
XShape
>
xShape
=
{
m_pShapeFactory
->
createLine2D
(
xPointGroupShape_Shapes
,
drawing
::
PolyPolygonShape3D
aPoly
;
PolyToPointSequence
(
aPoly
),
NULL
);
sal_Int32
nLineIndex
=
0
;
AddPointToPoly
(
aPoly
,
aPosMiddleMinimum
,
nLineIndex
);
AddPointToPoly
(
aPoly
,
aPosMiddleMaximum
,
nLineIndex
);
xProp
->
setPropertyValue
(
UNO_NAME_POLYPOLYGON
,
uno
::
makeAny
(
PolyToPointSequence
(
aPoly
)
)
);
}
this
->
setMappedProperties
(
xShape
,
xPointProp
,
PropertyMapper
::
getPropertyNameMapForLineSeriesProperties
()
);
this
->
setMappedProperties
(
xShape
,
xPointProp
,
PropertyMapper
::
getPropertyNameMapForLineSeriesProperties
()
);
}
}
//create first-last shape
//create first-last shape
if
(
bJapaneseStyle
&&
isValidPosition
(
aPosLeftFirst
)
&&
isValidPosition
(
aPosRightLast
)
)
if
(
bJapaneseStyle
&&
isValidPosition
(
aPosLeftFirst
)
&&
isValidPosition
(
aPosRightLast
)
)
{
{
uno
::
Reference
<
drawing
::
XShape
>
xShape
(
m_xShapeFactory
->
createInstance
(
"com.sun.star.drawing.RectangleShape"
),
uno
::
UNO_QUERY
);
xLossGainTarget
->
add
(
xShape
);
xShape
->
setPosition
(
Position3DToAWTPoint
(
aPosLeftFirst
)
);
drawing
::
Direction3D
aDiff
=
aPosRightLast
-
aPosLeftFirst
;
drawing
::
Direction3D
aDiff
=
aPosRightLast
-
aPosLeftFirst
;
awt
::
Size
aAWTSize
(
Direction3DToAWTSize
(
aDiff
));
awt
::
Size
aAWTSize
(
Direction3DToAWTSize
(
aDiff
));
// workaround for bug in drawing: if height is 0 the box gets infinitely large
// workaround for bug in drawing: if height is 0 the box gets infinitely large
if
(
aAWTSize
.
Height
==
0
)
if
(
aAWTSize
.
Height
==
0
)
aAWTSize
.
Height
=
1
;
aAWTSize
.
Height
=
1
;
xShape
->
setSize
(
aAWTSize
);
tNameSequence
aNames
;
tAnySequence
aValues
;
uno
::
Reference
<
drawing
::
XShape
>
xShape
=
m_pShapeFactory
->
createRectangle
(
xLossGainTarget
,
aAWTSize
,
Position3DToAWTPoint
(
aPosLeftFirst
),
aNames
,
aValues
);
uno
::
Reference
<
beans
::
XPropertySet
>
xProp
(
xShape
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xProp
(
xShape
,
uno
::
UNO_QUERY
);
if
(
xProp
.
is
())
if
(
xProp
.
is
())
...
@@ -292,14 +288,12 @@ void CandleStickChart::createShapes()
...
@@ -292,14 +288,12 @@ void CandleStickChart::createShapes()
if
(
aPoly
.
SequenceX
.
getLength
()
)
if
(
aPoly
.
SequenceX
.
getLength
()
)
{
{
uno
::
Reference
<
drawing
::
XShape
>
xShape
(
uno
::
Reference
<
drawing
::
XShape
>
xShape
=
m_xShapeFactory
->
createInstance
(
"com.sun.star.drawing.PolyLineShape"
),
m_pShapeFactory
->
createLine2D
(
xPointGroupShape_Shapes
,
uno
::
UNO_QUERY
);
PolyToPointSequence
(
aPoly
),
NULL
);
xPointGroupShape_Shapes
->
add
(
xShape
);
uno
::
Reference
<
beans
::
XPropertySet
>
xProp
(
xShape
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
beans
::
XPropertySet
>
xProp
(
xShape
,
uno
::
UNO_QUERY
);
if
(
xProp
.
is
())
if
(
xProp
.
is
())
{
{
xProp
->
setPropertyValue
(
UNO_NAME_POLYPOLYGON
,
uno
::
makeAny
(
PolyToPointSequence
(
aPoly
)
)
);
this
->
setMappedProperties
(
xShape
,
xPointProp
,
PropertyMapper
::
getPropertyNameMapForLineSeriesProperties
()
);
this
->
setMappedProperties
(
xShape
,
xPointProp
,
PropertyMapper
::
getPropertyNameMapForLineSeriesProperties
()
);
}
}
}
}
...
...
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