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_ffwidgetacc.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa/app/xfa_ffwidgetacc.cpp') diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp index 3ff159aa41..13145e6448 100644 --- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp +++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp @@ -768,8 +768,7 @@ void CXFA_WidgetAcc::CalcCaptionSize(CFX_SizeF& szCap) { bool CXFA_WidgetAcc::CalculateFieldAutoSize(CFX_SizeF& size) { CFX_SizeF szCap; CalcCaptionSize(szCap); - CFX_RectF rtUIMargin; - GetUIMargin(rtUIMargin); + CFX_RectF rtUIMargin = GetUIMargin(); size.x += rtUIMargin.left + rtUIMargin.width; size.y += rtUIMargin.top + rtUIMargin.height; if (szCap.x > 0 && szCap.y > 0) { @@ -883,8 +882,7 @@ bool CXFA_WidgetAcc::CalculateTextEditAutoSize(CFX_SizeF& size) { break; } } - CFX_RectF rtUIMargin; - GetUIMargin(rtUIMargin); + CFX_RectF rtUIMargin = GetUIMargin(); size.x -= rtUIMargin.left + rtUIMargin.width; CXFA_Margin mgWidget = GetMargin(); if (mgWidget) { @@ -1168,8 +1166,7 @@ bool CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight) { mgWidget.GetTopInset(fTopInset); mgWidget.GetBottomInset(fBottomInset); } - CFX_RectF rtUIMargin; - GetUIMargin(rtUIMargin); + CFX_RectF rtUIMargin = GetUIMargin(); fTopInset += rtUIMargin.top; fBottomInset += rtUIMargin.width; } -- cgit v1.2.3