summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_layoutitem.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-07 09:04:28 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-07 14:33:17 +0000
commitc222907f453e8a0e6376a86f89354eedb8285854 (patch)
tree8ac6942b7fe65f7eb6dbc951a6a1f77aa9e18afc /xfa/fxfa/parser/cxfa_layoutitem.cpp
parent76da8841aef9a60c1c65c646a9f943c25861bc33 (diff)
downloadpdfium-c222907f453e8a0e6376a86f89354eedb8285854.tar.xz
Cleanup out params in XFA layout code.
This CL converts some of the out parameters in the XFA layout code to pointers instead of references. Change-Id: I6246b91b975e7bc08f8cfb040de9dfdc3c3bedee Reviewed-on: https://pdfium-review.googlesource.com/2531 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_layoutitem.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_layoutitem.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/cxfa_layoutitem.cpp b/xfa/fxfa/parser/cxfa_layoutitem.cpp
index 55aa285e2d..7a373e1e9a 100644
--- a/xfa/fxfa/parser/cxfa_layoutitem.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutitem.cpp
@@ -61,16 +61,16 @@ CXFA_ContainerLayoutItem* CXFA_LayoutItem::GetPage() const {
return nullptr;
}
-void CXFA_LayoutItem::GetRect(CFX_RectF& rtLayout, bool bRelative) const {
+CFX_RectF CXFA_LayoutItem::GetRect(bool bRelative) const {
ASSERT(m_bIsContentLayoutItem);
- const CXFA_ContentLayoutItem* pThis =
- static_cast<const CXFA_ContentLayoutItem*>(this);
+ auto pThis = static_cast<const CXFA_ContentLayoutItem*>(this);
CFX_PointF sPos = pThis->m_sPos;
CFX_SizeF sSize = pThis->m_sSize;
if (bRelative) {
+ CFX_RectF rtLayout;
rtLayout.Set(sPos.x, sPos.y, sSize.x, sSize.y);
- return;
+ return rtLayout;
}
for (CXFA_LayoutItem* pLayoutItem = pThis->m_pParent; pLayoutItem;
@@ -100,7 +100,9 @@ void CXFA_LayoutItem::GetRect(CFX_RectF& rtLayout, bool bRelative) const {
break;
}
+ CFX_RectF rtLayout;
rtLayout.Set(sPos.x, sPos.y, sSize.x, sSize.y);
+ return rtLayout;
}
CXFA_LayoutItem* CXFA_LayoutItem::GetFirst() {