summaryrefslogtreecommitdiff
path: root/svtools/source/control
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-01 14:50:30 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-11-01 14:53:39 +0000
commita7542d38ddeebd37ddea233fa1e4cf15b2e03c49 (patch)
tree07ec3f89a4487b42c8b8203fab9e4dbb6f394a9c /svtools/source/control
parentb812374174144e077bc3b08fe347626cb1a33eee (diff)
fdo#84938: replace MIB_ constants with enum
Change-Id: I58c1b4c9e4c4b3751b233d2fe10b9c953b945c4a Reviewed-on: https://gerrit.libreoffice.org/12179 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools/source/control')
-rw-r--r--svtools/source/control/stdmenu.cxx8
-rw-r--r--svtools/source/control/toolbarmenu.cxx16
-rw-r--r--svtools/source/control/toolbarmenuimp.hxx2
3 files changed, 13 insertions, 13 deletions
diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx
index b0b3eba9479e..4a91286115a8 100644
--- a/svtools/source/control/stdmenu.cxx
+++ b/svtools/source/control/stdmenu.cxx
@@ -72,7 +72,7 @@ void FontNameMenu::Fill( const FontList* pList )
break;
j--;
}
- InsertItem( i+1, rName, MIB_RADIOCHECK | MIB_AUTOCHECK, OString(), j );
+ InsertItem( i+1, rName, MenuItemBits::RADIOCHECK | MenuItemBits::AUTOCHECK, OString(), j );
}
}
@@ -171,7 +171,7 @@ void FontSizeMenu::Fill( const vcl::FontInfo& rInfo, const FontList* pList )
long nSize = aFontSizeNames.GetIndexSize( i );
mpHeightAry[nPos] = nSize;
nPos++; // Id is nPos+1
- InsertItem( nPos, aSizeName, MIB_RADIOCHECK | MIB_AUTOCHECK );
+ InsertItem( nPos, aSizeName, MenuItemBits::RADIOCHECK | MenuItemBits::AUTOCHECK );
}
}
else
@@ -185,7 +185,7 @@ void FontSizeMenu::Fill( const vcl::FontInfo& rInfo, const FontList* pList )
{
mpHeightAry[nPos] = *pTempAry;
nPos++; // Id is nPos+1
- InsertItem( nPos, aSizeName, MIB_RADIOCHECK | MIB_AUTOCHECK );
+ InsertItem( nPos, aSizeName, MenuItemBits::RADIOCHECK | MenuItemBits::AUTOCHECK );
}
pTempAry++;
}
@@ -199,7 +199,7 @@ void FontSizeMenu::Fill( const vcl::FontInfo& rInfo, const FontList* pList )
{
mpHeightAry[nPos] = *pTempAry;
nPos++; // Id is nPos+1
- InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, true, false ), MIB_RADIOCHECK | MIB_AUTOCHECK );
+ InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, true, false ), MenuItemBits::RADIOCHECK | MenuItemBits::AUTOCHECK );
pTempAry++;
}
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index 6e9daefb22b1..d5cb6fbe97fa 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -698,20 +698,20 @@ Size ToolbarMenu::implCalcSize()
if( pEntry->HasCheck() && !pEntry->mbHasImage )
{
if( this->IsNativeControlSupported( CTRL_MENU_POPUP,
- (pEntry->mnBits & MIB_RADIOCHECK)
+ (pEntry->mnBits & MenuItemBits::RADIOCHECK)
? PART_MENU_ITEM_CHECK_MARK
: PART_MENU_ITEM_RADIO_MARK ) )
{
long nCheckHeight = 0, nRadioHeight = 0, nMaxCheckWidth = 0;
ImplGetNativeCheckAndRadioSize( this, nCheckHeight, nRadioHeight, nMaxCheckWidth );
- long nCtrlHeight = (pEntry->mnBits & MIB_RADIOCHECK) ? nCheckHeight : nRadioHeight;
+ long nCtrlHeight = (pEntry->mnBits & MenuItemBits::RADIOCHECK) ? nCheckHeight : nRadioHeight;
nMaxTextWidth += nCtrlHeight + gfxExtra;
}
else if( pEntry->mbChecked )
{
long nSymbolWidth = (nFontHeight*25)/40;
- if ( pEntry->mnBits & MIB_RADIOCHECK )
+ if ( pEntry->mnBits & MenuItemBits::RADIOCHECK )
nSymbolWidth = nFontHeight/2;
nMaxTextWidth += nSymbolWidth;
@@ -894,7 +894,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight )
bool bDrawItemRect = true;
Rectangle aItemRect( Point( nX, nY ), Size( aSz.Width(), pEntry->maSize.Height() ) );
- if ( pEntry->mnBits & MIB_POPUPSELECT )
+ if ( pEntry->mnBits & MenuItemBits::POPUPSELECT )
{
long nFontHeight = GetTextHeight();
aItemRect.Right() -= nFontHeight + nFontHeight/4;
@@ -1400,11 +1400,11 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
if( !pEntry->mbHasImage )
{
if( this->IsNativeControlSupported( CTRL_MENU_POPUP,
- (pEntry->mnBits & MIB_RADIOCHECK)
+ (pEntry->mnBits & MenuItemBits::RADIOCHECK)
? PART_MENU_ITEM_CHECK_MARK
: PART_MENU_ITEM_RADIO_MARK ) )
{
- ControlPart nPart = ((pEntry->mnBits & MIB_RADIOCHECK)
+ ControlPart nPart = ((pEntry->mnBits & MenuItemBits::RADIOCHECK)
? PART_MENU_ITEM_RADIO_MARK
: PART_MENU_ITEM_CHECK_MARK);
@@ -1419,7 +1419,7 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
if ( bHighlighted )
nState |= CTRL_STATE_SELECTED;
- long nCtrlHeight = (pEntry->mnBits & MIB_RADIOCHECK) ? nCheckHeight : nRadioHeight;
+ long nCtrlHeight = (pEntry->mnBits & MenuItemBits::RADIOCHECK) ? nCheckHeight : nRadioHeight;
aTmpPos.X() = aOuterCheckRect.Left() + (aOuterCheckRect.GetWidth() - nCtrlHeight)/2;
aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - nCtrlHeight)/2;
@@ -1433,7 +1433,7 @@ void ToolbarMenu::implPaint( ToolbarMenuEntry* pThisOnly, bool bHighlighted )
SymbolType eSymbol;
Size aSymbolSize;
- if ( pEntry->mnBits & MIB_RADIOCHECK )
+ if ( pEntry->mnBits & MenuItemBits::RADIOCHECK )
{
eSymbol = SymbolType::RADIOCHECKMARK;
aSymbolSize = Size( nFontHeight/2, nFontHeight/2 );
diff --git a/svtools/source/control/toolbarmenuimp.hxx b/svtools/source/control/toolbarmenuimp.hxx
index 793af00098ec..9a32d694fff4 100644
--- a/svtools/source/control/toolbarmenuimp.hxx
+++ b/svtools/source/control/toolbarmenuimp.hxx
@@ -97,7 +97,7 @@ public:
bool HasCheck() const
{
- return mbChecked || ( mnBits & ( MIB_RADIOCHECK | MIB_CHECKABLE | MIB_AUTOCHECK ) );
+ return mbChecked || ( mnBits & ( MenuItemBits::RADIOCHECK | MenuItemBits::CHECKABLE | MenuItemBits::AUTOCHECK ) );
}
};