summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-21 15:33:43 +0200
committerNoel Grandin <noel@peralex.com>2015-04-22 10:28:41 +0200
commit1b5f6935a498c1d9eea35ba0aa2edd25ee11ca47 (patch)
tree40347c60c1970acf90dd6db95f4067bb4216a62e /svtools
parent38143e4599e4ec759a11ea96a4b852bb00a42ab6 (diff)
convert SV_DRAGDOP_ constants to scoped enum
Change-Id: If953610ed24a2b6d5f33f2ba014fba2ca5308d7d
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/svimpbox.cxx4
-rw-r--r--svtools/source/contnr/treelistbox.cxx26
2 files changed, 15 insertions, 15 deletions
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index c1789f3beff7..19789560e797 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -65,7 +65,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
aSelEng.ExpandSelectionOnMouseMove( false );
SetStyle( nWinStyle );
SetSelectionMode( SINGLE_SELECTION );
- SetDragDropMode( 0 );
+ SetDragDropMode( DragDropMode::NONE );
aVerSBar.SetScrollHdl( LINK( this, SvImpLBox, ScrollUpDownHdl ) );
aHorSBar.SetScrollHdl( LINK( this, SvImpLBox, ScrollLeftRightHdl ) );
@@ -2903,7 +2903,7 @@ void SvImpLBox::SetSelectionMode( SelectionMode eSelMode )
void SvImpLBox::SetDragDropMode( DragDropMode eDDMode )
{
- if( eDDMode && eDDMode != SV_DRAGDROP_APP_DROP )
+ if( eDDMode != DragDropMode::NONE && eDDMode != DragDropMode::APP_DROP )
{
aSelEng.ExpandSelectionOnMouseMove( false );
aSelEng.EnableDrag( true );
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index e08f751786af..e9cc9376a2da 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -387,7 +387,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) :
nDragOptions = DND_ACTION_COPYMOVE | DND_ACTION_LINK;
nImpFlags = 0;
pTargetEntry = 0;
- nDragDropMode = 0;
+ nDragDropMode = DragDropMode::NONE;
SvTreeList* pTempModel = new SvTreeList;
pTempModel->SetRefCount( 0 );
SetBaseModel(pTempModel);
@@ -396,7 +396,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) :
pHdlEntry = 0;
pEdCtrl = 0;
eSelMode = SINGLE_SELECTION;
- nDragDropMode = SV_DRAGDROP_NONE;
+ nDragDropMode = DragDropMode::NONE;
SetType(WINDOW_TREELISTBOX);
InitTreeView();
@@ -417,7 +417,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, const ResId& rResId) :
pTargetEntry = 0;
nImpFlags = 0;
nDragOptions = DND_ACTION_COPYMOVE | DND_ACTION_LINK;
- nDragDropMode = 0;
+ nDragDropMode = DragDropMode::NONE;
SvTreeList* pTempModel = new SvTreeList;
pTempModel->SetRefCount( 0 );
SetBaseModel(pTempModel);
@@ -532,31 +532,31 @@ bool SvTreeListBox::CheckDragAndDropMode( SvTreeListBox* pSource, sal_Int8 nActi
{
if ( pSource == this )
{
- if ( !(nDragDropMode & (SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY) ) )
+ if ( !(nDragDropMode & (DragDropMode::CTRL_MOVE | DragDropMode::CTRL_COPY) ) )
return false; // D&D locked within list
if( DND_ACTION_MOVE == nAction )
{
- if ( !(nDragDropMode & SV_DRAGDROP_CTRL_MOVE) )
+ if ( !(nDragDropMode & DragDropMode::CTRL_MOVE) )
return false; // no local move
}
else
{
- if ( !(nDragDropMode & SV_DRAGDROP_CTRL_COPY))
+ if ( !(nDragDropMode & DragDropMode::CTRL_COPY))
return false; // no local copy
}
}
else
{
- if ( !(nDragDropMode & SV_DRAGDROP_APP_DROP ) )
+ if ( !(nDragDropMode & DragDropMode::APP_DROP ) )
return false; // no drop
if ( DND_ACTION_MOVE == nAction )
{
- if ( !(nDragDropMode & SV_DRAGDROP_APP_MOVE) )
+ if ( !(nDragDropMode & DragDropMode::APP_MOVE) )
return false; // no global move
}
else
{
- if ( !(nDragDropMode & SV_DRAGDROP_APP_COPY))
+ if ( !(nDragDropMode & DragDropMode::APP_COPY))
return false; // no global copy
}
}
@@ -1197,7 +1197,7 @@ sal_Int8 SvTreeListBox::AcceptDrop( const AcceptDropEvent& rEvt )
{
ImplShowTargetEmphasis( pTargetEntry, false );
}
- else if( !nDragDropMode )
+ else if( nDragDropMode == DragDropMode::NONE )
{
SAL_WARN( "svtools.contnr", "SvTreeListBox::QueryDrop(): no target" );
}
@@ -1296,7 +1296,7 @@ void SvTreeListBox::StartDrag( sal_Int8, const Point& rPosPixel )
MouseButtonUp( aMouseEvt );
nOldDragMode = GetDragDropMode();
- if ( !nOldDragMode )
+ if ( nOldDragMode == DragDropMode::NONE )
return;
ReleaseMouse();
@@ -1313,7 +1313,7 @@ void SvTreeListBox::StartDrag( sal_Int8, const Point& rPosPixel )
::com::sun::star::datatransfer::XTransferable > xRef( pContainer );
nDragDropMode = NotifyStartDrag( *pContainer, pEntry );
- if( !nDragDropMode || 0 == GetSelectionCount() )
+ if( nDragDropMode == DragDropMode::NONE || 0 == GetSelectionCount() )
{
nDragDropMode = nOldDragMode;
DragFinished( DND_ACTION_NONE );
@@ -2797,7 +2797,7 @@ SvTreeListEntry* SvTreeListBox::GetDropTarget( const Point& rPos )
// when dropping in a vacant space, use the last entry
if( !pTarget )
return (SvTreeListEntry*)LastVisible();
- else if( (GetDragDropMode() & SV_DRAGDROP_ENABLE_TOP) &&
+ else if( (GetDragDropMode() & DragDropMode::ENABLE_TOP) &&
pTarget == First() && rPos.Y() < 6 )
return 0;