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
f075a3ad
Kaydet (Commit)
f075a3ad
authored
Kas 04, 2014
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
coverity#735623 Division or modulo by float zero
Change-Id: Ibd53687416a4e20af7ac4a1e02c54407892aa470
üst
69b5df30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
EnhancedCustomShapeFontWork.cxx
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+11
-3
No files found.
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
Dosyayı görüntüle @
f075a3ad
...
@@ -552,12 +552,20 @@ void CalcDistances( const Polygon& rPoly, std::vector< double >& rDistances )
...
@@ -552,12 +552,20 @@ void CalcDistances( const Polygon& rPoly, std::vector< double >& rDistances )
void
InsertMissingOutlinePoints
(
const
Polygon
&
/*rOutlinePoly*/
,
const
std
::
vector
<
double
>&
rDistances
,
const
Rectangle
&
rTextAreaBoundRect
,
Polygon
&
rPoly
)
void
InsertMissingOutlinePoints
(
const
Polygon
&
/*rOutlinePoly*/
,
const
std
::
vector
<
double
>&
rDistances
,
const
Rectangle
&
rTextAreaBoundRect
,
Polygon
&
rPoly
)
{
{
sal_uInt16
i
=
0
;
sal_uInt16
nSize
=
rPoly
.
GetSize
();
if
(
nSize
==
0
)
return
;
long
nTextWidth
=
rTextAreaBoundRect
.
GetWidth
();
if
(
nTextWidth
==
0
)
throw
o3tl
::
divide_by_zero
();
double
fLastDistance
=
0.0
;
double
fLastDistance
=
0.0
;
for
(
i
=
0
;
i
<
rPoly
.
GetSize
();
i
++
)
for
(
sal_uInt16
i
=
0
;
i
<
nSize
;
++
i
)
{
{
Point
&
rPoint
=
rPoly
[
i
];
Point
&
rPoint
=
rPoly
[
i
];
double
fDistance
=
(
double
)(
rPoint
.
X
()
-
rTextAreaBoundRect
.
Left
()
)
/
(
double
)
rTextAreaBoundRect
.
GetWidth
()
;
double
fDistance
=
(
double
)(
rPoint
.
X
()
-
rTextAreaBoundRect
.
Left
()
)
/
(
double
)
nTextWidth
;
if
(
i
)
if
(
i
)
{
{
if
(
fDistance
>
fLastDistance
)
if
(
fDistance
>
fLastDistance
)
...
...
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