summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-07-26 17:19:40 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-26 23:56:24 +0000
commit6ba39e8a2f79b9ccfe8d3aeed3eeb4871c13520e (patch)
tree7d55f95975334e4f6bf209eef58002ac7e2bbd4f /fpdfsdk/fpdfxfa
parentf8c0276989b944240a620fa7fc7358054621b854 (diff)
downloadpdfium-6ba39e8a2f79b9ccfe8d3aeed3eeb4871c13520e.tar.xz
Allow CFX_RTemplate to work with CFX_FloatRect
This CL adds a CFX_RTemplate constuctor which accepts a CFX_FloatRect and converts to the correct type. It also adds a ToFloatRect() method which returns a CFX_FloatRect. The CFX_FloatRect::FromCFXRect is removed. Change-Id: I6827345300c6c4dee02c4e5dfa5590f3c8088748 Reviewed-on: https://pdfium-review.googlesource.com/9114 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 28badc4144..052bed55d2 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -66,8 +66,7 @@ void CPDFXFA_DocEnvironment::InvalidateRect(CXFA_FFPageView* pPageView,
if (!pFormFillEnv)
return;
- pFormFillEnv->Invalidate(pPage.Get(),
- CFX_FloatRect::FromCFXRectF(rt).ToFxRect());
+ pFormFillEnv->Invalidate(pPage.Get(), rt.ToFloatRect().ToFxRect());
}
void CPDFXFA_DocEnvironment::DisplayCaret(CXFA_FFWidget* hWidget,
@@ -97,7 +96,7 @@ void CPDFXFA_DocEnvironment::DisplayCaret(CXFA_FFWidget* hWidget,
if (!pFormFillEnv)
return;
- CFX_FloatRect rcCaret = CFX_FloatRect::FromCFXRectF(*pRtAnchor);
+ CFX_FloatRect rcCaret = pRtAnchor->ToFloatRect();
pFormFillEnv->DisplayCaret(pPage.Get(), bVisible, rcCaret.left, rcCaret.top,
rcCaret.right, rcCaret.bottom);
}
@@ -127,7 +126,7 @@ bool CPDFXFA_DocEnvironment::GetPopupPos(CXFA_FFWidget* hWidget,
int t1;
int t2;
- CFX_FloatRect rcAnchor = CFX_FloatRect::FromCFXRectF(rtAnchor);
+ CFX_FloatRect rcAnchor = rtAnchor.ToFloatRect();
int nRotate = hWidget->GetDataAcc()->GetRotate();
switch (nRotate) {
case 90: {