diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-20 13:29:57 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-05-21 06:40:36 +0000 |
commit | ebdba869de1de51b4cc7ca24c1a6a639d44de1bf (patch) | |
tree | a51965a28861f7e82dd2f55cf88be251a67f0347 /vcl | |
parent | 5bf6fecde772d1fb35645fe217e6fe3b5b5ac918 (diff) |
convert TABITEM constants to scoped enum
Change-Id: Ia16127a7d97ef7db59bd2b0e6b8d14d8625bc526
Reviewed-on: https://gerrit.libreoffice.org/15827
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/osx/salnativewidgets.cxx | 16 | ||||
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 8 |
2 files changed, 12 insertions, 12 deletions
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx index 5aa6f8d097e8..8103b56235f0 100644 --- a/vcl/osx/salnativewidgets.cxx +++ b/vcl/osx/salnativewidgets.cxx @@ -829,18 +829,18 @@ bool AquaSalGraphics::drawNativeControl(ControlType nType, aTabItemDrawInfo.position=kHIThemeTabPositionMiddle; TabitemValue const * pTabValue = static_cast<TabitemValue const *>(&aValue); - unsigned int nAlignment = pTabValue->mnAlignment; - //TABITEM_LEFTALIGNED (and TABITEM_RIGHTALIGNED) for the leftmost (or rightmost) tab + TabitemFlags nAlignment = pTabValue->mnAlignment; + //TabitemFlags::LeftAligned (and TabitemFlags::RightAligned) for the leftmost (or rightmost) tab //when there are several lines of tabs because there is only one first tab and one - //last tab and TABITEM_FIRST_IN_GROUP (and TABITEM_LAST_IN_GROUP) because when the - //line width is different from window width, there may not be TABITEM_RIGHTALIGNED - if( ( (nAlignment & TABITEM_LEFTALIGNED)&&(nAlignment & TABITEM_RIGHTALIGNED) ) || - ( (nAlignment & TABITEM_FIRST_IN_GROUP)&&(nAlignment & TABITEM_LAST_IN_GROUP) ) + //last tab and TabitemFlags::FirstInGroup (and TabitemFlags::LastInGroup) because when the + //line width is different from window width, there may not be TabitemFlags::RightAligned + if( ( (nAlignment & TabitemFlags::LeftAligned)&&(nAlignment & TabitemFlags::RightAligned) ) || + ( (nAlignment & TabitemFlags::FirstInGroup)&&(nAlignment & TabitemFlags::LastInGroup) ) ) //tab alone aTabItemDrawInfo.position=kHIThemeTabPositionOnly; - else if((nAlignment & TABITEM_LEFTALIGNED)||(nAlignment & TABITEM_FIRST_IN_GROUP)) + else if((nAlignment & TabitemFlags::LeftAligned)||(nAlignment & TabitemFlags::FirstInGroup)) aTabItemDrawInfo.position=kHIThemeTabPositionFirst; - else if((nAlignment & TABITEM_RIGHTALIGNED)||(nAlignment & TABITEM_LAST_IN_GROUP)) + else if((nAlignment & TabitemFlags::RightAligned)||(nAlignment & TabitemFlags::LastInGroup)) aTabItemDrawInfo.position=kHIThemeTabPositionLast; //support for RTL diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 1558b7304e6d..304e263f4c74 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -851,13 +851,13 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p pItem->maRect.Top() + TAB_TABOFFSET_Y, pItem->maRect.Bottom() - TAB_TABOFFSET_Y)); if (pItem->maRect.Left() < 5) - tiValue.mnAlignment |= TABITEM_LEFTALIGNED; + tiValue.mnAlignment |= TabitemFlags::LeftAligned; if (pItem->maRect.Right() > mnLastWidth - 5) - tiValue.mnAlignment |= TABITEM_RIGHTALIGNED; + tiValue.mnAlignment |= TabitemFlags::RightAligned; if (bFirstInGroup) - tiValue.mnAlignment |= TABITEM_FIRST_IN_GROUP; + tiValue.mnAlignment |= TabitemFlags::FirstInGroup; if (bLastInGroup) - tiValue.mnAlignment |= TABITEM_LAST_IN_GROUP; + tiValue.mnAlignment |= TabitemFlags::LastInGroup; Rectangle aCtrlRegion( pItem->maRect ); bNativeOK = rRenderContext.DrawNativeControl(CTRL_TAB_ITEM, PART_ENTIRE_CONTROL, |