[Libreoffice-commits] core.git: 11 commits - basctl/source chart2/source filter/source include/svx reportdesign/source sc/inc sc/source sd/inc sd/qa sd/source svx/inc svx/source sw/inc sw/qa sw/source
Noel Grandin
noel at peralex.com
Tue Aug 23 07:55:14 UTC 2016
basctl/source/dlged/dlgedfac.cxx | 123 ++--
basctl/source/inc/dlgedfac.hxx | 2
chart2/source/controller/main/ChartController_Tools.cxx | 2
chart2/source/controller/main/ChartController_Window.cxx | 6
chart2/source/controller/main/ChartTransferable.cxx | 2
chart2/source/controller/main/SelectionHelper.cxx | 12
filter/source/msfilter/svdfppt.cxx | 8
include/svx/fmobjfac.hxx | 4
include/svx/galmisc.hxx | 2
include/svx/objfac3d.hxx | 8
include/svx/srchdlg.hxx | 12
include/svx/svddrgmt.hxx | 4
include/svx/svddrgv.hxx | 4
include/svx/svdedtv.hxx | 28 -
include/svx/svdedxv.hxx | 14
include/svx/svdetc.hxx | 29 -
include/svx/svdhdl.hxx | 70 +-
include/svx/svdhlpln.hxx | 4
include/svx/svditer.hxx | 16
include/svx/svdobj.hxx | 43 -
reportdesign/source/ui/inc/dlgedfac.hxx | 2
reportdesign/source/ui/misc/UITools.cxx | 4
reportdesign/source/ui/report/ReportSection.cxx | 2
reportdesign/source/ui/report/ViewsWindow.cxx | 16
reportdesign/source/ui/report/dlgedfac.cxx | 26 -
reportdesign/source/ui/report/dlgedfunc.cxx | 2
sc/inc/userdat.hxx | 2
sc/source/core/data/documen5.cxx | 16
sc/source/core/data/documen9.cxx | 14
sc/source/core/data/document.cxx | 2
sc/source/core/data/drwlayer.cxx | 18
sc/source/core/data/userdat.cxx | 22
sc/source/core/tool/charthelper.cxx | 12
sc/source/core/tool/chartlock.cxx | 2
sc/source/core/tool/detfunc.cxx | 12
sc/source/filter/excel/xiescher.cxx | 2
sc/source/filter/html/htmlexp2.cxx | 2
sc/source/ui/app/client.cxx | 2
sc/source/ui/app/drwtrans.cxx | 12
sc/source/ui/drawfunc/drawsh5.cxx | 12
sc/source/ui/drawfunc/fudraw.cxx | 4
sc/source/ui/drawfunc/fupoor.cxx | 2
sc/source/ui/drawfunc/fusel.cxx | 2
sc/source/ui/drawfunc/fusel2.cxx | 4
sc/source/ui/drawfunc/futext.cxx | 2
sc/source/ui/drawfunc/futext3.cxx | 4
sc/source/ui/navipi/content.cxx | 6
sc/source/ui/uitest/uiobject.cxx | 2
sc/source/ui/undo/undotab.cxx | 2
sc/source/ui/unoobj/chartuno.cxx | 8
sc/source/ui/unoobj/docuno.cxx | 2
sc/source/ui/unoobj/viewuno.cxx | 2
sc/source/ui/view/dbfunc4.cxx | 2
sc/source/ui/view/drawvie3.cxx | 4
sc/source/ui/view/drawvie4.cxx | 4
sc/source/ui/view/drawview.cxx | 6
sc/source/ui/view/gridwin3.cxx | 2
sc/source/ui/view/tabvwshb.cxx | 2
sc/source/ui/view/viewfun2.cxx | 8
sc/source/ui/view/viewfun5.cxx | 4
sc/source/ui/view/viewfun7.cxx | 2
sd/inc/sdobjfac.hxx | 3
sd/qa/unit/tiledrendering/tiledrendering.cxx | 2
sd/source/core/CustomAnimationCloner.cxx | 4
sd/source/core/drawdoc2.cxx | 4
sd/source/core/drawdoc4.cxx | 6
sd/source/core/sdobjfac.cxx | 11
sd/source/core/sdpage2.cxx | 6
sd/source/filter/html/htmlex.cxx | 4
sd/source/filter/ppt/pptin.cxx | 2
sd/source/ui/animations/motionpathtag.cxx | 38 -
sd/source/ui/app/sdxfer.cxx | 2
sd/source/ui/dlg/sdtreelb.cxx | 8
sd/source/ui/func/fupoor.cxx | 8
sd/source/ui/func/fusel.cxx | 8
sd/source/ui/func/fusnapln.cxx | 10
sd/source/ui/func/futext.cxx | 8
sd/source/ui/func/smarttag.cxx | 4
sd/source/ui/inc/smarttag.hxx | 4
sd/source/ui/unoidl/unopage.cxx | 8
sd/source/ui/view/Outliner.cxx | 10
sd/source/ui/view/OutlinerIterator.cxx | 8
sd/source/ui/view/drviews2.cxx | 18
sd/source/ui/view/drviews3.cxx | 2
sd/source/ui/view/drviews4.cxx | 10
sd/source/ui/view/frmview.cxx | 16
sd/source/ui/view/sdview.cxx | 2
sd/source/ui/view/sdview2.cxx | 4
svx/inc/dragmt3d.hxx | 2
svx/inc/sdr/overlay/overlayhelpline.hxx | 2
svx/source/customshapes/EnhancedCustomShape3d.cxx | 2
svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 2
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 2
svx/source/dialog/graphctl.cxx | 4
svx/source/dialog/srchdlg.cxx | 8
svx/source/engine3d/dragmt3d.cxx | 30 -
svx/source/engine3d/helperhittest3d.cxx | 2
svx/source/engine3d/obj3d.cxx | 2
svx/source/engine3d/objfac3d.cxx | 28 -
svx/source/engine3d/scene3d.cxx | 4
svx/source/engine3d/view3d.cxx | 46 -
svx/source/form/fmobjfac.cxx | 14
svx/source/form/fmvwimp.cxx | 2
svx/source/gallery2/galmisc.cxx | 7
svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx | 6
svx/source/sdr/overlay/overlayhelpline.cxx | 4
svx/source/sdr/properties/e3dsceneproperties.cxx | 2
svx/source/sdr/properties/itemsettools.cxx | 2
svx/source/sdr/properties/properties.cxx | 2
svx/source/svdraw/svddrgmt.cxx | 136 ++---
svx/source/svdraw/svddrgv.cxx | 62 +-
svx/source/svdraw/svdedtv1.cxx | 38 -
svx/source/svdraw/svdedtv2.cxx | 28 -
svx/source/svdraw/svdedxv.cxx | 10
svx/source/svdraw/svdetc.cxx | 43 -
svx/source/svdraw/svdfmtf.cxx | 4
svx/source/svdraw/svdhdl.cxx | 382 +++++++--------
svx/source/svdraw/svdhlpln.cxx | 16
svx/source/svdraw/svditer.cxx | 4
svx/source/svdraw/svdmrkv.cxx | 40 -
svx/source/svdraw/svdmrkv1.cxx | 10
svx/source/svdraw/svdoashp.cxx | 46 -
svx/source/svdraw/svdobj.cxx | 107 ++--
svx/source/svdraw/svdocapt.cxx | 2
svx/source/svdraw/svdocirc.cxx | 30 -
svx/source/svdraw/svdoedge.cxx | 8
svx/source/svdraw/svdograf.cxx | 16
svx/source/svdraw/svdomeas.cxx | 2
svx/source/svdraw/svdopath.cxx | 2
svx/source/svdraw/svdorect.cxx | 26 -
svx/source/svdraw/svdotxdr.cxx | 32 -
svx/source/svdraw/svdpage.cxx | 4
svx/source/svdraw/svdpagv.cxx | 4
svx/source/svdraw/svdsnpv.cxx | 14
svx/source/svdraw/svdview.cxx | 10
svx/source/table/svdotable.cxx | 62 +-
svx/source/table/tablehandles.cxx | 4
svx/source/tbxctrls/tbunosearchcontrollers.cxx | 2
svx/source/unodraw/unoshap3.cxx | 2
sw/inc/dobjfac.hxx | 2
sw/qa/extras/tiledrendering/tiledrendering.cxx | 2
sw/source/core/doc/docdraw.cxx | 4
sw/source/core/draw/dcontact.cxx | 2
sw/source/core/draw/dflyobj.cxx | 16
sw/source/core/draw/dobjfac.cxx | 9
sw/source/core/draw/dview.cxx | 8
sw/source/core/frmedt/feshview.cxx | 6
sw/source/core/unocore/unodraw.cxx | 2
sw/source/uibase/dochdl/swdtflvr.cxx | 2
sw/source/uibase/docvw/edtwin.cxx | 42 -
sw/source/uibase/ribbar/drawbase.cxx | 2
sw/source/uibase/shells/drwbassh.cxx | 14
sw/source/uibase/uiview/viewsrch.cxx | 14
153 files changed, 1117 insertions(+), 1186 deletions(-)
New commits:
commit f091a4d82e383b2beab91ecd01d9f6a700377a2e
Author: Noel Grandin <noel at peralex.com>
Date: Tue Aug 23 09:42:09 2016 +0200
convert SearchLabel to scoped enum
Change-Id: I0c62a3166b9284895f119c600776dc2c7d6d1078
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 637a7a0..f77f3f5 100755
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -78,13 +78,13 @@ public:
// class SvxSearchDialogWrapper ------------------------------------------
-enum SearchLabel
+enum class SearchLabel
{
- SL_Empty,
- SL_End,
- SL_Start,
- SL_EndSheet,
- SL_NotFound
+ Empty,
+ End,
+ Start,
+ EndSheet,
+ NotFound
};
class SvxSearchDialog;
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 85f969e..a92d2be 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1657,7 +1657,7 @@ void ScViewFunc::AutoFormat( sal_uInt16 nFormatNo )
bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
bool bAddUndo, bool bIsApi )
{
- SvxSearchDialogWrapper::SetSearchLabel(SL_Empty);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Empty);
ScDocShell* pDocSh = GetViewData().GetDocShell();
ScDocument& rDoc = pDocSh->GetDocument();
ScMarkData& rMark = GetViewData().GetMarkData();
@@ -1792,9 +1792,9 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
if (!bIsApi)
{
if ( nStartTab == nEndTab )
- SvxSearchDialogWrapper::SetSearchLabel(SL_EndSheet);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::EndSheet);
else
- SvxSearchDialogWrapper::SetSearchLabel(SL_End);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::End);
ScDocument::GetSearchAndReplaceStart( *pSearchItem, nCol, nRow );
if (pSearchItem->GetBackward())
@@ -1818,7 +1818,7 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem,
if (!bIsApi)
{
GetViewData().GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, pSearchItem->GetSearchString().toUtf8().getStr());
- SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound);
}
break; // break 'while (TRUE)'
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 61e06e1..53c7f98 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -442,7 +442,7 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
bool bEndOfSearch = true;
// clear the search toolbar entry
- SvxSearchDialogWrapper::SetSearchLabel(SL_Empty);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Empty);
mpDrawDocument->GetDocSh()->SetWaitCursor( true );
if (mbPrepareSpellingPending)
@@ -1170,7 +1170,7 @@ void Outliner::ShowEndOfSearchDialog()
{
if (!mbStringFound)
{
- SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound);
std::shared_ptr<ViewShell> pViewShell(mpWeakViewShell.lock());
if (pViewShell)
{
@@ -1205,9 +1205,9 @@ bool Outliner::ShowWrapArroundDialog()
if (nCommand == SvxSearchCmd::REPLACE || nCommand == SvxSearchCmd::FIND)
{
if (mbDirectionIsForward)
- SvxSearchDialogWrapper::SetSearchLabel(SL_End);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::End);
else
- SvxSearchDialogWrapper::SetSearchLabel(SL_Start);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Start);
return true;
}
@@ -1481,7 +1481,7 @@ bool Outliner::HandleFailedSearch()
if (HasNoPreviousMatch ())
{
// No match found in the whole presentation.
- SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound);
}
else
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index ea1f9a1..9cc4cbd 100755
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -2401,13 +2401,13 @@ static vcl::Window* lcl_GetSearchLabelWindow()
void SvxSearchDialogWrapper::SetSearchLabel(const SearchLabel& rSL)
{
OUString sStr;
- if (rSL == SL_End)
+ if (rSL == SearchLabel::End)
sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_END);
- else if (rSL == SL_Start)
+ else if (rSL == SearchLabel::Start)
sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_START);
- else if (rSL == SL_EndSheet)
+ else if (rSL == SearchLabel::EndSheet)
sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_END_SHEET);
- else if (rSL == SL_NotFound)
+ else if (rSL == SearchLabel::NotFound)
sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_NOT_FOUND);
if (vcl::Window *pSearchLabel = lcl_GetSearchLabelWindow())
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 0979bf7..8eb9351 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -210,7 +210,7 @@ bool FindTextFieldControl::PreNotify( NotifyEvent& rNEvt )
{
// Clear SearchLabel when altering the search string
#if HAVE_FEATURE_DESKTOP
- SvxSearchDialogWrapper::SetSearchLabel(SL_Empty);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Empty);
#endif
const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index d773d10..2c8752c 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -273,7 +273,7 @@ void SwView::ExecSearch(SfxRequest& rReq)
if( !bQuiet )
{
m_pWrtShell->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, m_pSrchItem->GetSearchString().toUtf8().getStr());
- SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound);
}
#endif
m_bFound = false;
@@ -394,7 +394,7 @@ void SwView::ExecSearch(SfxRequest& rReq)
if( !bQuiet )
{
m_pWrtShell->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, m_pSrchItem->GetSearchString().toUtf8().getStr());
- SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound);
}
#endif
m_bFound = false;
@@ -590,7 +590,7 @@ bool SwView::SearchAndWrap(bool bApi)
{
#if HAVE_FEATURE_DESKTOP
m_pWrtShell->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, m_pSrchItem->GetSearchString().toUtf8().getStr());
- SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound);
#endif
}
m_bFound = false;
@@ -636,14 +636,14 @@ bool SwView::SearchAndWrap(bool bApi)
if (m_bFound)
{
if (!bSrchBkwrd)
- SvxSearchDialogWrapper::SetSearchLabel(SL_End);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::End);
else
- SvxSearchDialogWrapper::SetSearchLabel(SL_Start);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Start);
}
else if(!bApi)
{
m_pWrtShell->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, m_pSrchItem->GetSearchString().toUtf8().getStr());
- SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound);
}
#endif
return m_bFound;
@@ -786,7 +786,7 @@ SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, bool bBackward )
sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
{
#if HAVE_FEATURE_DESKTOP
- SvxSearchDialogWrapper::SetSearchLabel(SL_Empty);
+ SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Empty);
#endif
bool bDoReplace = m_pSrchItem->GetCommand() == SvxSearchCmd::REPLACE ||
m_pSrchItem->GetCommand() == SvxSearchCmd::REPLACE_ALL;
commit f8d980a813fb0125a2d7bb332450b2ab1d943031
Author: Noel Grandin <noel at peralex.com>
Date: Mon Aug 22 16:38:40 2016 +0200
convert SdrHorAlign to scoped enum
Change-Id: Ibddc5458c363b4174186c73bd0b3d9501933171a
diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 9b0ea15..7c1197f 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -33,11 +33,11 @@ class SfxStyleSheet;
class SdrLayer;
class SvdProgressInfo;
-enum SdrHorAlign {
- SDRHALIGN_NONE,
- SDRHALIGN_LEFT,
- SDRHALIGN_RIGHT,
- SDRHALIGN_CENTER
+enum class SdrHorAlign {
+ NONE,
+ Left,
+ Right,
+ Center
};
enum class SdrVertAlign {
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index d7f7f15..a5e1ca4 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -305,32 +305,32 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
case SID_OBJECT_ALIGN_LEFT:
case SID_ALIGN_ANY_LEFT:
if (pView->IsAlignPossible())
- pView->AlignMarkedObjects(SDRHALIGN_LEFT, SdrVertAlign::NONE);
+ pView->AlignMarkedObjects(SdrHorAlign::Left, SdrVertAlign::NONE);
break;
case SID_OBJECT_ALIGN_CENTER:
case SID_ALIGN_ANY_HCENTER:
if (pView->IsAlignPossible())
- pView->AlignMarkedObjects(SDRHALIGN_CENTER, SdrVertAlign::NONE);
+ pView->AlignMarkedObjects(SdrHorAlign::Center, SdrVertAlign::NONE);
break;
case SID_OBJECT_ALIGN_RIGHT:
case SID_ALIGN_ANY_RIGHT:
if (pView->IsAlignPossible())
- pView->AlignMarkedObjects(SDRHALIGN_RIGHT, SdrVertAlign::NONE);
+ pView->AlignMarkedObjects(SdrHorAlign::Right, SdrVertAlign::NONE);
break;
case SID_OBJECT_ALIGN_UP:
case SID_ALIGN_ANY_TOP:
if (pView->IsAlignPossible())
- pView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Top);
+ pView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Top);
break;
case SID_OBJECT_ALIGN_MIDDLE:
case SID_ALIGN_ANY_VCENTER:
if (pView->IsAlignPossible())
- pView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Center);
+ pView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Center);
break;
case SID_OBJECT_ALIGN_DOWN:
case SID_ALIGN_ANY_BOTTOM:
if (pView->IsAlignPossible())
- pView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Bottom);
+ pView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Bottom);
break;
case SID_DELETE:
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index a8cd514..a0c3a9d 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2456,7 +2456,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_OBJECT_ALIGN_LEFT: // BASIC
{
- mpDrawView->AlignMarkedObjects(SDRHALIGN_LEFT, SdrVertAlign::NONE);
+ mpDrawView->AlignMarkedObjects(SdrHorAlign::Left, SdrVertAlign::NONE);
Cancel();
rReq.Done ();
}
@@ -2464,7 +2464,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_OBJECT_ALIGN_CENTER: // BASIC
{
- mpDrawView->AlignMarkedObjects(SDRHALIGN_CENTER, SdrVertAlign::NONE);
+ mpDrawView->AlignMarkedObjects(SdrHorAlign::Center, SdrVertAlign::NONE);
Cancel();
rReq.Done ();
}
@@ -2472,7 +2472,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_OBJECT_ALIGN_RIGHT: // BASIC
{
- mpDrawView->AlignMarkedObjects(SDRHALIGN_RIGHT, SdrVertAlign::NONE);
+ mpDrawView->AlignMarkedObjects(SdrHorAlign::Right, SdrVertAlign::NONE);
Cancel();
rReq.Done ();
}
@@ -2480,7 +2480,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_OBJECT_ALIGN_UP: // BASIC
{
- mpDrawView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Top);
+ mpDrawView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Top);
Cancel();
rReq.Done ();
}
@@ -2488,7 +2488,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_OBJECT_ALIGN_MIDDLE: // BASIC
{
- mpDrawView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Center);
+ mpDrawView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Center);
Cancel();
rReq.Done ();
}
@@ -2496,7 +2496,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_OBJECT_ALIGN_DOWN: // BASIC
{
- mpDrawView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Bottom);
+ mpDrawView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Bottom);
Cancel();
rReq.Done ();
}
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 01596b4..1456c2c 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1748,7 +1748,7 @@ bool SdrEditView::IsAlignPossible() const
void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
{
- if (eHor==SDRHALIGN_NONE && eVert==SdrVertAlign::NONE)
+ if (eHor==SdrHorAlign::NONE && eVert==SdrVertAlign::NONE)
return;
SortMarkedObjects();
@@ -1759,7 +1759,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
if( bUndo )
{
OUString aStr(GetDescriptionOfMarkedObjects());
- if (eHor==SDRHALIGN_NONE)
+ if (eHor==SdrHorAlign::NONE)
{
switch (eVert)
{
@@ -1773,13 +1773,13 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
{
switch (eHor)
{
- case SDRHALIGN_LEFT : ImpTakeDescriptionStr(STR_EditAlignHLeft ,aStr); break;
- case SDRHALIGN_RIGHT : ImpTakeDescriptionStr(STR_EditAlignHRight ,aStr); break;
- case SDRHALIGN_CENTER: ImpTakeDescriptionStr(STR_EditAlignHCenter,aStr); break;
+ case SdrHorAlign::Left : ImpTakeDescriptionStr(STR_EditAlignHLeft ,aStr); break;
+ case SdrHorAlign::Right : ImpTakeDescriptionStr(STR_EditAlignHRight ,aStr); break;
+ case SdrHorAlign::Center: ImpTakeDescriptionStr(STR_EditAlignHCenter,aStr); break;
default: break;
}
}
- else if (eHor==SDRHALIGN_CENTER && eVert==SdrVertAlign::Center)
+ else if (eHor==SdrHorAlign::Center && eVert==SdrVertAlign::Center)
{
ImpTakeDescriptionStr(STR_EditAlignCenter,aStr);
}
@@ -1856,9 +1856,9 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
}
switch (eHor)
{
- case SDRHALIGN_LEFT : nXMov=aBound.Left() -aObjRect.Left() ; break;
- case SDRHALIGN_RIGHT : nXMov=aBound.Right() -aObjRect.Right() ; break;
- case SDRHALIGN_CENTER: nXMov=aCenter.X() -aObjRect.Center().X(); break;
+ case SdrHorAlign::Left : nXMov=aBound.Left() -aObjRect.Left() ; break;
+ case SdrHorAlign::Right : nXMov=aBound.Right() -aObjRect.Right() ; break;
+ case SdrHorAlign::Center: nXMov=aCenter.X() -aObjRect.Center().X(); break;
default: break;
}
if (nXMov!=0 || nYMov!=0)
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index b73fa55..34f379d 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -472,22 +472,22 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
switch (nSlotId)
{
case SID_OBJECT_ALIGN_LEFT:
- pSdrView->AlignMarkedObjects(SDRHALIGN_LEFT, SdrVertAlign::NONE);
+ pSdrView->AlignMarkedObjects(SdrHorAlign::Left, SdrVertAlign::NONE);
break;
case SID_OBJECT_ALIGN_CENTER:
- pSdrView->AlignMarkedObjects(SDRHALIGN_CENTER, SdrVertAlign::NONE);
+ pSdrView->AlignMarkedObjects(SdrHorAlign::Center, SdrVertAlign::NONE);
break;
case SID_OBJECT_ALIGN_RIGHT:
- pSdrView->AlignMarkedObjects(SDRHALIGN_RIGHT, SdrVertAlign::NONE);
+ pSdrView->AlignMarkedObjects(SdrHorAlign::Right, SdrVertAlign::NONE);
break;
case SID_OBJECT_ALIGN_UP:
- pSdrView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Top);
+ pSdrView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Top);
break;
case SID_OBJECT_ALIGN_MIDDLE:
- pSdrView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Center);
+ pSdrView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Center);
break;
case SID_OBJECT_ALIGN_DOWN:
- pSdrView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Bottom);
+ pSdrView->AlignMarkedObjects(SdrHorAlign::NONE, SdrVertAlign::Bottom);
break;
}
pSh->EndAction();
commit ec7d6860f0fdd3b8d0edc5b8f3620a295da965b3
Author: Noel Grandin <noel at peralex.com>
Date: Mon Aug 22 15:56:54 2016 +0200
convert SdrVertAlign to scoped enum
Change-Id: Ie517acfea6b8e34def35e0362a8e9e387de588c4
diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 03f03eb..9b0ea15 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -40,11 +40,11 @@ enum SdrHorAlign {
SDRHALIGN_CENTER
};
-enum SdrVertAlign {
- SDRVALIGN_NONE,
- SDRVALIGN_TOP,
- SDRVALIGN_BOTTOM,
- SDRVALIGN_CENTER
+enum class SdrVertAlign {
+ NONE,
+ Top,
+ Bottom,
+ Center
};
enum class SdrMergeMode {
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index 4dd852a..d7f7f15 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -305,32 +305,32 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
case SID_OBJECT_ALIGN_LEFT:
case SID_ALIGN_ANY_LEFT:
if (pView->IsAlignPossible())
- pView->AlignMarkedObjects(SDRHALIGN_LEFT, SDRVALIGN_NONE);
+ pView->AlignMarkedObjects(SDRHALIGN_LEFT, SdrVertAlign::NONE);
break;
case SID_OBJECT_ALIGN_CENTER:
case SID_ALIGN_ANY_HCENTER:
if (pView->IsAlignPossible())
- pView->AlignMarkedObjects(SDRHALIGN_CENTER, SDRVALIGN_NONE);
+ pView->AlignMarkedObjects(SDRHALIGN_CENTER, SdrVertAlign::NONE);
break;
case SID_OBJECT_ALIGN_RIGHT:
case SID_ALIGN_ANY_RIGHT:
if (pView->IsAlignPossible())
- pView->AlignMarkedObjects(SDRHALIGN_RIGHT, SDRVALIGN_NONE);
+ pView->AlignMarkedObjects(SDRHALIGN_RIGHT, SdrVertAlign::NONE);
break;
case SID_OBJECT_ALIGN_UP:
case SID_ALIGN_ANY_TOP:
if (pView->IsAlignPossible())
- pView->AlignMarkedObjects(SDRHALIGN_NONE, SDRVALIGN_TOP);
+ pView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Top);
break;
case SID_OBJECT_ALIGN_MIDDLE:
case SID_ALIGN_ANY_VCENTER:
if (pView->IsAlignPossible())
- pView->AlignMarkedObjects(SDRHALIGN_NONE, SDRVALIGN_CENTER);
+ pView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Center);
break;
case SID_OBJECT_ALIGN_DOWN:
case SID_ALIGN_ANY_BOTTOM:
if (pView->IsAlignPossible())
- pView->AlignMarkedObjects(SDRHALIGN_NONE, SDRVALIGN_BOTTOM);
+ pView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Bottom);
break;
case SID_DELETE:
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 2957a58..a8cd514 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2456,7 +2456,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_OBJECT_ALIGN_LEFT: // BASIC
{
- mpDrawView->AlignMarkedObjects(SDRHALIGN_LEFT, SDRVALIGN_NONE);
+ mpDrawView->AlignMarkedObjects(SDRHALIGN_LEFT, SdrVertAlign::NONE);
Cancel();
rReq.Done ();
}
@@ -2464,7 +2464,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_OBJECT_ALIGN_CENTER: // BASIC
{
- mpDrawView->AlignMarkedObjects(SDRHALIGN_CENTER, SDRVALIGN_NONE);
+ mpDrawView->AlignMarkedObjects(SDRHALIGN_CENTER, SdrVertAlign::NONE);
Cancel();
rReq.Done ();
}
@@ -2472,7 +2472,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_OBJECT_ALIGN_RIGHT: // BASIC
{
- mpDrawView->AlignMarkedObjects(SDRHALIGN_RIGHT, SDRVALIGN_NONE);
+ mpDrawView->AlignMarkedObjects(SDRHALIGN_RIGHT, SdrVertAlign::NONE);
Cancel();
rReq.Done ();
}
@@ -2480,7 +2480,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_OBJECT_ALIGN_UP: // BASIC
{
- mpDrawView->AlignMarkedObjects(SDRHALIGN_NONE, SDRVALIGN_TOP);
+ mpDrawView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Top);
Cancel();
rReq.Done ();
}
@@ -2488,7 +2488,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_OBJECT_ALIGN_MIDDLE: // BASIC
{
- mpDrawView->AlignMarkedObjects(SDRHALIGN_NONE, SDRVALIGN_CENTER);
+ mpDrawView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Center);
Cancel();
rReq.Done ();
}
@@ -2496,7 +2496,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_OBJECT_ALIGN_DOWN: // BASIC
{
- mpDrawView->AlignMarkedObjects(SDRHALIGN_NONE, SDRVALIGN_BOTTOM);
+ mpDrawView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Bottom);
Cancel();
rReq.Done ();
}
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 3573520..01596b4 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1748,7 +1748,7 @@ bool SdrEditView::IsAlignPossible() const
void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
{
- if (eHor==SDRHALIGN_NONE && eVert==SDRVALIGN_NONE)
+ if (eHor==SDRHALIGN_NONE && eVert==SdrVertAlign::NONE)
return;
SortMarkedObjects();
@@ -1763,13 +1763,13 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
{
switch (eVert)
{
- case SDRVALIGN_TOP : ImpTakeDescriptionStr(STR_EditAlignVTop ,aStr); break;
- case SDRVALIGN_BOTTOM: ImpTakeDescriptionStr(STR_EditAlignVBottom,aStr); break;
- case SDRVALIGN_CENTER: ImpTakeDescriptionStr(STR_EditAlignVCenter,aStr); break;
+ case SdrVertAlign::Top : ImpTakeDescriptionStr(STR_EditAlignVTop ,aStr); break;
+ case SdrVertAlign::Bottom: ImpTakeDescriptionStr(STR_EditAlignVBottom,aStr); break;
+ case SdrVertAlign::Center: ImpTakeDescriptionStr(STR_EditAlignVCenter,aStr); break;
default: break;
}
}
- else if (eVert==SDRVALIGN_NONE)
+ else if (eVert==SdrVertAlign::NONE)
{
switch (eHor)
{
@@ -1779,7 +1779,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
default: break;
}
}
- else if (eHor==SDRHALIGN_CENTER && eVert==SDRVALIGN_CENTER)
+ else if (eHor==SDRHALIGN_CENTER && eVert==SdrVertAlign::Center)
{
ImpTakeDescriptionStr(STR_EditAlignCenter,aStr);
}
@@ -1849,9 +1849,9 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
Rectangle aObjRect(pObj->GetSnapRect());
switch (eVert)
{
- case SDRVALIGN_TOP : nYMov=aBound.Top() -aObjRect.Top() ; break;
- case SDRVALIGN_BOTTOM: nYMov=aBound.Bottom()-aObjRect.Bottom() ; break;
- case SDRVALIGN_CENTER: nYMov=aCenter.Y() -aObjRect.Center().Y(); break;
+ case SdrVertAlign::Top : nYMov=aBound.Top() -aObjRect.Top() ; break;
+ case SdrVertAlign::Bottom: nYMov=aBound.Bottom()-aObjRect.Bottom() ; break;
+ case SdrVertAlign::Center: nYMov=aCenter.Y() -aObjRect.Center().Y(); break;
default: break;
}
switch (eHor)
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index 30ccc40..b73fa55 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -472,22 +472,22 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq)
switch (nSlotId)
{
case SID_OBJECT_ALIGN_LEFT:
- pSdrView->AlignMarkedObjects(SDRHALIGN_LEFT, SDRVALIGN_NONE);
+ pSdrView->AlignMarkedObjects(SDRHALIGN_LEFT, SdrVertAlign::NONE);
break;
case SID_OBJECT_ALIGN_CENTER:
- pSdrView->AlignMarkedObjects(SDRHALIGN_CENTER, SDRVALIGN_NONE);
+ pSdrView->AlignMarkedObjects(SDRHALIGN_CENTER, SdrVertAlign::NONE);
break;
case SID_OBJECT_ALIGN_RIGHT:
- pSdrView->AlignMarkedObjects(SDRHALIGN_RIGHT, SDRVALIGN_NONE);
+ pSdrView->AlignMarkedObjects(SDRHALIGN_RIGHT, SdrVertAlign::NONE);
break;
case SID_OBJECT_ALIGN_UP:
- pSdrView->AlignMarkedObjects(SDRHALIGN_NONE, SDRVALIGN_TOP);
+ pSdrView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Top);
break;
case SID_OBJECT_ALIGN_MIDDLE:
- pSdrView->AlignMarkedObjects(SDRHALIGN_NONE, SDRVALIGN_CENTER);
+ pSdrView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Center);
break;
case SID_OBJECT_ALIGN_DOWN:
- pSdrView->AlignMarkedObjects(SDRHALIGN_NONE, SDRVALIGN_BOTTOM);
+ pSdrView->AlignMarkedObjects(SDRHALIGN_NONE, SdrVertAlign::Bottom);
break;
}
pSh->EndAction();
commit 27ce6af929d12dcbd9aeddcceef5596ae21cdb10
Author: Noel Grandin <noel at peralex.com>
Date: Mon Aug 22 15:36:03 2016 +0200
convert SdrMergeMode to scoped enum
Change-Id: I4569733d0c0b4a63e364f0d136bef8de71d62724
diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 74c97f4..03f03eb 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -47,10 +47,10 @@ enum SdrVertAlign {
SDRVALIGN_CENTER
};
-enum SdrMergeMode {
- SDR_MERGE_MERGE,
- SDR_MERGE_SUBSTRACT,
- SDR_MERGE_INTERSECT
+enum class SdrMergeMode {
+ Merge,
+ Subtract,
+ Intersect
};
// Options for InsertObject()
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index db985f2..2957a58 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2212,7 +2212,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
else
{
WaitObject aWait( GetActiveWindow() );
- mpDrawView->MergeMarkedObjects(SDR_MERGE_MERGE);
+ mpDrawView->MergeMarkedObjects(SdrMergeMode::Merge);
}
Cancel();
rReq.Done ();
@@ -2233,7 +2233,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
else
{
WaitObject aWait( GetActiveWindow() );
- mpDrawView->MergeMarkedObjects(SDR_MERGE_SUBSTRACT);
+ mpDrawView->MergeMarkedObjects(SdrMergeMode::Subtract);
}
Cancel();
rReq.Done ();
@@ -2254,7 +2254,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
else
{
WaitObject aWait( GetActiveWindow() );
- mpDrawView->MergeMarkedObjects(SDR_MERGE_INTERSECT);
+ mpDrawView->MergeMarkedObjects(SdrMergeMode::Intersect);
}
Cancel();
rReq.Done ();
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index fbaf03e..184c727 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1096,7 +1096,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
switch(eMode)
{
- case SDR_MERGE_MERGE:
+ case SdrMergeMode::Merge:
{
// merge all contained parts (OR)
static bool bTestXOR(false);
@@ -1110,13 +1110,13 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
}
break;
}
- case SDR_MERGE_SUBSTRACT:
+ case SdrMergeMode::Subtract:
{
// Subtract B from A
aMergePolyPolygonA = basegfx::tools::solvePolygonOperationDiff(aMergePolyPolygonA, aMergePolyPolygonB);
break;
}
- case SDR_MERGE_INTERSECT:
+ case SdrMergeMode::Intersect:
{
// AND B and A
aMergePolyPolygonA = basegfx::tools::solvePolygonOperationAnd(aMergePolyPolygonA, aMergePolyPolygonB);
@@ -1145,21 +1145,21 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
aRemove.ForceSort();
switch(eMode)
{
- case SDR_MERGE_MERGE:
+ case SdrMergeMode::Merge:
{
SetUndoComment(
ImpGetResStr(STR_EditMergeMergePoly),
aRemove.GetMarkDescription());
break;
}
- case SDR_MERGE_SUBSTRACT:
+ case SdrMergeMode::Subtract:
{
SetUndoComment(
ImpGetResStr(STR_EditMergeSubstractPoly),
aRemove.GetMarkDescription());
break;
}
- case SDR_MERGE_INTERSECT:
+ case SdrMergeMode::Intersect:
{
SetUndoComment(
ImpGetResStr(STR_EditMergeIntersectPoly),
commit 2e8523f4083965085e19adac1e97eb3fb794d1db
Author: Noel Grandin <noel at peralex.com>
Date: Mon Aug 22 15:16:50 2016 +0200
convert SdrEndTextEditKind to scoped enum
Change-Id: Ic331db66ad937eba6488e6a9bbb30131230a29d7
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index 5957bce..0dede9e 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -45,11 +45,13 @@ namespace sdr {
class SelectionController;
}
-enum SdrEndTextEditKind {SDRENDTEXTEDIT_UNCHANGED, // textobject unchanged
- SDRENDTEXTEDIT_CHANGED, // textobject changed
- SDRENDTEXTEDIT_DELETED, // textobject implicitly deleted
- SDRENDTEXTEDIT_SHOULDBEDELETED}; // for writer: textobject should be deleted
-
+enum class SdrEndTextEditKind
+{
+ Unchanged, // textobject unchanged
+ Changed, // textobject changed
+ Deleted, // textobject implicitly deleted
+ ShouldBeDeleted // for writer: textobject should be deleted
+};
// - general edit for objectspecific properties
// - textedit for all drawobjects, inherited from SdrTextObj
@@ -188,7 +190,7 @@ public:
bool bDontDeleteOutliner = false, bool bOnlyOneView = false, bool bGrabFocus = true);
// bDontDeleteReally is a special parameter for writer
// If this flag is set, then a maybe empty textobject is not deleted.
- // Instead you get a return code SDRENDTEXTEDIT_SHOULDBEDELETED
+ // Instead you get a return code SdrEndTextEditKind::ShouldBeDeleted
// (in place of SDRENDTEXTEDIT_BEDELETED), which says, the obj should be
// deleted.
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally = false);
diff --git a/sc/source/ui/drawfunc/futext3.cxx b/sc/source/ui/drawfunc/futext3.cxx
index be4bd71..6046e4c 100644
--- a/sc/source/ui/drawfunc/futext3.cxx
+++ b/sc/source/ui/drawfunc/futext3.cxx
@@ -106,7 +106,7 @@ void FuText::StopEditMode()
below together with the cell note if the text is empty (independent of
border and area formatting). It is possible to prevent automatic
deletion by passing sal_True to this function. The return value changes
- from SDRENDTEXTEDIT_DELETED to SDRENDTEXTEDIT_SHOULDBEDELETED in this
+ from SdrEndTextEditKind::Deleted to SdrEndTextEditKind::ShouldBeDeleted in this
case. */
/*SdrEndTextEditKind eResult =*/ pView->SdrEndTextEdit( pNote != nullptr );
@@ -160,7 +160,7 @@ void FuText::StopEditMode()
to deleted text. If the note has been created *and* is deleted,
the last undo action can be removed completely. Note: The
function LeaveListAction() removes the last action by itself,
- if it is empty (when result is SDRENDTEXTEDIT_UNCHANGED). */
+ if it is empty (when result is SdrEndTextEditKind::Unchanged). */
if( bNewNote && bDeleteNote )
{
pUndoMgr->RemoveLastUndoAction();
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index e86d391..17f798d 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -155,7 +155,7 @@ void FuText::disposing()
{
if(mpView)
{
- if(mpView->SdrEndTextEdit() == SDRENDTEXTEDIT_DELETED)
+ if(mpView->SdrEndTextEdit() == SdrEndTextEditKind::Deleted)
mxTextObj.reset( nullptr );
// reset the RequestHandler of the used Outliner to the handler of the document
@@ -269,7 +269,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
if (mpView->IsTextEdit() && eHit != SdrHitKind::MarkedObject && eHit != SdrHitKind::Handle)
{
// finish text input
- if(mpView->SdrEndTextEdit() == SDRENDTEXTEDIT_DELETED)
+ if(mpView->SdrEndTextEdit() == SdrEndTextEditKind::Deleted)
{
/* Bugfix from MBA: during a double click onto the unused? area
in text mode, we get with the second click eHit =
@@ -872,7 +872,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
else
{
// switch to selection
- if (mpView->SdrEndTextEdit() == SDRENDTEXTEDIT_DELETED)
+ if (mpView->SdrEndTextEdit() == SdrEndTextEditKind::Deleted)
{
mxTextObj.reset(nullptr);
}
@@ -1330,7 +1330,7 @@ bool FuText::cancel()
{
if ( mpView->IsTextEdit() )
{
- if(mpView->SdrEndTextEdit() == SDRENDTEXTEDIT_DELETED)
+ if(mpView->SdrEndTextEdit() == SdrEndTextEditKind::Deleted)
mxTextObj.reset(nullptr);
mpView->SetCurrentObj(OBJ_TEXT);
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 80cb4f1..301d202 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -792,7 +792,7 @@ SdrEndTextEditKind View::SdrEndTextEdit(bool bDontDeleteReally)
}
else
{
- eKind = SDRENDTEXTEDIT_UNCHANGED;
+ eKind = SdrEndTextEditKind::Unchanged;
}
}
else if( xObj.is() && xObj->IsEmptyPresObj() )
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index c00db04..735cbc1 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1021,7 +1021,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
{
- SdrEndTextEditKind eRet=SDRENDTEXTEDIT_UNCHANGED;
+ SdrEndTextEditKind eRet=SdrEndTextEditKind::Unchanged;
SdrTextObj* pTEObj = dynamic_cast< SdrTextObj* >( mxTextEditObj.get() );
vcl::Window* pTEWin =pTextEditWin;
SdrOutliner* pTEOutliner =pTextEditOutliner;
@@ -1164,7 +1164,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
{
if( bUndo )
AddUndo(pTxtUndo);
- eRet=SDRENDTEXTEDIT_CHANGED;
+ eRet=SdrEndTextEditKind::Changed;
}
if (pDelUndo!=nullptr)
{
@@ -1176,7 +1176,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
{
delete pDelUndo;
}
- eRet=SDRENDTEXTEDIT_DELETED;
+ eRet=SdrEndTextEditKind::Deleted;
DBG_ASSERT(pTEObj->GetObjList()!=nullptr,"SdrObjEditView::SdrEndTextEdit(): Fatal: Object edited doesn't have an ObjList!");
if (pTEObj->GetObjList()!=nullptr)
{
@@ -1186,7 +1186,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
}
else if (bDelObj)
{ // for Writer: the app has to do the deletion itself.
- eRet=SDRENDTEXTEDIT_SHOULDBEDELETED;
+ eRet=SdrEndTextEditKind::ShouldBeDeleted;
}
if( bUndo )
@@ -1235,7 +1235,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
pTEWin->SetCursor(pTECursorMerker);
}
maHdlList.SetMoveOutside(false);
- if (eRet!=SDRENDTEXTEDIT_UNCHANGED)
+ if (eRet!=SdrEndTextEditKind::Unchanged)
{
GetMarkedObjectListWriteAccess().SetNameDirty();
}
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index d090efd..cc66fb9 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1036,7 +1036,7 @@ void SwFEShell::EndTextEdit()
}
if ( !pObj->GetUpGroup() )
{
- if ( SDRENDTEXTEDIT_SHOULDBEDELETED == pView->SdrEndTextEdit(true) )
+ if ( SdrEndTextEditKind::ShouldBeDeleted == pView->SdrEndTextEdit(true) )
{
if ( pView->GetMarkedObjectList().GetMarkCount() > 1 )
{
commit 6fc92adb8f89e653fd733e77ab24b4fcffe6a909
Author: Noel Grandin <noel at peralex.com>
Date: Mon Aug 22 14:54:18 2016 +0200
convert SdrHdlKind to scoped enum
Change-Id: Ib0a06d94f8b51cce1f29f20d1c00d54be939c076
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index d28252d..9422892 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -675,11 +675,11 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt )
if(pHitSelectionHdl)
{
SdrHdlKind eKind = pHitSelectionHdl->GetKind();
- if( eKind==HDL_UPPER || eKind==HDL_LOWER )
+ if( eKind==SdrHdlKind::Upper || eKind==SdrHdlKind::Lower )
eRotationDirection = DragMethod_RotateDiagram::ROTATIONDIRECTION_X;
- else if( eKind==HDL_LEFT || eKind==HDL_RIGHT )
+ else if( eKind==SdrHdlKind::Left || eKind==SdrHdlKind::Right )
eRotationDirection = DragMethod_RotateDiagram::ROTATIONDIRECTION_Y;
- else if( eKind==HDL_UPLFT || eKind==HDL_UPRGT || eKind==HDL_LWLFT || eKind==HDL_LWRGT )
+ else if( eKind==SdrHdlKind::UpperLeft || eKind==SdrHdlKind::UpperRight || eKind==SdrHdlKind::LowerLeft || eKind==SdrHdlKind::LowerRight )
eRotationDirection = DragMethod_RotateDiagram::ROTATIONDIRECTION_Z;
}
pDragMethod = new DragMethod_RotateDiagram( *pDrawViewWrapper, m_aSelection.getSelectedCID(), getModel(), eRotationDirection );
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index 5f37399..4e6375c 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -602,7 +602,7 @@ bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList )
for( sal_uInt32 nM = 0L; nM < aPolygon.count(); nM++)
{
const ::basegfx::B2DPoint aPoint(aPolygon.getB2DPoint(nM));
- SdrHdl* pHdl = new SdrHdl(Point(basegfx::fround(aPoint.getX()), basegfx::fround(aPoint.getY())), HDL_POLY);
+ SdrHdl* pHdl = new SdrHdl(Point(basegfx::fround(aPoint.getX()), basegfx::fround(aPoint.getY())), SdrHdlKind::Poly);
rHdlList.AddHdl(pHdl);
}
}
@@ -648,7 +648,7 @@ bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList )
}
Point aPos = pSubObj->GetCurrentBoundRect().Center();
- SdrHdl* pHdl = new SdrHdl(aPos,HDL_POLY);
+ SdrHdl* pHdl = new SdrHdl(aPos,SdrHdlKind::Poly);
rHdlList.AddHdl(pHdl);
}
return true;
diff --git a/include/svx/svddrgmt.hxx b/include/svx/svddrgmt.hxx
index cebb80a..4ed81504 100644
--- a/include/svx/svddrgmt.hxx
+++ b/include/svx/svddrgmt.hxx
@@ -209,8 +209,8 @@ public:
inline const Rectangle& SdrDragMethod::GetMarkedRect() const
{
- return getSdrDragView().meDragHdl==HDL_POLY ? getSdrDragView().GetMarkedPointsRect() :
- getSdrDragView().meDragHdl==HDL_GLUE ? getSdrDragView().GetMarkedGluePointsRect() :
+ return getSdrDragView().meDragHdl==SdrHdlKind::Poly ? getSdrDragView().GetMarkedPointsRect() :
+ getSdrDragView().meDragHdl==SdrHdlKind::Glue ? getSdrDragView().GetMarkedGluePointsRect() :
getSdrDragView().GetMarkedObjRect();
}
diff --git a/include/svx/svddrgv.hxx b/include/svx/svddrgv.hxx
index b96fb27..f642bc4 100644
--- a/include/svx/svddrgv.hxx
+++ b/include/svx/svddrgv.hxx
@@ -101,8 +101,8 @@ public:
bool IsDragObj() const { return mpCurrentSdrDragMethod && !mbInsPolyPoint && !mbInsGluePoint; }
SdrHdl* GetDragHdl() const { return mpDragHdl; }
SdrDragMethod* GetDragMethod() const { return mpCurrentSdrDragMethod; }
- bool IsDraggingPoints() const { return meDragHdl==HDL_POLY; }
- bool IsDraggingGluePoints() const { return meDragHdl==HDL_GLUE; }
+ bool IsDraggingPoints() const { return meDragHdl==SdrHdlKind::Poly; }
+ bool IsDraggingGluePoints() const { return meDragHdl==SdrHdlKind::Glue; }
// If you want to define that already during BegDrag
// or in the middle.
diff --git a/include/svx/svdhdl.hxx b/include/svx/svdhdl.hxx
index f22281a..78f1ebb 100644
--- a/include/svx/svdhdl.hxx
+++ b/include/svx/svdhdl.hxx
@@ -47,38 +47,38 @@ class MouseEvent;
// is picked up from the handle and passed to the app (on demand) to be switched on
// Handles like e.g. rotation center or the mirror axis are generated by
// the view if the correct transformation mode was selected by the controller.
-// HDL_MOVE...HDL_LWRGT should always be consecutive in the enum!
+// SdrHdlKind::Move...SdrHdlKind::LowerRight should always be consecutive in the enum!
-enum SdrHdlKind
+enum class SdrHdlKind
{
- HDL_MOVE, // Handle to move the object
- HDL_UPLFT, // Upper left
- HDL_UPPER, // Upper
- HDL_UPRGT, // Upper right
- HDL_LEFT, // Left
- HDL_RIGHT, // Right
- HDL_LWLFT, // Bottom left
- HDL_LOWER, // Bottom
- HDL_LWRGT, // Bottom right
- HDL_POLY, // Select point in polygon or beziercurve
- HDL_BWGT, // Weight of a beziercurve
- HDL_CIRC, // Angle to circle segment, corner radius to rectangle
- HDL_REF1, // Reference point 1, e.g. rotation center
- HDL_REF2, // Reference point 2, e.g. endpoint of mirror axis
- HDL_MIRX, // Mirror axis
- HDL_GLUE, // GluePoint
- HDL_GLUE_DESELECTED, // GluePoint
- HDL_ANCHOR, // Anchor symbol (SD, SW)
- HDL_TRNS, // Interactive transparence
- HDL_GRAD, // Interactive gradient
- HDL_COLR, // Interactive color
- HDL_USER,
- HDL_ANCHOR_TR, // #101688# Anchor handle with (0,0) at top right for SW
+ Move, // Handle to move the object
+ UpperLeft, // Upper left
+ Upper, // Upper
+ UpperRight, // Upper right
+ Left, // Left
+ Right, // Right
+ LowerLeft, // Bottom left
+ Lower, // Bottom
+ LowerRight, // Bottom right
+ Poly, // Select point in polygon or beziercurve
+ BezierWeight, // Weight of a beziercurve
+ Circle, // Angle to circle segment, corner radius to rectangle
+ Ref1, // Reference point 1, e.g. rotation center
+ Ref2, // Reference point 2, e.g. endpoint of mirror axis
+ MirrorAxis, // Mirror axis
+ Glue, // GluePoint
+ GlueDeselected, // GluePoint
+ Anchor, // Anchor symbol (SD, SW)
+ Transparence, // Interactive transparence
+ Gradient, // Interactive gradient
+ Color, // Interactive color
+ User,
+ Anchor_TR, // #101688# Anchor handle with (0,0) at top right for SW
// for SJ and the CustomShapeHandles:
- HDL_CUSTOMSHAPE1,
+ CustomShape1,
- HDL_SMARTTAG
+ SmartTag
};
@@ -176,7 +176,7 @@ protected:
public:
SdrHdl();
- explicit SdrHdl(const Point& rPnt, SdrHdlKind eNewKind=HDL_MOVE);
+ explicit SdrHdl(const Point& rPnt, SdrHdlKind eNewKind=SdrHdlKind::Move);
virtual ~SdrHdl();
const sdr::overlay::OverlayObjectList& getOverlayObjectList() const { return maOverlayGroup; }
@@ -200,8 +200,8 @@ public:
void Set1PixMore(bool bJa=true);
void SetRotationAngle(long n);
- bool IsCornerHdl() const { return eKind==HDL_UPLFT || eKind==HDL_UPRGT || eKind==HDL_LWLFT || eKind==HDL_LWRGT; }
- bool IsVertexHdl() const { return eKind==HDL_UPPER || eKind==HDL_LOWER || eKind==HDL_LEFT || eKind==HDL_RIGHT; }
+ bool IsCornerHdl() const { return eKind==SdrHdlKind::UpperLeft || eKind==SdrHdlKind::UpperRight || eKind==SdrHdlKind::LowerLeft || eKind==SdrHdlKind::LowerRight; }
+ bool IsVertexHdl() const { return eKind==SdrHdlKind::Upper || eKind==SdrHdlKind::Lower || eKind==SdrHdlKind::Left || eKind==SdrHdlKind::Right; }
void SetObjHdlNum(sal_uInt32 nNum) { nObjHdlNum=nNum; }
sal_uInt32 GetObjHdlNum() const { return nObjHdlNum; }
@@ -338,7 +338,7 @@ protected:
SdrHdl* pHdl2;
public:
- SdrHdlLine(SdrHdl& rHdl1, SdrHdl& rHdl2, SdrHdlKind eNewKind=HDL_MIRX) { eKind=eNewKind; pHdl1=&rHdl1; pHdl2=&rHdl2; }
+ SdrHdlLine(SdrHdl& rHdl1, SdrHdl& rHdl2, SdrHdlKind eNewKind=SdrHdlKind::MirrorAxis) { eKind=eNewKind; pHdl1=&rHdl1; pHdl2=&rHdl2; }
virtual ~SdrHdlLine();
virtual Pointer GetPointer() const override;
@@ -357,7 +357,7 @@ protected:
public:
// this is not a Copy-Ctor!!!
- SdrHdlBezWgt(const SdrHdl* pRefHdl1, SdrHdlKind eNewKind=HDL_BWGT) { eKind=eNewKind; pHdl1=pRefHdl1; }
+ SdrHdlBezWgt(const SdrHdl* pRefHdl1, SdrHdlKind eNewKind=SdrHdlKind::BezierWeight) { eKind=eNewKind; pHdl1=pRefHdl1; }
virtual ~SdrHdlBezWgt();
};
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index ef331d4..c4be7f7 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -1642,17 +1642,17 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode)
switch(pHdl->GetKind())
{
- case HDL_LEFT:
- case HDL_UPLFT:
- case HDL_LWLFT:
- case HDL_UPPER:
+ case SdrHdlKind::Left:
+ case SdrHdlKind::UpperLeft:
+ case SdrHdlKind::LowerLeft:
+ case SdrHdlKind::Upper:
aNewRect.Left() += nX;
aNewRect.Top() += nY;
break;
- case HDL_UPRGT:
- case HDL_RIGHT:
- case HDL_LWRGT:
- case HDL_LOWER:
+ case SdrHdlKind::UpperRight:
+ case SdrHdlKind::Right:
+ case SdrHdlKind::LowerRight:
+ case SdrHdlKind::Lower:
aNewRect.setWidth(aNewRect.getWidth() + nX);
aNewRect.setHeight(aNewRect.getHeight() + nY);
break;
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index c09dc2b..cc4a253 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -586,7 +586,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
if(pHdl)
{
- if(pHdl->GetKind() == HDL_POLY)
+ if(pHdl->GetKind() == SdrHdlKind::Poly)
{
// rescue ID of point with focus
sal_uInt32 nPol(pHdl->GetPolyNum());
@@ -619,7 +619,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
SdrHdl* pAct = rHdlList.GetHdl(a);
if(pAct
- && pAct->GetKind() == HDL_POLY
+ && pAct->GetKind() == SdrHdlKind::Poly
&& pAct->GetPolyNum() == nPol
&& pAct->GetPointNum() == nPnt)
{
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index df0c18b..9cc6382 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -126,7 +126,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
if( ScDrawLayer::IsNoteCaption( pMarkedObj ) )
{
// move using the valid caption handles for note text box.
- if(pHdl && (pHdl->GetKind() != HDL_POLY && pHdl->GetKind() != HDL_CIRC))
+ if(pHdl && (pHdl->GetKind() != SdrHdlKind::Poly && pHdl->GetKind() != SdrHdlKind::Circle))
bDrag = true;
// move the complete note box.
else if(!pHdl)
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index bfc6f6f..358e1d5 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -239,7 +239,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
SdrObject* pMarkedObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
if( ScDrawLayer::IsNoteCaption( pMarkedObj ) )
{
- if(pHdl->GetKind() != HDL_POLY && pHdl->GetKind() != HDL_CIRC)
+ if(pHdl->GetKind() != SdrHdlKind::Poly && pHdl->GetKind() != SdrHdlKind::Circle)
bDrag = true;
}
else
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index cae79d1..08e3844 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -75,8 +75,8 @@ void ScDrawView::SetPageAnchored()
pViewData->GetDocShell()->SetDrawModified();
// Remove the anchor object.
- maHdlList.RemoveAllByKind(HDL_ANCHOR);
- maHdlList.RemoveAllByKind(HDL_ANCHOR_TR);
+ maHdlList.RemoveAllByKind(SdrHdlKind::Anchor);
+ maHdlList.RemoveAllByKind(SdrHdlKind::Anchor_TR);
}
}
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index dbf146c..80111d1 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -311,7 +311,7 @@ void ScGridWindow::CreateAnchorHandle(SdrHdlList& rHdl, const ScAddress& rAddres
bool bNegativePage = pViewData->GetDocument()->IsNegativePage( pViewData->GetTabNo() );
Point aPos = pViewData->GetScrPos( rAddress.Col(), rAddress.Row(), eWhich, true );
aPos = PixelToLogic(aPos);
- rHdl.AddHdl(new SdrHdl(aPos, bNegativePage ? HDL_ANCHOR_TR : HDL_ANCHOR));
+ rHdl.AddHdl(new SdrHdl(aPos, bNegativePage ? SdrHdlKind::Anchor_TR : SdrHdlKind::Anchor));
}
}
}
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index b5de222..268692e 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -412,7 +412,7 @@ void SdTiledRenderingTest::testSetGraphicSelection()
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(8), pObject->GetHdlCount());
// Take the bottom center one.
SdrHdl* pHdl = pObject->GetHdl(6);
- CPPUNIT_ASSERT_EQUAL(HDL_LOWER, pHdl->GetKind());
+ CPPUNIT_ASSERT_EQUAL((int)SdrHdlKind::Lower, (int)pHdl->GetKind());
Rectangle aShapeBefore = pObject->GetSnapRect();
// Resize.
pXImpressDocument->setGraphicSelection(LOK_SETGRAPHICSELECTION_START, convertMm100ToTwip(pHdl->GetPos().getX()), convertMm100ToTwip(pHdl->GetPos().getY()));
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index 37e6f74..aed3a65 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -527,12 +527,12 @@ bool MotionPathTag::MouseButtonDown( const MouseEvent& rMEvt, SmartHdl& rHdl )
// to create the needed local SdrDragEntry for it in createSdrDragEntries()
const basegfx::B2DPolyPolygon aDragPoly(mpPathObj->GetPathPoly());
- if( (pHdl->GetKind() == HDL_MOVE) || (pHdl->GetKind() == HDL_SMARTTAG) )
+ if( (pHdl->GetKind() == SdrHdlKind::Move) || (pHdl->GetKind() == SdrHdlKind::SmartTag) )
{
pDragMethod = new PathDragMove( mrView, xTag, aDragPoly );
pHdl->SetPos( aMDPos );
}
- else if( pHdl->GetKind() == HDL_POLY )
+ else if( pHdl->GetKind() == SdrHdlKind::Poly )
{
pDragMethod = new PathDragObjOwn( mrView, aDragPoly );
}
@@ -628,7 +628,7 @@ bool MotionPathTag::OnMarkHandle( const KeyEvent& rKEvt )
const SdrHdlList& rHdlList = mrView.GetHdlList();
SdrHdl* pHdl = rHdlList.GetFocusHdl();
- if(pHdl && pHdl->GetKind() == HDL_POLY )
+ if(pHdl && pHdl->GetKind() == SdrHdlKind::Poly )
{
// rescue ID of point with focus
sal_uInt32 nPol(pHdl->GetPolyNum());
@@ -659,7 +659,7 @@ bool MotionPathTag::OnMarkHandle( const KeyEvent& rKEvt )
{
SdrHdl* pAct = rHdlList.GetHdl(a);
- if(pAct && pAct->GetKind() == HDL_POLY && pAct->GetPolyNum() == nPol && pAct->GetPointNum() == nPnt)
+ if(pAct && pAct->GetKind() == SdrHdlKind::Poly && pAct->GetPolyNum() == nPol && pAct->GetPointNum() == nPnt)
pNewOne = pAct;
}
@@ -714,15 +714,15 @@ bool MotionPathTag::OnMove( const KeyEvent& rKEvt )
// start dragging
rtl::Reference< MotionPathTag > xTag( this );
SdrDragMethod* pDragMethod = nullptr;
- if( (pHdl->GetKind() == HDL_MOVE) || (pHdl->GetKind() == HDL_SMARTTAG) )
+ if( (pHdl->GetKind() == SdrHdlKind::Move) || (pHdl->GetKind() == SdrHdlKind::SmartTag) )
{
pDragMethod = new PathDragMove( mrView, xTag );
}
- else if( pHdl->GetKind() == HDL_POLY )
+ else if( pHdl->GetKind() == SdrHdlKind::Poly )
{
pDragMethod = new PathDragObjOwn( mrView );
}
- else if( pHdl->GetKind() != HDL_BWGT )
+ else if( pHdl->GetKind() != SdrHdlKind::BezierWeight )
{
pDragMethod = new PathDragResize( mrView, xTag );
}
@@ -787,7 +787,7 @@ sal_uLong MotionPathTag::GetMarkedPointCount() const
bool MotionPathTag::MarkPoint(SdrHdl& rHdl, bool bUnmark )
{
bool bRet=false;
- if( mpPathObj && mrView.IsPointMarkable( rHdl ) && (rHdl.GetKind() != HDL_SMARTTAG) )
+ if( mpPathObj && mrView.IsPointMarkable( rHdl ) && (rHdl.GetKind() != SdrHdlKind::SmartTag) )
{
SmartHdl* pSmartHdl = dynamic_cast< SmartHdl* >( &rHdl );
if( pSmartHdl && pSmartHdl->getTag().get() == this )
@@ -955,23 +955,23 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList )
bool bHgt0=aRect.Top()==aRect.Bottom();
if (bWdt0 && bHgt0)
{
- rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopLeft(),HDL_UPLFT));
+ rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopLeft(),SdrHdlKind::UpperLeft));
}
else if (bWdt0 || bHgt0)
{
- rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopLeft() ,HDL_UPLFT));
- rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomRight(),HDL_LWRGT));
+ rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopLeft() ,SdrHdlKind::UpperLeft));
+ rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomRight(),SdrHdlKind::LowerRight));
}
else
{
- if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopLeft() ,HDL_UPLFT));
- if ( !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopCenter() ,HDL_UPPER));
- if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopRight() ,HDL_UPRGT));
- if (!bWdt0 ) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.LeftCenter() ,HDL_LEFT ));
- if (!bWdt0 ) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.RightCenter() ,HDL_RIGHT));
- if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomLeft() ,HDL_LWLFT));
- if ( !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomCenter(),HDL_LOWER));
- if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomRight() ,HDL_LWRGT));
+ if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopLeft() ,SdrHdlKind::UpperLeft));
+ if ( !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopCenter() ,SdrHdlKind::Upper));
+ if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.TopRight() ,SdrHdlKind::UpperRight));
+ if (!bWdt0 ) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.LeftCenter() ,SdrHdlKind::Left ));
+ if (!bWdt0 ) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.RightCenter() ,SdrHdlKind::Right));
+ if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomLeft() ,SdrHdlKind::LowerLeft));
+ if ( !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomCenter(),SdrHdlKind::Lower));
+ if (!bWdt0 && !bHgt0) rHandlerList.AddHdl(new SmartHdl( xThis, mpPathObj, aRect.BottomRight() ,SdrHdlKind::LowerRight));
}
while( nCount < rHandlerList.GetHdlCount() )
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index 7af92ea..d7de0b6 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -526,7 +526,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
if(pHdl)
{
- if(pHdl->GetKind() == HDL_POLY)
+ if(pHdl->GetKind() == SdrHdlKind::Poly)
{
// rescue ID of point with focus
sal_uInt32 nPol(pHdl->GetPolyNum());
@@ -559,7 +559,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
SdrHdl* pAct = rHdlList.GetHdl(a);
if(pAct
- && pAct->GetKind() == HDL_POLY
+ && pAct->GetKind() == SdrHdlKind::Poly
&& pAct->GetPolyNum() == nPol
&& pAct->GetPointNum() == nPnt)
{
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index d5d61ee..6ba4695 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -438,7 +438,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
SdrViewEvent aVEvt;
SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
- if (eHit == SdrHitKind::Handle && aVEvt.pHdl->GetKind() == HDL_BWGT)
+ if (eHit == SdrHitKind::Handle && aVEvt.pHdl->GetKind() == SdrHdlKind::BezierWeight)
{
/******************************************************************
* Drag Handle
@@ -718,9 +718,9 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
mpView->Start3DCreation();
bSuppressChangesOfSelection = false;
}
- else if (pHdl->GetKind() != HDL_MIRX &&
- pHdl->GetKind() != HDL_REF1 &&
- pHdl->GetKind() != HDL_REF2 && mpView->Is3DRotationCreationActive())
+ else if (pHdl->GetKind() != SdrHdlKind::MirrorAxis &&
+ pHdl->GetKind() != SdrHdlKind::Ref1 &&
+ pHdl->GetKind() != SdrHdlKind::Ref2 && mpView->Is3DRotationCreationActive())
{
/*********************************************************
* If 3D-rotation bodies are about to be created,
diff --git a/sd/source/ui/func/smarttag.cxx b/sd/source/ui/func/smarttag.cxx
index f49b3a8..0ee1807 100644
--- a/sd/source/ui/func/smarttag.cxx
+++ b/sd/source/ui/func/smarttag.cxx
@@ -348,14 +348,14 @@ void SmartTagSet::CheckPossibilities()
mxSelectedTag->CheckPossibilities();
}
-SmartHdl::SmartHdl( const SmartTagReference& xTag, SdrObject* pObject, const Point& rPnt, SdrHdlKind eNewKind /*=HDL_MOVE*/ )
+SmartHdl::SmartHdl( const SmartTagReference& xTag, SdrObject* pObject, const Point& rPnt, SdrHdlKind eNewKind /*=SdrHdlKind::Move*/ )
: SdrHdl( rPnt, eNewKind )
, mxTag( xTag )
{
SetObj( pObject );
}
-SmartHdl::SmartHdl( const SmartTagReference& xTag, const Point& rPnt, SdrHdlKind eNewKind /*=HDL_MOVE*/ )
+SmartHdl::SmartHdl( const SmartTagReference& xTag, const Point& rPnt, SdrHdlKind eNewKind /*=SdrHdlKind::Move*/ )
: SdrHdl( rPnt, eNewKind )
, mxTag( xTag )
{
diff --git a/sd/source/ui/inc/smarttag.hxx b/sd/source/ui/inc/smarttag.hxx
index 0e6b135..7b08aea 100644
--- a/sd/source/ui/inc/smarttag.hxx
+++ b/sd/source/ui/inc/smarttag.hxx
@@ -164,8 +164,8 @@ private:
class SmartHdl : public SdrHdl
{
public:
- SmartHdl( const SmartTagReference& xTag, SdrObject* pObject, const Point& rPnt, SdrHdlKind eNewKind=HDL_SMARTTAG );
- SmartHdl( const SmartTagReference& xTag, const Point& rPnt, SdrHdlKind eNewKind=HDL_SMARTTAG );
+ SmartHdl( const SmartTagReference& xTag, SdrObject* pObject, const Point& rPnt, SdrHdlKind eNewKind=SdrHdlKind::SmartTag );
+ SmartHdl( const SmartTagReference& xTag, const Point& rPnt, SdrHdlKind eNewKind=SdrHdlKind::SmartTag );
const SmartTagReference& getTag() const { return mxTag; }
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 361fcab..4ee833c 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -518,7 +518,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
{
SdrHdl* pIAOHandle = rHdlList.GetHdl( n );
- if( pIAOHandle && ( HDL_COLR == pIAOHandle->GetKind() ) )
+ if( pIAOHandle && ( SdrHdlKind::Color == pIAOHandle->GetKind() ) )
{
if(pIAOHandle->getOverlayObjectList().isHitPixel(rEvt.maPosPixel))
{
@@ -672,7 +672,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt,
{
SdrHdl* pIAOHandle = rHdlList.GetHdl( n );
- if( pIAOHandle && ( HDL_COLR == pIAOHandle->GetKind() ) )
+ if( pIAOHandle && ( SdrHdlKind::Color == pIAOHandle->GetKind() ) )
{
if(pIAOHandle->getOverlayObjectList().isHitPixel(rEvt.maPosPixel))
{
diff --git a/svx/inc/dragmt3d.hxx b/svx/inc/dragmt3d.hxx
index 674a892..3c4eacb 100644
--- a/svx/inc/dragmt3d.hxx
+++ b/svx/inc/dragmt3d.hxx
@@ -105,7 +105,7 @@ public:
E3dDragMove(
SdrDragView &rView,
const SdrMarkList& rMark,
- SdrHdlKind eDrgHdl = HDL_MOVE,
+ SdrHdlKind eDrgHdl = SdrHdlKind::Move,
E3dDragConstraint eConstr = E3DDRAG_CONSTR_XYZ,
bool bFull = false);
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 4426af0..896a093 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -541,7 +541,7 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
if(pHdl)
{
- if(pHdl->GetKind() == HDL_POLY)
+ if(pHdl->GetKind() == SdrHdlKind::Poly)
{
// rescue ID of point with focus
sal_uInt32 nPol(pHdl->GetPolyNum());
@@ -574,7 +574,7 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
SdrHdl* pAct = rHdlList.GetHdl(a);
if(pAct
- && pAct->GetKind() == HDL_POLY
+ && pAct->GetKind() == SdrHdlKind::Poly
&& pAct->GetPolyNum() == nPol
&& pAct->GetPointNum() == nPnt)
{
diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx
index 6083bd7..640170c 100644
--- a/svx/source/engine3d/dragmt3d.cxx
+++ b/svx/source/engine3d/dragmt3d.cxx
@@ -441,39 +441,39 @@ E3dDragMove::E3dDragMove(SdrDragView &_rView,
{
switch(meWhatDragHdl)
{
- case HDL_LEFT:
+ case SdrHdlKind::Left:
maScaleFixPos = maFullBound.RightCenter();
break;
- case HDL_RIGHT:
+ case SdrHdlKind::Right:
maScaleFixPos = maFullBound.LeftCenter();
break;
- case HDL_UPPER:
+ case SdrHdlKind::Upper:
maScaleFixPos = maFullBound.BottomCenter();
break;
- case HDL_LOWER:
+ case SdrHdlKind::Lower:
maScaleFixPos = maFullBound.TopCenter();
break;
- case HDL_UPLFT:
+ case SdrHdlKind::UpperLeft:
maScaleFixPos = maFullBound.BottomRight();
break;
- case HDL_UPRGT:
+ case SdrHdlKind::UpperRight:
maScaleFixPos = maFullBound.BottomLeft();
break;
- case HDL_LWLFT:
+ case SdrHdlKind::LowerLeft:
maScaleFixPos = maFullBound.TopRight();
break;
- case HDL_LWRGT:
+ case SdrHdlKind::LowerRight:
maScaleFixPos = maFullBound.TopLeft();
break;
default:
- // Moving the object, HDL_MOVE
+ // Moving the object, SdrHdlKind::Move
break;
}
// Override when IsResizeAtCenter()
if(getSdrDragView().IsResizeAtCenter())
{
- meWhatDragHdl = HDL_USER;
+ meWhatDragHdl = SdrHdlKind::User;
maScaleFixPos = maFullBound.Center();
}
}
@@ -487,7 +487,7 @@ void E3dDragMove::MoveSdrDrag(const Point& rPnt)
if(DragStat().CheckMinMoved(rPnt))
{
- if(HDL_MOVE == meWhatDragHdl)
+ if(SdrHdlKind::Move == meWhatDragHdl)
{
// Translation
// Determine the motion vector
@@ -605,13 +605,13 @@ void E3dDragMove::MoveSdrDrag(const Point& rPnt)
// constraints?
switch(meWhatDragHdl)
{
- case HDL_LEFT:
- case HDL_RIGHT:
+ case SdrHdlKind::Left:
+ case SdrHdlKind::Right:
// to constrain on X -> Y equal
aScNext.setY(aScFixPos.getY());
break;
- case HDL_UPPER:
- case HDL_LOWER:
+ case SdrHdlKind::Upper:
+ case SdrHdlKind::Lower:
// constrain to auf Y -> X equal
aScNext.setX(aScFixPos.getX());
break;
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index fe4fb5c..4699cc7 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -866,7 +866,7 @@ void E3dCompoundObject::AddToHdlList(SdrHdlList& rHdlList) const
// to 2d world coor
aPos2D *= rVCScene.getObjectTransformation();
- rHdlList.AddHdl(new SdrHdl(Point(basegfx::fround(aPos2D.getX()), basegfx::fround(aPos2D.getY())), HDL_BWGT));
+ rHdlList.AddHdl(new SdrHdl(Point(basegfx::fround(aPos2D.getX()), basegfx::fround(aPos2D.getY())), SdrHdlKind::BezierWeight));
}
}
}
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 3847c61..84548d1 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -1224,7 +1224,7 @@ bool E3dView::BegDragObj(const Point& rPnt, OutputDevice* pOut,
}
if( bThereAre3DObjects )
{
- meDragHdl = ( pHdl == nullptr ? HDL_MOVE : pHdl->GetKind() );
+ meDragHdl = ( pHdl == nullptr ? SdrHdlKind::Move : pHdl->GetKind() );
switch ( meDragMode )
{
case SdrDragMode::Rotate:
@@ -1232,24 +1232,24 @@ bool E3dView::BegDragObj(const Point& rPnt, OutputDevice* pOut,
{
switch ( meDragHdl )
{
- case HDL_LEFT:
- case HDL_RIGHT:
+ case SdrHdlKind::Left:
+ case SdrHdlKind::Right:
{
eConstraint = E3DDRAG_CONSTR_X;
}
break;
- case HDL_UPPER:
- case HDL_LOWER:
+ case SdrHdlKind::Upper:
+ case SdrHdlKind::Lower:
{
eConstraint = E3DDRAG_CONSTR_Y;
}
break;
- case HDL_UPLFT:
- case HDL_UPRGT:
- case HDL_LWLFT:
- case HDL_LWRGT:
+ case SdrHdlKind::UpperLeft:
+ case SdrHdlKind::UpperRight:
+ case SdrHdlKind::LowerLeft:
+ case SdrHdlKind::LowerRight:
{
eConstraint = E3DDRAG_CONSTR_Z;
}
@@ -1417,7 +1417,7 @@ void E3dView::Start3DCreation()
// Show mirror polygon IMMEDIATELY
const SdrHdlList &aHdlList = GetHdlList();
mpMirrorOverlay = new Impl3DMirrorConstructOverlay(*this);
- mpMirrorOverlay->SetMirrorAxis(aHdlList.GetHdl(HDL_REF1)->GetPos(), aHdlList.GetHdl(HDL_REF2)->GetPos());
+ mpMirrorOverlay->SetMirrorAxis(aHdlList.GetHdl(SdrHdlKind::Ref1)->GetPos(), aHdlList.GetHdl(SdrHdlKind::Ref2)->GetPos());
}
}
@@ -1434,9 +1434,9 @@ void E3dView::MovAction(const Point& rPnt)
SdrHdlKind eHdlKind = pHdl->GetKind();
// reacts only due to a mirror axis
- if ((eHdlKind == HDL_REF1) ||
- (eHdlKind == HDL_REF2) ||
- (eHdlKind == HDL_MIRX))
+ if ((eHdlKind == SdrHdlKind::Ref1) ||
+ (eHdlKind == SdrHdlKind::Ref2) ||
+ (eHdlKind == SdrHdlKind::MirrorAxis))
{
const SdrHdlList &aHdlList = GetHdlList ();
@@ -1444,8 +1444,8 @@ void E3dView::MovAction(const Point& rPnt)
// it anew
SdrView::MovAction (rPnt);
mpMirrorOverlay->SetMirrorAxis(
- aHdlList.GetHdl (HDL_REF1)->GetPos(),
- aHdlList.GetHdl (HDL_REF2)->GetPos());
+ aHdlList.GetHdl (SdrHdlKind::Ref1)->GetPos(),
+ aHdlList.GetHdl (SdrHdlKind::Ref2)->GetPos());
}
}
else
@@ -1490,8 +1490,8 @@ void E3dView::End3DCreation(bool bUseDefaultValuesForMirrorAxes)
// Determine from the handle positions and the displacement of
// the points
const SdrHdlList &aHdlList = GetHdlList();
- Point aMirrorRef1 = aHdlList.GetHdl(HDL_REF1)->GetPos();
- Point aMirrorRef2 = aHdlList.GetHdl(HDL_REF2)->GetPos();
+ Point aMirrorRef1 = aHdlList.GetHdl(SdrHdlKind::Ref1)->GetPos();
+ Point aMirrorRef2 = aHdlList.GetHdl(SdrHdlKind::Ref2)->GetPos();
basegfx::B2DPoint aPnt1(aMirrorRef1.X(), -aMirrorRef1.Y());
basegfx::B2DPoint aPnt2(aMirrorRef2.X(), -aMirrorRef2.Y());
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 776925d..15c9a57 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -967,10 +967,10 @@ bool SdrDragMovHdl::BeginSdrDrag()
DragStat().Ref1()=GetDragHdl()->GetPos();
DragStat().SetShown(!DragStat().IsShown());
SdrHdlKind eKind=GetDragHdl()->GetKind();
- SdrHdl* pH1=GetHdlList().GetHdl(HDL_REF1);
- SdrHdl* pH2=GetHdlList().GetHdl(HDL_REF2);
+ SdrHdl* pH1=GetHdlList().GetHdl(SdrHdlKind::Ref1);
+ SdrHdl* pH2=GetHdlList().GetHdl(SdrHdlKind::Ref2);
- if (eKind==HDL_MIRX)
+ if (eKind==SdrHdlKind::MirrorAxis)
{
if (pH1==nullptr || pH2==nullptr)
{
@@ -995,10 +995,10 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
if ( GetDragHdl() && DragStat().CheckMinMoved(rNoSnapPnt))
{
- if (GetDragHdl()->GetKind()==HDL_MIRX)
+ if (GetDragHdl()->GetKind()==SdrHdlKind::MirrorAxis)
{
- SdrHdl* pH1=GetHdlList().GetHdl(HDL_REF1);
- SdrHdl* pH2=GetHdlList().GetHdl(HDL_REF2);
+ SdrHdl* pH1=GetHdlList().GetHdl(SdrHdlKind::Ref1);
+ SdrHdl* pH2=GetHdlList().GetHdl(SdrHdlKind::Ref2);
if (pH1==nullptr || pH2==nullptr)
return;
@@ -1024,7 +1024,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
pH1->SetPos(Ref1()+aDif);
pH2->SetPos(Ref2()+aDif);
- SdrHdl* pHM = GetHdlList().GetHdl(HDL_MIRX);
+ SdrHdl* pHM = GetHdlList().GetHdl(SdrHdlKind::MirrorAxis);
if(pHM)
pHM->Touch();
@@ -1052,10 +1052,10 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
if (nSA!=0)
{ // angle snapping
- SdrHdlKind eRef=HDL_REF1;
+ SdrHdlKind eRef=SdrHdlKind::Ref1;
- if (GetDragHdl()->GetKind()==HDL_REF1)
- eRef=HDL_REF2;
+ if (GetDragHdl()->GetKind()==SdrHdlKind::Ref1)
+ eRef=SdrHdlKind::Ref2;
SdrHdl* pH=GetHdlList().GetHdl(eRef);
@@ -1090,7 +1090,7 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt)
Hide();
DragStat().NextMove(aPnt);
GetDragHdl()->SetPos(DragStat().GetNow());
- SdrHdl* pHM = GetHdlList().GetHdl(HDL_MIRX);
+ SdrHdl* pHM = GetHdlList().GetHdl(SdrHdlKind::MirrorAxis);
if(pHM)
pHM->Touch();
@@ -1108,15 +1108,15 @@ bool SdrDragMovHdl::EndSdrDrag(bool /*bCopy*/)
{
switch (GetDragHdl()->GetKind())
{
- case HDL_REF1:
+ case SdrHdlKind::Ref1:
Ref1()=DragStat().GetNow();
break;
- case HDL_REF2:
+ case SdrHdlKind::Ref2:
Ref2()=DragStat().GetNow();
break;
- case HDL_MIRX:
+ case SdrHdlKind::MirrorAxis:
Ref1()+=DragStat().GetNow()-DragStat().GetStart();
Ref2()+=DragStat().GetNow()-DragStat().GetStart();
break;
@@ -1136,7 +1136,7 @@ void SdrDragMovHdl::CancelSdrDrag()
if( pHdl )
pHdl->SetPos(DragStat().GetRef1());
- SdrHdl* pHM = GetHdlList().GetHdl(HDL_MIRX);
+ SdrHdl* pHM = GetHdlList().GetHdl(SdrHdlKind::MirrorAxis);
if(pHM)
pHM->Touch();
@@ -1802,23 +1802,23 @@ void SdrDragResize::TakeSdrDragComment(OUString& rStr) const
bool SdrDragResize::BeginSdrDrag()
{
- SdrHdlKind eRefHdl=HDL_MOVE;
+ SdrHdlKind eRefHdl=SdrHdlKind::Move;
SdrHdl* pRefHdl=nullptr;
switch (GetDragHdlKind())
{
- case HDL_UPLFT: eRefHdl=HDL_LWRGT; break;
- case HDL_UPPER: eRefHdl=HDL_LOWER; DragStat().SetHorFixed(true); break;
- case HDL_UPRGT: eRefHdl=HDL_LWLFT; break;
- case HDL_LEFT : eRefHdl=HDL_RIGHT; DragStat().SetVerFixed(true); break;
- case HDL_RIGHT: eRefHdl=HDL_LEFT ; DragStat().SetVerFixed(true); break;
- case HDL_LWLFT: eRefHdl=HDL_UPRGT; break;
- case HDL_LOWER: eRefHdl=HDL_UPPER; DragStat().SetHorFixed(true); break;
- case HDL_LWRGT: eRefHdl=HDL_UPLFT; break;
+ case SdrHdlKind::UpperLeft: eRefHdl=SdrHdlKind::LowerRight; break;
+ case SdrHdlKind::Upper: eRefHdl=SdrHdlKind::Lower; DragStat().SetHorFixed(true); break;
+ case SdrHdlKind::UpperRight: eRefHdl=SdrHdlKind::LowerLeft; break;
+ case SdrHdlKind::Left : eRefHdl=SdrHdlKind::Right; DragStat().SetVerFixed(true); break;
+ case SdrHdlKind::Right: eRefHdl=SdrHdlKind::Left ; DragStat().SetVerFixed(true); break;
+ case SdrHdlKind::LowerLeft: eRefHdl=SdrHdlKind::UpperRight; break;
+ case SdrHdlKind::Lower: eRefHdl=SdrHdlKind::Upper; DragStat().SetHorFixed(true); break;
+ case SdrHdlKind::LowerRight: eRefHdl=SdrHdlKind::UpperLeft; break;
default: break;
}
- if (eRefHdl!=HDL_MOVE)
+ if (eRefHdl!=SdrHdlKind::Move)
pRefHdl=GetHdlList().GetHdl(eRefHdl);
if (pRefHdl!=nullptr && !getSdrDragView().IsResizeAtCenter())
@@ -1828,8 +1828,8 @@ bool SdrDragResize::BeginSdrDrag()
}
else
{
- SdrHdl* pRef1=GetHdlList().GetHdl(HDL_UPLFT);
- SdrHdl* pRef2=GetHdlList().GetHdl(HDL_LWRGT);
+ SdrHdl* pRef1=GetHdlList().GetHdl(SdrHdlKind::UpperLeft);
+ SdrHdl* pRef2=GetHdlList().GetHdl(SdrHdlKind::LowerRight);
if (pRef1!=nullptr && pRef2!=nullptr)
{
@@ -2111,7 +2111,7 @@ void SdrDragRotate::TakeSdrDragComment(OUString& rStr) const
bool SdrDragRotate::BeginSdrDrag()
{
- SdrHdl* pH=GetHdlList().GetHdl(HDL_REF1);
+ SdrHdl* pH=GetHdlList().GetHdl(SdrHdlKind::Ref1);
if (pH!=nullptr)
{
@@ -2244,19 +2244,19 @@ void SdrDragShear::TakeSdrDragComment(OUString& rStr) const
bool SdrDragShear::BeginSdrDrag()
{
- SdrHdlKind eRefHdl=HDL_MOVE;
+ SdrHdlKind eRefHdl=SdrHdlKind::Move;
SdrHdl* pRefHdl=nullptr;
switch (GetDragHdlKind())
{
- case HDL_UPPER: eRefHdl=HDL_LOWER; break;
- case HDL_LOWER: eRefHdl=HDL_UPPER; break;
- case HDL_LEFT : eRefHdl=HDL_RIGHT; bVertical=true; break;
- case HDL_RIGHT: eRefHdl=HDL_LEFT ; bVertical=true; break;
+ case SdrHdlKind::Upper: eRefHdl=SdrHdlKind::Lower; break;
+ case SdrHdlKind::Lower: eRefHdl=SdrHdlKind::Upper; break;
+ case SdrHdlKind::Left : eRefHdl=SdrHdlKind::Right; bVertical=true; break;
+ case SdrHdlKind::Right: eRefHdl=SdrHdlKind::Left ; bVertical=true; break;
default: break;
}
- if (eRefHdl!=HDL_MOVE)
+ if (eRefHdl!=SdrHdlKind::Move)
pRefHdl=GetHdlList().GetHdl(eRefHdl);
if (pRefHdl!=nullptr)
@@ -2530,8 +2530,8 @@ void SdrDragMirror::TakeSdrDragComment(OUString& rStr) const
bool SdrDragMirror::BeginSdrDrag()
{
- SdrHdl* pH1=GetHdlList().GetHdl(HDL_REF1);
- SdrHdl* pH2=GetHdlList().GetHdl(HDL_REF2);
+ SdrHdl* pH1=GetHdlList().GetHdl(SdrHdlKind::Ref1);
+ SdrHdl* pH2=GetHdlList().GetHdl(SdrHdlKind::Ref2);
if (pH1!=nullptr && pH2!=nullptr)
{
@@ -2635,7 +2635,7 @@ bool SdrDragGradient::BeginSdrDrag()
{
bool bRetval(false);
- pIAOHandle = static_cast<SdrHdlGradient*>(GetHdlList().GetHdl(IsGradient() ? HDL_GRAD : HDL_TRNS));
+ pIAOHandle = static_cast<SdrHdlGradient*>(GetHdlList().GetHdl(IsGradient() ? SdrHdlKind::Gradient : SdrHdlKind::Transparence));
if(pIAOHandle)
{
@@ -2924,7 +2924,7 @@ bool SdrDragCrook::BeginSdrDrag()
if (bContortionAllowed || bNoContortionAllowed)
{
- bVertical=(GetDragHdlKind()==HDL_LOWER || GetDragHdlKind()==HDL_UPPER);
+ bVertical=(GetDragHdlKind()==SdrHdlKind::Lower || GetDragHdlKind()==SdrHdlKind::Upper);
aMarkRect=GetMarkedRect();
aMarkCenter=aMarkRect.Center();
nMarkSize=bVertical ? (aMarkRect.GetHeight()-1) : (aMarkRect.GetWidth()-1);
@@ -3127,14 +3127,14 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt)
{
switch (GetDragHdlKind())
{
- case HDL_UPLFT: aNeuCenter.X()=aMarkRect.Right(); bLft=true; break;
- case HDL_UPPER: aNeuCenter.Y()=aMarkRect.Bottom(); bUpr=true; break;
- case HDL_UPRGT: aNeuCenter.X()=aMarkRect.Left(); bRgt=true; break;
- case HDL_LEFT : aNeuCenter.X()=aMarkRect.Right(); bLft=true; break;
- case HDL_RIGHT: aNeuCenter.X()=aMarkRect.Left(); bRgt=true; break;
- case HDL_LWLFT: aNeuCenter.X()=aMarkRect.Right(); bLft=true; break;
- case HDL_LOWER: aNeuCenter.Y()=aMarkRect.Top(); bLwr=true; break;
- case HDL_LWRGT: aNeuCenter.X()=aMarkRect.Left(); bRgt=true; break;
+ case SdrHdlKind::UpperLeft: aNeuCenter.X()=aMarkRect.Right(); bLft=true; break;
+ case SdrHdlKind::Upper: aNeuCenter.Y()=aMarkRect.Bottom(); bUpr=true; break;
+ case SdrHdlKind::UpperRight: aNeuCenter.X()=aMarkRect.Left(); bRgt=true; break;
+ case SdrHdlKind::Left : aNeuCenter.X()=aMarkRect.Right(); bLft=true; break;
+ case SdrHdlKind::Right: aNeuCenter.X()=aMarkRect.Left(); bRgt=true; break;
+ case SdrHdlKind::LowerLeft: aNeuCenter.X()=aMarkRect.Right(); bLft=true; break;
+ case SdrHdlKind::Lower: aNeuCenter.Y()=aMarkRect.Top(); bLwr=true; break;
+ case SdrHdlKind::LowerRight: aNeuCenter.X()=aMarkRect.Left(); bRgt=true; break;
default: bAtCenter=true;
}
}
@@ -3460,10 +3460,10 @@ bool SdrDragDistort::BeginSdrDrag()
SdrHdlKind eKind=GetDragHdlKind();
nPolyPt=0xFFFF;
- if (eKind==HDL_UPLFT) nPolyPt=0;
- if (eKind==HDL_UPRGT) nPolyPt=1;
- if (eKind==HDL_LWRGT) nPolyPt=2;
- if (eKind==HDL_LWLFT) nPolyPt=3;
+ if (eKind==SdrHdlKind::UpperLeft) nPolyPt=0;
+ if (eKind==SdrHdlKind::UpperRight) nPolyPt=1;
+ if (eKind==SdrHdlKind::LowerRight) nPolyPt=2;
+ if (eKind==SdrHdlKind::LowerLeft) nPolyPt=3;
if (nPolyPt>3) return false;
aMarkRect=GetMarkedRect();
@@ -3632,8 +3632,8 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
}
// We need to produce a reference point and two (X & Y) scales
- SdrHdl* pRef1=GetHdlList().GetHdl(HDL_UPLFT);
- SdrHdl* pRef2=GetHdlList().GetHdl(HDL_LWRGT);
+ SdrHdl* pRef1=GetHdlList().GetHdl(SdrHdlKind::UpperLeft);
+ SdrHdl* pRef2=GetHdlList().GetHdl(SdrHdlKind::LowerRight);
if (pRef1==nullptr || pRef2==nullptr)
return false;
@@ -3647,14 +3647,14 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
// Reference point is the point opposed to the dragged handle
switch(GetDragHdlKind())
{
- case HDL_UPLFT: aRef = rect.BottomRight(); break;
- case HDL_UPPER: aRef = rect.BottomCenter(); DragStat().SetHorFixed(true); break;
- case HDL_UPRGT: aRef = rect.BottomLeft(); break;
- case HDL_LEFT : aRef = rect.RightCenter(); DragStat().SetVerFixed(true); break;
- case HDL_RIGHT: aRef = rect.LeftCenter(); DragStat().SetVerFixed(true); break;
- case HDL_LWLFT: aRef = rect.TopRight(); break;
- case HDL_LOWER: aRef = rect.TopCenter(); DragStat().SetHorFixed(true); break;
- case HDL_LWRGT: aRef = rect.TopLeft(); break;
+ case SdrHdlKind::UpperLeft: aRef = rect.BottomRight(); break;
+ case SdrHdlKind::Upper: aRef = rect.BottomCenter(); DragStat().SetHorFixed(true); break;
+ case SdrHdlKind::UpperRight: aRef = rect.BottomLeft(); break;
+ case SdrHdlKind::Left : aRef = rect.RightCenter(); DragStat().SetVerFixed(true); break;
+ case SdrHdlKind::Right: aRef = rect.LeftCenter(); DragStat().SetVerFixed(true); break;
+ case SdrHdlKind::LowerLeft: aRef = rect.TopRight(); break;
+ case SdrHdlKind::Lower: aRef = rect.TopCenter(); DragStat().SetHorFixed(true); break;
+ case SdrHdlKind::LowerRight: aRef = rect.TopLeft(); break;
default: break;
}
@@ -3844,14 +3844,14 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
switch(GetDragHdlKind())
{
- case HDL_UPLFT: aLocalStart.setX(1.0); aLocalStart.setY(1.0); break;
- case HDL_UPPER: aLocalStart.setX(0.5); aLocalStart.setY(1.0); bOnAxis = true; break;
- case HDL_UPRGT: aLocalStart.setX(0.0); aLocalStart.setY(1.0); break;
- case HDL_LEFT : aLocalStart.setX(1.0); aLocalStart.setY(0.5); bOnAxis = true; break;
- case HDL_RIGHT: aLocalStart.setX(0.0); aLocalStart.setY(0.5); bOnAxis = true; break;
- case HDL_LWLFT: aLocalStart.setX(1.0); aLocalStart.setY(0.0); break;
- case HDL_LOWER: aLocalStart.setX(0.5); aLocalStart.setY(0.0); bOnAxis = true; break;
- case HDL_LWRGT: aLocalStart.setX(0.0); aLocalStart.setY(0.0); break;
+ case SdrHdlKind::UpperLeft: aLocalStart.setX(1.0); aLocalStart.setY(1.0); break;
+ case SdrHdlKind::Upper: aLocalStart.setX(0.5); aLocalStart.setY(1.0); bOnAxis = true; break;
+ case SdrHdlKind::UpperRight: aLocalStart.setX(0.0); aLocalStart.setY(1.0); break;
+ case SdrHdlKind::Left : aLocalStart.setX(1.0); aLocalStart.setY(0.5); bOnAxis = true; break;
+ case SdrHdlKind::Right: aLocalStart.setX(0.0); aLocalStart.setY(0.5); bOnAxis = true; break;
+ case SdrHdlKind::LowerLeft: aLocalStart.setX(1.0); aLocalStart.setY(0.0); break;
+ case SdrHdlKind::Lower: aLocalStart.setX(0.5); aLocalStart.setY(0.0); bOnAxis = true; break;
+ case SdrHdlKind::LowerRight: aLocalStart.setX(0.0); aLocalStart.setY(0.0); break;
default: break;
}
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 793bedc..50cead0 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -53,7 +53,7 @@ void SdrDragView::ImpClearVars()
meDragMode=SdrDragMode::Move;
mbDragLimit=false;
mbMarkedHitMovesAlways=false;
- meDragHdl=HDL_MOVE;
+ meDragHdl=SdrHdlKind::Move;
mpDragHdl=nullptr;
mbDragHdl=false;
mbDragSpecial=false;
@@ -169,7 +169,7 @@ bool SdrDragView::TakeDragObjAnchorPos(Point& rPos, bool bTR ) const
if (dynamic_cast<const SdrCaptionObj*>( pObj) != nullptr)
{
Point aPt(static_cast<SdrCaptionObj*>(pObj)->GetTailPos());
- bool bTail=meDragHdl==HDL_POLY; // drag tail
+ bool bTail=meDragHdl==SdrHdlKind::Poly; // drag tail
bool bOwn=dynamic_cast<const SdrDragObjOwn*>( mpCurrentSdrDragMethod) != nullptr; // specific to object
if (!bTail)
{ // for bTail, TakeActionRect already does the right thing
@@ -209,7 +209,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
mbDragSpecial=false;
mbDragLimit=false;
SdrDragMode eTmpMode=meDragMode;
- if (eTmpMode==SdrDragMode::Move && pHdl!=nullptr && pHdl->GetKind()!=HDL_MOVE) {
+ if (eTmpMode==SdrDragMode::Move && pHdl!=nullptr && pHdl->GetKind()!=SdrHdlKind::Move) {
eTmpMode=SdrDragMode::Resize;
}
mbDragLimit=TakeDragLimit(eTmpMode,maDragLimit);
@@ -222,10 +222,10 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
Point aPnt(rPnt);
if(pHdl == nullptr
- || pHdl->GetKind() == HDL_MOVE
- || pHdl->GetKind() == HDL_MIRX
- || pHdl->GetKind() == HDL_TRNS
- || pHdl->GetKind() == HDL_GRAD)
+ || pHdl->GetKind() == SdrHdlKind::Move
+ || pHdl->GetKind() == SdrHdlKind::MirrorAxis
+ || pHdl->GetKind() == SdrHdlKind::Transparence
+ || pHdl->GetKind() == SdrHdlKind::Gradient)
{
maDragStat.Reset(aPnt);
}
@@ -241,13 +241,13 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
maDragStat.NextPoint();
mpDragWin=pOut;
mpDragHdl=pHdl;
- meDragHdl= pHdl==nullptr ? HDL_MOVE : pHdl->GetKind();
- mbDragHdl=meDragHdl==HDL_REF1 || meDragHdl==HDL_REF2 || meDragHdl==HDL_MIRX;
+ meDragHdl= pHdl==nullptr ? SdrHdlKind::Move : pHdl->GetKind();
+ mbDragHdl=meDragHdl==SdrHdlKind::Ref1 || meDragHdl==SdrHdlKind::Ref2 || meDragHdl==SdrHdlKind::MirrorAxis;
- // Expand test for HDL_ANCHOR_TR
- bool bNotDraggable = (HDL_ANCHOR == meDragHdl || HDL_ANCHOR_TR == meDragHdl);
+ // Expand test for SdrHdlKind::Anchor_TR
+ bool bNotDraggable = (SdrHdlKind::Anchor == meDragHdl || SdrHdlKind::Anchor_TR == meDragHdl);
- if(pHdl && (pHdl->GetKind() == HDL_SMARTTAG) && pForcedMeth )
+ if(pHdl && (pHdl->GetKind() == SdrHdlKind::SmartTag) && pForcedMeth )
{
// just use the forced method for smart tags
}
@@ -263,8 +263,8 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
{
switch (meDragHdl)
{
- case HDL_LEFT: case HDL_RIGHT:
- case HDL_UPPER: case HDL_LOWER:
+ case SdrHdlKind::Left: case SdrHdlKind::Right:
+ case SdrHdlKind::Upper: case SdrHdlKind::Lower:
{
// are 3D objects selected?
bool b3DObjSelected = false;
@@ -280,8 +280,8 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
return false;
mpCurrentSdrDragMethod = new SdrDragShear(*this,meDragMode==SdrDragMode::Rotate);
} break;
- case HDL_UPLFT: case HDL_UPRGT:
- case HDL_LWLFT: case HDL_LWRGT:
+ case SdrHdlKind::UpperLeft: case SdrHdlKind::UpperRight:
+ case SdrHdlKind::LowerLeft: case SdrHdlKind::LowerRight:
{
if (meDragMode==SdrDragMode::Shear || meDragMode==SdrDragMode::Distort)
{
@@ -296,8 +296,8 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
} break;
default:
{
- if (IsMarkedHitMovesAlways() && meDragHdl==HDL_MOVE)
- { // HDL_MOVE is true, even if Obj is hit directly
+ if (IsMarkedHitMovesAlways() && meDragHdl==SdrHdlKind::Move)
+ { // SdrHdlKind::Move is true, even if Obj is hit directly
if (!IsMoveAllowed()) return false;
mpCurrentSdrDragMethod = new SdrDragMove(*this);
}
@@ -311,7 +311,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
} break;
case SdrDragMode::Mirror:
{
- if (meDragHdl==HDL_MOVE && IsMarkedHitMovesAlways())
+ if (meDragHdl==SdrHdlKind::Move && IsMarkedHitMovesAlways())
{
if (!IsMoveAllowed()) return false;
mpCurrentSdrDragMethod = new SdrDragMove(*this);
@@ -325,7 +325,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
case SdrDragMode::Crop:
{
- if (meDragHdl==HDL_MOVE && IsMarkedHitMovesAlways())
+ if (meDragHdl==SdrHdlKind::Move && IsMarkedHitMovesAlways())
{
if (!IsMoveAllowed())
return false;
@@ -342,7 +342,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
case SdrDragMode::Transparence:
{
- if(meDragHdl == HDL_MOVE && IsMarkedHitMovesAlways())
+ if(meDragHdl == SdrHdlKind::Move && IsMarkedHitMovesAlways())
{
if(!IsMoveAllowed())
return false;
@@ -359,7 +359,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
}
case SdrDragMode::Gradient:
{
- if(meDragHdl == HDL_MOVE && IsMarkedHitMovesAlways())
+ if(meDragHdl == SdrHdlKind::Move && IsMarkedHitMovesAlways())
{
if(!IsMoveAllowed())
return false;
@@ -377,7 +377,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
case SdrDragMode::Crook :
{
- if (meDragHdl==HDL_MOVE && IsMarkedHitMovesAlways())
+ if (meDragHdl==SdrHdlKind::Move && IsMarkedHitMovesAlways())
{
if (!IsMoveAllowed()) return false;
mpCurrentSdrDragMethod = new SdrDragMove(*this);
@@ -392,11 +392,11 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
default:
{
// SdrDragMode::Move
- if((meDragHdl == HDL_MOVE) && !IsMoveAllowed())
+ if((meDragHdl == SdrHdlKind::Move) && !IsMoveAllowed())
{
return false;
}
- else if(meDragHdl == HDL_GLUE)
+ else if(meDragHdl == SdrHdlKind::Glue)
{
mpCurrentSdrDragMethod = new SdrDragMove(*this);
}
@@ -404,7 +404,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
{
if(mbFramDrag)
{
- if(meDragHdl == HDL_MOVE)
+ if(meDragHdl == SdrHdlKind::Move)
{
mpCurrentSdrDragMethod = new SdrDragMove(*this);
}
@@ -432,7 +432,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl
}
else
{
- if(HDL_MOVE == meDragHdl)
+ if(SdrHdlKind::Move == meDragHdl)
{
const bool bCustomShapeSelected(1 == GetMarkedObjectCount() && dynamic_cast<const SdrObjCustomShape*>(GetMarkedObjectByIndex(0)) != nullptr);
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list