summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_EventHandler.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-06-13 00:48:38 -0700
committerLei Zhang <thestig@chromium.org>2015-06-13 00:48:38 -0700
commita6d9f0edce07194f551db4c38bb427fbf7d550cf (patch)
tree5ab405c2afde59f7c78c0298992b25fe8566de3b /fpdfsdk/src/javascript/JS_EventHandler.cpp
parentbef3c6d1fe83c0d1a84ace5c501932ed39651a74 (diff)
downloadpdfium-a6d9f0edce07194f551db4c38bb427fbf7d550cf.tar.xz
Remove trailing whitespaces in fpdfsdk, XFA edition.
Review URL: https://codereview.chromium.org/1185843005.
Diffstat (limited to 'fpdfsdk/src/javascript/JS_EventHandler.cpp')
-rw-r--r--fpdfsdk/src/javascript/JS_EventHandler.cpp92
1 files changed, 46 insertions, 46 deletions
diff --git a/fpdfsdk/src/javascript/JS_EventHandler.cpp b/fpdfsdk/src/javascript/JS_EventHandler.cpp
index 1fab82f74e..7d27c66f6b 100644
--- a/fpdfsdk/src/javascript/JS_EventHandler.cpp
+++ b/fpdfsdk/src/javascript/JS_EventHandler.cpp
@@ -1,7 +1,7 @@
// Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
+
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../include/javascript/JavaScript.h"
@@ -57,41 +57,41 @@ void CJS_EventHandler::OnDoc_Open(CPDFSDK_Document* pDoc, const CFX_WideString&
Initial(JET_DOC_OPEN);
m_pTargetDoc = pDoc;
- m_strTargetName = strTargetName;
+ m_strTargetName = strTargetName;
}
void CJS_EventHandler::OnDoc_WillPrint(CPDFSDK_Document* pDoc)
{
Initial(JET_DOC_WILLPRINT);
- m_pTargetDoc = pDoc;
+ m_pTargetDoc = pDoc;
}
void CJS_EventHandler::OnDoc_DidPrint(CPDFSDK_Document* pDoc)
{
Initial(JET_DOC_DIDPRINT);
-
- m_pTargetDoc = pDoc;
+
+ m_pTargetDoc = pDoc;
}
void CJS_EventHandler::OnDoc_WillSave(CPDFSDK_Document* pDoc)
{
Initial(JET_DOC_WILLSAVE);
- m_pTargetDoc = pDoc;
+ m_pTargetDoc = pDoc;
}
void CJS_EventHandler::OnDoc_DidSave(CPDFSDK_Document* pDoc)
{
- Initial(JET_DOC_DIDSAVE);
-
- m_pTargetDoc = pDoc;
+ Initial(JET_DOC_DIDSAVE);
+
+ m_pTargetDoc = pDoc;
}
void CJS_EventHandler::OnDoc_WillClose(CPDFSDK_Document* pDoc)
{
Initial(JET_DOC_WILLCLOSE);
- m_pTargetDoc = pDoc;
+ m_pTargetDoc = pDoc;
}
void CJS_EventHandler::OnPage_Open(CPDFSDK_Document* pDoc)
@@ -104,21 +104,21 @@ void CJS_EventHandler::OnPage_Open(CPDFSDK_Document* pDoc)
void CJS_EventHandler::OnPage_Close(CPDFSDK_Document* pDoc)
{
Initial(JET_PAGE_CLOSE);
-
+
m_pTargetDoc = pDoc;
}
void CJS_EventHandler::OnPage_InView(CPDFSDK_Document* pDoc)
{
Initial(JET_PAGE_INVIEW);
-
+
m_pTargetDoc = pDoc;
}
void CJS_EventHandler::OnPage_OutView(CPDFSDK_Document* pDoc)
{
Initial(JET_PAGE_OUTVIEW);
-
+
m_pTargetDoc = pDoc;
}
@@ -140,16 +140,16 @@ void CJS_EventHandler::OnField_MouseExit(FX_BOOL bModifier, FX_BOOL bShift, CPDF
m_bModifier = bModifier;
m_bShift = bShift;
ASSERT(pTarget != NULL);
- m_strTargetName = pTarget->GetFullName();
+ m_strTargetName = pTarget->GetFullName();
}
void CJS_EventHandler::OnField_MouseDown(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget)
{
Initial(JET_FIELD_MOUSEDOWN);
m_eEventType = JET_FIELD_MOUSEDOWN;
-
+
m_bModifier = bModifier;
- m_bShift = bShift;
+ m_bShift = bShift;
ASSERT(pTarget != NULL);
m_strTargetName = pTarget->GetFullName();
}
@@ -164,13 +164,13 @@ void CJS_EventHandler::OnField_MouseUp(FX_BOOL bModifier, FX_BOOL bShift, CPDF_F
m_strTargetName = pTarget->GetFullName();
}
-void CJS_EventHandler::OnField_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget,
+void CJS_EventHandler::OnField_Focus(FX_BOOL bModifier, FX_BOOL bShift, CPDF_FormField* pTarget,
const CFX_WideString& Value)
{
Initial(JET_FIELD_FOCUS);
m_bModifier = bModifier;
- m_bShift = bShift;
+ m_bShift = bShift;
ASSERT(pTarget != NULL);
m_strTargetName = pTarget->GetFullName();
m_pValue = (CFX_WideString*)&Value;
@@ -185,7 +185,7 @@ void CJS_EventHandler::OnField_Blur(FX_BOOL bModifier, FX_BOOL bShift, CPDF_Form
m_bShift = bShift;
ASSERT(pTarget != NULL);
m_strTargetName = pTarget->GetFullName();
- m_pValue = (CFX_WideString*)&Value;
+ m_pValue = (CFX_WideString*)&Value;
}
void CJS_EventHandler::OnField_Keystroke(CFX_WideString &strChange,
@@ -196,7 +196,7 @@ void CJS_EventHandler::OnField_Keystroke(CFX_WideString &strChange,
FX_BOOL bFieldFull, FX_BOOL& bRc)
{
Initial(JET_FIELD_KEYSTROKE);
-
+
m_nCommitKey = 0;
m_pWideStrChange = &strChange;
m_WideStrChangeEx = strChangeEx;
@@ -204,11 +204,11 @@ void CJS_EventHandler::OnField_Keystroke(CFX_WideString &strChange,
m_bModifier = bModifier;
m_pISelEnd = &nSelEnd;
m_pISelStart = &nSelStart;
- m_bShift = bShift;
+ m_bShift = bShift;
ASSERT(pTarget != NULL);
m_strTargetName = pTarget->GetFullName();
m_pValue = &Value;
- m_bWillCommit = bWillCommit;
+ m_bWillCommit = bWillCommit;
m_pbRc = &bRc;
m_bFieldFull = bFieldFull;
}
@@ -218,19 +218,19 @@ void CJS_EventHandler::OnField_Validate(CFX_WideString& strChange, const CFX_Wid
CPDF_FormField* pTarget, CFX_WideString& Value, FX_BOOL& bRc)
{
Initial(JET_FIELD_VALIDATE);
-
+
m_pWideStrChange = &strChange;
- m_WideStrChangeEx = strChangeEx;
+ m_WideStrChangeEx = strChangeEx;
m_bKeyDown = bKeyDown;
m_bModifier = bModifier;
m_bShift = bShift;
ASSERT(pTarget != NULL);
m_strTargetName = pTarget->GetFullName();
- m_pValue = &Value;
- m_pbRc = &bRc;
+ m_pValue = &Value;
+ m_pbRc = &bRc;
}
-void CJS_EventHandler::OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget,
+void CJS_EventHandler::OnField_Calculate(CPDF_FormField* pSource, CPDF_FormField* pTarget,
CFX_WideString& Value, FX_BOOL& bRc)
{
Initial(JET_FIELD_CALCULATE);
@@ -248,7 +248,7 @@ void CJS_EventHandler::OnField_Format(CPDF_FormField* pTarget,
FX_BOOL bWillCommit)
{
Initial(JET_FIELD_FORMAT);
-
+
m_nCommitKey = 0;
ASSERT(pTarget != NULL);
m_strTargetName = pTarget->GetFullName();
@@ -349,15 +349,15 @@ void CJS_EventHandler::OnScreen_OutView(FX_BOOL bModifier, FX_BOOL bShift, CPDFS
void CJS_EventHandler::OnLink_MouseUp(CPDFSDK_Document* pTarget)
{
Initial(JET_LINK_MOUSEUP);
-
- m_pTargetDoc = pTarget;
+
+ m_pTargetDoc = pTarget;
}
void CJS_EventHandler::OnBookmark_MouseUp(CPDF_Bookmark* pBookMark)
{
Initial(JET_BOOKMARK_MOUSEUP);
- m_pTargetBookMark = pBookMark;
+ m_pTargetBookMark = pBookMark;
}
void CJS_EventHandler::OnMenu_Exec(CPDFSDK_Document* pTarget, const CFX_WideString& strTargetName)
@@ -377,7 +377,7 @@ void CJS_EventHandler::OnBatchExec(CPDFSDK_Document* pTarget)
{
Initial(JET_BATCH_EXEC);
- m_pTargetDoc = pTarget;
+ m_pTargetDoc = pTarget;
}
void CJS_EventHandler::OnConsole_Exec()
@@ -477,13 +477,13 @@ const FX_WCHAR* CJS_EventHandler::Name()
case JET_DOC_WILLPRINT: return L"WillPrint";
case JET_DOC_WILLSAVE: return L"WillSave";
case JET_EXTERNAL_EXEC: return L"Exec";
- case JET_FIELD_FOCUS:
+ case JET_FIELD_FOCUS:
case JET_SCREEN_FOCUS: return L"Focus";
- case JET_FIELD_BLUR:
+ case JET_FIELD_BLUR:
case JET_SCREEN_BLUR: return L"Blur";
case JET_FIELD_MOUSEDOWN:
case JET_SCREEN_MOUSEDOWN: return L"Mouse Down";
- case JET_FIELD_MOUSEUP:
+ case JET_FIELD_MOUSEUP:
case JET_SCREEN_MOUSEUP: return L"Mouse Up";
case JET_FIELD_MOUSEENTER:
case JET_SCREEN_MOUSEENTER: return L"Mouse Enter";
@@ -495,11 +495,11 @@ const FX_WCHAR* CJS_EventHandler::Name()
case JET_FIELD_VALIDATE: return L"Validate";
case JET_LINK_MOUSEUP: return L"Mouse Up";
case JET_MENU_EXEC: return L"Exec";
- case JET_PAGE_OPEN:
+ case JET_PAGE_OPEN:
case JET_SCREEN_OPEN: return L"Open";
case JET_PAGE_CLOSE:
case JET_SCREEN_CLOSE: return L"Close";
- case JET_SCREEN_INVIEW:
+ case JET_SCREEN_INVIEW:
case JET_PAGE_INVIEW: return L"InView";
case JET_PAGE_OUTVIEW:
case JET_SCREEN_OUTVIEW: return L"OutView";
@@ -516,7 +516,7 @@ const FX_WCHAR* CJS_EventHandler::Type()
{
case JET_APP_INIT: return L"App";
case JET_BATCH_EXEC: return L"Batch";
- case JET_BOOKMARK_MOUSEUP: return L"BookMark";
+ case JET_BOOKMARK_MOUSEUP: return L"BookMark";
case JET_CONSOLE_EXEC: return L"Console";
case JET_DOC_DIDPRINT:
case JET_DOC_DIDSAVE:
@@ -545,7 +545,7 @@ const FX_WCHAR* CJS_EventHandler::Type()
case JET_SCREEN_MOUSEEXIT:
case JET_SCREEN_INVIEW:
case JET_SCREEN_OUTVIEW: return L"Screen";
- case JET_LINK_MOUSEUP: return L"Link";
+ case JET_LINK_MOUSEUP: return L"Link";
case JET_MENU_EXEC: return L"Menu";
case JET_PAGE_OPEN:
case JET_PAGE_CLOSE:
@@ -563,7 +563,7 @@ FX_BOOL& CJS_EventHandler::Rc()
if (m_pbRc != NULL)
return *m_pbRc;
else
- {
+ {
return m_bRcDu;
}
}
@@ -614,7 +614,7 @@ Field* CJS_EventHandler::Source()
pDocument->AttachDoc(m_pTargetDoc);
else
pDocument->AttachDoc(m_pJSContext->GetReaderDocument());
-
+
//if (m_pSourceField == NULL)
// return NULL;
//CRAO_Widget *pWidget = IBCL_Widget::GetWidget(m_pSourceField);
@@ -623,10 +623,10 @@ Field* CJS_EventHandler::Source()
//CFX_WideString csFieldName = pFormField->GetFullName();
CJS_Field * pJSField = (CJS_Field*)JS_GetPrivate(pFieldObj);
ASSERT(pJSField != NULL);
- Field * pField = (Field *)pJSField->GetEmbedObject();
+ Field * pField = (Field *)pJSField->GetEmbedObject();
ASSERT(pField != NULL);
pField->AttachField(pDocument, m_strSourceName);
- return pField;
+ return pField;
}
Field* CJS_EventHandler::Target_Field()
@@ -648,15 +648,15 @@ Field* CJS_EventHandler::Target_Field()
pDocument->AttachDoc(m_pTargetDoc);
else
pDocument->AttachDoc(m_pJSContext->GetReaderDocument());
-
+
CJS_Field* pJSField = (CJS_Field*)JS_GetPrivate(pFieldObj);
ASSERT(pJSField != NULL);
- Field* pField = (Field *)pJSField->GetEmbedObject();
+ Field* pField = (Field *)pJSField->GetEmbedObject();
ASSERT(pField != NULL);
pField->AttachField(pDocument, m_strTargetName);
- return pField;
+ return pField;
}
CFX_WideString& CJS_EventHandler::Value()