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
2a6806a8
Kaydet (Commit)
2a6806a8
authored
Nis 24, 2015
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert SDRSNAP_ constants to scoped enum
Change-Id: Ida0b0e3f017c53588ea9208d078c24948a63eb92
üst
62f9bc73
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
20 deletions
+29
-20
svddrgmt.hxx
include/svx/svddrgmt.hxx
+1
-1
svdsnpv.hxx
include/svx/svdsnpv.hxx
+16
-7
svddrgmt.cxx
svx/source/svdraw/svddrgmt.cxx
+3
-3
svdsnpv.cxx
svx/source/svdraw/svdsnpv.cxx
+9
-9
No files found.
include/svx/svddrgmt.hxx
Dosyayı görüntüle @
2a6806a8
...
@@ -169,7 +169,7 @@ protected:
...
@@ -169,7 +169,7 @@ protected:
const
Rectangle
&
GetDragLimitRect
()
{
return
getSdrDragView
().
aDragLimit
;
}
const
Rectangle
&
GetDragLimitRect
()
{
return
getSdrDragView
().
aDragLimit
;
}
const
SdrMarkList
&
GetMarkedObjectList
()
{
return
getSdrDragView
().
GetMarkedObjectList
();
}
const
SdrMarkList
&
GetMarkedObjectList
()
{
return
getSdrDragView
().
GetMarkedObjectList
();
}
Point
GetSnapPos
(
const
Point
&
rPt
)
const
{
return
getSdrDragView
().
GetSnapPos
(
rPt
,
getSdrDragView
().
pMarkedPV
);
}
Point
GetSnapPos
(
const
Point
&
rPt
)
const
{
return
getSdrDragView
().
GetSnapPos
(
rPt
,
getSdrDragView
().
pMarkedPV
);
}
sal_uInt16
SnapPos
(
Point
&
rPt
)
const
{
return
getSdrDragView
().
SnapPos
(
rPt
,
getSdrDragView
().
pMarkedPV
);
}
SdrSnap
SnapPos
(
Point
&
rPt
)
const
{
return
getSdrDragView
().
SnapPos
(
rPt
,
getSdrDragView
().
pMarkedPV
);
}
inline
const
Rectangle
&
GetMarkedRect
()
const
;
inline
const
Rectangle
&
GetMarkedRect
()
const
;
SdrPageView
*
GetDragPV
()
const
;
SdrPageView
*
GetDragPV
()
const
;
SdrObject
*
GetDragObj
()
const
;
SdrObject
*
GetDragObj
()
const
;
...
...
include/svx/svdsnpv.hxx
Dosyayı görüntüle @
2a6806a8
...
@@ -23,12 +23,21 @@
...
@@ -23,12 +23,21 @@
#include <svx/svdpntv.hxx>
#include <svx/svdpntv.hxx>
#include <svx/svdhlpln.hxx>
#include <svx/svdhlpln.hxx>
#include <svx/svxdllapi.h>
#include <svx/svxdllapi.h>
#include <o3tl/typed_flags_set.hxx>
#define SDRSNAP_NOTSNAPPED 0x0000
/** return value for SnapPos() method */
#define SDRSNAP_XSNAPPED 0x0001
enum
class
SdrSnap
#define SDRSNAP_YSNAPPED 0x0002
{
#define SDRSNAP_XYSNAPPED 0x0003
NOTSNAPPED
=
0x00
,
XSNAPPED
=
0x01
,
YSNAPPED
=
0x02
,
XYSNAPPED
=
XSNAPPED
|
YSNAPPED
,
};
namespace
o3tl
{
template
<>
struct
typed_flags
<
SdrSnap
>
:
is_typed_flags
<
SdrSnap
,
3
>
{};
}
// SDRCROOK_STRETCH is not implemented yet!
// SDRCROOK_STRETCH is not implemented yet!
enum
SdrCrookMode
{
enum
SdrCrookMode
{
...
@@ -112,9 +121,9 @@ public:
...
@@ -112,9 +121,9 @@ public:
void
SetActualWin
(
const
OutputDevice
*
pWin
)
{
SdrPaintView
::
SetActualWin
(
pWin
);
if
(
pWin
!=
NULL
)
RecalcLogicSnapMagnetic
(
*
pWin
);
}
void
SetActualWin
(
const
OutputDevice
*
pWin
)
{
SdrPaintView
::
SetActualWin
(
pWin
);
if
(
pWin
!=
NULL
)
RecalcLogicSnapMagnetic
(
*
pWin
);
}
// Coordinates referred to the view!
// Coordinates referred to the view!
// Returnvalues are S
DRSNAP_NOTSNAPPED,SDRSNAP_
XSNAPPED,
// Returnvalues are S
drSnap::NOTSNAPPED,SdrSnap::
XSNAPPED,
// S
DRSNAP_YSNAPPED or SDRSNAP_
XYSNAPPED
// S
drSnap::YSNAPPED or SdrSnap::
XYSNAPPED
sal_uInt16
SnapPos
(
Point
&
rPnt
,
const
SdrPageView
*
pPV
)
const
;
SdrSnap
SnapPos
(
Point
&
rPnt
,
const
SdrPageView
*
pPV
)
const
;
Point
GetSnapPos
(
const
Point
&
rPnt
,
const
SdrPageView
*
pPV
)
const
;
Point
GetSnapPos
(
const
Point
&
rPnt
,
const
SdrPageView
*
pPV
)
const
;
void
CheckSnap
(
const
Point
&
rPt
,
const
SdrPageView
*
pPV
,
long
&
nBestXSnap
,
long
&
nBestYSnap
,
bool
&
bXSnapped
,
bool
&
bYSnapped
)
const
;
void
CheckSnap
(
const
Point
&
rPt
,
const
SdrPageView
*
pPV
,
long
&
nBestXSnap
,
long
&
nBestYSnap
,
bool
&
bXSnapped
,
bool
&
bYSnapped
)
const
;
...
...
svx/source/svdraw/svddrgmt.cxx
Dosyayı görüntüle @
2a6806a8
...
@@ -1557,10 +1557,10 @@ basegfx::B2DHomMatrix SdrDragMove::getCurrentTransformation()
...
@@ -1557,10 +1557,10 @@ basegfx::B2DHomMatrix SdrDragMove::getCurrentTransformation()
void
SdrDragMove
::
ImpCheckSnap
(
const
Point
&
rPt
)
void
SdrDragMove
::
ImpCheckSnap
(
const
Point
&
rPt
)
{
{
Point
aPt
(
rPt
);
Point
aPt
(
rPt
);
sal_uInt16
nRet
=
SnapPos
(
aPt
);
SdrSnap
nRet
=
SnapPos
(
aPt
);
aPt
-=
rPt
;
aPt
-=
rPt
;
if
(
(
nRet
&
SDRSNAP_XSNAPPED
)
!=
0
)
if
(
nRet
&
SdrSnap
::
XSNAPPED
)
{
{
if
(
bXSnapped
)
if
(
bXSnapped
)
{
{
...
@@ -1576,7 +1576,7 @@ void SdrDragMove::ImpCheckSnap(const Point& rPt)
...
@@ -1576,7 +1576,7 @@ void SdrDragMove::ImpCheckSnap(const Point& rPt)
}
}
}
}
if
(
(
nRet
&
SDRSNAP_YSNAPPED
)
!=
0
)
if
(
nRet
&
SdrSnap
::
YSNAPPED
)
{
{
if
(
bYSnapped
)
if
(
bYSnapped
)
{
{
...
...
svx/source/svdraw/svdsnpv.cxx
Dosyayı görüntüle @
2a6806a8
...
@@ -282,14 +282,14 @@ Point SdrSnapView::GetSnapPos(const Point& rPnt, const SdrPageView* pPV) const
...
@@ -282,14 +282,14 @@ Point SdrSnapView::GetSnapPos(const Point& rPnt, const SdrPageView* pPV) const
}
}
#define NOT_SNAPPED 0x7FFFFFFF
#define NOT_SNAPPED 0x7FFFFFFF
sal_uInt16
SdrSnapView
::
SnapPos
(
Point
&
rPnt
,
const
SdrPageView
*
pPV
)
const
SdrSnap
SdrSnapView
::
SnapPos
(
Point
&
rPnt
,
const
SdrPageView
*
pPV
)
const
{
{
if
(
!
bSnapEnab
)
return
S
DRSNAP_
NOTSNAPPED
;
if
(
!
bSnapEnab
)
return
S
drSnap
::
NOTSNAPPED
;
long
x
=
rPnt
.
X
();
long
x
=
rPnt
.
X
();
long
y
=
rPnt
.
Y
();
long
y
=
rPnt
.
Y
();
if
(
pPV
==
NULL
)
{
if
(
pPV
==
NULL
)
{
pPV
=
GetSdrPageView
();
pPV
=
GetSdrPageView
();
if
(
pPV
==
NULL
)
return
S
DRSNAP_
NOTSNAPPED
;
if
(
pPV
==
NULL
)
return
S
drSnap
::
NOTSNAPPED
;
}
}
long
dx
=
NOT_SNAPPED
;
long
dx
=
NOT_SNAPPED
;
...
@@ -424,9 +424,9 @@ sal_uInt16 SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
...
@@ -424,9 +424,9 @@ sal_uInt16 SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
dy
=
0
;
dy
=
0
;
}
}
}
}
sal_uInt16
bRet
=
SDRSNAP_
NOTSNAPPED
;
SdrSnap
bRet
=
SdrSnap
::
NOTSNAPPED
;
if
(
dx
==
NOT_SNAPPED
)
dx
=
0
;
else
bRet
|=
S
DRSNAP_
XSNAPPED
;
if
(
dx
==
NOT_SNAPPED
)
dx
=
0
;
else
bRet
|=
S
drSnap
::
XSNAPPED
;
if
(
dy
==
NOT_SNAPPED
)
dy
=
0
;
else
bRet
|=
S
DRSNAP_
YSNAPPED
;
if
(
dy
==
NOT_SNAPPED
)
dy
=
0
;
else
bRet
|=
S
drSnap
::
YSNAPPED
;
rPnt
.
X
()
=
x
+
dx
;
rPnt
.
X
()
=
x
+
dx
;
rPnt
.
Y
()
=
y
+
dy
;
rPnt
.
Y
()
=
y
+
dy
;
return
bRet
;
return
bRet
;
...
@@ -435,9 +435,9 @@ sal_uInt16 SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
...
@@ -435,9 +435,9 @@ sal_uInt16 SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const
void
SdrSnapView
::
CheckSnap
(
const
Point
&
rPt
,
const
SdrPageView
*
pPV
,
long
&
nBestXSnap
,
long
&
nBestYSnap
,
bool
&
bXSnapped
,
bool
&
bYSnapped
)
const
void
SdrSnapView
::
CheckSnap
(
const
Point
&
rPt
,
const
SdrPageView
*
pPV
,
long
&
nBestXSnap
,
long
&
nBestYSnap
,
bool
&
bXSnapped
,
bool
&
bYSnapped
)
const
{
{
Point
aPt
(
rPt
);
Point
aPt
(
rPt
);
sal_uInt16
nRet
=
SnapPos
(
aPt
,
pPV
);
SdrSnap
nRet
=
SnapPos
(
aPt
,
pPV
);
aPt
-=
rPt
;
aPt
-=
rPt
;
if
(
(
nRet
&
SDRSNAP_XSNAPPED
)
!=
0
)
{
if
(
nRet
&
SdrSnap
::
XSNAPPED
)
{
if
(
bXSnapped
)
{
if
(
bXSnapped
)
{
if
(
std
::
abs
(
aPt
.
X
())
<
std
::
abs
(
nBestXSnap
))
{
if
(
std
::
abs
(
aPt
.
X
())
<
std
::
abs
(
nBestXSnap
))
{
nBestXSnap
=
aPt
.
X
();
nBestXSnap
=
aPt
.
X
();
...
@@ -447,7 +447,7 @@ void SdrSnapView::CheckSnap(const Point& rPt, const SdrPageView* pPV, long& nBes
...
@@ -447,7 +447,7 @@ void SdrSnapView::CheckSnap(const Point& rPt, const SdrPageView* pPV, long& nBes
bXSnapped
=
true
;
bXSnapped
=
true
;
}
}
}
}
if
(
(
nRet
&
SDRSNAP_YSNAPPED
)
!=
0
)
{
if
(
nRet
&
SdrSnap
::
YSNAPPED
)
{
if
(
bYSnapped
)
{
if
(
bYSnapped
)
{
if
(
std
::
abs
(
aPt
.
Y
())
<
std
::
abs
(
nBestYSnap
))
{
if
(
std
::
abs
(
aPt
.
Y
())
<
std
::
abs
(
nBestYSnap
))
{
nBestYSnap
=
aPt
.
Y
();
nBestYSnap
=
aPt
.
Y
();
...
...
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