diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-18 13:36:39 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-20 09:52:08 +0200 |
commit | 25a47c5cd54c73e754de988bde8ec8a202d27717 (patch) | |
tree | 479c07ba52f718f03770fba60121d2a0ef3a3b08 /svx/source/fmcomp/gridcell.cxx | |
parent | 7a0af37989d1f1b508a61f28e785c5b1f27d58af (diff) |
convert TEXT_DRAW constants to scoped enum
Change-Id: Ic0f7f8fa236bb478b3598ae3fd3c1b30ebbf1a01
Diffstat (limited to 'svx/source/fmcomp/gridcell.cxx')
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 326f6fbf5c3c..0b8e49e74856 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -467,28 +467,28 @@ void DbGridColumn::Paint(OutputDevice& rDev, { if (!pRow || !pRow->IsValid()) { - sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_CENTER; + DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::Center; if ( !bEnabled ) - nStyle |= TEXT_DRAW_DISABLE; + nStyle |= DrawTextFlags::Disable; rDev.DrawText(rRect, OUString(INVALIDTEXT), nStyle); } else if (m_bAutoValue && pRow->IsNew()) { - sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_VCENTER; + DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::VCenter; if ( !bEnabled ) - nStyle |= TEXT_DRAW_DISABLE; + nStyle |= DrawTextFlags::Disable; switch (GetAlignment()) { case ::com::sun::star::awt::TextAlign::RIGHT: - nStyle |= TEXT_DRAW_RIGHT; + nStyle |= DrawTextFlags::Right; break; case ::com::sun::star::awt::TextAlign::CENTER: - nStyle |= TEXT_DRAW_CENTER; + nStyle |= DrawTextFlags::Center; break; default: - nStyle |= TEXT_DRAW_LEFT; + nStyle |= DrawTextFlags::Left; } rDev.DrawText(rRect, SVX_RESSTR(RID_STR_AUTOFIELD), nStyle); @@ -502,17 +502,17 @@ void DbGridColumn::Paint(OutputDevice& rDev, { if (!pRow || !pRow->IsValid()) { - sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_CENTER; + DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::Center; if ( !bEnabled ) - nStyle |= TEXT_DRAW_DISABLE; + nStyle |= DrawTextFlags::Disable; rDev.DrawText(rRect, OUString(INVALIDTEXT), nStyle); } else if (pRow->HasField(m_nFieldPos) && m_bObject) { - sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_CENTER; + DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::Center; if ( !bEnabled ) - nStyle |= TEXT_DRAW_DISABLE; + nStyle |= DrawTextFlags::Disable; rDev.DrawText(rRect, OUString(OBJECTTEXT), nStyle); } } @@ -2698,7 +2698,7 @@ DbFilterField::~DbFilterField() void DbFilterField::PaintCell(OutputDevice& rDev, const Rectangle& rRect) { - static sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_VCENTER | TEXT_DRAW_LEFT; + static const DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::VCenter | DrawTextFlags::Left; switch (m_nControlClass) { case FormComponentType::CHECKBOX: @@ -3538,20 +3538,20 @@ void FmXTextCell::PaintFieldToCell(OutputDevice& rDev, return; } - sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_VCENTER; + DrawTextFlags nStyle = DrawTextFlags::Clip | DrawTextFlags::VCenter; if ( ( rDev.GetOutDevType() == OUTDEV_WINDOW ) && !static_cast< vcl::Window& >( rDev ).IsEnabled() ) - nStyle |= TEXT_DRAW_DISABLE; + nStyle |= DrawTextFlags::Disable; switch (m_pColumn->GetAlignment()) { case ::com::sun::star::awt::TextAlign::RIGHT: - nStyle |= TEXT_DRAW_RIGHT; + nStyle |= DrawTextFlags::Right; break; case ::com::sun::star::awt::TextAlign::CENTER: - nStyle |= TEXT_DRAW_CENTER; + nStyle |= DrawTextFlags::Center; break; default: - nStyle |= TEXT_DRAW_LEFT; + nStyle |= DrawTextFlags::Left; } Color* pColor = NULL; |