summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-19 10:43:01 +0200
committerNoel Grandin <noel@peralex.com>2015-05-20 09:52:08 +0200
commit3cbdf64ad5240e6d9a73d4f7e005f7110d5e4002 (patch)
tree87ecd744320ba70cd784a2aac82aa436ea5d0c13 /sw
parent662700703bebad38ca7ad74ca4eb040fe8b5b676 (diff)
convert DRAWMODE constants to scoped enum
Change-Id: I36cbe8057d09226f8b302963bdd94dc5600b686f
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/paintfrm.cxx26
-rw-r--r--sw/source/core/view/vdraw.cxx6
-rw-r--r--sw/source/ui/table/tautofmt.cxx4
3 files changed, 18 insertions, 18 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 23be1e1736da..89eb1a326c28 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1063,10 +1063,10 @@ void SwLineRects::PaintLines( OutputDevice *pOut, SwPaintProperties &properties
{
pLast = &rLRect.GetColor();
- sal_uLong nOldDrawMode = pOut->GetDrawMode();
+ DrawModeFlags nOldDrawMode = pOut->GetDrawMode();
if( properties.pSGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
- pOut->SetDrawMode( 0 );
+ pOut->SetDrawMode( DrawModeFlags::Default );
pOut->SetLineColor( *pLast );
pOut->SetFillColor( *pLast );
@@ -1098,11 +1098,11 @@ void SwLineRects::PaintLines( OutputDevice *pOut, SwPaintProperties &properties
{
pLast = &rLRect.GetColor();
- sal_uLong nOldDrawMode = pOut->GetDrawMode();
+ DrawModeFlags nOldDrawMode = pOut->GetDrawMode();
if( properties.pSGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
- pOut->SetDrawMode( 0 );
+ pOut->SetDrawMode( DrawModeFlags::Default );
}
pOut->SetFillColor( *pLast );
@@ -1186,11 +1186,11 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
// Reset draw mode in high contrast mode in order to get fill color
// set at output device. Recover draw mode after draw of lines.
// Necessary for the subsidiary lines painted by the fly frames.
- sal_uLong nOldDrawMode = pOut->GetDrawMode();
+ DrawModeFlags nOldDrawMode = pOut->GetDrawMode();
if( gProp.pSGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
- pOut->SetDrawMode( 0 );
+ pOut->SetDrawMode( DrawModeFlags::Default );
}
for (SwSubsRects::iterator it = aLineRects.begin(); it != aLineRects.end();
@@ -2206,11 +2206,11 @@ void DrawGraphic(
}
// #i75614# reset draw mode in high contrast mode in order to get fill color set
- const sal_uLong nOldDrawMode = pOutDev->GetDrawMode();
+ const DrawModeFlags nOldDrawMode = pOutDev->GetDrawMode();
if ( gProp.pSGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
- pOutDev->SetDrawMode( 0 );
+ pOutDev->SetDrawMode( DrawModeFlags::Default );
}
// OD 06.08.2002 #99657# - if background region has to be drawn
@@ -2574,12 +2574,12 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
// high contrast mode:
// overrides the color of non-subsidiary lines.
const Color* pHCColor = 0;
- sal_uLong nOldDrawMode = rDev.GetDrawMode();
+ DrawModeFlags nOldDrawMode = rDev.GetDrawMode();
if( gProp.pSGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
pHCColor = &SwViewOption::GetFontColor();
- rDev.SetDrawMode( 0 );
+ rDev.SetDrawMode( DrawModeFlags::Default );
}
const SwFrm* pUpper = mrTabFrm.GetUpper();
@@ -4588,16 +4588,16 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect,
vcl::RenderContext *pOut = properties.pSGlobalShell->GetOut();
- sal_uLong nOldDrawMode = pOut->GetDrawMode();
+ DrawModeFlags nOldDrawMode = pOut->GetDrawMode();
Color aShadowColor( rShadow.GetColor().GetRGBColor() );
if( !aRegion.empty() && properties.pSGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
// In high contrast mode, the output device has already set the
- // DRAWMODE_SETTINGSFILL flag. This causes the SetFillColor function
+ // DrawModeFlags::SettingsFill flag. This causes the SetFillColor function
// to ignore the setting of a new color. Therefore we have to reset
// the drawing mode
- pOut->SetDrawMode( 0 );
+ pOut->SetDrawMode( DrawModeFlags::Default );
aShadowColor = SwViewOption::GetFontColor();
}
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index c9bf7159e5cd..01cf7e6f77b5 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -93,13 +93,13 @@ void SwViewShellImp::PaintLayer( const SdrLayerID _nLayerID,
{
//change the draw mode in high contrast mode
OutputDevice* pOutDev = GetShell()->GetOut();
- sal_uLong nOldDrawMode = pOutDev->GetDrawMode();
+ DrawModeFlags nOldDrawMode = pOutDev->GetDrawMode();
if( GetShell()->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() &&
(!GetShell()->IsPreview()||SW_MOD()->GetAccessibilityOptions().GetIsForPagePreviews()))
{
- pOutDev->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL |
- DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT );
+ pOutDev->SetDrawMode( nOldDrawMode | DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill |
+ DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient );
}
// For correct handling of accessibility, high contrast, the
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index cd2bbfeb4a00..ddb2aa03e877 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -909,9 +909,9 @@ void AutoFmtPreview::NotifyChange( const SwTableAutoFmt& rNewData )
void AutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/)
{
- sal_uInt32 nOldDrawMode = aVD->GetDrawMode();
+ DrawModeFlags nOldDrawMode = aVD->GetDrawMode();
if (rRenderContext.GetSettings().GetStyleSettings().GetHighContrastMode())
- aVD->SetDrawMode(DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT);
+ aVD->SetDrawMode(DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient);
Bitmap thePreview;
Point aCenterPos;