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
fed40ef8
Kaydet (Commit)
fed40ef8
authored
Ara 27, 2017
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Return early
Change-Id: I2b420141b5986b1d23460d5432c1b7051b11663e
üst
b30499e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
svdmrkv.cxx
svx/source/svdraw/svdmrkv.cxx
+11
-11
No files found.
svx/source/svdraw/svdmrkv.cxx
Dosyayı görüntüle @
fed40ef8
...
...
@@ -1913,24 +1913,23 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
bool
bCheckNearestOn3rdPass
(
nOptions
&
SdrSearchOptions
::
PASS3NEAREST
);
rpObj
=
nullptr
;
rpPV
=
nullptr
;
bool
bFnd
=
false
;
const
size_t
nMarkCount
=
GetMarkedObjectCount
();
for
(
size_t
nMarkNum
=
nMarkCount
;
nMarkNum
>
0
&&
!
bFnd
;)
{
for
(
size_t
nMarkNum
=
nMarkCount
;
nMarkNum
>
0
;)
{
--
nMarkNum
;
SdrMark
*
pM
=
GetSdrMarkByIndex
(
nMarkNum
);
SdrPageView
*
pPV
=
pM
->
GetPageView
();
SdrObject
*
pObj
=
pM
->
GetMarkedSdrObj
();
bFnd
=
nullptr
!=
CheckSingleSdrObjectHit
(
rPnt
,
mnHitTolLog
,
pObj
,
pPV
,
SdrSearchOptions
::
TESTMARKABLE
,
nullptr
);
if
(
bFnd
)
{
if
(
CheckSingleSdrObjectHit
(
rPnt
,
mnHitTolLog
,
pObj
,
pPV
,
SdrSearchOptions
::
TESTMARKABLE
,
nullptr
))
{
rpObj
=
pObj
;
rpPV
=
pPV
;
return
true
;
}
}
if
(
(
bBoundCheckOn2ndPass
||
bCheckNearestOn3rdPass
)
&&
!
bFnd
)
{
if
(
bBoundCheckOn2ndPass
||
bCheckNearestOn3rdPass
)
{
SdrObject
*
pBestObj
=
nullptr
;
SdrPageView
*
pBestPV
=
nullptr
;
sal_uIntPtr
nBestDist
=
ULONG_MAX
;
for
(
size_t
nMarkNum
=
nMarkCount
;
nMarkNum
>
0
&&
!
bFnd
;)
{
for
(
size_t
nMarkNum
=
nMarkCount
;
nMarkNum
>
0
;)
{
--
nMarkNum
;
SdrMark
*
pM
=
GetSdrMarkByIndex
(
nMarkNum
);
SdrPageView
*
pPV
=
pM
->
GetPageView
();
...
...
@@ -1941,10 +1940,11 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
aRect
.
Right
()
+=
mnHitTolLog
;
aRect
.
Bottom
()
+=
mnHitTolLog
;
if
(
aRect
.
IsInside
(
rPnt
))
{
bFnd
=
true
;
rpObj
=
pObj
;
rpPV
=
pPV
;
}
else
if
(
bCheckNearestOn3rdPass
)
{
return
true
;
}
if
(
bCheckNearestOn3rdPass
)
{
sal_uIntPtr
nDist
=
0
;
if
(
rPnt
.
X
()
<
aRect
.
Left
())
nDist
+=
aRect
.
Left
()
-
rPnt
.
X
();
if
(
rPnt
.
X
()
>
aRect
.
Right
())
nDist
+=
rPnt
.
X
()
-
aRect
.
Right
();
...
...
@@ -1957,13 +1957,13 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
}
}
}
if
(
bCheckNearestOn3rdPass
&&
!
bFnd
)
{
if
(
bCheckNearestOn3rdPass
)
{
rpObj
=
pBestObj
;
rpPV
=
pBestPV
;
bFnd
=
pBestObj
!=
nullptr
;
return
pBestObj
!=
nullptr
;
}
}
return
bFnd
;
return
false
;
}
...
...
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