summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/Document.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-06-08 20:44:54 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-08 20:44:54 -0700
commit23ae4a55bfa8edca1069ac534bfd7c836fcc91ea (patch)
tree29c72f3e6d4dc68fa8e74cf4f46233404af4d455 /fpdfsdk/javascript/Document.cpp
parent947c87348d30ec8065a646e6da09e863e8f24cfa (diff)
downloadpdfium-23ae4a55bfa8edca1069ac534bfd7c836fcc91ea.tar.xz
Remove redundant casts, part 4
Review-Url: https://codereview.chromium.org/2053513002
Diffstat (limited to 'fpdfsdk/javascript/Document.cpp')
-rw-r--r--fpdfsdk/javascript/Document.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index 076e99849e..258dddbe10 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;
}