From c635c93c974db1c55032c36e81e98f3d214a249f Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 3 Jan 2017 15:46:55 -0500 Subject: Remove the ::GetCapacity methods. The GetCapacity methods return a void* because they return different types of internal class memory based on what the calling parameter was. This is confusing and makes it difficult to tell when then enum values can be removed. This CL removes GetCapacity and adds methods as needed to get the real values. Change-Id: I64c2edc858220624880e27f4ed49c2dae080f462 Reviewed-on: https://pdfium-review.googlesource.com/2137 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- xfa/fxfa/app/xfa_fffield.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa/app/xfa_fffield.cpp') diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp index 2e15696ab7..0bd6160944 100644 --- a/xfa/fxfa/app/xfa_fffield.cpp +++ b/xfa/fxfa/app/xfa_fffield.cpp @@ -135,8 +135,7 @@ void CXFA_FFField::SetEditScrollOffset() { FX_FLOAT fScrollOffset = 0; CXFA_FFField* pPrev = static_cast(GetPrev()); if (pPrev) { - CFX_RectF rtMargin; - m_pDataAcc->GetUIMargin(rtMargin); + CFX_RectF rtMargin = m_pDataAcc->GetUIMargin(); fScrollOffset = -rtMargin.top; } while (pPrev) { @@ -265,8 +264,7 @@ void CXFA_FFField::CapPlacement() { void CXFA_FFField::CapTopBottomPlacement(CXFA_Caption caption, const CFX_RectF& rtWidget, int32_t iCapPlacement) { - CFX_RectF rtUIMargin; - m_pDataAcc->GetUIMargin(rtUIMargin); + CFX_RectF rtUIMargin = m_pDataAcc->GetUIMargin(); m_rtCaption.left += rtUIMargin.left; if (CXFA_Margin mgCap = caption.GetMargin()) { XFA_RectWidthoutMargin(m_rtCaption, mgCap); @@ -292,8 +290,7 @@ void CXFA_FFField::CapTopBottomPlacement(CXFA_Caption caption, void CXFA_FFField::CapLeftRightPlacement(CXFA_Caption caption, const CFX_RectF& rtWidget, int32_t iCapPlacement) { - CFX_RectF rtUIMargin; - m_pDataAcc->GetUIMargin(rtUIMargin); + CFX_RectF rtUIMargin = m_pDataAcc->GetUIMargin(); m_rtCaption.top += rtUIMargin.top; m_rtCaption.height -= rtUIMargin.top; if (CXFA_Margin mgCap = caption.GetMargin()) { -- cgit v1.2.3