diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-16 15:41:10 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-22 10:28:39 +0200 |
commit | 0578aa4de27cc960cd3709eb2e15f40e02e1272d (patch) | |
tree | 295966c066e2760f4322273d970fa02fe5e0c84a /dbaccess/source/ui | |
parent | f87e0957cdcbf9ee12e0615b55a1bb1de1d70efb (diff) |
convert BROWSER_ constants to scoped enum
and fix a couple of places where it was mixing these flags up with the
WinBits flags and calling the wrong constructor.
Change-Id: I65c66bdd5a263e2f1db179c853f3f00e9ac7659e
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r-- | dbaccess/source/ui/control/RelationControl.cxx | 17 | ||||
-rw-r--r-- | dbaccess/source/ui/control/TableGrantCtrl.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 34 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableDesignControl.cxx | 10 |
6 files changed, 38 insertions, 37 deletions
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 9621b71ba04a..0ae9329e2f65 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -130,7 +130,8 @@ namespace dbaui ORelationControl::ORelationControl(vcl::Window *pParent) : EditBrowseBox(pParent, EBBF_SMART_TAB_TRAVEL | EBBF_NOROWPICTURE, - WB_TABSTOP | WB_BORDER | BROWSER_AUTOSIZE_LASTCOL) + WB_TABSTOP | WB_BORDER, + BrowserMode::AUTOSIZE_LASTCOL) , m_pBoxControl(NULL) , m_nDataPos(0) , m_xSourceDef(NULL) @@ -172,13 +173,13 @@ namespace dbaui m_pListCell.reset( new ListBoxControl( &GetDataWindow() ) ); // set browse mode - SetMode( BROWSER_COLUMNSELECTION | - BROWSER_HLINESFULL | - BROWSER_VLINESFULL | - BROWSER_HIDECURSOR | - BROWSER_HIDESELECT | - BROWSER_AUTO_HSCROLL | - BROWSER_AUTO_VSCROLL); + SetMode( BrowserMode::COLUMNSELECTION | + BrowserMode::HLINES | + BrowserMode::VLINES | + BrowserMode::HIDECURSOR | + BrowserMode::HIDESELECT | + BrowserMode::AUTO_HSCROLL | + BrowserMode::AUTO_VSCROLL); } else // not the first call diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx index ce73d137ac7a..d32c49e2a264 100644 --- a/dbaccess/source/ui/control/TableGrantCtrl.cxx +++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx @@ -132,8 +132,8 @@ void OTableGrantControl::Init() UpdateTables(); // Browser Mode setzen - BrowserMode nMode = BROWSER_COLUMNSELECTION | BROWSER_HLINESFULL | BROWSER_VLINESFULL | - BROWSER_HIDECURSOR | BROWSER_HIDESELECT; + BrowserMode nMode = BrowserMode::COLUMNSELECTION | BrowserMode::HLINES | BrowserMode::VLINES | + BrowserMode::HIDECURSOR | BrowserMode::HIDESELECT; SetMode(nMode); } diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index b4c8800fce7b..bd9e978265ff 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -27,8 +27,8 @@ namespace dbaui { -#define BROWSER_STANDARD_FLAGS BROWSER_COLUMNSELECTION | BROWSER_HLINESFULL | BROWSER_VLINESFULL | \ - BROWSER_HIDECURSOR | BROWSER_HIDESELECT | BROWSER_AUTO_HSCROLL | BROWSER_AUTO_VSCROLL +#define BROWSER_STANDARD_FLAGS BrowserMode::COLUMNSELECTION | BrowserMode::HLINES | BrowserMode::VLINES | \ + BrowserMode::HIDECURSOR | BrowserMode::HIDESELECT | BrowserMode::AUTO_HSCROLL | BrowserMode::AUTO_VSCROLL #define COLUMN_ID_FIELDNAME 1 #define COLUMN_ID_ORDER 2 diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index c454e2d6b44a..dfbbae2d4812 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -96,8 +96,8 @@ namespace } OSelectionBrowseBox::OSelectionBrowseBox( vcl::Window* pParent ) - :EditBrowseBox( pParent,EBBF_NOROWPICTURE, WB_3DLOOK, BROWSER_COLUMNSELECTION | BROWSER_KEEPSELECTION | BROWSER_HIDESELECT | - BROWSER_HIDECURSOR | BROWSER_HLINESFULL | BROWSER_VLINESFULL ) + :EditBrowseBox( pParent,EBBF_NOROWPICTURE, WB_3DLOOK, BrowserMode::COLUMNSELECTION | BrowserMode::KEEPHIGHLIGHT | BrowserMode::HIDESELECT | + BrowserMode::HIDECURSOR | BrowserMode::HLINES | BrowserMode::VLINES ) ,m_nSeekRow(0) ,m_nMaxColumns(0) ,m_aFunctionStrings(ModuleRes(STR_QUERY_FUNCTIONS)) @@ -112,10 +112,10 @@ OSelectionBrowseBox::OSelectionBrowseBox( vcl::Window* pParent ) { SetHelpId(HID_CTL_QRYDGNCRIT); - m_nMode = BROWSER_COLUMNSELECTION | BROWSER_HIDESELECT - | BROWSER_KEEPSELECTION | BROWSER_HIDECURSOR - | BROWSER_HLINESFULL | BROWSER_VLINESFULL - | BROWSER_HEADERBAR_NEW ; + m_nMode = BrowserMode::COLUMNSELECTION | BrowserMode::HIDESELECT + | BrowserMode::KEEPHIGHLIGHT | BrowserMode::HIDECURSOR + | BrowserMode::HLINES | BrowserMode::VLINES + | BrowserMode::HEADERBAR_NEW ; m_pTextCell = new Edit(&GetDataWindow(), 0); m_pVisibleCell = new CheckBoxControl(&GetDataWindow()); @@ -263,10 +263,10 @@ namespace { m_pBrowseBox->DeactivateCell(); // we are in the right mode if a row hase been selected row - if ( BROWSER_HIDESELECT == ( nMode & BROWSER_HIDESELECT ) ) + if ( BrowserMode::HIDESELECT == ( nMode & BrowserMode::HIDESELECT ) ) { - nMode &= ~BROWSER_HIDESELECT; - nMode |= BROWSER_MULTISELECTION; + nMode &= ~BrowserMode::HIDESELECT; + nMode |= BrowserMode::MULTISELECTION; m_pBrowseBox->SetMode( nMode ); } } @@ -407,12 +407,12 @@ void OSelectionBrowseBox::SetReadOnly(bool bRO) if (bRO) { DeactivateCell(); - m_nMode &= ~BROWSER_HIDECURSOR; + m_nMode &= ~BrowserMode::HIDECURSOR; SetMode(m_nMode); } else { - m_nMode |= BROWSER_HIDECURSOR; + m_nMode |= BrowserMode::HIDECURSOR; SetMode(m_nMode); ActivateCell(); } @@ -1300,22 +1300,22 @@ void OSelectionBrowseBox::adjustSelectionMode( bool _bClickedOntoHeader, bool _b { if (0 == GetSelectColumnCount() ) // I am in the correct mode if a selected column exists - if ( BROWSER_HIDESELECT == ( m_nMode & BROWSER_HIDESELECT ) ) + if ( BrowserMode::HIDESELECT == ( m_nMode & BrowserMode::HIDESELECT ) ) { - m_nMode &= ~BROWSER_HIDESELECT; - m_nMode |= BROWSER_MULTISELECTION; + m_nMode &= ~BrowserMode::HIDESELECT; + m_nMode |= BrowserMode::MULTISELECTION; SetMode( m_nMode ); } } - else if ( BROWSER_HIDESELECT != ( m_nMode & BROWSER_HIDESELECT ) ) + else if ( BrowserMode::HIDESELECT != ( m_nMode & BrowserMode::HIDESELECT ) ) { if ( GetSelectColumnCount() != 0 ) SetNoSelection(); if ( _bClickedOntoHandleCol ) { - m_nMode |= BROWSER_HIDESELECT; - m_nMode &= ~BROWSER_MULTISELECTION; + m_nMode |= BrowserMode::HIDESELECT; + m_nMode &= ~BrowserMode::MULTISELECTION; SetMode( m_nMode ); } } diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index d8b907d4183e..fa78833bfb2a 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -177,10 +177,10 @@ void OTableEditorCtrl::SetReadOnly( bool bRead ) DeactivateCell(); // Select the correct Browsers cursor - BrowserMode nMode(BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_KEEPSELECTION | - BROWSER_HLINESFULL | BROWSER_VLINESFULL|BROWSER_AUTOSIZE_LASTCOL); + BrowserMode nMode(BrowserMode::COLUMNSELECTION | BrowserMode::MULTISELECTION | BrowserMode::KEEPHIGHLIGHT | + BrowserMode::HLINES | BrowserMode::VLINES|BrowserMode::AUTOSIZE_LASTCOL); if( !bReadOnly ) - nMode |= BROWSER_HIDECURSOR; + nMode |= BrowserMode::HIDECURSOR; SetMode(nMode); if( !bReadOnly ) diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx index f4348d5ebdfb..1bda40e23fd2 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx @@ -36,8 +36,8 @@ using namespace ::com::sun::star::util; OTableRowView::OTableRowView(vcl::Window* pParent) :EditBrowseBox(pParent, ModuleRes(RID_DB_TAB_EDITOR),EBBF_NONE, - BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_AUTOSIZE_LASTCOL | - BROWSER_KEEPSELECTION | BROWSER_HLINESFULL | BROWSER_VLINESFULL) + BrowserMode::COLUMNSELECTION | BrowserMode::MULTISELECTION | BrowserMode::AUTOSIZE_LASTCOL | + BrowserMode::KEEPHIGHLIGHT | BrowserMode::HLINES | BrowserMode::VLINES) ,m_nDataPos(-1) ,m_nCurrentPos(-1) ,m_nCurUndoActId(0) @@ -69,10 +69,10 @@ void OTableRowView::Init() // set up HandleColumn for at maximum 5 digits InsertHandleColumn(static_cast<sal_uInt16>(GetTextWidth(OUString('0')) * 4)/*, sal_True */); - BrowserMode nMode = BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_KEEPSELECTION | - BROWSER_HLINESFULL | BROWSER_VLINESFULL | BROWSER_AUTOSIZE_LASTCOL; + BrowserMode nMode = BrowserMode::COLUMNSELECTION | BrowserMode::MULTISELECTION | BrowserMode::KEEPHIGHLIGHT | + BrowserMode::HLINES | BrowserMode::VLINES | BrowserMode::AUTOSIZE_LASTCOL; if (IsUpdatable()) - nMode |= BROWSER_HIDECURSOR; + nMode |= BrowserMode::HIDECURSOR; SetMode(nMode); } |