summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/Field.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-26 13:17:56 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-26 13:17:56 -0800
commit566b974287ce0e81a963138152b8898f22480f52 (patch)
treeb85991aee92475549d84e8cb68702960b85d1252 /fpdfsdk/src/javascript/Field.cpp
parent3b8fdd34bdf57ec45291b77008a43249f838efcb (diff)
downloadpdfium-566b974287ce0e81a963138152b8898f22480f52.tar.xz
Revert "Replace CPDF_Rect and CPDF_Point with CFX types."
This reverts commit 3b8fdd34bdf57ec45291b77008a43249f838efcb. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1743753002 .
Diffstat (limited to 'fpdfsdk/src/javascript/Field.cpp')
-rw-r--r--fpdfsdk/src/javascript/Field.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index 9b6a7facba..82187c2453 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/src/javascript/Field.cpp
@@ -2095,7 +2095,7 @@ FX_BOOL Field::rect(IJS_Context* cc,
pArray[2] = (FX_FLOAT)Lower_Rightx.ToInt();
pArray[3] = (FX_FLOAT)Upper_Lefty.ToInt();
- CFX_FloatRect crRect(pArray);
+ CPDF_Rect crRect(pArray);
if (m_bDelay) {
AddDelay_Rect(FP_RECT, crRect);
} else {
@@ -2133,7 +2133,7 @@ FX_BOOL Field::rect(IJS_Context* cc,
void Field::SetRect(CPDFSDK_Document* pDocument,
const CFX_WideString& swFieldName,
int nControlIndex,
- const CFX_FloatRect& rect) {
+ const CPDF_Rect& rect) {
CPDFSDK_InterForm* pInterForm = (CPDFSDK_InterForm*)pDocument->GetInterForm();
std::vector<CPDF_FormField*> FieldArray =
@@ -2146,13 +2146,13 @@ void Field::SetRect(CPDFSDK_Document* pDocument,
ASSERT(pFormControl);
if (CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormControl)) {
- CFX_FloatRect crRect = rect;
+ CPDF_Rect crRect = rect;
CPDF_Page* pPDFPage = pWidget->GetPDFPage();
crRect.Intersect(pPDFPage->GetPageBBox());
if (!crRect.IsEmpty()) {
- CFX_FloatRect rcOld = pWidget->GetRect();
+ CPDF_Rect rcOld = pWidget->GetRect();
if (crRect.left != rcOld.left || crRect.right != rcOld.right ||
crRect.top != rcOld.top || crRect.bottom != rcOld.bottom) {
pWidget->SetRect(crRect);
@@ -2170,13 +2170,13 @@ void Field::SetRect(CPDFSDK_Document* pDocument,
if (CPDF_FormControl* pFormControl =
pFormField->GetControl(nControlIndex)) {
if (CPDFSDK_Widget* pWidget = pInterForm->GetWidget(pFormControl)) {
- CFX_FloatRect crRect = rect;
+ CPDF_Rect crRect = rect;
CPDF_Page* pPDFPage = pWidget->GetPDFPage();
crRect.Intersect(pPDFPage->GetPageBBox());
if (!crRect.IsEmpty()) {
- CFX_FloatRect rcOld = pWidget->GetRect();
+ CPDF_Rect rcOld = pWidget->GetRect();
if (crRect.left != rcOld.left || crRect.right != rcOld.right ||
crRect.top != rcOld.top || crRect.bottom != rcOld.bottom) {
pWidget->SetRect(crRect);
@@ -3402,7 +3402,7 @@ void Field::AddDelay_WideString(enum FIELD_PROP prop,
m_pJSDoc->AddDelayData(pNewData);
}
-void Field::AddDelay_Rect(enum FIELD_PROP prop, const CFX_FloatRect& rect) {
+void Field::AddDelay_Rect(enum FIELD_PROP prop, const CPDF_Rect& rect) {
CJS_DelayData* pNewData = new CJS_DelayData;
pNewData->sFieldName = m_FieldName;
pNewData->nControlIndex = m_nFormControlIndex;
@@ -3592,6 +3592,6 @@ void Field::AddField(CPDFSDK_Document* pDocument,
int nPageIndex,
int nFieldType,
const CFX_WideString& sName,
- const CFX_FloatRect& rcCoords) {
+ const CPDF_Rect& rcCoords) {
// Not supported.
}