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 | |
parent | 7a0af37989d1f1b508a61f28e785c5b1f27d58af (diff) |
convert TEXT_DRAW constants to scoped enum
Change-Id: Ic0f7f8fa236bb478b3598ae3fd3c1b30ebbf1a01
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/dialcontrol.cxx | 2 | ||||
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 34 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthValueSet.cxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/tools/ValueSetWithTextControl.cxx | 6 |
4 files changed, 23 insertions, 23 deletions
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index 21755f8d25fc..8c318494870a 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -87,7 +87,7 @@ void DialControlBmp::DrawElements( const OUString& rText, sal_Int32 nAngle ) long nX = static_cast< long >( mnCenterX - fWidth * fCos - fHeight * fSin ); long nY = static_cast< long >( mnCenterY + fWidth * fSin - fHeight * fCos ); Rectangle aRect( nX, nY, 2 * mnCenterX - nX, 2 * mnCenterY - nY ); - DrawText( aRect, rText, mbEnabled ? 0 : TEXT_DRAW_DISABLE ); + DrawText( aRect, rText, mbEnabled ? DrawTextFlags::NONE : DrawTextFlags::Disable ); } else { 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; diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx index db6ac1b17fbb..85b59696fe11 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ b/svx/source/sidebar/line/LineWidthValueSet.cxx @@ -138,7 +138,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) aFont.SetColor(GetSettings().GetStyleSettings().GetDisableColor()); pDev->SetFont(aFont); - pDev->DrawText(aStrRect, strUnit[ nItemId - 1 ], TEXT_DRAW_ENDELLIPSIS); + pDev->DrawText(aStrRect, strUnit[ nItemId - 1 ], DrawTextFlags::EndEllipsis); } else { @@ -164,7 +164,7 @@ void LineWidthValueSet::UserDraw( const UserDrawEvent& rUDEvt ) aFont.SetColor(GetSettings().GetStyleSettings().GetFieldTextColor()); pDev->SetFont(aFont); Point aStart(aBLPos.X() + nRectWidth * 7 / 9 , aBLPos.Y() + nRectHeight/6); - pDev->DrawText(aStart, strUnit[ nItemId - 1 ]); //can't set TEXT_DRAW_ENDELLIPSIS here ,or the text will disappear + pDev->DrawText(aStart, strUnit[ nItemId - 1 ]); //can't set DrawTextFlags::EndEllipsis here ,or the text will disappear //draw line if( nSelItem == nItemId ) diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx index ab47fbb752d0..889c8377c2b0 100644 --- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx +++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx @@ -204,7 +204,7 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt ) aStrRect.Left() += pImage->GetSizePixel().Width() + 12; pDev->SetFont(aFont); - pDev->DrawText(aStrRect, maItems[nItemId-1].maItemText, TEXT_DRAW_ENDELLIPSIS); + pDev->DrawText(aStrRect, maItems[nItemId-1].maItemText, DrawTextFlags::EndEllipsis); } break; case TEXT_TEXT: @@ -213,10 +213,10 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt ) aStrRect.Left() += 8; aStrRect.Right() -= (nRectWidth*2)/3; pDev->SetFont(aFont); - pDev->DrawText(aStrRect, maItems[nItemId-1].maItemText, TEXT_DRAW_ENDELLIPSIS); + pDev->DrawText(aStrRect, maItems[nItemId-1].maItemText, DrawTextFlags::EndEllipsis); aStrRect.Left() += nRectWidth/3; aStrRect.Right() += (nRectWidth*2)/3; - pDev->DrawText(aStrRect, maItems[nItemId-1].maItemText2, TEXT_DRAW_ENDELLIPSIS); + pDev->DrawText(aStrRect, maItems[nItemId-1].maItemText2, DrawTextFlags::EndEllipsis); } break; } |