summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-05-02 20:46:38 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-02 20:46:38 +0000
commit20c62003660cc7bf7ab28a5e638556e22d5a525b (patch)
treee8c45ca96b1441a8743b8a1cd8934e4e2523ee7e /fpdfsdk
parentcef665eb28bbf4caaa5625332be8f891e3ec2a8e (diff)
downloadpdfium-20c62003660cc7bf7ab28a5e638556e22d5a525b.tar.xz
Use pointers instead of refs for GetPopupPos() params.
Change-Id: Ic19b91f91f08b1867437b22de04a2c54045ce8ae Reviewed-on: https://pdfium-review.googlesource.com/31992 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp28
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h2
2 files changed, 15 insertions, 15 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 984fff715c..dc6686548b 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -107,7 +107,7 @@ bool CPDFXFA_DocEnvironment::GetPopupPos(CXFA_FFWidget* hWidget,
float fMinPopup,
float fMaxPopup,
const CFX_RectF& rtAnchor,
- CFX_RectF& rtPopup) {
+ CFX_RectF* pPopupRect) {
if (!hWidget)
return false;
@@ -139,9 +139,9 @@ bool CPDFXFA_DocEnvironment::GetPopupPos(CXFA_FFWidget* hWidget,
static_cast<int>(rtAnchor.top - page_view_rect.top);
if (rtAnchor.left < page_view_rect.left)
- rtPopup.left += page_view_rect.left - rtAnchor.left;
+ pPopupRect->left += page_view_rect.left - rtAnchor.left;
if (rtAnchor.right() > page_view_rect.right)
- rtPopup.left -= rtAnchor.right() - page_view_rect.right;
+ pPopupRect->left -= rtAnchor.right() - page_view_rect.right;
break;
}
case 90: {
@@ -151,9 +151,9 @@ bool CPDFXFA_DocEnvironment::GetPopupPos(CXFA_FFWidget* hWidget,
static_cast<int>(rtAnchor.left - page_view_rect.left);
if (rtAnchor.bottom() > page_view_rect.bottom)
- rtPopup.left += rtAnchor.bottom() - page_view_rect.bottom;
+ pPopupRect->left += rtAnchor.bottom() - page_view_rect.bottom;
if (rtAnchor.top < page_view_rect.top)
- rtPopup.left -= page_view_rect.top - rtAnchor.top;
+ pPopupRect->left -= page_view_rect.top - rtAnchor.top;
break;
}
case 180: {
@@ -163,9 +163,9 @@ bool CPDFXFA_DocEnvironment::GetPopupPos(CXFA_FFWidget* hWidget,
static_cast<int>(page_view_rect.bottom - rtAnchor.bottom());
if (rtAnchor.right() > page_view_rect.right)
- rtPopup.left += rtAnchor.right() - page_view_rect.right;
+ pPopupRect->left += rtAnchor.right() - page_view_rect.right;
if (rtAnchor.left < page_view_rect.left)
- rtPopup.left -= page_view_rect.left - rtAnchor.left;
+ pPopupRect->left -= page_view_rect.left - rtAnchor.left;
break;
}
case 270: {
@@ -175,9 +175,9 @@ bool CPDFXFA_DocEnvironment::GetPopupPos(CXFA_FFWidget* hWidget,
static_cast<int>(page_view_rect.right - rtAnchor.right());
if (rtAnchor.top < page_view_rect.top)
- rtPopup.left += page_view_rect.top - rtAnchor.top;
+ pPopupRect->left += page_view_rect.top - rtAnchor.top;
if (rtAnchor.bottom() > page_view_rect.bottom)
- rtPopup.left -= rtAnchor.bottom() - page_view_rect.bottom;
+ pPopupRect->left -= rtAnchor.bottom() - page_view_rect.bottom;
break;
}
}
@@ -213,24 +213,24 @@ bool CPDFXFA_DocEnvironment::GetPopupPos(CXFA_FFWidget* hWidget,
case 0:
case 180: {
if (draw_below_anchor)
- rtPopup.top = rtAnchor.height;
+ pPopupRect->top = rtAnchor.height;
else
- rtPopup.top = -popup_height;
+ pPopupRect->top = -popup_height;
break;
}
case 90:
case 270: {
if (draw_below_anchor)
- rtPopup.top = rtAnchor.width;
+ pPopupRect->top = rtAnchor.width;
else
- rtPopup.top = -popup_height;
+ pPopupRect->top = -popup_height;
break;
}
default:
break;
}
- rtPopup.height = popup_height;
+ pPopupRect->height = popup_height;
return true;
}
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
index 03aae3d765..1c46a37fe8 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
@@ -33,7 +33,7 @@ class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment {
float fMinPopup,
float fMaxPopup,
const CFX_RectF& rtAnchor,
- CFX_RectF& rtPopup) override;
+ CFX_RectF* pPopupRect) override;
bool PopupMenu(CXFA_FFWidget* hWidget, CFX_PointF ptPopup) override;
// dwFlags XFA_PAGEVIEWEVENT_Added, XFA_PAGEVIEWEVENT_Removing