summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_fffield.cpp
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-11-10 19:22:24 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-10 19:22:24 +0000
commit267d2a862fd9ec7bc722533914e8e5af8a19df26 (patch)
tree1b913d9b1f0c6ab4c3ce7436477a009b7f429f73 /xfa/fxfa/cxfa_fffield.cpp
parentc7056ca0027eb34ed9abf31338c4cd2ffff40528 (diff)
downloadpdfium-267d2a862fd9ec7bc722533914e8e5af8a19df26.tar.xz
Cleanup public methods of CXFA_TextLayout
Change-Id: I532c3d7b76b650bbc262925b6a4a26f596a16814 Reviewed-on: https://pdfium-review.googlesource.com/18331 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_fffield.cpp')
-rw-r--r--xfa/fxfa/cxfa_fffield.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp
index 67a4cb1aca..a58fd00cce 100644
--- a/xfa/fxfa/cxfa_fffield.cpp
+++ b/xfa/fxfa/cxfa_fffield.cpp
@@ -216,10 +216,9 @@ void CXFA_FFField::CapPlacement() {
CXFA_TextLayout* pCapTextLayout = m_pDataAcc->GetCaptionTextLayout();
if (fCapReserve <= 0 && pCapTextLayout) {
- CFX_SizeF size;
CFX_SizeF minSize;
CFX_SizeF maxSize;
- pCapTextLayout->CalcSize(minSize, maxSize, size);
+ CFX_SizeF size = pCapTextLayout->CalcSize(minSize, maxSize);
if (iCapPlacement == XFA_ATTRIBUTEENUM_Top ||
iCapPlacement == XFA_ATTRIBUTEENUM_Bottom) {
fCapReserve = size.height;
@@ -592,9 +591,8 @@ void CXFA_FFField::LayoutCaption() {
if (!pCapTextLayout)
return;
- float fHeight = 0;
- pCapTextLayout->Layout(CFX_SizeF(m_rtCaption.width, m_rtCaption.height),
- &fHeight);
+ float fHeight =
+ pCapTextLayout->Layout(CFX_SizeF(m_rtCaption.width, m_rtCaption.height));
if (m_rtCaption.height < fHeight)
m_rtCaption.height = fHeight;
}
@@ -619,7 +617,7 @@ void CXFA_FFField::RenderCaption(CXFA_Graphics* pGS, CFX_Matrix* pMatrix) {
rtClip = pMatrix->TransformRect(rtClip);
mt.Concat(*pMatrix);
}
- pCapTextLayout->DrawString(pRenderDevice, mt, rtClip);
+ pCapTextLayout->DrawString(pRenderDevice, mt, rtClip, 0);
}
bool CXFA_FFField::ProcessCommittedData() {