diff options
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp | 28 |
1 files changed, 14 insertions, 14 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; } |