diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-21 21:59:45 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-21 21:59:45 +0000 |
commit | 96d6f741b3c106ba0e48a05692910f64cf1e5e09 (patch) | |
tree | 07fc97f427a308bffd995ae9a77aa2dbac9972eb /xfa/fxfa/cxfa_textlayout.cpp | |
parent | b06d3f8d7658eeab6624f66aef690a7f4b44936e (diff) | |
download | pdfium-96d6f741b3c106ba0e48a05692910f64cf1e5e09.tar.xz |
Cleanup CXFA_ParaData
This CL fixes the return types and makes the CXFA_ParaData methods
const.
Change-Id: Ifb63b46e826d9741682d992d7fc1ee37c772fb41
Reviewed-on: https://pdfium-review.googlesource.com/19070
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_textlayout.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_textlayout.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/xfa/fxfa/cxfa_textlayout.cpp b/xfa/fxfa/cxfa_textlayout.cpp index 7ff86bafeb..e951e3fe3a 100644 --- a/xfa/fxfa/cxfa_textlayout.cpp +++ b/xfa/fxfa/cxfa_textlayout.cpp @@ -120,6 +120,12 @@ void CXFA_TextLayout::InitBreak(float fLineWidth) { case XFA_ATTRIBUTEENUM_JustifyAll: iAlign = CFX_RTFLineAlignment::Distributed; break; + case XFA_ATTRIBUTEENUM_Left: + case XFA_ATTRIBUTEENUM_Radix: + break; + default: + NOTREACHED(); + break; } m_pBreak->SetAlignment(iAlign); @@ -649,17 +655,19 @@ void CXFA_TextLayout::LoadText(CXFA_Node* pNode, float fSpaceAbove = 0; if (paraData.HasValidNode()) { fSpaceAbove = paraData.GetSpaceAbove(); - if (fSpaceAbove < 0.1f) { + if (fSpaceAbove < 0.1f) fSpaceAbove = 0; - } - int32_t verAlign = paraData.GetVerticalAlign(); - switch (verAlign) { + + switch (paraData.GetVerticalAlign()) { case XFA_ATTRIBUTEENUM_Top: case XFA_ATTRIBUTEENUM_Middle: case XFA_ATTRIBUTEENUM_Bottom: { fLinePos += fSpaceAbove; break; } + default: + NOTREACHED(); + break; } } |