summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
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