Convert SelectionMode to scoped enum

Change-Id: I86c435de3918540cb54a0cb24568e58456c2f9d1
Reviewed-on: https://gerrit.libreoffice.org/25611
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin 2016-05-29 17:12:52 +02:00
parent 8ac4240efe
commit c47b170c71
79 changed files with 171 additions and 171 deletions

View File

@ -582,7 +582,7 @@ namespace accessibility
{
rStateSet.AddState( AccessibleStateType::FOCUSABLE );
rStateSet.AddState( AccessibleStateType::MANAGES_DESCENDANTS );
if ( getListBox()->GetSelectionMode() == MULTIPLE_SELECTION )
if ( getListBox()->GetSelectionMode() == SelectionMode::Multiple )
rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE );
}
}

View File

@ -1851,7 +1851,7 @@ StackWindow::StackWindow (Layout* pParent) :
aTreeListBox->SetAccessibleName(IDEResId(RID_STR_STACKNAME).toString());
aTreeListBox->SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight ) );
aTreeListBox->SetHighlightRange();
aTreeListBox->SetSelectionMode( NO_SELECTION );
aTreeListBox->SetSelectionMode( SelectionMode::NONE );
aTreeListBox->InsertEntry( OUString() );
aTreeListBox->Show();
@ -1906,7 +1906,7 @@ void StackWindow::UpdateCalls()
if (StarBASIC::IsRunning())
{
SbxError eOld = SbxBase::GetError();
aTreeListBox->SetSelectionMode( SINGLE_SELECTION );
aTreeListBox->SetSelectionMode( SelectionMode::Single );
sal_Int32 nScope = 0;
SbMethod* pMethod = StarBASIC::GetActiveMethod( nScope );
@ -1966,7 +1966,7 @@ void StackWindow::UpdateCalls()
}
else
{
aTreeListBox->SetSelectionMode( NO_SELECTION );
aTreeListBox->SetSelectionMode( SelectionMode::NONE );
aTreeListBox->InsertEntry( OUString() );
}

View File

@ -180,7 +180,7 @@ TreeListBox::TreeListBox (vcl::Window* pParent, WinBits nStyle)
void TreeListBox::Init()
{
SetNodeDefaultImages();
SetSelectionMode( SINGLE_SELECTION );
SetSelectionMode( SelectionMode::Single );
nMode = 0xFF; // everything
}

View File

@ -70,7 +70,7 @@ MacroChooser::MacroChooser( vcl::Window* pParnt, bool bCreateEntries )
get(m_pNewLibButton, "newlibrary");
get(m_pNewModButton, "newmodule");
m_pMacroBox->SetSelectionMode( SINGLE_SELECTION );
m_pMacroBox->SetSelectionMode( SelectionMode::Single );
m_pMacroBox->SetHighlightRange(); // select over the whole width
m_pRunButton->SetClickHdl( LINK( this, MacroChooser, ButtonHdl ) );

View File

@ -795,7 +795,7 @@ SfxAcceleratorConfigPage::SfxAcceleratorConfigPage( vcl::Window* pParent, const
// initialize Entriesbox
m_pEntriesBox->SetStyle(m_pEntriesBox->GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN);
m_pEntriesBox->SetSelectionMode(SINGLE_SELECTION);
m_pEntriesBox->SetSelectionMode(SelectionMode::Single);
m_pEntriesBox->SetTabs(&AccCfgTabs[0]);
m_pEntriesBox->Resize(); // OS: Hack for right selection
m_pEntriesBox->SetSpaceBetweenEntries(0);

View File

@ -1622,7 +1622,7 @@ SvxMenuEntriesListBox::SvxMenuEntriesListBox(vcl::Window* pParent, SvxConfigPage
SetEntryHeight( ENTRY_HEIGHT );
SetHighlightRange();
SetSelectionMode(SINGLE_SELECTION);
SetSelectionMode(SelectionMode::Single);
SetDragDropMode( DragDropMode::CTRL_MOVE |
DragDropMode::APP_COPY |

View File

@ -727,7 +727,7 @@ void SvxMacroTabPage_::InitAndSetHandler( const Reference< container::XNameRepla
rListBox.SetSelectHdl( LINK( this, SvxMacroTabPage_, SelectEvent_Impl ));
rListBox.SetSelectionMode( SINGLE_SELECTION );
rListBox.SetSelectionMode( SelectionMode::Single );
rListBox.SetTabs( &nTabs[0] );
Size aSize( nTabs[ 2 ], 0 );
rHeaderBar.InsertItem( ITEMID_EVENT, mpImpl->sStrEvent, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );

View File

@ -1117,7 +1117,7 @@ namespace svx
m_pDictsLB->set_height_request(m_pDictsLB->GetTextHeight() * 5);
m_pDictsLB->set_width_request(m_pDictsLB->approximate_char_width() * 32);
m_pDictsLB->SetStyle( m_pDictsLB->GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE );
m_pDictsLB->SetSelectionMode( SINGLE_SELECTION );
m_pDictsLB->SetSelectionMode( SelectionMode::Single );
m_pDictsLB->SetHighlightRange();
m_pDictsLB->SetSelectHdl( LINK( this, HangulHanjaOptionsDialog, DictsLB_SelectHdl ) );
m_pDictsLB->SetDeselectHdl( LINK( this, HangulHanjaOptionsDialog, DictsLB_SelectHdl ) );

View File

@ -182,7 +182,7 @@ IconChoiceDialog::IconChoiceDialog ( vcl::Window* pParent, const OUString& rID,
m_pIconCtrl->SetClickHdl ( LINK ( this, IconChoiceDialog , ChosePageHdl_Impl ) );
m_pIconCtrl->Show();
m_pIconCtrl->SetChoiceWithCursor();
m_pIconCtrl->SetSelectionMode( SINGLE_SELECTION );
m_pIconCtrl->SetSelectionMode( SelectionMode::Single );
m_pIconCtrl->SetHelpId( HID_ICCDIALOG_CHOICECTRL );
// ItemSet

View File

@ -112,7 +112,7 @@ SvBaseLinksDlg::SvBaseLinksDlg( vcl::Window * pParent, LinkManager* pMgr, bool b
get(m_pPbChangeSource, "CHANGE_SOURCE");
get(m_pPbBreakLink, "BREAK_LINK");
m_pTbLinks->SetSelectionMode( MULTIPLE_SELECTION );
m_pTbLinks->SetSelectionMode( SelectionMode::Multiple );
m_pTbLinks->SetTabs( &nTabs[0] );
FixedText *pFtFiles = get<FixedText>("FILES");
pFtFiles->set_width_request(LogicToPixel(Size(nTabs[2] - nTabs[1] - 2, 0), MAP_APPFONT).Width());

View File

@ -84,7 +84,7 @@ SFTreeListBox::SFTreeListBox(vcl::Window* pParent)
, m_sMyMacros(CUI_RESSTR(RID_SVXSTR_MYMACROS))
, m_sProdMacros(CUI_RESSTR(RID_SVXSTR_PRODMACROS))
{
SetSelectionMode( SINGLE_SELECTION );
SetSelectionMode( SelectionMode::Single );
SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL |
WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HIDESELECTION |

View File

@ -147,7 +147,7 @@ DbRegistrationOptionsPage::DbRegistrationOptionsPage( vcl::Window* pParent, cons
m_pPathBox->SetStyle( m_pPathBox->GetStyle()|nBits );
m_pPathBox->SetDoubleClickHdl( LINK( this, DbRegistrationOptionsPage, PathBoxDoubleClickHdl ) );
m_pPathBox->SetSelectHdl( LINK( this, DbRegistrationOptionsPage, PathSelect_Impl ) );
m_pPathBox->SetSelectionMode( SINGLE_SELECTION );
m_pPathBox->SetSelectionMode( SelectionMode::Single );
m_pPathBox->SetPosSizePixel( Point( 0, aHeadSize.Height() ),
Size( aBoxSize.Width(), aBoxSize.Height() - aHeadSize.Height() ) );
m_pPathBox->SvSimpleTable::SetTabs( aTabs );

View File

@ -67,7 +67,7 @@ SvxFontSubstTabPage::SvxFontSubstTabPage( vcl::Window* pParent,
m_pCheckLB->SetHelpId(HID_OFA_FONT_SUBST_CLB);
m_pCheckLB->SetStyle(m_pCheckLB->GetStyle()|WB_HSCROLL|WB_VSCROLL);
m_pCheckLB->SetSelectionMode(MULTIPLE_SELECTION);
m_pCheckLB->SetSelectionMode(SelectionMode::Multiple);
m_pCheckLB->SortByCol(2);
long aStaticTabs[] = { 4, 0, 0, 0, 0 };
m_pCheckLB->SvSimpleTable::SetTabs(&aStaticTabs[0]);

View File

@ -231,7 +231,7 @@ SvxPathTabPage::SvxPathTabPage(vcl::Window* pParent, const SfxItemSet& rSet)
pPathBox->SetDoubleClickHdl( LINK( this, SvxPathTabPage, DoubleClickPathHdl_Impl ) );
pPathBox->SetSelectHdl( LINK( this, SvxPathTabPage, PathSelect_Impl ) );
pPathBox->SetSelectionMode( MULTIPLE_SELECTION );
pPathBox->SetSelectionMode( SelectionMode::Multiple );
pPathBox->SetHighlightRange();
xDialogListener->SetDialogClosedLink( LINK( this, SvxPathTabPage, DialogClosedHdl ) );

View File

@ -785,7 +785,7 @@ void OfaTreeOptionsDialog::InitTreeAndHandler()
WB_HASLINES | WB_HASLINESATROOT |
WB_CLIPCHILDREN | WB_HSCROLL | WB_FORCE_MAKEVISIBLE | WB_QUICK_SEARCH );
pTreeLB->SetSpaceBetweenEntries( 0 );
pTreeLB->SetSelectionMode( SINGLE_SELECTION );
pTreeLB->SetSelectionMode( SelectionMode::Single );
pTreeLB->SetSublistOpenWithLeftRight();
pTreeLB->SetExpandedHdl( LINK( this, OfaTreeOptionsDialog, ExpandedHdl_Impl ) );
pTreeLB->SetSelectHdl( LINK( this, OfaTreeOptionsDialog, ShowPageHdl_Impl ) );

View File

@ -383,7 +383,7 @@ void SfxMacroTabPage_::InitAndSetHandler()
mpImpl->pGroupLB->SetSelectHdl( LINK( this, SfxMacroTabPage_, SelectGroup_Impl ));
mpImpl->pMacroLB->SetSelectHdl( LINK( this, SfxMacroTabPage_, SelectMacro_Impl ));
rListBox.SetSelectionMode( SINGLE_SELECTION );
rListBox.SetSelectionMode( SelectionMode::Single );
rListBox.SetTabs( &nTabs[0] );
Size aSize( nTabs[ 2 ], 0 );
rHeaderBar.InsertItem( ITEMID_EVENT, mpImpl->sStrEvent, LogicToPixel( aSize, MapMode( MAP_APPFONT ) ).Width() );

View File

@ -738,7 +738,7 @@ DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, cons
_pTreeView->SetStyle(_pTreeView->GetStyle() | WB_HASLINES | WB_SORT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT | WB_TABSTOP);
_pTreeView->GetModel()->SetSortMode(SortAscending);
_pTreeView->EnableCheckButton( nullptr ); // do not show any buttons
_pTreeView->SetSelectionMode(MULTIPLE_SELECTION);
_pTreeView->SetSelectionMode(SelectionMode::Multiple);
_pTreeView->SetDefaultCollapsedEntryBmp( _rImage );
_pTreeView->SetDefaultExpandedEntryBmp( _rImage );

View File

@ -79,7 +79,7 @@ OCreationList::OCreationList( OTasksWindow& _rParent )
{
sal_uInt16 nSize = SPACEBETWEENENTRIES;
SetSpaceBetweenEntries(nSize);
SetSelectionMode( NO_SELECTION );
SetSelectionMode( SelectionMode::NONE );
SetExtendedWinBits( EWB_NO_AUTO_CURENTRY );
SetNodeDefaultImages( );
EnableEntryMnemonics();

View File

@ -57,7 +57,7 @@ OApplicationIconControl::OApplicationIconControl(vcl::Window* _pParent)
}
SetChoiceWithCursor();
SetSelectionMode(SINGLE_SELECTION);
SetSelectionMode(SelectionMode::Single);
}
OApplicationIconControl::~OApplicationIconControl()

View File

@ -344,12 +344,12 @@ OAddTableDlg::OAddTableDlg( vcl::Window* pParent, IAddTableDialogContext& _rCont
m_pTableList->EnableInplaceEditing( false );
m_pTableList->SetStyle(m_pTableList->GetStyle() | WB_BORDER | WB_HASLINES |WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HASLINESATROOT | WB_SORT | WB_HSCROLL );
m_pTableList->EnableCheckButton( nullptr ); // do not show any buttons
m_pTableList->SetSelectionMode( SINGLE_SELECTION );
m_pTableList->SetSelectionMode( SelectionMode::Single );
m_pTableList->notifyHiContrastChanged();
m_pTableList->suppressEmptyFolders();
m_pQueryList->EnableInplaceEditing( false );
m_pQueryList->SetSelectionMode( SINGLE_SELECTION );
m_pQueryList->SetSelectionMode( SelectionMode::Single );
if ( !m_rContext.allowQueries() )
{

View File

@ -211,7 +211,7 @@ namespace dbaui
m_pIndexList->SetSelectHdl(LINK(this, DbaIndexDialog, OnIndexSelected));
m_pIndexList->SetEndEditHdl(LINK(this, DbaIndexDialog, OnEntryEdited));
m_pIndexList->SetSelectionMode(SINGLE_SELECTION);
m_pIndexList->SetSelectionMode(SelectionMode::Single);
m_pIndexList->SetHighlightRange();
m_pIndexList->setConnection(m_xConnection);

View File

@ -314,7 +314,7 @@ OExceptionChainDialog::OExceptionChainDialog(vcl::Window* pParent, const Excepti
m_sStatusLabel = ModuleRes( STR_EXCEPTION_STATUS );
m_sErrorCodeLabel = ModuleRes( STR_EXCEPTION_ERRORCODE );
m_pExceptionList->SetSelectionMode(SINGLE_SELECTION);
m_pExceptionList->SetSelectionMode(SelectionMode::Single);
m_pExceptionList->SetDragDropMode(DragDropMode::NONE);
m_pExceptionList->EnableInplaceEditing(false);
m_pExceptionList->SetStyle(m_pExceptionList->GetStyle() | WB_HASLINES | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL);

View File

@ -86,7 +86,7 @@ namespace dbaui
m_pTablesList->SetCheckHandler(LINK(this,OGenericAdministrationPage,OnControlModified));
// initialize the TabListBox
m_pTablesList->SetSelectionMode( MULTIPLE_SELECTION );
m_pTablesList->SetSelectionMode( SelectionMode::Multiple );
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);

View File

@ -365,7 +365,7 @@ OColumnTreeBox::OColumnTreeBox( vcl::Window* pParent, WinBits nBits )
SetDragDropMode( DragDropMode::NONE );
EnableInplaceEditing( false );
SetStyle(GetStyle() | WB_BORDER | WB_HASBUTTONS | WB_HSCROLL | nBits);
SetSelectionMode( SINGLE_SELECTION );
SetSelectionMode( SelectionMode::Single );
}
VCL_BUILDER_FACTORY(OColumnTreeBox)

View File

@ -303,7 +303,7 @@ bool OTableWindow::Init()
{
m_xListBox = CreateListBox();
OSL_ENSURE( m_xListBox != nullptr, "OTableWindow::Init() : CreateListBox returned NULL !" );
m_xListBox->SetSelectionMode( MULTIPLE_SELECTION );
m_xListBox->SetSelectionMode( SelectionMode::Multiple );
}
// Set the title

View File

@ -51,7 +51,7 @@ OTableWindowListBox::OTableWindowListBox( OTableWindow* pParent )
m_aScrollTimer.SetTimeout( SCROLLING_TIMESPAN );
SetDoubleClickHdl( LINK(this, OTableWindowListBox, OnDoubleClick) );
SetSelectionMode(SINGLE_SELECTION);
SetSelectionMode(SelectionMode::Single);
SetHighlightRange( );
}

View File

@ -84,7 +84,7 @@ void EditSelFunctionSet::DeselectAll()
EditSelectionEngine::EditSelectionEngine() : SelectionEngine( nullptr )
{
SetSelectionMode( RANGE_SELECTION );
SetSelectionMode( SelectionMode::Range );
EnableDrag( true );
}

View File

@ -60,7 +60,7 @@ namespace pcr
get(m_pNoAssignment, "noassignment");
// initialize the TreeListBox
m_pControlTree->SetSelectionMode( SINGLE_SELECTION );
m_pControlTree->SetSelectionMode( SelectionMode::Single );
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);

View File

@ -297,7 +297,7 @@ namespace pcr
SetDragDropMode(DragDropMode::ALL/*DragDropMode::CTRL_MOVE*/);
// Hmm. The flag alone is not enough, so to be on the safe side ...
SetSelectionMode( MULTIPLE_SELECTION );
SetSelectionMode( SelectionMode::Multiple );
}
VCL_BUILDER_DECL_FACTORY(TabOrderListBox)

View File

@ -1413,7 +1413,7 @@ XMLFilterListBox::XMLFilterListBox(Window* pParent, SvxPathControl* pPathControl
static long nTabs[] = {2, 0, nTabSize };
SetSelectionMode( MULTIPLE_SELECTION );
SetSelectionMode( SelectionMode::Multiple );
SetTabs( &nTabs[0], MAP_PIXEL );
SetScrolledHdl( LINK( this, XMLFilterListBox, TabBoxScrollHdl_Impl ) );
SetHighlightRange();

View File

@ -34,7 +34,7 @@ class CommandEvent;
#define SELENG_AUTOREPEAT_INTERVAL_MIN 25
#define SELENG_AUTOREPEAT_INTERVAL_MAX 300
enum SelectionMode { NO_SELECTION, SINGLE_SELECTION, RANGE_SELECTION, MULTIPLE_SELECTION };
enum class SelectionMode { NONE, Single, Range, Multiple };
class VCL_DLLPUBLIC FunctionSet

View File

@ -105,7 +105,7 @@ OAddFieldWindowListBox::OAddFieldWindowListBox( OAddFieldWindow* _pParent )
,m_pTabWin( _pParent )
{
SetHelpId( HID_RPT_FIELD_SEL );
SetSelectionMode(MULTIPLE_SELECTION);
SetSelectionMode(SelectionMode::Multiple);
SetDragDropMode( DragDropMode::ALL );
SetHighlightRange( );
}

View File

@ -244,7 +244,7 @@ NavigatorTree::NavigatorTree( vcl::Window* pParent,OReportController& _rControll
SetDragDropMode(DragDropMode::ALL);
EnableInplaceEditing( false );
SetSelectionMode(MULTIPLE_SELECTION);
SetSelectionMode(SelectionMode::Multiple);
Clear();
m_aDropActionTimer.SetTimeoutHdl(LINK(this, NavigatorTree, OnDropActionTimer));

View File

@ -30,7 +30,7 @@ ScCondFormatManagerWindow::ScCondFormatManagerWindow(SvSimpleTableContainer& rPa
Init();
Show();
SetSelectionMode(MULTIPLE_SELECTION);
SetSelectionMode(SelectionMode::Multiple);
}
OUString ScCondFormatManagerWindow::createEntryString(const ScConditionalFormat& rFormat)

View File

@ -58,7 +58,7 @@ ScTpSubTotalGroup::ScTpSubTotalGroup( vcl::Window* pParent,
mpLbFunctions->set_height_request(nHeight);
// Font is correctly initialized by SvTreeListBox ctor
mpLbColumns->SetSelectionMode( SINGLE_SELECTION );
mpLbColumns->SetSelectionMode( SelectionMode::Single );
mpLbColumns->SetDragDropMode( DragDropMode::NONE );
mpLbColumns->SetSpaceBetweenEntries( 0 );

View File

@ -133,7 +133,7 @@ ScAcceptChgDlg::ScAcceptChgDlg(SfxBindings* pB, SfxChildWindow* pCW, vcl::Window
pTheView->SetDeselectHdl( LINK(this, ScAcceptChgDlg, SelectHandle));
pTheView->SetCommandHdl( LINK(this, ScAcceptChgDlg, CommandHdl));
pTheView->SetColCompareHdl( LINK(this, ScAcceptChgDlg,ColCompareHdl));
pTheView->SetSelectionMode(MULTIPLE_SELECTION);
pTheView->SetSelectionMode(SelectionMode::Multiple);
pTheView->SetHighlightRange(1);
Init();

View File

@ -418,7 +418,7 @@ ScConflictsDlg::ScConflictsDlg( vcl::Window* pParent, ScViewData* pViewData, ScD
m_pLbConflicts->InsertHeaderEntry( aHeader, HEADERBAR_APPEND, HeaderBarItemBits::LEFT | HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::VCENTER );
m_pLbConflicts->SetStyle( m_pLbConflicts->GetStyle() | WB_HASLINES | WB_CLIPCHILDREN | WB_HASBUTTONS | WB_HASBUTTONSATROOT | WB_HSCROLL );
m_pLbConflicts->SetSelectionMode( MULTIPLE_SELECTION );
m_pLbConflicts->SetSelectionMode( SelectionMode::Multiple );
m_pLbConflicts->SetHighlightRange();
maSelectionIdle.SetPriority( SchedulerPriority::LOW );

View File

@ -101,7 +101,7 @@ ScShareDocumentDlg::ScShareDocumentDlg( vcl::Window* pParent, ScViewData* pViewD
aHeader += "\t";
aHeader += get<FixedText>("accessed")->GetText();
m_pLbUsers->InsertHeaderEntry( aHeader, HEADERBAR_APPEND, HeaderBarItemBits::LEFT | HeaderBarItemBits::LEFTIMAGE | HeaderBarItemBits::VCENTER );
m_pLbUsers->SetSelectionMode( NO_SELECTION );
m_pLbUsers->SetSelectionMode( SelectionMode::NONE );
UpdateView();
}

View File

@ -60,7 +60,7 @@ ScRangeManagerTable::ScRangeManagerTable(SvSimpleTableContainer& rParent,
UpdateViewSize();
Init();
ShowTable();
SetSelectionMode(MULTIPLE_SELECTION);
SetSelectionMode(SelectionMode::Multiple);
SetScrolledHdl( LINK( this, ScRangeManagerTable, ScrollHdl ) );
HeaderEndDragHdl(nullptr);
}

View File

@ -631,7 +631,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, vcl
aLbEntries->InitWindowBits(true);
aLbEntries->SetSpaceBetweenEntries(0);
aLbEntries->SetSelectionMode( SINGLE_SELECTION );
aLbEntries->SetSelectionMode( SelectionMode::Single );
aLbEntries->SetDragDropMode( DragDropMode::CTRL_MOVE |
DragDropMode::CTRL_COPY |
DragDropMode::ENABLE_TOP );

View File

@ -751,7 +751,7 @@ ScViewSelectionEngine::ScViewSelectionEngine( vcl::Window* pWindow, ScTabView* p
SelectionEngine( pWindow, &pView->GetFunctionSet() ),
eWhich( eSplitPos )
{
SetSelectionMode( MULTIPLE_SELECTION );
SetSelectionMode( SelectionMode::Multiple );
EnableDrag( true );
}
@ -945,7 +945,7 @@ void ScHeaderFunctionSet::DeselectAll()
ScHeaderSelectionEngine::ScHeaderSelectionEngine( vcl::Window* pWindow, ScHeaderFunctionSet* pFuncSet ) :
SelectionEngine( pWindow, pFuncSet )
{
SetSelectionMode( MULTIPLE_SELECTION );
SetSelectionMode( SelectionMode::Multiple );
EnableDrag( false );
}

View File

@ -463,7 +463,7 @@ CustomAnimationList::CustomAnimationList( vcl::Window* pParent )
{
EnableContextMenuHandling();
SetSelectionMode( MULTIPLE_SELECTION );
SetSelectionMode( SelectionMode::Multiple );
SetOptimalImageIndent();
SetNodeDefaultImages();
}

View File

@ -74,7 +74,7 @@ void SdInsertPagesObjsDlg::Reset()
{
if( pMedium )
{
m_pLbTree->SetSelectionMode( MULTIPLE_SELECTION );
m_pLbTree->SetSelectionMode( SelectionMode::Multiple );
// transfer ownership of Medium
m_pLbTree->Fill( mpDoc, pMedium, rName );

View File

@ -103,7 +103,7 @@ SdNavigatorWin::SdNavigatorWin(
long nListboxYPos = maToolbox->GetPosPixel().Y() + maToolbox->GetSizePixel().Height() + 4;
maTlbObjects->setPosSizePixel( 0, nListboxYPos, 0, 0, PosSizeFlags::Y );
maTlbObjects->SetDoubleClickHdl( LINK( this, SdNavigatorWin, ClickObjectHdl ) );
maTlbObjects->SetSelectionMode( SINGLE_SELECTION );
maTlbObjects->SetSelectionMode( SelectionMode::Single );
// set focus to listbox, otherwise it is in the toolbox which is only useful
// for keyboard navigation
maTlbObjects->GrabFocus();
@ -465,10 +465,10 @@ IMPL_LINK_TYPED( SdNavigatorWin, MenuSelectHdl, Menu *, pMenu, bool )
if( maTlbObjects->GetSelectionCount() > 1 )
maTlbObjects->SelectAll( false );
maTlbObjects->SetSelectionMode( SINGLE_SELECTION );
maTlbObjects->SetSelectionMode( SelectionMode::Single );
}
else
maTlbObjects->SetSelectionMode( MULTIPLE_SELECTION );
maTlbObjects->SetSelectionMode( SelectionMode::Multiple );
}
}
return false;
@ -601,7 +601,7 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName)
if (xMedium->IsStorage())
{
// Now depending on mode:
// maTlbObjects->SetSelectionMode(MULTIPLE_SELECTION);
// maTlbObjects->SetSelectionMode(SelectionMode::Multiple);
// handover of ownership of xMedium;
SdDrawDocument* pDropDoc = maTlbObjects->GetBookmarkDoc(xMedium.release());
@ -917,7 +917,7 @@ void SdPageNameControllerItem::StateChanged( sal_uInt16 nSId,
if( !pNavigatorWin->maTlbObjects->HasSelectedChildren( aPageName ) )
{
if( pNavigatorWin->maTlbObjects->GetSelectionMode() == MULTIPLE_SELECTION )
if( pNavigatorWin->maTlbObjects->GetSelectionMode() == SelectionMode::Multiple )
{
// because otherwise it is always additional select
pNavigatorWin->maTlbObjects->SelectAll( false );

View File

@ -1143,7 +1143,7 @@ void SdPageObjsTLB::StartDrag( sal_Int8 nAction, const Point& rPosPixel)
// targets. This prevents moving shapes from one page to another.
// Select all entries and disable them as drop targets.
SetSelectionMode(MULTIPLE_SELECTION);
SetSelectionMode(SelectionMode::Multiple);
SetCursor(static_cast<SvTreeListEntry*>(nullptr));
SelectAll(true, false);
EnableSelectionAsDropTarget(false);
@ -1162,7 +1162,7 @@ void SdPageObjsTLB::StartDrag( sal_Int8 nAction, const Point& rPosPixel)
// Set selection back to the entry under the mouse.
SelectAll(false, false);
SetSelectionMode(SINGLE_SELECTION);
SetSelectionMode(SelectionMode::Single);
Select(pEntry);
// We can delete the Navigator from ExecuteDrag (when switching to

View File

@ -276,7 +276,7 @@ ContentListBox_Impl::ContentListBox_Impl(vcl::Window* pParent, WinBits nStyle)
SetStyle( GetStyle() | WB_HIDESELECTION | WB_HSCROLL );
SetEntryHeight( 16 );
SetSelectionMode( SINGLE_SELECTION );
SetSelectionMode( SelectionMode::Single );
SetSpaceBetweenEntries( 2 );
SetNodeBitmaps( aClosedBookImage, aOpenBookImage );

View File

@ -854,7 +854,7 @@ void SfxCommonTemplateDialog_Impl::Initialize()
aFilterLb->SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, FilterSelectHdl ) );
aFmtLb->SetDoubleClickHdl( LINK( this, SfxCommonTemplateDialog_Impl, TreeListApplyHdl ) );
aFmtLb->SetSelectHdl( LINK( this, SfxCommonTemplateDialog_Impl, FmtSelectHdl ) );
aFmtLb->SetSelectionMode(MULTIPLE_SELECTION);
aFmtLb->SetSelectionMode(SelectionMode::Multiple);
aFilterLb->Show();

View File

@ -227,7 +227,7 @@ SfxVersionDialog::SfxVersionDialog ( SfxViewFrame* pVwFrame, bool bIsSaveVersion
m_pVersionBox->GrabFocus();
m_pVersionBox->SetStyle( m_pVersionBox->GetStyle() | WB_HSCROLL | WB_CLIPCHILDREN );
m_pVersionBox->SetSelectionMode( SINGLE_SELECTION );
m_pVersionBox->SetSelectionMode( SelectionMode::Single );
long nTabs_Impl[] = { 3, 0, 0, 0 };
@ -548,7 +548,7 @@ SfxCmisVersionsDialog::SfxCmisVersionsDialog ( SfxViewFrame* pVwFrame )
m_pVersionBox->GrabFocus();
m_pVersionBox->SetStyle( m_pVersionBox->GetStyle() | WB_HSCROLL | WB_CLIPCHILDREN );
m_pVersionBox->SetSelectionMode( SINGLE_SELECTION );
m_pVersionBox->SetSelectionMode( SelectionMode::Single );
long nTabs_Impl[] = { 3, 0, 0, 0 };

View File

@ -523,7 +523,7 @@ ViewTabListBox_Impl::ViewTabListBox_Impl( vcl::Window* pParentWin,
SetHighlightRange();
SetEntryHeight( ROW_HEIGHT );
if (nFlags & FileViewFlags::MULTISELECTION)
SetSelectionMode( MULTIPLE_SELECTION );
SetSelectionMode( SelectionMode::Multiple );
Show();
if( mbShowHeader )

View File

@ -419,7 +419,7 @@ void IconViewImpl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rR
if (!pCursor && ((nExtendedWinBits & EWB_NO_AUTO_CURENTRY) == 0))
{
// do not select if multiselection or explicit set
bool bNotSelect = (aSelEng.GetSelectionMode() == MULTIPLE_SELECTION ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
SetCursor(pStartEntry, bNotSelect);
}

View File

@ -115,7 +115,7 @@ SvxIconChoiceCtrl_Impl::SvxIconChoiceCtrl_Impl(
bUpdateMode = true;
bEntryEditingEnabled = false;
bHighlightFramePressed = false;
eSelectionMode = MULTIPLE_SELECTION;
eSelectionMode = SelectionMode::Multiple;
pView = pCurView;
pZOrderList = new SvxIconChoiceCtrlEntryList_impl();
ePositionMode = IcnViewPositionModeFree;
@ -230,7 +230,7 @@ void SvxIconChoiceCtrl_Impl::SetStyle( WinBits nWinStyle )
if( nWinBits & (WB_SMALLICON | WB_DETAILS) )
nCurTextDrawFlags = DRAWTEXT_FLAGS_SMALLICON;
if( nWinBits & WB_NOSELECTION )
eSelectionMode = NO_SELECTION;
eSelectionMode = SelectionMode::NONE;
if( !(nWinStyle & (WB_ALIGN_TOP | WB_ALIGN_LEFT)))
nWinBits |= WB_ALIGN_LEFT;
if( (nWinStyle & WB_DETAILS))
@ -353,7 +353,7 @@ void SvxIconChoiceCtrl_Impl::SetListPositions()
void SvxIconChoiceCtrl_Impl::SelectEntry( SvxIconChoiceCtrlEntry* pEntry, bool bSelect,
bool bAdd, bool bSyncPaint )
{
if( eSelectionMode == NO_SELECTION )
if( eSelectionMode == SelectionMode::NONE )
return;
if( !bAdd )
@ -392,7 +392,7 @@ void SvxIconChoiceCtrl_Impl::EntrySelected(SvxIconChoiceCtrlEntry* pEntry, bool
// When using SingleSelection, make sure that the cursor is always placed
// over the (only) selected entry. (But only if a cursor exists.)
if (bSelect && pCursor &&
eSelectionMode == SINGLE_SELECTION &&
eSelectionMode == SelectionMode::Single &&
pEntry != pCursor)
{
SetCursor(pEntry);
@ -728,7 +728,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
if( pEntry )
MakeEntryVisible( pEntry, false );
if( rMEvt.IsShift() && eSelectionMode != SINGLE_SELECTION )
if( rMEvt.IsShift() && eSelectionMode != SelectionMode::Single )
{
if( pEntry )
SetCursor_Impl( pCursor, pEntry, rMEvt.IsMod1(), rMEvt.IsShift(), true);
@ -737,7 +737,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
if( pAnchor && (rMEvt.IsShift() || rMEvt.IsMod1())) // keyboard selection?
{
DBG_ASSERT(eSelectionMode != SINGLE_SELECTION,"Invalid selection mode");
DBG_ASSERT(eSelectionMode != SelectionMode::Single,"Invalid selection mode");
if( rMEvt.IsMod1() )
nFlags |= IconChoiceFlags::AddMode;
@ -769,7 +769,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
{
if( !pEntry )
{
if( eSelectionMode == MULTIPLE_SELECTION )
if( eSelectionMode == SelectionMode::Multiple )
{
if( !rMEvt.IsMod1() ) // Ctrl
{
@ -810,7 +810,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
EditEntry( pEntry );
}
}
else if( eSelectionMode == SINGLE_SELECTION )
else if( eSelectionMode == SelectionMode::Single )
{
DeselectAllBut( pEntry );
SetCursor( pEntry );
@ -820,7 +820,7 @@ bool SvxIconChoiceCtrl_Impl::MouseButtonDown( const MouseEvent& rMEvt)
nFlags |= IconChoiceFlags::StartEditTimerInMouseUp;
}
}
else if( eSelectionMode == NO_SELECTION )
else if( eSelectionMode == SelectionMode::NONE )
{
if( rMEvt.IsLeft() && (nWinBits & WB_HIGHLIGHTFRAME) )
{
@ -938,7 +938,7 @@ void SvxIconChoiceCtrl_Impl::SetCursor_Impl( SvxIconChoiceCtrlEntry* pOldCursor,
{
SvxIconChoiceCtrlEntry* pFilterEntry = nullptr;
bool bDeselectAll = false;
if( eSelectionMode != SINGLE_SELECTION )
if( eSelectionMode != SelectionMode::Single )
{
if( !bMod1 && !bShift )
bDeselectAll = true;
@ -1004,7 +1004,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
bool bMod1 = rKEvt.GetKeyCode().IsMod1();
bool bShift = rKEvt.GetKeyCode().IsShift();
if( eSelectionMode == SINGLE_SELECTION || eSelectionMode == NO_SELECTION)
if( eSelectionMode == SelectionMode::Single || eSelectionMode == SelectionMode::NONE)
{
bShift = false;
bMod1 = false;
@ -1117,7 +1117,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
break;
case KEY_SPACE:
if( pCursor && eSelectionMode != SINGLE_SELECTION )
if( pCursor && eSelectionMode != SelectionMode::Single )
{
if( !bMod1 )
{
@ -1154,7 +1154,7 @@ bool SvxIconChoiceCtrl_Impl::KeyInput( const KeyEvent& rKEvt )
case KEY_ADD:
case KEY_DIVIDE :
case KEY_A:
if( bMod1 && (eSelectionMode != SINGLE_SELECTION))
if( bMod1 && (eSelectionMode != SelectionMode::Single))
SelectAll();
else
bKeyUsed = false;
@ -1510,7 +1510,7 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, bool bSel
bool bSolidTextRect = false;
if(bDropTarget && (eSelectionMode != NO_SELECTION))
if(bDropTarget && (eSelectionMode != SelectionMode::NONE))
{
rRenderContext.SetFillColor(rSettings.GetHighlightColor());
bSolidTextRect = true;
@ -1592,7 +1592,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po
{
bool bSelected = false;
if (eSelectionMode != NO_SELECTION)
if (eSelectionMode != SelectionMode::NONE)
bSelected = pEntry->IsSelected();
bool bCursored = pEntry->IsCursored();
@ -1605,7 +1605,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po
Rectangle aTextRect(CalcTextRect(pEntry, &rPos, false, &aEntryText));
Rectangle aBmpRect(CalcBmpRect(pEntry, &rPos));
bool bShowSelection = ((bSelected && !bCursored) && !bNoEmphasis && (eSelectionMode != NO_SELECTION));
bool bShowSelection = ((bSelected && !bCursored) && !bNoEmphasis && (eSelectionMode != SelectionMode::NONE));
bool bActiveSelection = (0 != (nWinBits & WB_NOHIDESELECTION)) || pView->HasFocus();
@ -1992,7 +1992,7 @@ void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry )
{
if( pEntry == pCursor )
{
if( pCursor && eSelectionMode == SINGLE_SELECTION &&
if( pCursor && eSelectionMode == SelectionMode::Single &&
!pCursor->IsSelected() )
SelectEntry( pCursor, true );
return;
@ -2003,14 +2003,14 @@ void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry )
if( pOldCursor )
{
pOldCursor->ClearFlags( SvxIconViewFlags::FOCUSED );
if( eSelectionMode == SINGLE_SELECTION )
if( eSelectionMode == SelectionMode::Single )
SelectEntry( pOldCursor, false ); // deselect old cursor
}
if( pCursor )
{
ToTop( pCursor );
pCursor->SetFlags( SvxIconViewFlags::FOCUSED );
if( eSelectionMode == SINGLE_SELECTION )
if( eSelectionMode == SelectionMode::Single )
SelectEntry( pCursor, true );
ShowCursor( true );
}
@ -2996,7 +2996,7 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry() const
if( !GetSelectionCount() )
return nullptr;
if( (nWinBits & WB_HIGHLIGHTFRAME) && (eSelectionMode == NO_SELECTION) )
if( (nWinBits & WB_HIGHLIGHTFRAME) && (eSelectionMode == SelectionMode::NONE) )
{
return pCurHighlightFrame;
}

View File

@ -64,7 +64,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
aSelEng.SetFunctionSet( static_cast<FunctionSet*>(&aFctSet) );
aSelEng.ExpandSelectionOnMouseMove( false );
SetStyle( nWinStyle );
SetSelectionMode( SINGLE_SELECTION );
SetSelectionMode( SelectionMode::Single );
SetDragDropMode( DragDropMode::NONE );
aVerSBar->SetScrollHdl( LINK( this, SvImpLBox, ScrollUpDownHdl ) );
@ -240,7 +240,7 @@ void SvImpLBox::CalcCellFocusRect( SvTreeListEntry* pEntry, Rectangle& rRect )
void SvImpLBox::SetStyle( WinBits i_nWinStyle )
{
m_nStyle = i_nWinStyle;
if ( ( m_nStyle & WB_SIMPLEMODE) && ( aSelEng.GetSelectionMode() == MULTIPLE_SELECTION ) )
if ( ( m_nStyle & WB_SIMPLEMODE) && ( aSelEng.GetSelectionMode() == SelectionMode::Multiple ) )
aSelEng.AddAlways( true );
}
@ -643,7 +643,7 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect )
// multiple selection: select in cursor move if we're not in
// Add mode (Ctrl-F8)
else if( GetUpdateMode() &&
pView->GetSelectionMode() == MULTIPLE_SELECTION &&
pView->GetSelectionMode() == SelectionMode::Multiple &&
!(nFlags & LBoxFlags::DeselectAll) && !aSelEng.IsAddMode() &&
!bForceNoSelect )
{
@ -661,7 +661,7 @@ void SvImpLBox::SetCursor( SvTreeListEntry* pEntry, bool bForceNoSelect )
if( pAnchor )
{
DBG_ASSERT(aSelEng.GetSelectionMode() != SINGLE_SELECTION,"Mode?");
DBG_ASSERT(aSelEng.GetSelectionMode() != SelectionMode::Single,"Mode?");
SetAnchorSelection( pOldCursor, pCursor );
}
}
@ -853,7 +853,7 @@ SvTreeListEntry* SvImpLBox::MakePointVisible(const Point& rPoint)
if( pEntry )
{
if( pEntry != pCursor &&
aSelEng.GetSelectionMode() == SINGLE_SELECTION
aSelEng.GetSelectionMode() == SelectionMode::Single
)
pView->Select( pCursor, false );
}
@ -930,7 +930,7 @@ void SvImpLBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
if (!pCursor && ((nExtendedWinBits & EWB_NO_AUTO_CURENTRY) == 0))
{
// do not select if multiselection or explicit set
bool bNotSelect = (aSelEng.GetSelectionMode() == MULTIPLE_SELECTION ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
bool bNotSelect = (aSelEng.GetSelectionMode() == SelectionMode::Multiple ) || ((m_nStyle & WB_NOINITIALSELECTION) == WB_NOINITIALSELECTION);
SetCursor(pStartEntry, bNotSelect);
}
@ -1600,7 +1600,7 @@ void SvImpLBox::EntrySelected( SvTreeListEntry* pEntry, bool bSelect )
nFlags &= (~LBoxFlags::DeselectAll);
if( bSelect &&
aSelEng.GetSelectionMode() == SINGLE_SELECTION &&
aSelEng.GetSelectionMode() == SelectionMode::Single &&
pEntry != pCursor )
{
SetCursor( pEntry );
@ -2069,13 +2069,13 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
return;
// Inplace-Editing?
}
if ( aSelEng.GetSelectionMode() != NO_SELECTION )
if ( aSelEng.GetSelectionMode() != SelectionMode::NONE )
aSelEng.SelMouseButtonDown( rMEvt );
}
void SvImpLBox::MouseButtonUp( const MouseEvent& rMEvt)
{
if ( !ButtonUpCheckCtrl( rMEvt ) && ( aSelEng.GetSelectionMode() != NO_SELECTION ) )
if ( !ButtonUpCheckCtrl( rMEvt ) && ( aSelEng.GetSelectionMode() != SelectionMode::NONE ) )
aSelEng.SelMouseButtonUp( rMEvt );
EndScroll();
if( nFlags & LBoxFlags::StartEditTimer )
@ -2091,7 +2091,7 @@ void SvImpLBox::MouseButtonUp( const MouseEvent& rMEvt)
void SvImpLBox::MouseMove( const MouseEvent& rMEvt)
{
SvTreeListEntry* pEntry = GetClickedEntry( rMEvt.GetPosPixel() );
if ( !MouseMoveCheckCtrl( rMEvt, pEntry ) && ( aSelEng.GetSelectionMode() != NO_SELECTION ) )
if ( !MouseMoveCheckCtrl( rMEvt, pEntry ) && ( aSelEng.GetSelectionMode() != SelectionMode::NONE ) )
aSelEng.SelMouseMove( rMEvt );
return;
}
@ -2337,11 +2337,11 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
break;
case KEY_SPACE:
if ( pView->GetSelectionMode() != NO_SELECTION )
if ( pView->GetSelectionMode() != SelectionMode::NONE )
{
if ( bMod1 )
{
if ( pView->GetSelectionMode() == MULTIPLE_SELECTION && !bShift )
if ( pView->GetSelectionMode() == SelectionMode::Multiple && !bShift )
// toggle selection
pView->Select( pCursor, !pView->IsSelected( pCursor ) );
}
@ -2390,7 +2390,7 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
break;
case KEY_F8:
if( bShift && pView->GetSelectionMode()==MULTIPLE_SELECTION &&
if( bShift && pView->GetSelectionMode()==SelectionMode::Multiple &&
!(m_nStyle & WB_SIMPLEMODE))
{
if( aSelEng.IsAlwaysAdding() )
@ -2846,11 +2846,11 @@ void SvImpLBox::SelAllDestrAnch(
void SvImpLBox::SetSelectionMode( SelectionMode eSelMode )
{
aSelEng.SetSelectionMode( eSelMode);
if( eSelMode == SINGLE_SELECTION )
if( eSelMode == SelectionMode::Single )
bSimpleTravel = true;
else
bSimpleTravel = false;
if( (m_nStyle & WB_SIMPLEMODE) && (eSelMode == MULTIPLE_SELECTION) )
if( (m_nStyle & WB_SIMPLEMODE) && (eSelMode == SelectionMode::Multiple) )
aSelEng.AddAlways( true );
}
@ -2969,7 +2969,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
pView->SetCursor( pClickedEntry );
}
}
else if( aSelEng.GetSelectionMode() == SINGLE_SELECTION )
else if( aSelEng.GetSelectionMode() == SelectionMode::Single )
{
bClickedIsFreePlace = true;
sal_Int32 nSelectedEntries = pView->GetSelectionCount();
@ -3090,14 +3090,14 @@ void SvImpLBox::Invalidate()
void SvImpLBox::SetCurEntry( SvTreeListEntry* pEntry )
{
if ( ( aSelEng.GetSelectionMode() != SINGLE_SELECTION )
&& ( aSelEng.GetSelectionMode() != NO_SELECTION )
if ( ( aSelEng.GetSelectionMode() != SelectionMode::Single )
&& ( aSelEng.GetSelectionMode() != SelectionMode::NONE )
)
SelAllDestrAnch( false );
if ( pEntry )
MakeVisible( pEntry );
SetCursor( pEntry );
if ( pEntry && ( aSelEng.GetSelectionMode() != NO_SELECTION ) )
if ( pEntry && ( aSelEng.GetSelectionMode() != SelectionMode::NONE ) )
pView->Select( pEntry );
}

View File

@ -338,7 +338,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) :
mbContextBmpExpanded(false),
mbAlternatingRowColors(false),
mbUpdateAlternatingRows(false),
eSelMode(NO_SELECTION),
eSelMode(SelectionMode::NONE),
nMinWidthInChars(0),
mbCenterAndClipText(false)
{
@ -353,7 +353,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) :
pModel->InsertView( this );
pHdlEntry = nullptr;
pEdCtrl = nullptr;
eSelMode = SINGLE_SELECTION;
eSelMode = SelectionMode::Single;
nDragDropMode = DragDropMode::NONE;
SetType(WINDOW_TREELISTBOX);
@ -370,7 +370,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, const ResId& rResId) :
mbContextBmpExpanded(false),
mbAlternatingRowColors(false),
mbUpdateAlternatingRows(false),
eSelMode(NO_SELECTION),
eSelMode(SelectionMode::NONE),
nMinWidthInChars(0),
mbCenterAndClipText(false)
{
@ -2372,7 +2372,7 @@ void SvTreeListBox::SelectAll( bool bSelect, bool )
pImpl->SelAllDestrAnch(
bSelect,
true, // delete anchor,
true ); // even when using SINGLE_SELECTION, deselect the cursor
true ); // even when using SelectionMode::Single, deselect the cursor
}
void SvTreeListBox::ModelHasInsertedTree( SvTreeListEntry* pEntry )
@ -2682,7 +2682,7 @@ void SvTreeListBox::EditedText( const OUString& rStr )
}
if( GetSelectionCount() == 0 )
Select( pEdEntry );
if( GetSelectionMode() == MULTIPLE_SELECTION && !GetCurEntry() )
if( GetSelectionMode() == SelectionMode::Multiple && !GetCurEntry() )
SetCurEntry( pEdEntry );
}
}

View File

@ -218,7 +218,7 @@ protected:
SelectionEngine aSelEng;
sal_uLong nVisibleCount; // Number of lines in control
bool bInVScrollHdl : 1;
bool bSimpleTravel : 1; // ist true bei SINGLE_SELECTION
bool bSimpleTravel : 1; // ist true bei SelectionMode::Single
long nNextVerVisSize;
long nNodeBmpTabDistance; // typical smaller than 0

View File

@ -175,7 +175,7 @@ namespace svt { namespace table
TableCell const tableCell( i_tableControl.hitTest( i_event.GetPosPixel() ) );
if ( tableCell.nRow >= 0 )
{
if ( i_tableControl.getSelEngine()->GetSelectionMode() == NO_SELECTION )
if ( i_tableControl.getSelEngine()->GetSelectionMode() == SelectionMode::NONE )
{
i_tableControl.activateCell( tableCell.nColumn, tableCell.nRow );
handled = true;
@ -197,7 +197,7 @@ namespace svt { namespace table
TableCell const tableCell = i_tableControl.hitTest( i_event.GetPosPixel() );
if ( tableCell.nRow >= 0 )
{
if ( i_tableControl.getSelEngine()->GetSelectionMode() != NO_SELECTION )
if ( i_tableControl.getSelEngine()->GetSelectionMode() != SelectionMode::NONE )
{
i_tableControl.getSelEngine()->SelMouseButtonUp( i_event );
}

View File

@ -424,7 +424,7 @@ namespace svt { namespace table
rStateSet.AddState( AccessibleStateType::FOCUSABLE );
if ( m_pImpl->getSelEngine()->GetSelectionMode() == MULTIPLE_SELECTION )
if ( m_pImpl->getSelEngine()->GetSelectionMode() == SelectionMode::Multiple )
rStateSet.AddState( AccessibleStateType::MULTI_SELECTABLE);
if ( HasChildPathFocus() )

View File

@ -248,7 +248,7 @@ namespace svt { namespace table
,m_pAccessibleTable ( nullptr )
{
m_pSelEngine = new SelectionEngine( m_pDataWindow.get(), m_pTableFunctionSet );
m_pSelEngine->SetSelectionMode(SINGLE_SELECTION);
m_pSelEngine->SetSelectionMode(SelectionMode::Single);
m_pDataWindow->SetPosPixel( Point( 0, 0 ) );
m_pDataWindow->Show();
}
@ -1308,7 +1308,7 @@ namespace svt { namespace table
switch ( _eAction )
{
case cursorDown:
if ( m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION )
if ( m_pSelEngine->GetSelectionMode() == SelectionMode::Single )
{
//if other rows already selected, deselect them
if(!m_aSelectedRows.empty())
@ -1336,7 +1336,7 @@ namespace svt { namespace table
break;
case cursorUp:
if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
if(m_pSelEngine->GetSelectionMode() == SelectionMode::Single)
{
if(!m_aSelectedRows.empty())
{
@ -1420,7 +1420,7 @@ namespace svt { namespace table
case cursorSelectRow:
{
if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
if(m_pSelEngine->GetSelectionMode() == SelectionMode::NONE)
return bSuccess = false;
//pos is the position of the current row in the vector of selected rows, if current row is selected
int pos = getRowSelectedNumber(m_aSelectedRows, m_nCurRow);
@ -1441,9 +1441,9 @@ namespace svt { namespace table
break;
case cursorSelectRowUp:
{
if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
if(m_pSelEngine->GetSelectionMode() == SelectionMode::NONE)
return bSuccess = false;
else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
else if(m_pSelEngine->GetSelectionMode() == SelectionMode::Single)
{
//if there are other selected rows, deselect them
return false;
@ -1526,9 +1526,9 @@ namespace svt { namespace table
break;
case cursorSelectRowDown:
{
if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
if(m_pSelEngine->GetSelectionMode() == SelectionMode::NONE)
bSuccess = false;
else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
else if(m_pSelEngine->GetSelectionMode() == SelectionMode::Single)
{
bSuccess = false;
}
@ -1608,9 +1608,9 @@ namespace svt { namespace table
case cursorSelectRowAreaTop:
{
if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
if(m_pSelEngine->GetSelectionMode() == SelectionMode::NONE)
bSuccess = false;
else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
else if(m_pSelEngine->GetSelectionMode() == SelectionMode::Single)
bSuccess = false;
else
{
@ -1636,9 +1636,9 @@ namespace svt { namespace table
case cursorSelectRowAreaBottom:
{
if(m_pSelEngine->GetSelectionMode() == NO_SELECTION)
if(m_pSelEngine->GetSelectionMode() == SelectionMode::NONE)
return bSuccess = false;
else if(m_pSelEngine->GetSelectionMode() == SINGLE_SELECTION)
else if(m_pSelEngine->GetSelectionMode() == SelectionMode::Single)
return bSuccess = false;
//select the region between the current and the last row
RowPos iter = m_nCurRow;
@ -2265,7 +2265,7 @@ namespace svt { namespace table
SelectionMode const eSelMode = getSelEngine()->GetSelectionMode();
switch ( eSelMode )
{
case SINGLE_SELECTION:
case SelectionMode::Single:
if ( !m_aSelectedRows.empty() )
{
OSL_ENSURE( m_aSelectedRows.size() == 1, "TableControl::markRowAsSelected: SingleSelection with more than one selected element?" );
@ -2274,7 +2274,7 @@ namespace svt { namespace table
}
SAL_FALLTHROUGH;
case MULTIPLE_SELECTION:
case SelectionMode::Multiple:
m_aSelectedRows.push_back( i_rowIndex );
break;
@ -2300,7 +2300,7 @@ namespace svt { namespace table
bool TableControl_Impl::markAllRowsAsSelected()
{
SelectionMode const eSelMode = getSelEngine()->GetSelectionMode();
ENSURE_OR_RETURN_FALSE( eSelMode == MULTIPLE_SELECTION, "TableControl_Impl::markAllRowsAsSelected: unsupported selection mode!" );
ENSURE_OR_RETURN_FALSE( eSelMode == SelectionMode::Multiple, "TableControl_Impl::markAllRowsAsSelected: unsupported selection mode!" );
if ( m_aSelectedRows.size() == size_t( m_pModel->getRowCount() ) )
{
@ -2528,7 +2528,7 @@ namespace svt { namespace table
m_pTableControl->markRowAsSelected( newRow );
else
{
if ( m_pTableControl->getSelEngine()->GetSelectionMode() == SINGLE_SELECTION )
if ( m_pTableControl->getSelEngine()->GetSelectionMode() == SelectionMode::Single )
{
DeselectAll();
m_pTableControl->markRowAsSelected( newRow );
@ -2538,7 +2538,7 @@ namespace svt { namespace table
m_pTableControl->markRowAsSelected( newRow );
}
}
if ( m_pTableControl->getSelectedRowCount() > 1 && m_pTableControl->getSelEngine()->GetSelectionMode() != SINGLE_SELECTION )
if ( m_pTableControl->getSelectedRowCount() > 1 && m_pTableControl->getSelEngine()->GetSelectionMode() != SelectionMode::Single )
m_pTableControl->getSelEngine()->AddAlways(true);
m_pTableControl->invalidateRow( newRow );

View File

@ -290,10 +290,10 @@ void SVTXGridControl::setProperty( const OUString& PropertyName, const Any& aVal
SelectionMode eSelMode;
switch( eSelectionType )
{
case SelectionType_SINGLE: eSelMode = SINGLE_SELECTION; break;
case SelectionType_RANGE: eSelMode = RANGE_SELECTION; break;
case SelectionType_MULTI: eSelMode = MULTIPLE_SELECTION; break;
default: eSelMode = NO_SELECTION; break;
case SelectionType_SINGLE: eSelMode = SelectionMode::Single; break;
case SelectionType_RANGE: eSelMode = SelectionMode::Range; break;
case SelectionType_MULTI: eSelMode = SelectionMode::Multiple; break;
default: eSelMode = SelectionMode::NONE; break;
}
if( pTable->getSelEngine()->GetSelectionMode() != eSelMode )
pTable->getSelEngine()->SetSelectionMode( eSelMode );
@ -485,9 +485,9 @@ Any SVTXGridControl::getProperty( const OUString& PropertyName ) throw(RuntimeEx
SelectionMode eSelMode = pTable->getSelEngine()->GetSelectionMode();
switch( eSelMode )
{
case SINGLE_SELECTION: eSelectionType = SelectionType_SINGLE; break;
case RANGE_SELECTION: eSelectionType = SelectionType_RANGE; break;
case MULTIPLE_SELECTION:eSelectionType = SelectionType_MULTI; break;
case SelectionMode::Single: eSelectionType = SelectionType_SINGLE; break;
case SelectionMode::Range: eSelectionType = SelectionType_RANGE; break;
case SelectionMode::Multiple:eSelectionType = SelectionType_MULTI; break;
default: eSelectionType = SelectionType_NONE; break;
}
aPropertyValue <<= eSelectionType;

View File

@ -1247,11 +1247,11 @@ void TreeControlPeer::setProperty( const OUString& PropertyName, const Any& aVal
SelectionMode eSelMode;
switch( eSelectionType )
{
case SelectionType_SINGLE: eSelMode = SINGLE_SELECTION; break;
case SelectionType_RANGE: eSelMode = RANGE_SELECTION; break;
case SelectionType_MULTI: eSelMode = MULTIPLE_SELECTION; break;
case SelectionType_SINGLE: eSelMode = SelectionMode::Single; break;
case SelectionType_RANGE: eSelMode = SelectionMode::Range; break;
case SelectionType_MULTI: eSelMode = SelectionMode::Multiple; break;
// case SelectionType_NONE:
default: eSelMode = NO_SELECTION; break;
default: eSelMode = SelectionMode::NONE; break;
}
if( rTree.GetSelectionMode() != eSelMode )
rTree.SetSelectionMode( eSelMode );
@ -1336,10 +1336,10 @@ Any TreeControlPeer::getProperty( const OUString& PropertyName ) throw(RuntimeEx
SelectionMode eSelMode = rTree.GetSelectionMode();
switch( eSelMode )
{
case SINGLE_SELECTION: eSelectionType = SelectionType_SINGLE; break;
case RANGE_SELECTION: eSelectionType = SelectionType_RANGE; break;
case MULTIPLE_SELECTION:eSelectionType = SelectionType_MULTI; break;
// case NO_SELECTION:
case SelectionMode::Single: eSelectionType = SelectionType_SINGLE; break;
case SelectionMode::Range: eSelectionType = SelectionType_RANGE; break;
case SelectionMode::Multiple:eSelectionType = SelectionType_MULTI; break;
// case SelectionMode::NONE:
default: eSelectionType = SelectionType_NONE; break;
}
return Any( eSelectionType );

View File

@ -1111,7 +1111,7 @@ FmFilterNavigator::FmFilterNavigator( vcl::Window* pParent )
StartListening( *m_pModel );
EnableInplaceEditing( true );
SetSelectionMode(MULTIPLE_SELECTION);
SetSelectionMode(SelectionMode::Multiple);
SetDragDropMode(DragDropMode::ALL);

View File

@ -143,7 +143,7 @@ namespace svxform
SetDragDropMode(DragDropMode::ALL);
EnableInplaceEditing( true );
SetSelectionMode(MULTIPLE_SELECTION);
SetSelectionMode(SelectionMode::Multiple);
m_pNavModel = new NavigatorTreeModel( m_aNavigatorImages );
Clear();

View File

@ -385,7 +385,7 @@ void DictionaryList::init(const Reference< linguistic2::XConversionDictionary>&
vcl::Window *pFT_Term, vcl::Window *pFT_Mapping, vcl::Window *pFT_Property)
{
SetStyle( WB_VSCROLL | WB_TABSTOP );
SetSelectionMode( SINGLE_SELECTION );
SetSelectionMode( SelectionMode::Single );
SetBorderStyle( WindowBorderStyle::MONO );
SetHighlightRange();

View File

@ -91,7 +91,7 @@ SwCondCollPage::SwCondCollPage(vcl::Window *pParent, const SfxItemSet &rSet)
m_pFilterLB->SetSelectHdl( LINK(this, SwCondCollPage, SelectListBoxHdl));
m_pTbLinks->SetStyle(m_pTbLinks->GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN);
m_pTbLinks->SetSelectionMode( SINGLE_SELECTION );
m_pTbLinks->SetSelectionMode( SelectionMode::Single );
m_pTbLinks->SetTabs( &nTabs[0] );
m_pTbLinks->Resize(); // OS: Hack for the right selection
m_pTbLinks->SetSpaceBetweenEntries( 0 );

View File

@ -204,7 +204,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
m_pListLB->setColSizes();
m_pListLB->SetStyle( m_pListLB->GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP );
m_pListLB->SetSelectionMode( SINGLE_SELECTION );
m_pListLB->SetSelectionMode( SelectionMode::Single );
m_pOK->SetClickHdl( LINK( this, SwAddressListDialog, OKHdl_Impl));
uno::Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() );

View File

@ -1248,7 +1248,7 @@ DDListBox::DDListBox(vcl::Window* pParent, WinBits nStyle)
{
SetStyle( GetStyle() | /*WB_HASBUTTONS|WB_HASBUTTONSATROOT|*/
WB_CLIPCHILDREN );
SetSelectionMode( SINGLE_SELECTION );
SetSelectionMode( SelectionMode::Single );
SetDragDropMode( DragDropMode::CTRL_COPY );
EnableAsyncDrag(true);
// expand selection to the complete width of the ListBox

View File

@ -293,7 +293,7 @@ SwSendMailDialog::SwSendMailDialog(vcl::Window *pParent, SwMailMergeConfigItem&
static long nTabs[] = {2, 0, nPos1};
m_pStatus->SetStyle( m_pStatus->GetStyle() | WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP );
m_pStatus->SetSelectionMode( SINGLE_SELECTION );
m_pStatus->SetSelectionMode( SelectionMode::Single );
m_pStatus->SetTabs(&nTabs[0], MAP_PIXEL);
m_pStatus->SetSpaceBetweenEntries(3);

View File

@ -55,7 +55,7 @@ SwAddressTable::SwAddressTable(SvSimpleTableContainer& rParent)
: SvSimpleTable(rParent, 0)
{
SetSpaceBetweenEntries(3);
SetSelectionMode(SINGLE_SELECTION);
SetSelectionMode(SelectionMode::Single);
SetDragDropMode(DragDropMode::NONE);
EnableAsyncDrag(false);
}

View File

@ -362,7 +362,7 @@ SwEditRegionDlg::SwEditRegionDlg( vcl::Window* pParent, SwWrtShell& rWrtSh )
m_pSubRegionED->AddEventListener(LINK(this, SwEditRegionDlg, SubRegionEventHdl));
m_pSubRegionED->EnableAutocomplete(true, true);
m_pTree->SetSelectionMode( MULTIPLE_SELECTION );
m_pTree->SetSelectionMode( SelectionMode::Multiple );
m_pTree->SetStyle(m_pTree->GetStyle()|WB_HASBUTTONSATROOT|WB_CLIPCHILDREN|WB_HSCROLL);
m_pTree->SetSpaceBetweenEntries(0);
m_pTree->SetAllEntriesAccessibleRoleType(SvTreeAccRoleType::TREE);

View File

@ -593,7 +593,7 @@ SwVisitingCardPage::SwVisitingCardPage(vcl::Window* pParent, const SfxItemSet& r
m_pAutoTextLB->SetStyle( m_pAutoTextLB->GetStyle() | WB_HSCROLL );
m_pAutoTextLB->SetSpaceBetweenEntries(0);
m_pAutoTextLB->SetSelectionMode( SINGLE_SELECTION );
m_pAutoTextLB->SetSelectionMode( SelectionMode::Single );
SetExchangeSupport();
m_pAutoTextLB->SetSelectHdl(LINK(this, SwVisitingCardPage, AutoTextSelectTreeListBoxHdl));

View File

@ -69,7 +69,7 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw)
m_pDefineBT->SetClickHdl(LINK(this, SwChangeDBDlg, ButtonHdl));
m_pAddDBPB->SetClickHdl(LINK(this, SwChangeDBDlg, AddDBHdl));
m_pUsedDBTLB->SetSelectionMode(MULTIPLE_SELECTION);
m_pUsedDBTLB->SetSelectionMode(SelectionMode::Multiple);
m_pUsedDBTLB->SetStyle(m_pUsedDBTLB->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
m_pUsedDBTLB->SetSpaceBetweenEntries(0);
m_pUsedDBTLB->SetNodeBitmaps( aImageList.GetImage(IMG_COLLAPSE), aImageList.GetImage(IMG_EXPAND));

View File

@ -71,7 +71,7 @@ SwFieldDokInfPage::SwFieldDokInfPage(vcl::Window* pParent, const SfxItemSet *con
m_pFormatLB->set_width_request(nWidth);
m_pSelectionLB->set_width_request(nWidth);
m_pTypeTLB->SetSelectionMode(SINGLE_SELECTION);
m_pTypeTLB->SetSelectionMode(SelectionMode::Single);
m_pTypeTLB->SetStyle(m_pTypeTLB->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
m_pTypeTLB->SetOptimalImageIndent();
// Don't set font, so that the control's font is adopted!

View File

@ -1879,7 +1879,7 @@ SwTOXEntryTabPage::SwTOXEntryTabPage(vcl::Window* pParent, const SfxItemSet& rAt
sLevelStr = m_pLevelFT->GetText();
m_pLevelLB->SetStyle( m_pLevelLB->GetStyle() | WB_HSCROLL );
m_pLevelLB->SetSpaceBetweenEntries(0);
m_pLevelLB->SetSelectionMode( SINGLE_SELECTION );
m_pLevelLB->SetSelectionMode( SelectionMode::Single );
m_pLevelLB->SetHighlightRange(); // select full width
m_pLevelLB->Show();

View File

@ -340,7 +340,7 @@ BookmarkTable::BookmarkTable(SvSimpleTableContainer& rParent) :
static long nTabs[] = {3, 0, 40, 150};
SetTabs(nTabs, MAP_PIXEL);
SetSelectionMode(MULTIPLE_SELECTION);
SetSelectionMode(SelectionMode::Multiple);
InsertHeaderEntry(OUString(SW_RES(STR_PAGE)));
InsertHeaderEntry(OUString(SW_RES(STR_BOOKMARK_NAME)));
InsertHeaderEntry(OUString(SW_RES(STR_BOOKMARK_TEXT)));

View File

@ -183,7 +183,7 @@ void SwDBTreeList::InitTreeList()
{
if(!pImpl->HasContext() && pImpl->GetWrtShell())
return;
SetSelectionMode(SINGLE_SELECTION);
SetSelectionMode(SelectionMode::Single);
SetStyle(GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
// don't set font, so that the Control's font is being applied!
SetSpaceBetweenEntries(0);

View File

@ -206,7 +206,7 @@ SwRedlineAcceptDlg::SwRedlineAcceptDlg(vcl::Window *pParent, VclBuilderContainer
m_pTable->SetStyle(m_pTable->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
m_pTable->SetNodeDefaultImages();
m_pTable->SetSelectionMode(MULTIPLE_SELECTION);
m_pTable->SetSelectionMode(SelectionMode::Multiple);
m_pTable->SetHighlightRange(1);
m_pTable->SortByCol(nSortMode, bSortDir);

View File

@ -773,7 +773,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
m_aContentTree->SetStyle( m_aContentTree->GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT|
WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE );
m_aContentTree->SetSpaceBetweenEntries(3);
m_aContentTree->SetSelectionMode( SINGLE_SELECTION );
m_aContentTree->SetSelectionMode( SelectionMode::Single );
m_aContentTree->SetDragDropMode( DragDropMode::CTRL_MOVE |
DragDropMode::CTRL_COPY |
DragDropMode::ENABLE_TOP );
@ -783,7 +783,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
// TreeListBox for global document
m_aGlobalTree->setPosSizePixel( 0, nListboxYPos, 0, 0, PosSizeFlags::Y );
m_aGlobalTree->SetSelectionMode( MULTIPLE_SELECTION );
m_aGlobalTree->SetSelectionMode( SelectionMode::Multiple );
m_aGlobalTree->SetStyle( m_aGlobalTree->GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT|
WB_CLIPCHILDREN|WB_HSCROLL );
Size aGlblSize(m_aGlobalToolBox->CalcWindowSizePixel());

View File

@ -68,7 +68,7 @@ class SelectionDialog extends JDialog
maChildrenSelector = new JList (GetChildrenList());
maChildrenSelector.setPreferredSize (new Dimension (500,300));
aContent.add (maChildrenSelector, BorderLayout.CENTER);
maChildrenSelector.setSelectionMode (ListSelectionModel.SINGLE_SELECTION);
maChildrenSelector.setSelectionMode (ListSelectionModel.SelectionMode::Single);
JPanel aButtons = new JPanel();
aButtons.setLayout( new FlowLayout() );

View File

@ -202,7 +202,7 @@ TextView::TextView( TextEngine* pEng, vcl::Window* pWindow ) :
mpImpl->mpSelFuncSet = new TextSelFunctionSet( this );
mpImpl->mpSelEngine = new SelectionEngine( mpImpl->mpWindow, mpImpl->mpSelFuncSet );
mpImpl->mpSelEngine->SetSelectionMode( RANGE_SELECTION );
mpImpl->mpSelEngine->SetSelectionMode( SelectionMode::Range );
mpImpl->mpSelEngine->EnableDrag( true );
mpImpl->mpCursor = new vcl::Cursor;

View File

@ -28,7 +28,7 @@ FunctionSet::~FunctionSet()
inline bool SelectionEngine::ShouldDeselect( bool bModifierKey1 ) const
{
return eSelMode != MULTIPLE_SELECTION || !bModifierKey1;
return eSelMode != SelectionMode::Multiple || !bModifierKey1;
}
// TODO: throw out FunctionSet::SelectAtPoint
@ -38,7 +38,7 @@ SelectionEngine::SelectionEngine( vcl::Window* pWindow, FunctionSet* pFuncSet,
pWin( pWindow ),
nUpdateInterval( nAutoRepeatInterval )
{
eSelMode = SINGLE_SELECTION;
eSelMode = SelectionMode::Single;
pFunctionSet = pFuncSet;
nFlags = SelectionEngineFlags::EXPANDONMOVE;
nLockedMods = 0;
@ -68,7 +68,7 @@ void SelectionEngine::CursorPosChanging( bool bShift, bool bMod1 )
if ( !pFunctionSet )
return;
if ( bShift && eSelMode != SINGLE_SELECTION )
if ( bShift && eSelMode != SelectionMode::Single )
{
if ( IsAddMode() )
{
@ -122,7 +122,7 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
return false;
// in SingleSelection: filter Control-Key,
// so that a D&D can be also started with a Ctrl-Click
if ( nModifier == KEY_MOD1 && eSelMode == SINGLE_SELECTION )
if ( nModifier == KEY_MOD1 && eSelMode == SelectionMode::Single )
nModifier = 0;
Point aPos = rMEvt.GetPosPixel();
@ -151,7 +151,7 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
pWin->ReleaseMouse();
return true; // wait for STARTDRAG-Command-Event
}
if ( eSelMode != SINGLE_SELECTION )
if ( eSelMode != SelectionMode::Single )
{
if( !IsAddMode() )
pFunctionSet->DeselectAll();
@ -161,13 +161,13 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
}
pFunctionSet->SetCursorAtPoint( aPos );
// special case Single-Selection, to enable simple Select+Drag
if (eSelMode == SINGLE_SELECTION && (nFlags & SelectionEngineFlags::DRG_ENAB))
if (eSelMode == SelectionMode::Single && (nFlags & SelectionEngineFlags::DRG_ENAB))
nFlags |= SelectionEngineFlags::WAIT_UPEVT;
return true;
}
case KEY_SHIFT:
if ( eSelMode == SINGLE_SELECTION )
if ( eSelMode == SelectionMode::Single )
{
pWin->ReleaseMouse();
nFlags &= (~SelectionEngineFlags::IN_SEL);
@ -190,7 +190,7 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
case KEY_MOD1:
// allow Control only for Multi-Select
if ( eSelMode != MULTIPLE_SELECTION )
if ( eSelMode != SelectionMode::Multiple )
{
nFlags &= (~SelectionEngineFlags::IN_SEL);
pWin->ReleaseMouse();
@ -214,7 +214,7 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt )
return true;
case KEY_SHIFT + KEY_MOD1:
if ( eSelMode != MULTIPLE_SELECTION )
if ( eSelMode != SelectionMode::Multiple )
{
pWin->ReleaseMouse();
nFlags &= (~SelectionEngineFlags::IN_SEL);
@ -249,7 +249,7 @@ bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt )
}
if( (nFlags & SelectionEngineFlags::WAIT_UPEVT) && !(nFlags & SelectionEngineFlags::CMDEVT) &&
eSelMode != SINGLE_SELECTION)
eSelMode != SelectionMode::Single)
{
// MouseButtonDown in Sel but no CommandEvent yet
// ==> deselektieren
@ -305,7 +305,7 @@ bool SelectionEngine::SelMouseMove( const MouseEvent& rMEvt )
if (!comphelper::LibreOfficeKit::isActive())
// Generating fake mouse moves does not work with LOK.
aWTimer.Start();
if ( eSelMode != SINGLE_SELECTION )
if ( eSelMode != SelectionMode::Single )
{
if ( !(nFlags & SelectionEngineFlags::HAS_ANCH) )
{