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
0c423808
Kaydet (Commit)
0c423808
authored
Şub 15, 2016
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cppcheck: noExplicitConstructor
Change-Id: I92f41cde892d47abcd31e2b85ace7d228cbfd9fe
üst
045ec6aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
poly.cxx
tools/source/generic/poly.cxx
+6
-6
No files found.
tools/source/generic/poly.cxx
Dosyayı görüntüle @
0c423808
...
...
@@ -1127,7 +1127,7 @@ private:
double
mfX
;
double
mfY
;
public
:
Vector2D
(
const
Pair
&
rPair
)
:
mfX
(
rPair
.
A
()
),
mfY
(
rPair
.
B
()
)
{};
explicit
Vector2D
(
const
Point
&
rPair
)
:
mfX
(
rPair
.
A
()
),
mfY
(
rPair
.
B
()
)
{};
double
GetLength
()
const
{
return
hypot
(
mfX
,
mfY
);
}
Vector2D
&
operator
-=
(
const
Vector2D
&
rVec
)
{
mfX
-=
rVec
.
mfX
,
mfY
-=
rVec
.
mfY
;
return
*
this
;
}
double
Scalar
(
const
Vector2D
&
rVec
)
const
{
return
mfX
*
rVec
.
mfX
+
mfY
*
rVec
.
mfY
;
}
...
...
@@ -1167,10 +1167,10 @@ void Polygon::ImplReduceEdges( tools::Polygon& rPoly, const double& rArea, sal_u
sal_uInt16
nIndPrevPrev
=
!
nIndPrev
?
nPntCnt
-
1
:
nIndPrev
-
1
;
sal_uInt16
nIndNext
=
(
n
==
nPntCnt
-
1
)
?
0
:
n
+
1
;
sal_uInt16
nIndNextNext
=
(
nIndNext
==
nPntCnt
-
1
)
?
0
:
nIndNext
+
1
;
Vector2D
aVec1
(
rPoly
[
nIndPrev
]
);
aVec1
-=
rPoly
[
nIndPrevPrev
]
;
Vector2D
aVec2
(
rPoly
[
n
]
);
aVec2
-=
rPoly
[
nIndPrev
]
;
Vector2D
aVec3
(
rPoly
[
nIndNext
]
);
aVec3
-=
rPoly
[
n
]
;
Vector2D
aVec4
(
rPoly
[
nIndNextNext
]
);
aVec4
-=
rPoly
[
nIndNext
]
;
Vector2D
aVec1
(
rPoly
[
nIndPrev
]
);
aVec1
-=
Vector2D
(
rPoly
[
nIndPrevPrev
])
;
Vector2D
aVec2
(
rPoly
[
n
]
);
aVec2
-=
Vector2D
(
rPoly
[
nIndPrev
])
;
Vector2D
aVec3
(
rPoly
[
nIndNext
]
);
aVec3
-=
Vector2D
(
rPoly
[
n
])
;
Vector2D
aVec4
(
rPoly
[
nIndNextNext
]
);
aVec4
-=
Vector2D
(
rPoly
[
nIndNext
])
;
double
fDist1
=
aVec1
.
GetLength
(),
fDist2
=
aVec2
.
GetLength
();
double
fDist3
=
aVec3
.
GetLength
(),
fDist4
=
aVec4
.
GetLength
();
double
fTurnB
=
aVec2
.
Normalize
().
Scalar
(
aVec3
.
Normalize
()
);
...
...
@@ -1180,7 +1180,7 @@ void Polygon::ImplReduceEdges( tools::Polygon& rPoly, const double& rArea, sal_u
else
{
Vector2D
aVecB
(
rPoly
[
nIndNext
]
);
double
fDistB
=
(
aVecB
-=
rPoly
[
nIndPrev
]
).
GetLength
();
double
fDistB
=
(
aVecB
-=
Vector2D
(
rPoly
[
nIndPrev
]
)
).
GetLength
();
double
fLenWithB
=
fDist2
+
fDist3
;
double
fLenFact
=
(
fDistB
!=
0.0
)
?
fLenWithB
/
fDistB
:
1.0
;
double
fTurnPrev
=
aVec1
.
Normalize
().
Scalar
(
aVec2
);
...
...
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