Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Unified Diff: fpdfsdk/javascript/Document.cpp

Issue 2053513002: Remove redundant casts, part 4 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/fsdk_annothandler.cpp ('k') | fpdfsdk/javascript/Field.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/Document.cpp
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index 076e99849e7fe89866e12cc5507aab16d38dd5ce..258dddbe108a07c336a4583290f69ccbc36f7933 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -379,8 +379,7 @@ FX_BOOL Document::mailForm(IJS_Context* cc,
CFX_WideString cSubject = iLength > 4 ? params[4].ToCFXWideString() : L"";
CFX_WideString cMsg = iLength > 5 ? params[5].ToCFXWideString() : L"";
- CPDFSDK_InterForm* pInterForm =
- (CPDFSDK_InterForm*)m_pDocument->GetInterForm();
+ CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm();
CFX_ByteTextBuf textBuf;
if (!pInterForm->ExportFormToFDFTextBuf(textBuf))
return FALSE;
@@ -478,12 +477,9 @@ FX_BOOL Document::removeField(IJS_Context* cc,
}
CFX_WideString sFieldName = params[0].ToCFXWideString();
- CPDFSDK_InterForm* pInterForm =
- (CPDFSDK_InterForm*)m_pDocument->GetInterForm();
-
+ CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm();
std::vector<CPDFSDK_Widget*> widgets;
pInterForm->GetWidgets(sFieldName, &widgets);
-
if (widgets.empty())
return TRUE;
@@ -520,8 +516,7 @@ FX_BOOL Document::resetForm(IJS_Context* cc,
m_pDocument->GetPermissions(FPDFPERM_FILL_FORM)))
return FALSE;
- CPDFSDK_InterForm* pInterForm =
- (CPDFSDK_InterForm*)m_pDocument->GetInterForm();
+ CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm();
CPDF_InterForm* pPDFForm = pInterForm->GetInterForm();
CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc);
CJS_Array aName(pRuntime);
@@ -611,8 +606,7 @@ FX_BOOL Document::submitForm(IJS_Context* cc,
CJS_Value(pRuntime, pValue, GET_VALUE_TYPE(pValue)).ToV8Array());
}
- CPDFSDK_InterForm* pInterForm =
- (CPDFSDK_InterForm*)m_pDocument->GetInterForm();
+ CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm();
CPDF_InterForm* pPDFInterForm = pInterForm->GetInterForm();
if (aFields.GetLength() == 0 && bEmpty) {
if (pPDFInterForm->CheckRequiredFields(nullptr, true)) {
@@ -1028,9 +1022,7 @@ FX_BOOL Document::baseURL(IJS_Context* cc,
FX_BOOL Document::calculate(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
- CPDFSDK_InterForm* pInterForm =
- (CPDFSDK_InterForm*)m_pDocument->GetInterForm();
-
+ CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm();
if (vp.IsGetting()) {
if (pInterForm->IsCalculateEnabled())
vp << true;
@@ -1311,8 +1303,7 @@ FX_BOOL Document::calculateNow(IJS_Context* cc,
m_pDocument->GetPermissions(FPDFPERM_FILL_FORM)))
return FALSE;
- CPDFSDK_InterForm* pInterForm =
- (CPDFSDK_InterForm*)m_pDocument->GetInterForm();
+ CPDFSDK_InterForm* pInterForm = m_pDocument->GetInterForm();
pInterForm->OnCalculate();
return TRUE;
}
« no previous file with comments | « fpdfsdk/fsdk_annothandler.cpp ('k') | fpdfsdk/javascript/Field.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698