summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-24 13:52:50 +0200
committerNoel Grandin <noel@peralex.com>2015-04-29 10:41:39 +0200
commit4e62eee559f798f9d6f5d7dbcb9179007248d16c (patch)
tree4ca576bd16d7093730e96de086e24e595ad4502f
parent1902ad6cad6d8c18f8d81e92517a88568f734b44 (diff)
convert SDRSEARCH_ constants to scoped enum
Change-Id: I1495dbaf05b642d98f41639d41f831f007601df3
-rw-r--r--basctl/source/dlged/dlgedview.cxx2
-rw-r--r--basctl/source/inc/dlgedview.hxx2
-rw-r--r--chart2/source/controller/drawinglayer/DrawViewWrapper.cxx2
-rw-r--r--include/svx/svdmrkv.hxx73
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx2
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx6
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx8
-rw-r--r--sc/source/ui/drawfunc/futext.cxx4
-rw-r--r--sc/source/ui/view/gridwin5.cxx4
-rw-r--r--sd/source/ui/func/fudraw.cxx6
-rw-r--r--sd/source/ui/func/fuformatpaintbrush.cxx4
-rw-r--r--sd/source/ui/func/fusel.cxx10
-rw-r--r--sd/source/ui/func/futext.cxx2
-rw-r--r--svx/source/form/fmpage.cxx2
-rw-r--r--svx/source/svdraw/svddrgv.cxx2
-rw-r--r--svx/source/svdraw/svdmrkv.cxx75
-rw-r--r--svx/source/svdraw/svdmrkv1.cxx6
-rw-r--r--svx/source/svdraw/svdview.cxx4
-rw-r--r--sw/source/core/draw/dpage.cxx2
-rw-r--r--sw/source/core/draw/dview.cxx2
-rw-r--r--sw/source/core/frmedt/fefly1.cxx6
-rw-r--r--sw/source/core/frmedt/feshview.cxx10
-rw-r--r--sw/source/core/inc/dview.hxx2
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx4
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx2
25 files changed, 125 insertions, 117 deletions
diff --git a/basctl/source/dlged/dlgedview.cxx b/basctl/source/dlged/dlgedview.cxx
index 8f07c70edad7..4bd0a5d2e890 100644
--- a/basctl/source/dlged/dlgedview.cxx
+++ b/basctl/source/dlged/dlgedview.cxx
@@ -172,7 +172,7 @@ SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt
return pRetval;
}
-SdrObject* DlgEdView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const
+SdrObject* DlgEdView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay) const
{
// call parent
SdrObject* pRetval = SdrView::CheckSingleSdrObjectHit(rPnt, nTol, pObj, pPV, nOptions, pMVisLay);
diff --git a/basctl/source/inc/dlgedview.hxx b/basctl/source/inc/dlgedview.hxx
index 0c54e5c5eb93..11b8247a1115 100644
--- a/basctl/source/inc/dlgedview.hxx
+++ b/basctl/source/inc/dlgedview.hxx
@@ -49,7 +49,7 @@ public:
protected:
/// override to handle HitTest for some objects specially
using SdrView::CheckSingleSdrObjectHit;
- virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const SAL_OVERRIDE;
+ virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay) const SAL_OVERRIDE;
};
} // namespace basctl
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index dbf9c4856c00..d6623b994af6 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -175,7 +175,7 @@ void DrawViewWrapper::SetMarkHandles()
SdrObject* DrawViewWrapper::getHitObject( const Point& rPnt ) const
{
SdrObject* pRet = NULL;
- sal_uLong nOptions = SDRSEARCH_DEEP | SDRSEARCH_TESTMARKABLE;
+ SdrSearchOptions nOptions = SdrSearchOptions::DEEP | SdrSearchOptions::TESTMARKABLE;
SdrPageView* pSdrPageView = this->GetPageView();
this->SdrView::PickObj(rPnt, lcl_getHitTolerance( this->GetFirstOutputDevice() ), pRet, pSdrPageView, nOptions);
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index 4388008da021..cddd924de42c 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -25,27 +25,36 @@
#include <svx/svdsnpv.hxx>
#include <svx/svdtypes.hxx>
#include <svx/svxdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
-
-// The following is not yet implemented, or just particially:
-#define SDRSEARCH_DEEP 0x0001 /* recursive into group objects */
-#define SDRSEARCH_ALSOONMASTER 0x0002 /* MasterPages are also scanned */
-#define SDRSEARCH_WHOLEPAGE 0x0004 /* Not just the ObjList of PageView */
-#define SDRSEARCH_TESTMARKABLE 0x0008 /* just markable Objekte/Punkte/Handles/... */
-#define SDRSEARCH_TESTMACRO 0x0010 /* Just objects with macro */
-#define SDRSEARCH_TESTTEXTEDIT 0x0020 /* Just TextEdit-enabed objects */
-#define SDRSEARCH_WITHTEXT 0x0040 /* Just objects with text */
-#define SDRSEARCH_TESTTEXTAREA 0x0080 /* The textarea of objects with text (TextEditHit) */
-#define SDRSEARCH_BACKWARD 0x0100 /* Backwards search */
-#define SDRSEARCH_NEXT 0x0200 /* Search starts behind the transferred object/point/... */
-#define SDRSEARCH_MARKED 0x0400 /* Just marked objects/points/... */
-#define SDRSEARCH_PASS2BOUND 0x0800 /* In case of empty search results, then 2nd. try with BoundRectHit */
-#define SDRSEARCH_PASS3NEAREST 0x1000 /* In case of empty search results, then new 3rd. Try with NearestBoundRectHit */
-#define SDRSEARCH_BEFOREMARK 0x2000 /* if one marked one found, ignore all behind that */
-
-#define SDRSEARCH_PICKMARKABLE (SDRSEARCH_TESTMARKABLE)
-#define SDRSEARCH_PICKTEXTEDIT (SDRSEARCH_DEEP|SDRSEARCH_TESTMARKABLE|SDRSEARCH_TESTTEXTEDIT)
-#define SDRSEARCH_PICKMACRO (SDRSEARCH_DEEP|SDRSEARCH_ALSOONMASTER|SDRSEARCH_WHOLEPAGE|SDRSEARCH_TESTMACRO)
+// The following is not yet implemented, or just partially:
+enum class SdrSearchOptions
+{
+ NONE = 0x0000,
+ DEEP = 0x0001, /* recursive into group objects */
+ ALSOONMASTER = 0x0002, /* MasterPages are also scanned */
+ WHOLEPAGE = 0x0004, /* Not just the ObjList of PageView */
+ TESTMARKABLE = 0x0008, /* just markable Objekte/Punkte/Handles/... */
+ TESTMACRO = 0x0010, /* Just objects with macro */
+ TESTTEXTEDIT = 0x0020, /* Just TextEdit-enabed objects */
+ WITHTEXT = 0x0040, /* Just objects with text */
+ TESTTEXTAREA = 0x0080, /* The textarea of objects with text (TextEditHit) */
+ BACKWARD = 0x0100, /* Backwards search */
+ NEXT = 0x0200, /* Search starts behind the transferred object/point/... */
+ MARKED = 0x0400, /* Just marked objects/points/... */
+ PASS2BOUND = 0x0800, /* In case of empty search results, then 2nd. try with BoundRectHit */
+ PASS3NEAREST = 0x1000, /* In case of empty search results, then new 3rd. Try with NearestBoundRectHit */
+ BEFOREMARK = 0x2000, /* if one marked one found, ignore all behind that */
+
+ IMPISMASTER = 0x8000, /* MasterPage is being searched right now */
+ PICKMARKABLE = TESTMARKABLE,
+ PICKTEXTEDIT = DEEP | TESTMARKABLE | TESTTEXTEDIT,
+ PICKMACRO = DEEP | ALSOONMASTER | WHOLEPAGE | TESTMACRO,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SdrSearchOptions> : is_typed_flags<SdrSearchOptions, 0xbfff> {};
+}
// SDRSEARCHPASS_... is return parameter value at PickObj().
#define SDRSEARCHPASS_DIRECT 0x0000 /* Object is hit by 'direct hit' */
@@ -153,9 +162,9 @@ protected:
void ForceUndirtyMrkPnt() const { if (bMrkPntDirty) UndirtyMrkPnt(); }
//HMHvoid ImpShowMarkHdl(bool bNoRefHdl);
- virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uIntPtr nOptions, const SetOfByte* pMVisLay) const;
- SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, sal_uIntPtr nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const;
- SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, sal_uIntPtr nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj,const SdrMarkList * pMarkList) const;
+ virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay) const;
+ SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const;
+ SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj,const SdrMarkList * pMarkList) const;
bool ImpIsFrameHandles() const;
void ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 nVal=0, sal_uInt16 nOpt=0) const;
@@ -271,18 +280,18 @@ public:
bool IsMarkedObjHit(const Point& rPnt, short nTol=-2) const;
// Pick: Supported options for nOptions are SEARCH_NEXT, SEARCH_BACKWARD (ni)
- SdrHdl* PickHandle(const Point& rPnt, sal_uIntPtr nOptions=0, SdrHdl* pHdl0=NULL) const;
+ SdrHdl* PickHandle(const Point& rPnt, SdrSearchOptions nOptions=SdrSearchOptions::NONE, SdrHdl* pHdl0=NULL) const;
// Pick: Supported options for nOptions are:
- // SDRSEARCH_DEEP SDRSEARCH_ALSOONMASTER SDRSEARCH_TESTMARKABLE SDRSEARCH_TESTTEXTEDIT
- // SDRSEARCH_WITHTEXT SDRSEARCH_TESTTEXTAREA SDRSEARCH_BACKWARD SDRSEARCH_MARKED
- // SDRSEARCH_WHOLEPAGE
- bool PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions, SdrObject** ppRootObj, sal_uInt16* pnPassNum=NULL) const;
- bool PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions=0) const;
+ // SdrSearchOptions::DEEP SdrSearchOptions::ALSOONMASTER SdrSearchOptions::TESTMARKABLE SdrSearchOptions::TESTTEXTEDIT
+ // SdrSearchOptions::WITHTEXT SdrSearchOptions::TESTTEXTAREA SdrSearchOptions::BACKWARD SdrSearchOptions::MARKED
+ // SdrSearchOptions::WHOLEPAGE
+ bool PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, SdrSearchOptions nOptions, SdrObject** ppRootObj, sal_uInt16* pnPassNum=NULL) const;
+ bool PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, SdrSearchOptions nOptions=SdrSearchOptions::NONE) const;
bool MarkObj(const Point& rPnt, short nTol=-2, bool bToggle=false, bool bDeep=false);
- // Pick: Supported options for nOptions are SDRSEARCH_PASS2BOUND und SDRSEARCH_PASS3NEAREST
- bool PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions=0) const;
+ // Pick: Supported options for nOptions are SdrSearchOptions::PASS2BOUND und SdrSearchOptions::PASS3NEAREST
+ bool PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, SdrSearchOptions nOptions=SdrSearchOptions::NONE) const;
// Selects the most upper of the marked objects (O1) and scans from there
// towards bottom direction, selecting the first non-marked object (O2).
@@ -382,7 +391,7 @@ public:
// Attention: With each change of the glue point status the handle list is re-calculated.
// All previously saved SdrHdl* became invalid by this, the same with the point IDs!
// Pick: Supported options for nOptions are SEARCH_NEXT, SEARCH_BACKWARD
- bool PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16& rnId, SdrPageView*& rpPV, sal_uIntPtr nOptions=0) const;
+ bool PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16& rnId, SdrPageView*& rpPV, SdrSearchOptions nOptions=SdrSearchOptions::NONE) const;
bool MarkGluePoint(const SdrObject* pObj, sal_uInt16 nId, const SdrPageView* pPV, bool bUnmark=false);
bool UnmarkGluePoint(const SdrObject* pObj, sal_uInt16 nId, const SdrPageView* pPV) { return MarkGluePoint(pObj,nId,pPV,true); }
bool IsGluePointMarked(const SdrObject* pObj, sal_uInt16 nId) const;
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 9fb1f24c923b..b1bf52957ada 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -223,7 +223,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
{
SdrPageView* pPV = 0;
SdrObject* pHit = 0;
- if ( pView->PickObj( pWin->PixelToLogic( pViewData->GetMousePosPixel() ), pView->getHitTolLog(), pHit, pPV, SDRSEARCH_DEEP ) )
+ if ( pView->PickObj( pWin->PixelToLogic( pViewData->GetMousePosPixel() ), pView->getHitTolLog(), pHit, pPV, SdrSearchOptions::DEEP ) )
pObj = pHit;
}
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index 40f43fc7c8ac..5e4ceefb49e7 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -735,12 +735,12 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
SdrPageView* pPV;
ScMacroInfo* pInfo = 0;
- if ( pView->PickObj(aPnt, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER) )
+ if ( pView->PickObj(aPnt, pView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER) )
{
if ( pObj->IsGroupObject() )
{
SdrObject* pHit = 0;
- if ( pView->PickObj(aMDPos, pView->getHitTolLog(), pHit, pPV, SDRSEARCH_DEEP ) )
+ if ( pView->PickObj(aMDPos, pView->getHitTolLog(), pHit, pPV, SdrSearchOptions::DEEP ) )
pObj = pHit;
}
pInfo = ScDrawLayer::GetMacroInfo( pObj );
@@ -765,7 +765,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
// could be suppressed with ALT
pWindow->SetPointer( Pointer( POINTER_REFHAND ) ); // Text-URL / ImageMap
}
- else if ( !bAlt && pView->PickObj(aPnt, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO) )
+ else if ( !bAlt && pView->PickObj(aPnt, pView->getHitTolLog(), pObj, pPV, SdrSearchOptions::PICKMACRO) )
{
// could be suppressed with ALT
SdrObjMacroHitRec aHitRec; //! something missing ????
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index 056436dce9f5..db5e7f2765b4 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -153,7 +153,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
SdrObject* pObj;
SdrPageView* pPV;
bool bAlt = rMEvt.IsMod2();
- if ( !bAlt && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO) )
+ if ( !bAlt && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SdrSearchOptions::PICKMACRO) )
{
pView->BegMacroObj(aMDPos, pObj, pPV, pWindow);
bReturn = true;
@@ -161,7 +161,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
else
{
OUString sURL, sTarget;
- if ( !bAlt && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER))
+ if ( !bAlt && pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER))
{
// Support for imported Excel docs
// Excel is of course not consistent and allows
@@ -184,7 +184,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
if ( !pTmpInfo || pTmpInfo->GetMacro().isEmpty() )
{
SdrObject* pHit = NULL;
- if ( pView->PickObj(aMDPos, pView->getHitTolLog(), pHit, pPV, SDRSEARCH_DEEP ) )
+ if ( pView->PickObj(aMDPos, pView->getHitTolLog(), pHit, pPV, SdrSearchOptions::DEEP ) )
pObj = pHit;
}
}
@@ -435,7 +435,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
* one, he releases the mouse button immediately
**************************************************************/
SdrPageView* pPV = NULL;
- if (pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK))
+ if (pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER | SdrSearchOptions::BEFOREMARK))
{
pView->UnmarkAllObj();
pView->MarkObj(pObj,pPV,false,false);
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 69c1fb782ed2..17d50953da40 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -202,7 +202,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
if (pHdl == NULL &&
// pView->TakeTextEditObject(aMDPos, pObj, pPV) )
- pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKTEXTEDIT) )
+ pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SdrSearchOptions::PICKTEXTEDIT) )
{
SdrOutliner* pO = MakeOutliner();
lcl_UpdateHyphenator( *pO, pObj );
@@ -328,7 +328,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
if ( bRet )
pView->GetCreateObj()->SetGridOffset( aGridOff );
}
- else if (pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK))
+ else if (pView->PickObj(aMDPos, pView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER | SdrSearchOptions::BEFOREMARK))
{
pView->UnmarkAllObj();
ScViewData& rViewData = pViewShell->GetViewData();
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 5fa3255a534c..ccbede095d93 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -343,12 +343,12 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
SdrObject* pObj = 0;
SdrPageView* pPV = 0;
Point aMDPos = PixelToLogic( aPosPixel );
- if ( pDrView->PickObj(aMDPos, pDrView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER) )
+ if ( pDrView->PickObj(aMDPos, pDrView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER) )
{
if ( pObj->IsGroupObject() )
{
SdrObject* pHit = 0;
- if ( pDrView->PickObj(aMDPos, pDrView->getHitTolLog(), pHit, pPV, SDRSEARCH_DEEP ) )
+ if ( pDrView->PickObj(aMDPos, pDrView->getHitTolLog(), pHit, pPV, SdrSearchOptions::DEEP ) )
pObj = pHit;
}
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 8863f2f5c0d9..e1a6ae50d74d 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -567,7 +567,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
if (eHit == SDRHIT_NONE)
{
// found nothing -> look after at the masterpage
- mpView->PickObj(aPnt, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER);
+ mpView->PickObj(aPnt, mpView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER);
}
else if (eHit == SDRHIT_UNMARKEDOBJECT)
{
@@ -596,7 +596,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
if (bDefPointer && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dPolyScene)))
{
// take a glance into the group
- if (mpView->PickObj(aPnt, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP))
+ if (mpView->PickObj(aPnt, mpView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER | SdrSearchOptions::DEEP))
bDefPointer = !SetPointer(pObj, aPnt);
}
}
@@ -784,7 +784,7 @@ bool FuDraw::RequestHelp(const HelpEvent& rHEvt)
Point aPos(mpWindow->PixelToLogic(mpWindow->ScreenToOutputPixel(aPosPixel)));
- if (mpView->PickObj(aPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP))
+ if (mpView->PickObj(aPos, mpView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER | SdrSearchOptions::DEEP))
bReturn = SetHelpText(pObj, aPosPixel, aVEvt);
}
}
diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx
index 1f7966419bc7..0d6cfc76e117 100644
--- a/sd/source/ui/func/fuformatpaintbrush.cxx
+++ b/sd/source/ui/func/fuformatpaintbrush.cxx
@@ -103,7 +103,7 @@ bool FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt)
SdrObject* pPickObj=0;
SdrPageView* pPV=0;
sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
- mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pPickObj, pPV, SDRSEARCH_PICKMARKABLE);
+ mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pPickObj, pPV, SdrSearchOptions::PICKMARKABLE);
if( (pPickObj != 0) && !pPickObj->IsEmptyPresObj() )
{
@@ -162,7 +162,7 @@ bool FuFormatPaintBrush::MouseMove(const MouseEvent& rMEvt)
sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
SdrObject* pObj=0;
SdrPageView* pPV=0;
- bool bOverMarkableObject = mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pObj, pPV, SDRSEARCH_PICKMARKABLE);
+ bool bOverMarkableObject = mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pObj, pPV, SdrSearchOptions::PICKMARKABLE);
if(bOverMarkableObject && HasContentForThisType(pObj->GetObjInventor(),pObj->GetObjIdentifier()) )
mpWindow->SetPointer(Pointer(POINTER_FILL));
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 65ffe59a262b..f880f74aa237 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -239,7 +239,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
}
else
{
- if (!rMEvt.IsMod2() && mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO))
+ if (!rMEvt.IsMod2() && mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SdrSearchOptions::PICKMACRO))
{
mpView->BegMacroObj(aMDPos, nHitLog, pObj, pPV, mpWindow);
bReturn = true;
@@ -303,7 +303,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
&& mpViewShell->ISA(DrawViewShell)
)
{
- if(mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER))
+ if(mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER))
{
// Animate object when not just selecting.
if ( ! bSelectionOnly)
@@ -314,7 +314,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
if(rMEvt.GetClicks() == 1)
{
// Look into the group
- if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP))
+ if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER | SdrSearchOptions::DEEP))
bReturn = AnimateObj(pObj, aMDPos);
}
else if( !bReadOnly && rMEvt.GetClicks() == 2)
@@ -682,7 +682,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
* If a user wants to click on an object in front of a marked
* one, he releases the mouse button immediately
**************************************************************/
- if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK))
+ if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER | SdrSearchOptions::BEFOREMARK))
{
mpView->UnmarkAllObj();
mpView->MarkObj(pObj,pPV,false,false);
@@ -1504,7 +1504,7 @@ SdrObject* FuSelection::pickObject (const Point& rTestPoint)
SdrObject* pObject = NULL;
SdrPageView* pPageView;
sal_uInt16 nHitLog = sal_uInt16 (mpWindow->PixelToLogic(Size(HITPIX,0)).Width());
- mpView->PickObj (rTestPoint, nHitLog, pObject, pPageView, SDRSEARCH_PICKMARKABLE);
+ mpView->PickObj (rTestPoint, nHitLog, pObject, pPageView, SdrSearchOptions::PICKMARKABLE);
return pObject;
}
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 27f6540e6c06..24801ef7827a 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -654,7 +654,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
/*************************************************************
* From text mode, you don't want to rotate immediately.
**************************************************************/
- if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK))
+ if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER | SdrSearchOptions::BEFOREMARK))
{
mpView->UnmarkAllObj();
mpView->MarkObj(pObj,pPV,false,false);
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index a7a679689fdb..cc32c6dad91a 100644
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -169,7 +169,7 @@ bool FmFormPage::RequestHelp( vcl::Window* pWindow, SdrView* pView,
SdrObject* pObj = NULL;
SdrPageView* pPV = NULL;
- if ( !pView->PickObj( aPos, 0, pObj, pPV, SDRSEARCH_DEEP ) )
+ if ( !pView->PickObj( aPos, 0, pObj, pPV, SdrSearchOptions::DEEP ) )
return false;
FmFormObj* pFormObject = FmFormObj::GetFormObject( pObj );
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 27b74c037e4b..abcda08e571c 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -743,7 +743,7 @@ bool SdrDragView::BegInsGluePoint(const Point& rPnt)
bool bRet=false;
SdrObject* pObj;
SdrPageView* pPV;
- if (PickMarkedObj(rPnt,pObj,pPV,SDRSEARCH_PASS2BOUND))
+ if (PickMarkedObj(rPnt,pObj,pPV,SdrSearchOptions::PASS2BOUND))
{
BrkAction();
UnmarkAllGluePoints();
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index a747bc69889a..57c84b25eec5 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1343,18 +1343,18 @@ bool SdrMarkView::IsMarkedObjHit(const Point& rPnt, short nTol) const
Point aPt(rPnt);
for (size_t nm=0; nm<GetMarkedObjectCount() && !bRet; ++nm) {
SdrMark* pM=GetSdrMarkByIndex(nm);
- bRet = 0 != CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),0,0);
+ bRet = 0 != CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),SdrSearchOptions::NONE,0);
}
return bRet;
}
-SdrHdl* SdrMarkView::PickHandle(const Point& rPnt, sal_uIntPtr nOptions, SdrHdl* pHdl0) const
+SdrHdl* SdrMarkView::PickHandle(const Point& rPnt, SdrSearchOptions nOptions, SdrHdl* pHdl0) const
{
if (bSomeObjChgdFlag) { // recalculate handles, if necessary
FlushComeBackTimer();
}
- bool bBack=(nOptions & SDRSEARCH_BACKWARD) !=0;
- bool bNext=(nOptions & SDRSEARCH_NEXT) !=0;
+ bool bBack(nOptions & SdrSearchOptions::BACKWARD);
+ bool bNext(nOptions & SdrSearchOptions::NEXT);
Point aPt(rPnt);
return maHdlList.IsHdlListHit(aPt,bBack,bNext,pHdl0);
}
@@ -1364,8 +1364,8 @@ bool SdrMarkView::MarkObj(const Point& rPnt, short nTol, bool bToggle, bool bDee
SdrObject* pObj;
SdrPageView* pPV;
nTol=ImpGetHitTolLogic(nTol,NULL);
- sal_uIntPtr nOptions=SDRSEARCH_PICKMARKABLE;
- if (bDeep) nOptions=nOptions|SDRSEARCH_DEEP;
+ SdrSearchOptions nOptions=SdrSearchOptions::PICKMARKABLE;
+ if (bDeep) nOptions=nOptions|SdrSearchOptions::DEEP;
bool bRet=PickObj(rPnt,(sal_uInt16)nTol,pObj,pPV,nOptions);
if (bRet) {
bool bUnmark=bToggle && IsObjMarked(pObj);
@@ -1443,7 +1443,7 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev)
for (size_t nm=nMarkCount; nm>0 && pTopMarkHit==NULL;) {
--nm;
SdrMark* pM=GetSdrMarkByIndex(nm);
- if(CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),0,0))
+ if(CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),SdrSearchOptions::NONE,0))
{
pTopMarkHit=pM;
nTopMarkHit=nm;
@@ -1460,7 +1460,7 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev)
for (size_t nm=0; nm<nMarkCount && pBtmMarkHit==NULL; ++nm) {
SdrMark* pM=GetSdrMarkByIndex(nm);
SdrPageView* pPV2=pM->GetPageView();
- if (pPV2==pPV && CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pPV2,0,0))
+ if (pPV2==pPV && CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pPV2,SdrSearchOptions::NONE,0))
{
pBtmMarkHit=pM;
nBtmMarkHit=nm;
@@ -1514,7 +1514,7 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev)
pObj = pObjList->GetObj(no);
}
- if (CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pObj,pPV,SDRSEARCH_TESTMARKABLE,0))
+ if (CheckSingleSdrObjectHit(aPt,sal_uInt16(nTol),pObj,pPV,SdrSearchOptions::TESTMARKABLE,0))
{
if (TryToFindMarkedObject(pObj)==SAL_MAX_SIZE) {
pFndObj=pObj;
@@ -1618,16 +1618,15 @@ void SdrMarkView::SetMarkHdlSizePixel(sal_uInt16 nSiz)
}
}
-#define SDRSEARCH_IMPISMASTER 0x80000000 /* MasterPage is being searched right now */
-SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uIntPtr nOptions, const SetOfByte* pMVisLay) const
+SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay) const
{
- if(((nOptions & SDRSEARCH_IMPISMASTER) && pObj->IsNotVisibleAsMaster()) || (!pObj->IsVisible()))
+ if(((nOptions & SdrSearchOptions::IMPISMASTER) && pObj->IsNotVisibleAsMaster()) || (!pObj->IsVisible()))
{
return NULL;
}
- const bool bCheckIfMarkable(nOptions & SDRSEARCH_TESTMARKABLE);
- const bool bDeep(nOptions & SDRSEARCH_DEEP);
+ const bool bCheckIfMarkable(nOptions & SdrSearchOptions::TESTMARKABLE);
+ const bool bDeep(nOptions & SdrSearchOptions::DEEP);
const bool bOLE(pObj->ISA(SdrOle2Obj));
const bool bTXT(pObj->ISA(SdrTextObj) && static_cast<SdrTextObj*>(pObj)->IsTextFrame());
SdrObject* pRet=NULL;
@@ -1686,14 +1685,14 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
return pRet;
}
-SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, sal_uIntPtr nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const
+SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj) const
{
return (*this).CheckSingleSdrObjectHit(rPnt,nTol,pOL,pPV,nOptions,pMVisLay,rpRootObj,NULL);
}
-SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, sal_uIntPtr nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj,const SdrMarkList * pMarkList) const
+SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObjList* pOL, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay, SdrObject*& rpRootObj,const SdrMarkList * pMarkList) const
{
- bool bBack=(nOptions & SDRSEARCH_BACKWARD)!=0;
- bool bBefMrk=(nOptions & SDRSEARCH_BEFOREMARK)!=0;
+ bool bBack(nOptions & SdrSearchOptions::BACKWARD);
+ bool bBefMrk(nOptions & SdrSearchOptions::BEFOREMARK);
SdrObject* pRet=NULL;
rpRootObj=NULL;
if (pOL!=NULL)
@@ -1733,26 +1732,26 @@ SdrObject* SdrMarkView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nT
return pRet;
}
-bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions) const
+bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, SdrSearchOptions nOptions) const
{
return PickObj(rPnt,nTol,rpObj,rpPV,nOptions,NULL,NULL);
}
-bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions, SdrObject** ppRootObj, sal_uInt16* pnPassNum) const
+bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, SdrSearchOptions nOptions, SdrObject** ppRootObj, sal_uInt16* pnPassNum) const
{ // TODO: lacks a Pass2,Pass3
SortMarkedObjects();
if (ppRootObj!=NULL) *ppRootObj=NULL;
if (pnPassNum!=NULL) *pnPassNum=0;
rpObj=NULL;
rpPV=NULL;
- bool bWholePage=(nOptions & SDRSEARCH_WHOLEPAGE) !=0;
- bool bMarked=(nOptions & SDRSEARCH_MARKED) !=0;
- bool bMasters=!bMarked && (nOptions & SDRSEARCH_ALSOONMASTER) !=0;
- bool bBack=(nOptions & SDRSEARCH_BACKWARD) !=0;
+ bool bWholePage(nOptions & SdrSearchOptions::WHOLEPAGE);
+ bool bMarked(nOptions & SdrSearchOptions::MARKED);
+ bool bMasters=!bMarked && bool(nOptions & SdrSearchOptions::ALSOONMASTER);
+ bool bBack(nOptions & SdrSearchOptions::BACKWARD);
#if OSL_DEBUG_LEVEL > 0
- bool bNext=(nOptions & SDRSEARCH_NEXT) !=0; (void)bNext; // n.i.
- bool bBoundCheckOn2ndPass=(nOptions & SDRSEARCH_PASS2BOUND) !=0; (void)bBoundCheckOn2ndPass;// n.i.
- bool bCheckNearestOn3rdPass=(nOptions & SDRSEARCH_PASS3NEAREST) !=0; (void)bCheckNearestOn3rdPass;// n.i.
+ bool bNext(nOptions & SdrSearchOptions::NEXT); (void)bNext; // n.i.
+ bool bBoundCheckOn2ndPass(nOptions & SdrSearchOptions::PASS2BOUND); (void)bBoundCheckOn2ndPass;// n.i.
+ bool bCheckNearestOn3rdPass(nOptions & SdrSearchOptions::PASS3NEAREST); (void)bCheckNearestOn3rdPass;// n.i.
#endif
if (nTol<0) nTol=ImpGetHitTolLogic(nTol,NULL);
Point aPt(rPnt);
@@ -1794,7 +1793,7 @@ bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
if (bExtraPassForWholePage) nPgAnz++; // First search in AktObjList, then on the entire page
sal_uInt16 nPgNum=bBack ? 0 : nPgAnz;
while (pHitObj==NULL && (bBack ? nPgNum<nPgAnz : nPgNum>0)) {
- sal_uIntPtr nTmpOptions=nOptions;
+ SdrSearchOptions nTmpOptions=nOptions;
if (!bBack) nPgNum--;
const SetOfByte* pMVisLay=NULL;
SdrObjList* pObjList=NULL;
@@ -1815,7 +1814,7 @@ bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
pObjList = &rMasterPage;
if (pnPassNum!=NULL) *pnPassNum|=SDRSEARCHPASS_MASTERPAGE;
- nTmpOptions=nTmpOptions | SDRSEARCH_IMPISMASTER;
+ nTmpOptions=nTmpOptions | SdrSearchOptions::IMPISMASTER;
}
pHitObj=CheckSingleSdrObjectHit(aPt,nTol,pObjList,pPV,nTmpOptions,pMVisLay,pObj,&(GetMarkedObjectList()));
if (bBack) nPgNum++;
@@ -1824,13 +1823,13 @@ bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
}
if (pHitObj!=NULL) {
if (ppRootObj!=NULL) *ppRootObj=pObj;
- if ((nOptions & SDRSEARCH_DEEP) !=0) pObj=pHitObj;
- if ((nOptions & SDRSEARCH_TESTTEXTEDIT) !=0) {
+ if (nOptions & SdrSearchOptions::DEEP) pObj=pHitObj;
+ if (nOptions & SdrSearchOptions::TESTTEXTEDIT) {
if (!pObj->HasTextEdit() || pPV->GetLockedLayers().IsSet(pObj->GetLayer())) {
pObj=NULL;
}
}
- if (pObj!=NULL && (nOptions & SDRSEARCH_TESTMACRO) !=0) {
+ if (pObj!=NULL && (nOptions & SdrSearchOptions::TESTMACRO)) {
SdrObjMacroHitRec aHitRec;
aHitRec.aPos=aPt;
aHitRec.aDownPos=aPt;
@@ -1839,8 +1838,8 @@ bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
aHitRec.pPageView=pPV;
if (!pObj->HasMacro() || !pObj->IsMacroHit(aHitRec)) pObj=NULL;
}
- if (pObj!=NULL && (nOptions & SDRSEARCH_WITHTEXT) !=0 && pObj->GetOutlinerParaObject()==NULL) pObj=NULL;
- if (pObj!=NULL && (nOptions & SDRSEARCH_TESTTEXTAREA) !=0 && pPV)
+ if (pObj!=NULL && (nOptions & SdrSearchOptions::WITHTEXT) && pObj->GetOutlinerParaObject()==NULL) pObj=NULL;
+ if (pObj!=NULL && (nOptions & SdrSearchOptions::TESTTEXTAREA) && pPV)
{
if(!SdrObjectPrimitiveHit(*pObj, aPt, 0, *pPV, 0, true))
{
@@ -1856,11 +1855,11 @@ bool SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrP
return rpObj!=NULL;
}
-bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, sal_uIntPtr nOptions) const
+bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, SdrSearchOptions nOptions) const
{
SortMarkedObjects();
- bool bBoundCheckOn2ndPass=(nOptions & SDRSEARCH_PASS2BOUND) !=0;
- bool bCheckNearestOn3rdPass=(nOptions & SDRSEARCH_PASS3NEAREST) !=0;
+ bool bBoundCheckOn2ndPass(nOptions & SdrSearchOptions::PASS2BOUND);
+ bool bCheckNearestOn3rdPass(nOptions & SdrSearchOptions::PASS3NEAREST);
rpObj=NULL;
rpPV=NULL;
Point aPt(rPnt);
@@ -1872,7 +1871,7 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie
SdrMark* pM=GetSdrMarkByIndex(nMarkNum);
SdrPageView* pPV=pM->GetPageView();
SdrObject* pObj=pM->GetMarkedSdrObj();
- bFnd = 0 != CheckSingleSdrObjectHit(aPt,nTol,pObj,pPV,SDRSEARCH_TESTMARKABLE,0);
+ bFnd = 0 != CheckSingleSdrObjectHit(aPt,nTol,pObj,pPV,SdrSearchOptions::TESTMARKABLE,0);
if (bFnd) {
rpObj=pObj;
rpPV=pPV;
diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx
index 1dd73677e74c..080a8fcc506d 100644
--- a/svx/source/svdraw/svdmrkv1.cxx
+++ b/svx/source/svdraw/svdmrkv1.cxx
@@ -467,14 +467,14 @@ bool SdrMarkView::MarkGluePoints(const Rectangle* pRect, bool bUnmark)
return bChgd;
}
-bool SdrMarkView::PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16& rnId, SdrPageView*& rpPV, sal_uIntPtr nOptions) const
+bool SdrMarkView::PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16& rnId, SdrPageView*& rpPV, SdrSearchOptions nOptions) const
{
SdrObject* pObj0=rpObj;
sal_uInt16 nId0=rnId;
rpObj=NULL; rpPV=NULL; rnId=0;
if (!IsGluePointEditMode()) return false;
- bool bBack=(nOptions & SDRSEARCH_BACKWARD) !=0;
- bool bNext=(nOptions & SDRSEARCH_NEXT) !=0;
+ bool bBack(nOptions & SdrSearchOptions::BACKWARD);
+ bool bNext(nOptions & SdrSearchOptions::NEXT);
OutputDevice* pOut=const_cast<OutputDevice*>(pActualOutDev.get());
if (pOut==NULL) pOut=GetFirstOutputDevice();
if (pOut==NULL) return false;
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index e2dd8d4dc3f1..1a041fac711d 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -364,7 +364,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
{
eHit=SDRHIT_GLUEPOINT; // deselected glue point hit
}
- else if (PickObj(aLocalLogicPosition,nHitTolLog,pHitObj,pPV,SDRSEARCH_DEEP|SDRSEARCH_MARKED,&pObj,&nHitPassNum))
+ else if (PickObj(aLocalLogicPosition,nHitTolLog,pHitObj,pPV,SdrSearchOptions::DEEP|SdrSearchOptions::MARKED,&pObj,&nHitPassNum))
{
eHit=SDRHIT_MARKEDOBJECT;
::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( pObj );
@@ -384,7 +384,7 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
}
}
}
- else if (PickObj(aLocalLogicPosition,nHitTolLog,pHitObj,pPV,SDRSEARCH_DEEP|SDRSEARCH_ALSOONMASTER|SDRSEARCH_WHOLEPAGE,&pObj,&nHitPassNum))
+ else if (PickObj(aLocalLogicPosition,nHitTolLog,pHitObj,pPV,SdrSearchOptions::DEEP|SdrSearchOptions::ALSOONMASTER|SdrSearchOptions::WHOLEPAGE,&pObj,&nHitPassNum))
{
// MasterPages and WholePage for Macro and URL
eHit=SDRHIT_UNMARKEDOBJECT;
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index 52348ef79398..091ff77c3813 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -184,7 +184,7 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView,
SdrPageView* pPV;
SdrObject* pObj;
- if( pView->PickObj( aPos, 0, pObj, pPV, SDRSEARCH_PICKMACRO ) &&
+ if( pView->PickObj( aPos, 0, pObj, pPV, SdrSearchOptions::PICKMACRO ) &&
pObj->ISA(SwVirtFlyDrawObj) )
{
SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm();
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index db68d754daee..58a14d8696df 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -185,7 +185,7 @@ SdrObject* impLocalHitCorrection(SdrObject* pRetval, const Point& rPnt, sal_uInt
return pRetval;
}
-SdrObject* SwDrawView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const
+SdrObject* SwDrawView::CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay) const
{
// call parent
SdrObject* pRetval = FmFormView::CheckSingleSdrObjectHit(rPnt, nTol, pObj, pPV, nOptions, pMVisLay);
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 1963d150afc8..f6f1caaaf8a4 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -1473,7 +1473,7 @@ const SwFrmFmt* SwFEShell::IsURLGrfAtPos( const Point& rPt, OUString* pURL,
sal_uInt16 nOld = pDView->GetHitTolerancePixel();
pDView->SetHitTolerancePixel( 2 );
- if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPV,SDRSEARCH_PICKMACRO ) &&
+ if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPV,SdrSearchOptions::PICKMACRO ) &&
pObj->ISA(SwVirtFlyDrawObj) )
{
SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm();
@@ -1583,7 +1583,7 @@ const SwFrmFmt* SwFEShell::GetFmtFromObj( const Point& rPt, SwRect** pRectToFill
// tolerance for Drawing-SS
pDView->SetHitTolerancePixel( pDView->GetMarkHdlSizePixel()/2 );
- if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SDRSEARCH_PICKMARKABLE ) )
+ if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SdrSearchOptions::PICKMARKABLE ) )
{
// first check it:
if ( pObj->ISA(SwVirtFlyDrawObj) )
@@ -1707,7 +1707,7 @@ ObjCntType SwFEShell::GetObjCntType( const Point &rPt, SdrObject *&rpObj ) const
// tolerance for Drawing-SS
pDView->SetHitTolerancePixel( pDView->GetMarkHdlSizePixel()/2 );
- if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SDRSEARCH_PICKMARKABLE ) )
+ if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SdrSearchOptions::PICKMARKABLE ) )
eType = GetObjCntType( *(rpObj = pObj) );
pDView->SetHitTolerancePixel( nOld );
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 1ef1e8b05bb6..6278931cc37c 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1031,7 +1031,7 @@ bool SwFEShell::IsObjSelectable( const Point& rPt )
sal_uInt16 nOld = pDView->GetHitTolerancePixel();
pDView->SetHitTolerancePixel( pDView->GetMarkHdlSizePixel()/2 );
- bRet = pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMARKABLE );
+ bRet = pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPV, SdrSearchOptions::PICKMARKABLE );
pDView->SetHitTolerancePixel( nOld );
}
return bRet;
@@ -1048,7 +1048,7 @@ SdrObject* SwFEShell::GetObjAt( const Point& rPt )
sal_uInt16 nOld = pDView->GetHitTolerancePixel();
pDView->SetHitTolerancePixel( pDView->GetMarkHdlSizePixel()/2 );
- pDView->PickObj( rPt, pDView->getHitTolLog(), pRet, pPV, SDRSEARCH_PICKMARKABLE );
+ pDView->PickObj( rPt, pDView->getHitTolLog(), pRet, pPV, SdrSearchOptions::PICKMARKABLE );
pDView->SetHitTolerancePixel( nOld );
}
return pRet;
@@ -1068,7 +1068,7 @@ bool SwFEShell::ShouldObjectBeSelected(const Point& rPt)
sal_uInt16 nOld(pDrawView->GetHitTolerancePixel());
pDrawView->SetHitTolerancePixel(pDrawView->GetMarkHdlSizePixel()/2);
- bRet = pDrawView->PickObj(rPt, pDrawView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMARKABLE);
+ bRet = pDrawView->PickObj(rPt, pDrawView->getHitTolLog(), pObj, pPV, SdrSearchOptions::PICKMARKABLE);
pDrawView->SetHitTolerancePixel(nOld);
if ( bRet && pObj )
@@ -2515,7 +2515,7 @@ SwChainRet SwFEShell::Chainable( SwRect &rRect, const SwFrmFmt &rSource,
SwDrawView *pDView = const_cast<SwDrawView*>(Imp()->GetDrawView());
const sal_uInt16 nOld = pDView->GetHitTolerancePixel();
pDView->SetHitTolerancePixel( 0 );
- if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SDRSEARCH_PICKMARKABLE ) &&
+ if( pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SdrSearchOptions::PICKMARKABLE ) &&
pObj->ISA(SwVirtFlyDrawObj) )
{
SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm();
@@ -2548,7 +2548,7 @@ SwChainRet SwFEShell::Chain( SwFrmFmt &rSource, const Point &rPt )
SwDrawView *pDView = (SwDrawView*)Imp()->GetDrawView();
const sal_uInt16 nOld = pDView->GetHitTolerancePixel();
pDView->SetHitTolerancePixel( 0 );
- pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SDRSEARCH_PICKMARKABLE );
+ pDView->PickObj( rPt, pDView->getHitTolLog(), pObj, pPView, SdrSearchOptions::PICKMARKABLE );
pDView->SetHitTolerancePixel( nOld );
SwFlyFrm *pFly = static_cast<SwVirtFlyDrawObj*>(pObj)->GetFlyFrm();
diff --git a/sw/source/core/inc/dview.hxx b/sw/source/core/inc/dview.hxx
index b8fce60b62f9..e9a8569a6f58 100644
--- a/sw/source/core/inc/dview.hxx
+++ b/sw/source/core/inc/dview.hxx
@@ -73,7 +73,7 @@ protected:
// override to allow extra handling when picking SwVirtFlyDrawObj's
using FmFormView::CheckSingleSdrObjectHit;
- virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, sal_uLong nOptions, const SetOfByte* pMVisLay) const SAL_OVERRIDE;
+ virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SetOfByte* pMVisLay) const SAL_OVERRIDE;
// support enhanced text edit for draw objects
virtual SdrUndoManager* getSdrUndoManagerForEnhancedTextEdit() const SAL_OVERRIDE;
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 71042f0aa7aa..e3b39d40f600 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -450,7 +450,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
SdrObject* pObj; SdrPageView* pPV;
pSdrView->SetHitTolerancePixel( HIT_PIX );
if ( bNotInSelObj && bExecHyperlinks &&
- pSdrView->PickObj( rLPt, pSdrView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO ))
+ pSdrView->PickObj( rLPt, pSdrView->getHitTolLog(), pObj, pPV, SdrSearchOptions::PICKMACRO ))
{
SdrObjMacroHitRec aTmp;
aTmp.aPos = rLPt;
@@ -4243,7 +4243,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
SdrObject* pObj;
SdrPageView* pPV;
- if (pSdrView && pSdrView->PickObj(aDocPos, pSdrView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER ))
+ if (pSdrView && pSdrView->PickObj(aDocPos, pSdrView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER ))
{
std::map<SwFrmFmt*, SwFrmFmt*> aTextBoxShapes = SwTextBoxHelper::findShapes(rSh.GetDoc());
SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(GetUserCall(pObj));
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 81e2ead3c251..2e845614323e 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -485,7 +485,7 @@ bool SwView::EnterDrawTextMode(const Point& aDocPos)
if( pSdrView->IsMarkedHit( aDocPos ) &&
!pSdrView->PickHandle( aDocPos ) && IsTextTool() &&
- pSdrView->PickObj( aDocPos, pSdrView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKTEXTEDIT ) &&
+ pSdrView->PickObj( aDocPos, pSdrView->getHitTolLog(), pObj, pPV, SdrSearchOptions::PICKTEXTEDIT ) &&
// To allow SwDrawVirtObj text objects to be activated, allow their type, too.
( pObj->ISA( SdrTextObj ) ||