summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/moduldlg.cxx8
-rw-r--r--cui/source/customize/acccfg.cxx2
-rw-r--r--cui/source/customize/cfg.cxx8
-rw-r--r--cui/source/customize/selector.cxx2
-rw-r--r--dbaccess/source/ui/browser/dbtreeview.cxx2
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx2
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx2
-rw-r--r--dbaccess/source/ui/misc/WNameMatch.cxx2
-rw-r--r--extensions/source/propctrlr/selectlabeldialog.cxx2
-rw-r--r--extensions/source/propctrlr/taborder.cxx2
-rw-r--r--include/svtools/treelistbox.hxx27
-rw-r--r--reportdesign/source/ui/dlg/AddField.cxx2
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx2
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx2
-rw-r--r--sc/source/ui/navipi/navipi.cxx6
-rw-r--r--sd/source/ui/dlg/custsdlg.cxx2
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx10
-rw-r--r--sfx2/source/dialog/templdlg.cxx8
-rw-r--r--svtools/source/contnr/svimpbox.cxx4
-rw-r--r--svtools/source/contnr/treelistbox.cxx26
-rw-r--r--svx/source/form/datanavi.cxx2
-rw-r--r--svx/source/form/filtnav.cxx2
-rw-r--r--svx/source/form/navigatortree.cxx2
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx2
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx8
-rw-r--r--sw/source/uibase/dbui/dbtree.cxx2
-rw-r--r--sw/source/uibase/utlui/content.cxx4
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx8
-rw-r--r--sw/source/uibase/utlui/navipi.cxx6
31 files changed, 84 insertions, 77 deletions
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index dd39719b39da..5929511f8ae6 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -141,14 +141,14 @@ bool ExtTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewT
DragDropMode ExtTreeListBox::NotifyStartDrag( TransferDataContainer&, SvTreeListEntry* pEntry )
{
- DragDropMode nMode_ = SV_DRAGDROP_NONE;
+ DragDropMode nMode_ = DragDropMode::NONE;
if ( pEntry )
{
sal_uInt16 nDepth = GetModel()->GetDepth( pEntry );
if ( nDepth >= 2 )
{
- nMode_ = SV_DRAGDROP_CTRL_COPY;
+ nMode_ = DragDropMode::CTRL_COPY;
EntryDescriptor aDesc = GetEntryDescriptor(pEntry);
ScriptDocument aDocument( aDesc.GetDocument() );
OUString aLibName( aDesc.GetLibName() );
@@ -170,7 +170,7 @@ DragDropMode ExtTreeListBox::NotifyStartDrag( TransferDataContainer&, SvTreeList
bAllowMove = ( xSourceMgr->getLocales().getLength() == 0 );
}
if( bAllowMove )
- nMode_ |= SV_DRAGDROP_CTRL_MOVE;
+ nMode_ |= DragDropMode::CTRL_MOVE;
}
}
}
@@ -577,7 +577,7 @@ ObjectPage::ObjectPage(vcl::Window *pParent, const OString &rName, sal_uInt16 nM
m_pNewModButton->Hide();
}
- m_pBasicBox->SetDragDropMode( SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY );
+ m_pBasicBox->SetDragDropMode( DragDropMode::CTRL_MOVE | DragDropMode::CTRL_COPY );
m_pBasicBox->EnableInplaceEditing(true);
m_pBasicBox->SetMode( nMode );
m_pBasicBox->SetStyle( WB_BORDER | WB_TABSTOP |
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index f26e00ccd606..05aa1343d5c8 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -776,7 +776,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( vcl::Window* pParent, const
m_pEntriesBox->SetTabs(&AccCfgTabs[0], MAP_APPFONT);
m_pEntriesBox->Resize(); // OS: Hack for right selection
m_pEntriesBox->SetSpaceBetweenEntries(0);
- m_pEntriesBox->SetDragDropMode(0);
+ m_pEntriesBox->SetDragDropMode(DragDropMode::NONE);
// detect max keyname width
long nMaxWidth = 0;
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 5d6b74ae0b81..aa1cd010af66 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1389,10 +1389,10 @@ SvxMenuEntriesListBox::SvxMenuEntriesListBox(vcl::Window* pParent, SvxConfigPage
SetHighlightRange();
SetSelectionMode(SINGLE_SELECTION);
- SetDragDropMode( SV_DRAGDROP_CTRL_MOVE |
- SV_DRAGDROP_APP_COPY |
- SV_DRAGDROP_ENABLE_TOP |
- SV_DRAGDROP_APP_DROP);
+ SetDragDropMode( DragDropMode::CTRL_MOVE |
+ DragDropMode::APP_COPY |
+ DragDropMode::ENABLE_TOP |
+ DragDropMode::APP_DROP);
}
SvxMenuEntriesListBox::~SvxMenuEntriesListBox()
diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx
index 761cd4f831d0..5a5723d81c19 100644
--- a/cui/source/customize/selector.cxx
+++ b/cui/source/customize/selector.cxx
@@ -873,7 +873,7 @@ SvxScriptSelectorDialog::SvxScriptSelectorDialog(
// If we are showing Slot API commands update labels in the UI, and
// enable drag'n'drop
SetText(CUI_RESSTR(RID_SVXSTR_SELECTOR_ADD_COMMANDS));
- m_pCommands->SetDragDropMode( SV_DRAGDROP_APP_COPY );
+ m_pCommands->SetDragDropMode( DragDropMode::APP_COPY );
get(m_pCancelButton, "close");
get(m_pDialogDescription, "helptoolbar");
diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx
index 2d140c3b1326..9dba9af17c20 100644
--- a/dbaccess/source/ui/browser/dbtreeview.cxx
+++ b/dbaccess/source/ui/browser/dbtreeview.cxx
@@ -38,7 +38,7 @@ DBTreeView::DBTreeView( vcl::Window* pParent, WinBits nBits)
m_pTreeListBox = new DBTreeListBox(this, WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT);
m_pTreeListBox->EnableCheckButton(NULL);
- m_pTreeListBox->SetDragDropMode( 0 );
+ m_pTreeListBox->SetDragDropMode( DragDropMode::NONE );
m_pTreeListBox->EnableInplaceEditing( true );
m_pTreeListBox->SetHelpId(HID_TLB_TREELISTBOX);
m_pTreeListBox->Show();
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 9d7cacc9512a..70ba97341669 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -324,7 +324,7 @@ OExceptionChainDialog::OExceptionChainDialog(vcl::Window* pParent, const Excepti
m_sErrorCodeLabel = ModuleRes( STR_EXCEPTION_ERRORCODE );
m_pExceptionList->SetSelectionMode(SINGLE_SELECTION);
- m_pExceptionList->SetDragDropMode(0);
+ m_pExceptionList->SetDragDropMode(DragDropMode::NONE);
m_pExceptionList->EnableInplaceEditing(false);
m_pExceptionList->SetStyle(m_pExceptionList->GetStyle() | WB_HASLINES | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL);
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index ee89c63ef83a..3a1ef5dc854e 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -87,7 +87,7 @@ namespace dbaui
// initialize the TabListBox
m_pTablesList->SetSelectionMode( MULTIPLE_SELECTION );
- m_pTablesList->SetDragDropMode( 0 );
+ m_pTablesList->SetDragDropMode( DragDropMode::NONE );
m_pTablesList->EnableInplaceEditing( false );
m_pTablesList->SetStyle(m_pTablesList->GetStyle() | WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT);
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 52af008b4979..aa35ed9d6c16 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -350,7 +350,7 @@ OColumnTreeBox::OColumnTreeBox( vcl::Window* pParent, WinBits nBits )
: OMarkableTreeListBox(pParent, nBits)
, m_bReadOnly(false)
{
- SetDragDropMode( 0 );
+ SetDragDropMode( DragDropMode::NONE );
EnableInplaceEditing( false );
SetStyle(GetStyle() | WB_BORDER | WB_HASBUTTONS | WB_HSCROLL | nBits);
SetSelectionMode( SINGLE_SELECTION );
diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx
index 79f37b5602b1..27ed6d5d1799 100644
--- a/extensions/source/propctrlr/selectlabeldialog.cxx
+++ b/extensions/source/propctrlr/selectlabeldialog.cxx
@@ -61,7 +61,7 @@ namespace pcr
// initialize the TreeListBox
m_pControlTree->SetSelectionMode( SINGLE_SELECTION );
- m_pControlTree->SetDragDropMode( 0 );
+ m_pControlTree->SetDragDropMode( DragDropMode::NONE );
m_pControlTree->EnableInplaceEditing( false );
m_pControlTree->SetStyle(m_pControlTree->GetStyle() | WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL);
diff --git a/extensions/source/propctrlr/taborder.cxx b/extensions/source/propctrlr/taborder.cxx
index 2036f0834a07..80a10be07203 100644
--- a/extensions/source/propctrlr/taborder.cxx
+++ b/extensions/source/propctrlr/taborder.cxx
@@ -292,7 +292,7 @@ namespace pcr
TabOrderListBox::TabOrderListBox( vcl::Window* pParent, WinBits nBits )
:SvTreeListBox( pParent, nBits )
{
- SetDragDropMode(0xFFFF/*SV_DRAGDROP_CTRL_MOVE*/);
+ SetDragDropMode(DragDropMode::ALL/*DragDropMode::CTRL_MOVE*/);
// Hmm. The flag alone is not enough, so to be on the safe side ...
SetSelectionMode( MULTIPLE_SELECTION );
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index f06c3c6b6e67..cd0ab60f1efa 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -197,16 +197,23 @@ inline void delete_clone(const SvLBoxItem* p)
#define WB_FORCE_SELECTION ((WinBits)0x8000)
-#define DragDropMode sal_uInt16
-#define SV_DRAGDROP_NONE (DragDropMode)0x0000
-#define SV_DRAGDROP_CTRL_MOVE (DragDropMode)0x0001
-#define SV_DRAGDROP_CTRL_COPY (DragDropMode)0x0002
-#define SV_DRAGDROP_APP_MOVE (DragDropMode)0x0004
-#define SV_DRAGDROP_APP_COPY (DragDropMode)0x0008
-#define SV_DRAGDROP_APP_DROP (DragDropMode)0x0010
-// Entries may be dropped via the uppermost Entry
-// The DropTarget is 0 in that case
-#define SV_DRAGDROP_ENABLE_TOP (DragDropMode)0x0020
+enum class DragDropMode
+{
+ NONE = 0x0000,
+ CTRL_MOVE = 0x0001,
+ CTRL_COPY = 0x0002,
+ APP_MOVE = 0x0004,
+ APP_COPY = 0x0008,
+ APP_DROP = 0x0010,
+ // Entries may be dropped via the uppermost Entry
+ // The DropTarget is 0 in that case
+ ENABLE_TOP = 0x0020,
+ ALL = 0x003f,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<DragDropMode> : is_typed_flags<DragDropMode, 0x003f> {};
+}
#define SVLBOX_IN_EDT 0x0001
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index d1e646097710..d9c6e05b8608 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -106,7 +106,7 @@ OAddFieldWindowListBox::OAddFieldWindowListBox( OAddFieldWindow* _pParent )
{
SetHelpId( HID_RPT_FIELD_SEL );
SetSelectionMode(MULTIPLE_SELECTION);
- SetDragDropMode( 0xFFFF );
+ SetDragDropMode( DragDropMode::ALL );
SetHighlightRange( );
}
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index d36b7615b6f6..a85071eebd3f 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -243,7 +243,7 @@ NavigatorTree::NavigatorTree( vcl::Window* pParent,OReportController& _rControll
m_aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE )
);
- SetDragDropMode(0xFFFF);
+ SetDragDropMode(DragDropMode::ALL);
EnableInplaceEditing( false );
SetSelectionMode(MULTIPLE_SELECTION);
Clear();
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
index 0a54325891d2..e0423626febc 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
@@ -24,7 +24,7 @@ ScPivotLayoutTreeListBase::ScPivotLayoutTreeListBase(vcl::Window* pParent, WinBi
, mpParent(NULL)
{
SetHighlightRange();
- SetDragDropMode(SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_APP_MOVE | SV_DRAGDROP_APP_DROP);
+ SetDragDropMode(DragDropMode::CTRL_MOVE | DragDropMode::APP_MOVE | DragDropMode::APP_DROP);
}
ScPivotLayoutTreeListBase::~ScPivotLayoutTreeListBase()
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index 12643fc22c61..f76265dbf9b0 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -59,7 +59,7 @@ ScTpSubTotalGroup::ScTpSubTotalGroup( vcl::Window* pParent,
// Font is correctly initialized by SvTreeListBox ctor
mpLbColumns->SetSelectionMode( SINGLE_SELECTION );
- mpLbColumns->SetDragDropMode( SV_DRAGDROP_NONE );
+ mpLbColumns->SetDragDropMode( DragDropMode::NONE );
mpLbColumns->SetSpaceBetweenEntries( 0 );
Init ();
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 1a6178319f82..d3c47ccf9728 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -635,9 +635,9 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, vcl
aLbEntries.SetSpaceBetweenEntries(0);
aLbEntries.SetSelectionMode( SINGLE_SELECTION );
- aLbEntries.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE |
- SV_DRAGDROP_CTRL_COPY |
- SV_DRAGDROP_ENABLE_TOP );
+ aLbEntries.SetDragDropMode( DragDropMode::CTRL_MOVE |
+ DragDropMode::CTRL_COPY |
+ DragDropMode::ENABLE_TOP );
// was a category chosen as root?
sal_uInt16 nLastRoot = rCfg.GetRootType();
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index d1c023e9b387..45355fee5ad7 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -327,7 +327,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( vcl::Window* pWindow,
rpCustomShow->SetName( m_pEdtName->GetText() );
}
- m_pLbCustomPages->SetDragDropMode( SV_DRAGDROP_CTRL_MOVE );
+ m_pLbCustomPages->SetDragDropMode( DragDropMode::CTRL_MOVE );
m_pLbCustomPages->SetHighlightRange();
m_pBtnOK->Enable( false );
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 2599f3be7c65..6ea85b4c2f79 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -218,8 +218,8 @@ SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, const SdResId& rSdResId )
Image(Bitmap( SdResId(BMP_COLLAPSE) )));
SetDragDropMode(
- SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY |
- SV_DRAGDROP_APP_MOVE | SV_DRAGDROP_APP_COPY | SV_DRAGDROP_APP_DROP );
+ DragDropMode::CTRL_MOVE | DragDropMode::CTRL_COPY |
+ DragDropMode::APP_MOVE | DragDropMode::APP_COPY | DragDropMode::APP_DROP );
}
SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, WinBits nStyle )
@@ -249,8 +249,8 @@ SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, WinBits nStyle )
Image(Bitmap( SdResId(BMP_COLLAPSE) )));
SetDragDropMode(
- SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY |
- SV_DRAGDROP_APP_MOVE | SV_DRAGDROP_APP_COPY | SV_DRAGDROP_APP_DROP );
+ DragDropMode::CTRL_MOVE | DragDropMode::CTRL_COPY |
+ DragDropMode::APP_MOVE | DragDropMode::APP_COPY | DragDropMode::APP_DROP );
}
SdPageObjsTLB::~SdPageObjsTLB()
@@ -1292,7 +1292,7 @@ sal_Int8 SdPageObjsTLB::AcceptDrop (const AcceptDropEvent& rEvent)
{
ImplShowTargetEmphasis( pTargetEntry, false );
}
- else if( !GetDragDropMode() )
+ else if( GetDragDropMode() == DragDropMode::NONE )
{
SAL_WARN( "sc.ui", "SdPageObjsTLB::AcceptDrop(): no target" );
}
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 819af4751f74..c0c98b8cbc0f 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1033,9 +1033,9 @@ void SfxCommonTemplateDialog_Impl::EnableTreeDrag( bool bEnable )
if ( pTreeBox )
{
if ( pStyle && pStyle->HasParentSupport() && bEnable )
- pTreeBox->SetDragDropMode(SV_DRAGDROP_CTRL_MOVE);
+ pTreeBox->SetDragDropMode(DragDropMode::CTRL_MOVE);
else
- pTreeBox->SetDragDropMode(SV_DRAGDROP_NONE);
+ pTreeBox->SetDragDropMode(DragDropMode::NONE);
}
}
bTreeDrag = bEnable;
@@ -1054,9 +1054,9 @@ void SfxCommonTemplateDialog_Impl::FillTreeBox()
SfxStyleSheetBase* pStyle = pStyleSheetPool->First();
if(pStyle && pStyle->HasParentSupport() && bTreeDrag )
- pTreeBox->SetDragDropMode(SV_DRAGDROP_CTRL_MOVE);
+ pTreeBox->SetDragDropMode(DragDropMode::CTRL_MOVE);
else
- pTreeBox->SetDragDropMode(SV_DRAGDROP_NONE);
+ pTreeBox->SetDragDropMode(DragDropMode::NONE);
while (pStyle)
{
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;
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 3e77a89b03f6..0956934e8344 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -137,7 +137,7 @@ namespace svxform
EnableContextMenuHandling();
if ( DGTInstance == m_eGroup )
- SetDragDropMode( SV_DRAGDROP_CTRL_MOVE |SV_DRAGDROP_CTRL_COPY | SV_DRAGDROP_APP_COPY );
+ SetDragDropMode( DragDropMode::CTRL_MOVE |DragDropMode::CTRL_COPY | DragDropMode::APP_COPY );
}
DataTreeListBox::~DataTreeListBox()
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 97744603341b..bc19f378f9bc 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1141,7 +1141,7 @@ FmFilterNavigator::FmFilterNavigator( vcl::Window* pParent )
EnableInplaceEditing( true );
SetSelectionMode(MULTIPLE_SELECTION);
- SetDragDropMode(0xFFFF);
+ SetDragDropMode(DragDropMode::ALL);
m_aDropActionTimer.SetTimeoutHdl(LINK(this, FmFilterNavigator, OnDropActionTimer));
}
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 46a444d35bff..e2b9247aa7bd 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -143,7 +143,7 @@ namespace svxform
m_aNavigatorImages.GetImage( RID_SVXIMG_EXPANDEDNODE )
);
- SetDragDropMode(0xFFFF);
+ SetDragDropMode(DragDropMode::ALL);
EnableInplaceEditing( true );
SetSelectionMode(MULTIPLE_SELECTION);
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 58d0fc443810..44d7ff52b384 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -1194,7 +1194,7 @@ DDListBox::DDListBox(vcl::Window* pParent, WinBits nStyle)
SetStyle( GetStyle() | /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/
WB_CLIPCHILDREN );
SetSelectionMode( SINGLE_SELECTION );
- SetDragDropMode( SV_DRAGDROP_CTRL_COPY );
+ SetDragDropMode( DragDropMode::CTRL_COPY );
EnableAsyncDrag(true);
// expand selection to the complete width of the ListBox
SetHighlightRange();
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index e701558e985a..f780d35f3446 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -57,7 +57,7 @@ SwAddressTable::SwAddressTable(SvSimpleTableContainer& rParent, WinBits nBits)
{
SetSpaceBetweenEntries(3);
SetSelectionMode(SINGLE_SELECTION);
- SetDragDropMode(0);
+ SetDragDropMode(DragDropMode::NONE);
EnableAsyncDrag(false);
}
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 0c2960398514..858fd69bdd3a 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -812,7 +812,7 @@ SwGlTreeListBox::SwGlTreeListBox(vcl::Window* pParent, WinBits nBits)
, sReadonly(SW_RESSTR(SW_STR_READONLY)),
pDragEntry(0)
{
- SetDragDropMode( SV_DRAGDROP_CTRL_MOVE|SV_DRAGDROP_CTRL_COPY );
+ SetDragDropMode( DragDropMode::CTRL_MOVE|DragDropMode::CTRL_COPY );
}
Size SwGlTreeListBox::GetOptimalSize() const
@@ -892,7 +892,7 @@ DragDropMode SwGlTreeListBox::NotifyStartDrag(
DragDropMode eRet;
pDragEntry = pEntry;
if(!GetParent(pEntry))
- eRet = SV_DRAGDROP_NONE;
+ eRet = DragDropMode::NONE;
else
{
SwGlossaryDlg* pDlg = static_cast<SwGlossaryDlg*>(GetParentDialog());
@@ -903,10 +903,10 @@ DragDropMode SwGlTreeListBox::NotifyStartDrag(
+ OUStringLiteral1<GLOS_DELIM>()
+ OUString::number(pGroupData->nPathIdx);
sal_Int8 nDragOption = DND_ACTION_COPY;
- eRet = SV_DRAGDROP_CTRL_COPY;
+ eRet = DragDropMode::CTRL_COPY;
if(!pDlg->pGlossaryHdl->IsReadOnly(&sEntry))
{
- eRet |= SV_DRAGDROP_CTRL_MOVE;
+ eRet |= DragDropMode::CTRL_MOVE;
nDragOption |= DND_ACTION_MOVE;
}
SetDragOptions( nDragOption );
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index 2ad207ce04f3..64bcf9c87ae8 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -210,7 +210,7 @@ void SwDBTreeList::InitTreeList()
SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE),
aImageList.GetImage(IMG_EXPAND ) );
- SetDragDropMode(SV_DRAGDROP_APP_COPY);
+ SetDragDropMode(DragDropMode::APP_COPY);
GetModel()->SetCompareHdl(LINK(this, SwDBTreeList, DBCompare));
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index b41cbf5e998c..282a72749611 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -816,7 +816,7 @@ SwContentTree::SwContentTree(vcl::Window* pParent, const ResId& rResId)
SetNodeDefaultImages();
SetDoubleClickHdl(LINK(this, SwContentTree, ContentDoubleClickHdl));
- SetDragDropMode(SV_DRAGDROP_APP_COPY);
+ SetDragDropMode(DragDropMode::APP_COPY);
for (sal_uInt16 i = 0; i < CONTENT_TYPE_MAX; i++)
{
aActiveContentArr[i] = 0;
@@ -2492,7 +2492,7 @@ DragDropMode SwContentTree::NotifyStartDrag(
&& !GetWrtShell()->GetView().GetDocShell()->IsReadOnly())
eMode = GetDragDropMode();
else if(!bIsActive && GetWrtShell()->GetView().GetDocShell()->HasName())
- eMode = SV_DRAGDROP_APP_COPY;
+ eMode = DragDropMode::APP_COPY;
sal_Int8 nDragMode;
FillTransferData( rContainer, nDragMode );
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index e794c98b3687..2f4b0a5009f6 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -161,9 +161,9 @@ SwGlobalTree::SwGlobalTree(vcl::Window* pParent, const ResId& rResId) :
bIsImageListInitialized ( false )
{
- SetDragDropMode(SV_DRAGDROP_APP_COPY |
- SV_DRAGDROP_CTRL_MOVE |
- SV_DRAGDROP_ENABLE_TOP );
+ SetDragDropMode(DragDropMode::APP_COPY |
+ DragDropMode::CTRL_MOVE |
+ DragDropMode::ENABLE_TOP );
aUpdateTimer.SetTimeout(GLOBAL_UPDATE_TIMEOUT);
aUpdateTimer.SetTimeoutHdl(LINK(this, SwGlobalTree, Timeout));
@@ -525,7 +525,7 @@ DragDropMode SwGlobalTree::NotifyStartDrag( TransferDataContainer& ,
{
bIsInternalDrag = true;
pDDSource = pEntry;
- return SV_DRAGDROP_CTRL_MOVE;
+ return DragDropMode::CTRL_MOVE;
}
sal_IntPtr SwGlobalTree::GetTabPos( SvTreeListEntry*, SvLBoxTab* pTab)
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 2d7c6c7903da..946d409c1e58 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -763,9 +763,9 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE );
aContentTree.SetSpaceBetweenEntries(3);
aContentTree.SetSelectionMode( SINGLE_SELECTION );
- aContentTree.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE |
- SV_DRAGDROP_CTRL_COPY |
- SV_DRAGDROP_ENABLE_TOP );
+ aContentTree.SetDragDropMode( DragDropMode::CTRL_MOVE |
+ DragDropMode::CTRL_COPY |
+ DragDropMode::ENABLE_TOP );
aContentTree.EnableAsyncDrag(true);
aContentTree.ShowTree();
aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, true);