summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-14 09:36:33 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-10-15 10:13:04 +0000
commitd9fa1247be9d3a3d559adbbf9e1ed12395744738 (patch)
tree20fb4e43af4c94760b290d62ad3a6ac581665bf1 /vcl
parentd7a0916e68238d619d74cbab72e66980e24d2f48 (diff)
fdo#84938: replace SYMBOL_TYPE constants with enum
Change-Id: Ib3763f20d74c22e28d519a9ac47f6f3ab4e31f51 Reviewed-on: https://gerrit.libreoffice.org/11983 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/button.cxx8
-rw-r--r--vcl/source/control/ilstbox.cxx4
-rw-r--r--vcl/source/control/morebtn.cxx4
-rw-r--r--vcl/source/control/scrbar.cxx16
-rw-r--r--vcl/source/control/spinfld.cxx24
-rw-r--r--vcl/source/window/brdwin.cxx14
-rw-r--r--vcl/source/window/builder.cxx38
-rw-r--r--vcl/source/window/decoview.cxx73
-rw-r--r--vcl/source/window/menu.cxx6
-rw-r--r--vcl/source/window/menubarwindow.cxx9
-rw-r--r--vcl/source/window/menufloatingwindow.cxx2
11 files changed, 100 insertions, 98 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 03329959edcf..e39c00d8a795 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -638,7 +638,7 @@ void PushButton::ImplInitPushButtonData()
{
mpWindowImpl->mbPushButton = true;
- meSymbol = SYMBOL_NOSYMBOL;
+ meSymbol = SymbolType::DONTKNOW;
meState = TRISTATE_FALSE;
meSaveValue = TRISTATE_FALSE;
mnDDStyle = 0;
@@ -899,7 +899,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawF
}
ImplSetSeparatorX( nSeparatorX );
- aDecoView.DrawSymbol( aSymbolRect, SYMBOL_SPIN_DOWN, aColor, nStyle );
+ aDecoView.DrawSymbol( aSymbolRect, SymbolType::SPIN_DOWN, aColor, nStyle );
}
}
@@ -986,7 +986,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
break;
}
- bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && GetText().isEmpty() );
+ bool bDropDown = ( IsSymbol() && (GetSymbol()==SymbolType::SPIN_DOWN) && GetText().isEmpty() );
if( bDropDown && (aCtrlType == CTRL_COMBOBOX || aCtrlType == CTRL_LISTBOX ) )
{
@@ -1526,7 +1526,7 @@ bool PushButton::PreNotify( NotifyEvent& rNEvt )
break;
}
- bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && GetText().isEmpty() );
+ bool bDropDown = ( IsSymbol() && (GetSymbol()==SymbolType::SPIN_DOWN) && GetText().isEmpty() );
if( bDropDown && GetParent()->IsNativeControlSupported( aCtrlType, PART_ENTIRE_CONTROL) &&
!GetParent()->IsNativeControlSupported( aCtrlType, PART_BUTTON_DOWN) )
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 693070fe6261..8a987f44338f 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -78,9 +78,9 @@ void ImplInitFieldSettings( vcl::Window* pWin, bool bFont, bool bForeground, boo
void ImplInitDropDownButton( PushButton* pButton )
{
if ( pButton->GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_SPINUPDOWN )
- pButton->SetSymbol( SYMBOL_SPIN_UPDOWN );
+ pButton->SetSymbol( SymbolType::SPIN_UPDOWN );
else
- pButton->SetSymbol( SYMBOL_SPIN_DOWN );
+ pButton->SetSymbol( SymbolType::SPIN_DOWN );
if ( pButton->IsNativeControlSupported(CTRL_LISTBOX, PART_ENTIRE_CONTROL)
&& ! pButton->IsNativeControlSupported(CTRL_LISTBOX, PART_BUTTON_DOWN) )
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index f84e0a891287..0b585a1587a8 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -62,12 +62,12 @@ void MoreButton::ShowState()
{
if ( mbState )
{
- SetSymbol( SYMBOL_PAGEUP );
+ SetSymbol( SymbolType::PAGEUP );
SetText( mpMBData->maLessText );
}
else
{
- SetSymbol( SYMBOL_PAGEDOWN );
+ SetSymbol( SymbolType::PAGEDOWN );
SetText( mpMBData->maMoreText );
}
}
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index df763dd5ad4f..1af0b65f4c8e 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -646,16 +646,16 @@ void ScrollBar::ImplDraw( sal_uInt16 nDrawFlags, OutputDevice* pOutDev )
if ( rStyleSettings.GetOptions() & STYLE_OPTION_SCROLLARROW )
{
if ( GetStyle() & WB_HORZ )
- eSymbolType = SYMBOL_ARROW_LEFT;
+ eSymbolType = SymbolType::ARROW_LEFT;
else
- eSymbolType = SYMBOL_ARROW_UP;
+ eSymbolType = SymbolType::ARROW_UP;
}
else
{
if ( GetStyle() & WB_HORZ )
- eSymbolType = SYMBOL_SPIN_LEFT;
+ eSymbolType = SymbolType::SPIN_LEFT;
else
- eSymbolType = SYMBOL_SPIN_UP;
+ eSymbolType = SymbolType::SPIN_UP;
}
aDecoView.DrawSymbol( aTempRect, eSymbolType, rStyleSettings.GetButtonTextColor(), nStyle );
}
@@ -673,16 +673,16 @@ void ScrollBar::ImplDraw( sal_uInt16 nDrawFlags, OutputDevice* pOutDev )
if ( rStyleSettings.GetOptions() & STYLE_OPTION_SCROLLARROW )
{
if ( GetStyle() & WB_HORZ )
- eSymbolType = SYMBOL_ARROW_RIGHT;
+ eSymbolType = SymbolType::ARROW_RIGHT;
else
- eSymbolType = SYMBOL_ARROW_DOWN;
+ eSymbolType = SymbolType::ARROW_DOWN;
}
else
{
if ( GetStyle() & WB_HORZ )
- eSymbolType = SYMBOL_SPIN_RIGHT;
+ eSymbolType = SymbolType::SPIN_RIGHT;
else
- eSymbolType = SYMBOL_SPIN_DOWN;
+ eSymbolType = SymbolType::SPIN_DOWN;
}
aDecoView.DrawSymbol( aTempRect, eSymbolType, rStyleSettings.GetButtonTextColor(), nStyle );
}
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index c1a81b2e73d6..8bbdbb9e14d7 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -156,26 +156,26 @@ void ImplDrawSpinButton( OutputDevice* pOutDev,
// arrows are only use in OS/2 look
if ( bHorz )
{
- eType1 = bMirrorHorz ? SYMBOL_ARROW_RIGHT : SYMBOL_ARROW_LEFT;
- eType2 = bMirrorHorz ? SYMBOL_ARROW_LEFT : SYMBOL_ARROW_RIGHT;
+ eType1 = bMirrorHorz ? SymbolType::ARROW_RIGHT : SymbolType::ARROW_LEFT;
+ eType2 = bMirrorHorz ? SymbolType::ARROW_LEFT : SymbolType::ARROW_RIGHT;
}
else
{
- eType1 = SYMBOL_ARROW_UP;
- eType2 = SYMBOL_ARROW_DOWN;
+ eType1 = SymbolType::ARROW_UP;
+ eType2 = SymbolType::ARROW_DOWN;
}
}
else
{
if ( bHorz )
{
- eType1 = bMirrorHorz ? SYMBOL_SPIN_RIGHT : SYMBOL_SPIN_LEFT;
- eType2 = bMirrorHorz ? SYMBOL_SPIN_LEFT : SYMBOL_SPIN_RIGHT;
+ eType1 = bMirrorHorz ? SymbolType::SPIN_RIGHT : SymbolType::SPIN_LEFT;
+ eType2 = bMirrorHorz ? SymbolType::SPIN_LEFT : SymbolType::SPIN_RIGHT;
}
else
{
- eType1 = SYMBOL_SPIN_UP;
- eType2 = SYMBOL_SPIN_DOWN;
+ eType1 = SymbolType::SPIN_UP;
+ eType2 = SymbolType::SPIN_DOWN;
}
}
@@ -615,9 +615,9 @@ void SpinField::Paint( const Rectangle& rRect )
nStyle |= BUTTON_DRAW_PRESSED;
Rectangle aInnerRect = aView.DrawButton( maDropDownRect, nStyle );
- SymbolType eSymbol = SYMBOL_SPIN_DOWN;
+ SymbolType eSymbol = SymbolType::SPIN_DOWN;
if ( GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_SPINUPDOWN )
- eSymbol = SYMBOL_SPIN_UPDOWN;
+ eSymbol = SymbolType::SPIN_UPDOWN;
nStyle = IsEnabled() ? 0 : SYMBOL_DRAW_DISABLE;
aView.DrawSymbol( aInnerRect, eSymbol, GetSettings().GetStyleSettings().GetButtonTextColor(), nStyle );
@@ -1023,9 +1023,9 @@ void SpinField::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
DecorationView aView( pDev );
sal_uInt16 nStyle = BUTTON_DRAW_NOLIGHTBORDER;
Rectangle aInnerRect = aView.DrawButton( aDD, nStyle );
- SymbolType eSymbol = SYMBOL_SPIN_DOWN;
+ SymbolType eSymbol = SymbolType::SPIN_DOWN;
if ( GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_SPINUPDOWN )
- eSymbol = SYMBOL_SPIN_UPDOWN;
+ eSymbol = SymbolType::SPIN_UPDOWN;
nStyle = ( IsEnabled() || ( nFlags & WINDOW_DRAW_NODISABLE ) ) ? 0 : SYMBOL_DRAW_DISABLE;
aView.DrawSymbol( aInnerRect, eSymbol, aButtonTextColor, nStyle );
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index d008582da02d..579c2ee44045 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1674,7 +1674,7 @@ void ImplStdBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* p
Rectangle aSymbolRect( pData->maCloseRect );
if ( pOffset )
aSymbolRect.Move( pOffset->X(), pOffset->Y() );
- ImplDrawBrdWinSymbolButton( pDev, aSymbolRect, SYMBOL_CLOSE, pData->mnCloseState );
+ ImplDrawBrdWinSymbolButton( pDev, aSymbolRect, SymbolType::CLOSE, pData->mnCloseState );
}
if ( ((nDrawFlags & BORDERWINDOW_DRAW_DOCK) || (nDrawFlags & BORDERWINDOW_DRAW_TITLE)) &&
!pData->maDockRect.IsEmpty() )
@@ -1682,7 +1682,7 @@ void ImplStdBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* p
Rectangle aSymbolRect( pData->maDockRect );
if ( pOffset )
aSymbolRect.Move( pOffset->X(), pOffset->Y() );
- ImplDrawBrdWinSymbolButton( pDev, aSymbolRect, SYMBOL_DOCK, pData->mnDockState );
+ ImplDrawBrdWinSymbolButton( pDev, aSymbolRect, SymbolType::DOCK, pData->mnDockState );
}
if ( ((nDrawFlags & BORDERWINDOW_DRAW_MENU) || (nDrawFlags & BORDERWINDOW_DRAW_TITLE)) &&
!pData->maMenuRect.IsEmpty() )
@@ -1690,7 +1690,7 @@ void ImplStdBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* p
Rectangle aSymbolRect( pData->maMenuRect );
if ( pOffset )
aSymbolRect.Move( pOffset->X(), pOffset->Y() );
- ImplDrawBrdWinSymbolButton( pDev, aSymbolRect, SYMBOL_MENU, pData->mnMenuState );
+ ImplDrawBrdWinSymbolButton( pDev, aSymbolRect, SymbolType::MENU, pData->mnMenuState );
}
if ( ((nDrawFlags & BORDERWINDOW_DRAW_HIDE) || (nDrawFlags & BORDERWINDOW_DRAW_TITLE)) &&
!pData->maHideRect.IsEmpty() )
@@ -1698,16 +1698,16 @@ void ImplStdBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* p
Rectangle aSymbolRect( pData->maHideRect );
if ( pOffset )
aSymbolRect.Move( pOffset->X(), pOffset->Y() );
- ImplDrawBrdWinSymbolButton( pDev, aSymbolRect, SYMBOL_HIDE, pData->mnHideState );
+ ImplDrawBrdWinSymbolButton( pDev, aSymbolRect, SymbolType::HIDE, pData->mnHideState );
}
if ( ((nDrawFlags & BORDERWINDOW_DRAW_ROLL) || (nDrawFlags & BORDERWINDOW_DRAW_TITLE)) &&
!pData->maRollRect.IsEmpty() )
{
SymbolType eType;
if ( pBorderWindow->mbRollUp )
- eType = SYMBOL_ROLLDOWN;
+ eType = SymbolType::ROLLDOWN;
else
- eType = SYMBOL_ROLLUP;
+ eType = SymbolType::ROLLUP;
Rectangle aSymbolRect( pData->maRollRect );
if ( pOffset )
aSymbolRect.Move( pOffset->X(), pOffset->Y() );
@@ -1720,7 +1720,7 @@ void ImplStdBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* p
Rectangle aSymbolRect( pData->maHelpRect );
if ( pOffset )
aSymbolRect.Move( pOffset->X(), pOffset->Y() );
- ImplDrawBrdWinSymbolButton( pDev, aSymbolRect, SYMBOL_HELP, pData->mnHelpState );
+ ImplDrawBrdWinSymbolButton( pDev, aSymbolRect, SymbolType::HELP, pData->mnHelpState );
}
if ( ((nDrawFlags & BORDERWINDOW_DRAW_PIN) || (nDrawFlags & BORDERWINDOW_DRAW_TITLE)) &&
!pData->maPinRect.IsEmpty() )
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index f7ab58f08388..faffeccbb764 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -66,33 +66,33 @@ namespace
SymbolType mapStockToSymbol(const OString& sType)
{
- SymbolType eRet = SYMBOL_NOSYMBOL;
+ SymbolType eRet = SymbolType::DONTKNOW;
if (sType == "gtk-media-next")
- eRet = SYMBOL_NEXT;
+ eRet = SymbolType::NEXT;
else if (sType == "gtk-media-previous")
- eRet = SYMBOL_PREV;
+ eRet = SymbolType::PREV;
else if (sType == "gtk-media-play")
- eRet = SYMBOL_PLAY;
+ eRet = SymbolType::PLAY;
else if (sType == "gtk-goto-first")
- eRet = SYMBOL_FIRST;
+ eRet = SymbolType::FIRST;
else if (sType == "gtk-goto-last")
- eRet = SYMBOL_LAST;
+ eRet = SymbolType::LAST;
else if (sType == "gtk-go-back")
- eRet = SYMBOL_ARROW_LEFT;
+ eRet = SymbolType::ARROW_LEFT;
else if (sType == "gtk-go-forward")
- eRet = SYMBOL_ARROW_RIGHT;
+ eRet = SymbolType::ARROW_RIGHT;
else if (sType == "gtk-go-up")
- eRet = SYMBOL_ARROW_UP;
+ eRet = SymbolType::ARROW_UP;
else if (sType == "gtk-go-down")
- eRet = SYMBOL_ARROW_DOWN;
+ eRet = SymbolType::ARROW_DOWN;
else if (sType == "gtk-missing-image")
- eRet = SYMBOL_IMAGE;
+ eRet = SymbolType::IMAGE;
else if (sType == "gtk-help")
- eRet = SYMBOL_HELP;
+ eRet = SymbolType::HELP;
else if (sType == "gtk-close")
- eRet = SYMBOL_CLOSE;
+ eRet = SymbolType::CLOSE;
else if (mapStockToImageResource(sType))
- eRet = SYMBOL_IMAGE;
+ eRet = SymbolType::IMAGE;
return eRet;
}
}
@@ -389,8 +389,8 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr
{
const stockinfo &rImageInfo = aFind->second;
SymbolType eType = mapStockToSymbol(rImageInfo.m_sStock);
- SAL_WARN_IF(eType == SYMBOL_NOSYMBOL, "vcl", "missing stock image element for button");
- if (eType == SYMBOL_NOSYMBOL)
+ SAL_WARN_IF(eType == SymbolType::DONTKNOW, "vcl", "missing stock image element for button");
+ if (eType == SymbolType::DONTKNOW)
continue;
if (!aI->m_bRadio)
{
@@ -399,12 +399,12 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr
//but images the right size. Really the PushButton::CalcMinimumSize
//and PushButton::ImplDrawPushButton are the better place to handle
//this, but its such a train-wreck
- if (eType != SYMBOL_IMAGE)
+ if (eType != SymbolType::IMAGE)
pTargetButton->SetStyle(pTargetButton->GetStyle() | WB_SMALLSTYLE);
}
else
- SAL_WARN_IF(eType != SYMBOL_IMAGE, "vcl.layout", "inimplemented symbol type for radiobuttons");
- if (eType == SYMBOL_IMAGE)
+ SAL_WARN_IF(eType != SymbolType::IMAGE, "vcl.layout", "inimplemented symbol type for radiobuttons");
+ if (eType == SymbolType::IMAGE)
{
Bitmap aBitmap(VclResId(mapStockToImageResource(rImageInfo.m_sStock)));
Image const aImage(aBitmap);
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 083f13c19692..13b94d2f51cb 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -70,7 +70,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
switch ( eType )
{
- case SYMBOL_ARROW_UP:
+ case SymbolType::ARROW_UP:
pDev->DrawPixel( Point( aCenter.X(), nRect.Top() ) );
for ( long i=1; i <= n2; ++i )
{
@@ -82,7 +82,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
aCenter.X()+n8, nRect.Bottom() ) );
break;
- case SYMBOL_ARROW_DOWN:
+ case SymbolType::ARROW_DOWN:
pDev->DrawPixel( Point( aCenter.X(), nRect.Bottom() ) );
for ( long i=1; i <= n2; ++i )
{
@@ -94,7 +94,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
aCenter.X()+n8, nRect.Bottom()-1 ) );
break;
- case SYMBOL_ARROW_LEFT:
+ case SymbolType::ARROW_LEFT:
pDev->DrawPixel( Point( nRect.Left(), aCenter.Y() ) );
for ( long i=1; i <= n2; ++i )
{
@@ -106,7 +106,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
nRect.Right(), aCenter.Y()+n8 ) );
break;
- case SYMBOL_ARROW_RIGHT:
+ case SymbolType::ARROW_RIGHT:
pDev->DrawPixel( Point( nRect.Right(), aCenter.Y() ) );
for ( long i=1; i <= n2; ++i )
{
@@ -118,7 +118,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
nRect.Right()-1, aCenter.Y()+n8 ) );
break;
- case SYMBOL_SPIN_UP:
+ case SymbolType::SPIN_UP:
nRect.Top() += n4;
pDev->DrawPixel( Point( aCenter.X(), nRect.Top() ) );
for ( long i=1; i <= n2; ++i )
@@ -129,7 +129,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
break;
- case SYMBOL_SPIN_DOWN:
+ case SymbolType::SPIN_DOWN:
nRect.Bottom() -= n4;
pDev->DrawPixel( Point( aCenter.X(), nRect.Bottom() ) );
for ( long i=1; i <= n2; ++i )
@@ -140,12 +140,12 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
break;
- case SYMBOL_SPIN_LEFT:
- case SYMBOL_FIRST:
- case SYMBOL_PREV:
- case SYMBOL_REVERSEPLAY:
+ case SymbolType::SPIN_LEFT:
+ case SymbolType::FIRST:
+ case SymbolType::PREV:
+ case SymbolType::REVERSEPLAY:
nRect.Left() += n4;
- if ( eType==SYMBOL_FIRST )
+ if ( eType==SymbolType::FIRST )
{
pDev->DrawLine( Point( nRect.Left(), nRect.Top() ),
Point( nRect.Left(), nRect.Bottom() ) );
@@ -160,12 +160,12 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
break;
- case SYMBOL_SPIN_RIGHT:
- case SYMBOL_LAST:
- case SYMBOL_NEXT:
- case SYMBOL_PLAY:
+ case SymbolType::SPIN_RIGHT:
+ case SymbolType::LAST:
+ case SymbolType::NEXT:
+ case SymbolType::PLAY:
nRect.Right() -= n4;
- if ( eType==SYMBOL_LAST )
+ if ( eType==SymbolType::LAST )
{
pDev->DrawLine( Point( nRect.Right(), nRect.Top() ),
Point( nRect.Right(), nRect.Bottom() ) );
@@ -180,7 +180,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
break;
- case SYMBOL_PAGEUP:
+ case SymbolType::PAGEUP:
pDev->DrawPixel( Point( aCenter.X(), nRect.Top() ) );
pDev->DrawPixel( Point( aCenter.X(), nRect.Top()+n2 ) );
for ( long i=1; i < n2; ++i )
@@ -193,7 +193,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
break;
- case SYMBOL_PAGEDOWN:
+ case SymbolType::PAGEDOWN:
pDev->DrawPixel( Point( aCenter.X(), nRect.Bottom() ) );
pDev->DrawPixel( Point( aCenter.X(), nRect.Bottom()-n2 ) );
for ( long i=1; i < n2; ++i )
@@ -206,8 +206,8 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
break;
- case SYMBOL_RADIOCHECKMARK:
- case SYMBOL_RECORD:
+ case SymbolType::RADIOCHECKMARK:
+ case SymbolType::RECORD:
{
// Midpoint circle algorithm
long x = 0;
@@ -239,23 +239,23 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
break;
- case SYMBOL_STOP:
+ case SymbolType::STOP:
pDev->DrawRect( nRect );
break;
- case SYMBOL_PAUSE:
+ case SymbolType::PAUSE:
pDev->DrawRect( Rectangle ( nRect.Left(), nRect.Top(),
aCenter.X()-n8, nRect.Bottom() ) );
pDev->DrawRect( Rectangle ( aCenter.X()+n8, nRect.Top(),
nRect.Right(), nRect.Bottom() ) );
break;
- case SYMBOL_WINDSTART:
+ case SymbolType::WINDSTART:
pDev->DrawLine( Point( nRect.Left(), aCenter.Y()-n2+1 ),
Point( nRect.Left(), aCenter.Y()+n2-1 ) );
++nRect.Left();
// Intentional fall-through
- case SYMBOL_WINDBACKWARD:
+ case SymbolType::WINDBACKWARD:
pDev->DrawPixel( Point( nRect.Left(), aCenter.Y() ) );
pDev->DrawPixel( Point( nRect.Left()+n2, aCenter.Y() ) );
for ( long i=1; i < n2; ++i )
@@ -268,12 +268,12 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
break;
- case SYMBOL_WINDEND:
+ case SymbolType::WINDEND:
pDev->DrawLine( Point( nRect.Right(), aCenter.Y()-n2+1 ),
Point( nRect.Right(), aCenter.Y()+n2-1 ) );
--nRect.Right();
// Intentional fall-through
- case SYMBOL_WINDFORWARD:
+ case SymbolType::WINDFORWARD:
pDev->DrawPixel( Point( nRect.Right(), aCenter.Y() ) );
pDev->DrawPixel( Point( nRect.Right()-n2, aCenter.Y() ) );
for ( long i=1; i < n2; ++i )
@@ -286,7 +286,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
break;
- case SYMBOL_CLOSE:
+ case SymbolType::CLOSE:
pDev->DrawLine( Point( nRect.Left(), nRect.Top() ),
Point( nRect.Right(), nRect.Bottom() ) );
pDev->DrawLine( Point( nRect.Left(), nRect.Bottom() ),
@@ -304,7 +304,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
break;
- case SYMBOL_ROLLDOWN:
+ case SymbolType::ROLLDOWN:
pDev->DrawLine( Point( nRect.Left(), nRect.Top() ),
Point( nRect.Left(), nRect.Bottom() ) );
pDev->DrawLine( Point( nRect.Right(), nRect.Top() ),
@@ -312,12 +312,12 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
pDev->DrawLine( Point( nRect.Left(), nRect.Bottom() ),
Point( nRect.Right(), nRect.Bottom() ) );
// Intentional fall-through
- case SYMBOL_ROLLUP:
+ case SymbolType::ROLLUP:
pDev->DrawRect( Rectangle( nRect.Left(), nRect.Top(),
nRect.Right(), nRect.Top()+n8 ) );
break;
- case SYMBOL_CHECKMARK:
+ case SymbolType::CHECKMARK:
{
long n3 = nSide/3;
nRect.Top() -= n3/2;
@@ -354,7 +354,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
break;
- case SYMBOL_SPIN_UPDOWN:
+ case SymbolType::SPIN_UPDOWN:
pDev->DrawPixel( Point( aCenter.X(), nRect.Top() ) );
pDev->DrawPixel( Point( aCenter.X(), nRect.Bottom() ) );
for ( long i=1; i < n2; ++i )
@@ -368,7 +368,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
}
break;
- case SYMBOL_FLOAT:
+ case SymbolType::FLOAT:
nRect.Right() -= n4;
nRect.Top() += n4+1;
pDev->DrawRect( Rectangle( nRect.Left(), nRect.Top(),
@@ -393,7 +393,7 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
Point( nRect.Right(), nRect.Bottom() ) );
break;
- case SYMBOL_DOCK:
+ case SymbolType::DOCK:
pDev->DrawLine( Point( nRect.Left(), nRect.Top() ),
Point( nRect.Right(), nRect.Top() ) );
pDev->DrawLine( Point( nRect.Left(), nRect.Top() ),
@@ -404,17 +404,20 @@ void ImplDrawSymbol( OutputDevice* pDev, Rectangle nRect, const SymbolType eType
Point( nRect.Right(), nRect.Bottom() ) );
break;
- case SYMBOL_HIDE:
+ case SymbolType::HIDE:
pDev->DrawRect( Rectangle( nRect.Left()+n8, nRect.Bottom()-n8,
nRect.Right()-n8, nRect.Bottom() ) );
break;
- case SYMBOL_PLUS:
+ case SymbolType::PLUS:
pDev->DrawRect( Rectangle( nRect.Left(), aCenter.Y()-n8,
nRect.Right(), aCenter.Y()+n8 ) );
pDev->DrawRect( Rectangle( aCenter.X()-n8, nRect.Top(),
aCenter.X()+n8, nRect.Bottom() ) );
break;
+ case SymbolType::DONTKNOW:
+ case SymbolType::IMAGE:
+ case SymbolType::HELP: break;
}
}
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index c925e994ab6e..4ed51747c3d7 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1905,12 +1905,12 @@ void Menu::ImplPaint( vcl::Window* pWin, sal_uInt16 nBorder, long nStartY, MenuI
Size aSymbolSize;
if ( pData->nBits & MIB_RADIOCHECK )
{
- eSymbol = SYMBOL_RADIOCHECKMARK;
+ eSymbol = SymbolType::RADIOCHECKMARK;
aSymbolSize = Size( nFontHeight/2, nFontHeight/2 );
}
else
{
- eSymbol = SYMBOL_CHECKMARK;
+ eSymbol = SymbolType::CHECKMARK;
aSymbolSize = Size( (nFontHeight*25)/40, nFontHeight/2 );
}
aTmpPos.X() = aOuterCheckRect.Left() + (aOuterCheckRect.GetWidth() - aSymbolSize.Width())/2;
@@ -2045,7 +2045,7 @@ void Menu::ImplPaint( vcl::Window* pWin, sal_uInt16 nBorder, long nStartY, MenuI
}
aDecoView.DrawSymbol(
Rectangle( aTmpPos, Size( nFontHeight/2, nFontHeight/2 ) ),
- SYMBOL_SPIN_RIGHT, pWin->GetTextColor(), nSymbolStyle );
+ SymbolType::SPIN_RIGHT, pWin->GetTextColor(), nSymbolStyle );
}
}
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 9fd93c8e9b11..1f0bcee25caa 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -150,11 +150,11 @@ MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) :
aCloseBtn.SetQuickHelpText(IID_DOCUMENTCLOSE, ResId(SV_HELPTEXT_CLOSEDOCUMENT, *pResMgr).toString());
aFloatBtn.SetClickHdl( LINK( this, MenuBarWindow, FloatHdl ) );
- aFloatBtn.SetSymbol( SYMBOL_FLOAT );
+ aFloatBtn.SetSymbol( SymbolType::FLOAT );
aFloatBtn.SetQuickHelpText( ResId(SV_HELPTEXT_RESTORE, *pResMgr).toString() );
aHideBtn.SetClickHdl( LINK( this, MenuBarWindow, HideHdl ) );
- aHideBtn.SetSymbol( SYMBOL_HIDE );
+ aHideBtn.SetSymbol( SymbolType::HIDE );
aHideBtn.SetQuickHelpText( ResId(SV_HELPTEXT_MINIMIZE, *pResMgr).toString() );
}
@@ -938,9 +938,8 @@ void MenuBarWindow::Resize()
aHideBtn.setPosSizePixel( nX, nY, n, n );
}
- aFloatBtn.SetSymbol( SYMBOL_FLOAT );
- aHideBtn.SetSymbol( SYMBOL_HIDE );
- //aCloseBtn.SetSymbol( SYMBOL_CLOSE ); //is a toolbox now
+ aFloatBtn.SetSymbol( SymbolType::FLOAT );
+ aHideBtn.SetSymbol( SymbolType::HIDE );
Invalidate();
}
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 9ef3f91cdfc0..a61345af1e62 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -1124,7 +1124,7 @@ void MenuFloatingWindow::ImplDrawScroller( bool bUp )
Rectangle aRect( Point( nX, nY ), Size( aOutSz.Width()-nX, nScrollerHeight ) );
DecorationView aDecoView( this );
- SymbolType eSymbol = bUp ? SYMBOL_SPIN_UP : SYMBOL_SPIN_DOWN;
+ SymbolType eSymbol = bUp ? SymbolType::SPIN_UP : SymbolType::SPIN_DOWN;
sal_uInt16 nStyle = 0;
if ( ( bUp && !bScrollUp ) || ( !bUp && !bScrollDown ) )