summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffline.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-21 21:54:40 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-21 21:54:40 +0000
commit36261b631e1847bcfdda6d381ae414c954d73e88 (patch)
treee2f6dd3eb79e04125033933adbb02ad3a5ceb83c /xfa/fxfa/cxfa_ffline.cpp
parent64e16079bb87085fdff5d6268267fd01eacbc5d9 (diff)
downloadpdfium-36261b631e1847bcfdda6d381ae414c954d73e88.tar.xz
Cleanup CXFA_LineData
Make methods const and return the correct types. Change-Id: Icaa1c17d611a69227f67ea398e4b3cc17bc1004b Reviewed-on: https://pdfium-review.googlesource.com/19011 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffline.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffline.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/xfa/fxfa/cxfa_ffline.cpp b/xfa/fxfa/cxfa_ffline.cpp
index 62a4f86998..df83fa62ab 100644
--- a/xfa/fxfa/cxfa_ffline.cpp
+++ b/xfa/fxfa/cxfa_ffline.cpp
@@ -15,7 +15,7 @@ CXFA_FFLine::CXFA_FFLine(CXFA_WidgetAcc* pDataAcc) : CXFA_FFDraw(pDataAcc) {}
CXFA_FFLine::~CXFA_FFLine() {}
void CXFA_FFLine::GetRectFromHand(CFX_RectF& rect,
- int32_t iHand,
+ XFA_ATTRIBUTEENUM iHand,
float fLineWidth) {
float fHalfWidth = fLineWidth / 2.0f;
if (rect.height < 1.0f) {
@@ -25,6 +25,11 @@ void CXFA_FFLine::GetRectFromHand(CFX_RectF& rect,
break;
case XFA_ATTRIBUTEENUM_Right:
rect.top += fHalfWidth;
+ case XFA_ATTRIBUTEENUM_Even:
+ break;
+ default:
+ NOTREACHED();
+ break;
}
} else if (rect.width < 1.0f) {
switch (iHand) {
@@ -34,6 +39,11 @@ void CXFA_FFLine::GetRectFromHand(CFX_RectF& rect,
case XFA_ATTRIBUTEENUM_Right:
rect.left += fHalfWidth;
break;
+ case XFA_ATTRIBUTEENUM_Even:
+ break;
+ default:
+ NOTREACHED();
+ break;
}
} else {
switch (iHand) {
@@ -43,6 +53,11 @@ void CXFA_FFLine::GetRectFromHand(CFX_RectF& rect,
case XFA_ATTRIBUTEENUM_Right:
rect.Deflate(fHalfWidth, fHalfWidth);
break;
+ case XFA_ATTRIBUTEENUM_Even:
+ break;
+ default:
+ NOTREACHED();
+ break;
}
}
}