summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-30 15:36:02 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-10-30 15:36:02 +0000
commit51230323263024ec7f27ce868609fe5ab3d4323b (patch)
treeddf9b4f188a90fb9cbb5ba4fece12fc6ffe2a571 /fpdfsdk
parent451e4c80dae398ef2349afa51c242e313f5e6c63 (diff)
downloadpdfium-51230323263024ec7f27ce868609fe5ab3d4323b.tar.xz
Rename Field to cjs_field
This CL renames Field.{cpp|h} to cjs_field.{cpp|h}. The CJS_DelayData is split out into cjs_delaydata.{cpp|h} Change-Id: If1e3cbbc0d65cbb5cc69ee9862db3fc78ee652e2 Reviewed-on: https://pdfium-review.googlesource.com/17033 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp2
-rw-r--r--fpdfsdk/javascript/cjs_delaydata.cpp12
-rw-r--r--fpdfsdk/javascript/cjs_delaydata.h35
-rw-r--r--fpdfsdk/javascript/cjs_document.cpp3
-rw-r--r--fpdfsdk/javascript/cjs_eventhandler.cpp3
-rw-r--r--fpdfsdk/javascript/cjs_field.cpp (renamed from fpdfsdk/javascript/Field.cpp)21
-rw-r--r--fpdfsdk/javascript/cjs_field.h (renamed from fpdfsdk/javascript/Field.h)28
-rw-r--r--fpdfsdk/javascript/cjs_runtime.cpp2
-rw-r--r--fpdfsdk/javascript/event.cpp2
9 files changed, 62 insertions, 46 deletions
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index acd01bb6db..b4cc7bfa28 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -19,12 +19,12 @@
#include "core/fxcrt/fx_extension.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_interform.h"
-#include "fpdfsdk/javascript/Field.h"
#include "fpdfsdk/javascript/JS_Define.h"
#include "fpdfsdk/javascript/JS_Object.h"
#include "fpdfsdk/javascript/JS_Value.h"
#include "fpdfsdk/javascript/cjs_event_context.h"
#include "fpdfsdk/javascript/cjs_eventhandler.h"
+#include "fpdfsdk/javascript/cjs_field.h"
#include "fpdfsdk/javascript/cjs_runtime.h"
#include "fpdfsdk/javascript/color.h"
#include "fpdfsdk/javascript/resource.h"
diff --git a/fpdfsdk/javascript/cjs_delaydata.cpp b/fpdfsdk/javascript/cjs_delaydata.cpp
new file mode 100644
index 0000000000..bf5e3469c8
--- /dev/null
+++ b/fpdfsdk/javascript/cjs_delaydata.cpp
@@ -0,0 +1,12 @@
+// Copyright 2017 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 "fpdfsdk/javascript/cjs_delaydata.h"
+
+CJS_DelayData::CJS_DelayData(FIELD_PROP prop, int idx, const WideString& name)
+ : eProp(prop), nControlIndex(idx), sFieldName(name) {}
+
+CJS_DelayData::~CJS_DelayData() {}
diff --git a/fpdfsdk/javascript/cjs_delaydata.h b/fpdfsdk/javascript/cjs_delaydata.h
new file mode 100644
index 0000000000..3aa9e27fda
--- /dev/null
+++ b/fpdfsdk/javascript/cjs_delaydata.h
@@ -0,0 +1,35 @@
+// Copyright 2017 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
+
+#ifndef FPDFSDK_JAVASCRIPT_CJS_DELAYDATA_H_
+#define FPDFSDK_JAVASCRIPT_CJS_DELAYDATA_H_
+
+#include <string>
+#include <vector>
+
+#include "core/fxcrt/fx_coordinates.h"
+#include "core/fxcrt/widestring.h"
+#include "core/fxge/cfx_color.h"
+#include "fpdfsdk/javascript/cjs_field.h"
+
+struct CJS_DelayData {
+ CJS_DelayData(FIELD_PROP prop, int idx, const WideString& name);
+ ~CJS_DelayData();
+
+ FIELD_PROP eProp;
+ int nControlIndex;
+ WideString sFieldName;
+ int32_t num;
+ bool b;
+ ByteString string;
+ WideString widestring;
+ CFX_FloatRect rect;
+ CFX_Color color;
+ std::vector<uint32_t> wordarray;
+ std::vector<WideString> widestringarray;
+};
+
+#endif // FPDFSDK_JAVASCRIPT_CJS_DELAYDATA_H_
diff --git a/fpdfsdk/javascript/cjs_document.cpp b/fpdfsdk/javascript/cjs_document.cpp
index 5726d2461d..abbc61be61 100644
--- a/fpdfsdk/javascript/cjs_document.cpp
+++ b/fpdfsdk/javascript/cjs_document.cpp
@@ -19,10 +19,11 @@
#include "fpdfsdk/cpdfsdk_annotiteration.h"
#include "fpdfsdk/cpdfsdk_interform.h"
#include "fpdfsdk/cpdfsdk_pageview.h"
-#include "fpdfsdk/javascript/Field.h"
#include "fpdfsdk/javascript/Icon.h"
#include "fpdfsdk/javascript/app.h"
#include "fpdfsdk/javascript/cjs_annot.h"
+#include "fpdfsdk/javascript/cjs_delaydata.h"
+#include "fpdfsdk/javascript/cjs_field.h"
#include "fpdfsdk/javascript/cjs_printparamsobj.h"
const JSPropertySpec CJS_Document::PropertySpecs[] = {
diff --git a/fpdfsdk/javascript/cjs_eventhandler.cpp b/fpdfsdk/javascript/cjs_eventhandler.cpp
index ada365a268..9dcc029ce9 100644
--- a/fpdfsdk/javascript/cjs_eventhandler.cpp
+++ b/fpdfsdk/javascript/cjs_eventhandler.cpp
@@ -6,12 +6,13 @@
#include "fpdfsdk/javascript/cjs_eventhandler.h"
-#include "fpdfsdk/javascript/Field.h"
+#include "core/fpdfdoc/cpdf_formfield.h"
#include "fpdfsdk/javascript/JS_Define.h"
#include "fpdfsdk/javascript/JS_Object.h"
#include "fpdfsdk/javascript/JS_Value.h"
#include "fpdfsdk/javascript/cjs_document.h"
#include "fpdfsdk/javascript/cjs_event_context.h"
+#include "fpdfsdk/javascript/cjs_field.h"
#include "fpdfsdk/javascript/cjs_runtime.h"
CJS_EventHandler::CJS_EventHandler(CJS_EventContext* pContext)
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/cjs_field.cpp
index c0c52aa76b..110c8ee51a 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/cjs_field.cpp
@@ -4,30 +4,20 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/javascript/Field.h"
+#include "fpdfsdk/javascript/cjs_field.h"
#include <algorithm>
#include <memory>
-#include <string>
-#include <vector>
#include "core/fpdfapi/font/cpdf_font.h"
-#include "core/fpdfapi/page/cpdf_page.h"
-#include "core/fpdfapi/parser/cpdf_document.h"
+#include "core/fpdfdoc/cpdf_formfield.h"
#include "core/fpdfdoc/cpdf_interform.h"
-#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_interform.h"
#include "fpdfsdk/cpdfsdk_pageview.h"
#include "fpdfsdk/cpdfsdk_widget.h"
#include "fpdfsdk/javascript/Icon.h"
-#include "fpdfsdk/javascript/JS_Define.h"
-#include "fpdfsdk/javascript/JS_Object.h"
-#include "fpdfsdk/javascript/JS_Value.h"
-#include "fpdfsdk/javascript/PublicMethods.h"
+#include "fpdfsdk/javascript/cjs_delaydata.h"
#include "fpdfsdk/javascript/cjs_document.h"
-#include "fpdfsdk/javascript/cjs_event_context.h"
-#include "fpdfsdk/javascript/cjs_eventhandler.h"
-#include "fpdfsdk/javascript/cjs_runtime.h"
#include "fpdfsdk/javascript/color.h"
namespace {
@@ -181,11 +171,6 @@ void CJS_Field::DefineJSObjects(CFXJS_Engine* pEngine) {
DefineMethods(pEngine, ObjDefnID, MethodSpecs);
}
-CJS_DelayData::CJS_DelayData(FIELD_PROP prop, int idx, const WideString& name)
- : eProp(prop), nControlIndex(idx), sFieldName(name) {}
-
-CJS_DelayData::~CJS_DelayData() {}
-
void CJS_Field::InitInstance(IJS_Runtime* pIRuntime) {}
Field::Field(CJS_Object* pJSObject)
diff --git a/fpdfsdk/javascript/Field.h b/fpdfsdk/javascript/cjs_field.h
index 6c16c5eb28..11786ff0f8 100644
--- a/fpdfsdk/javascript/Field.h
+++ b/fpdfsdk/javascript/cjs_field.h
@@ -4,19 +4,18 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_JAVASCRIPT_FIELD_H_
-#define FPDFSDK_JAVASCRIPT_FIELD_H_
+#ifndef FPDFSDK_JAVASCRIPT_CJS_FIELD_H_
+#define FPDFSDK_JAVASCRIPT_CJS_FIELD_H_
#include <string>
#include <vector>
-#include "core/fxcrt/observable.h"
-#include "core/fxge/cfx_color.h"
-#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/javascript/JS_Define.h"
+class CPDF_FormControl;
class CPDFSDK_Widget;
class Document;
+struct CJS_DelayData;
enum FIELD_PROP {
FP_BORDERSTYLE,
@@ -28,23 +27,6 @@ enum FIELD_PROP {
FP_VALUE
};
-struct CJS_DelayData {
- CJS_DelayData(FIELD_PROP prop, int idx, const WideString& name);
- ~CJS_DelayData();
-
- FIELD_PROP eProp;
- int nControlIndex;
- WideString sFieldName;
- int32_t num;
- bool b;
- ByteString string;
- WideString widestring;
- CFX_FloatRect rect;
- CFX_Color color;
- std::vector<uint32_t> wordarray;
- std::vector<WideString> widestringarray;
-};
-
class Field : public CJS_EmbedObj {
public:
static void DoDelay(CPDFSDK_FormFillEnvironment* pFormFillEnv,
@@ -453,4 +435,4 @@ class CJS_Field : public CJS_Object {
static const JSMethodSpec MethodSpecs[];
};
-#endif // FPDFSDK_JAVASCRIPT_FIELD_H_
+#endif // FPDFSDK_JAVASCRIPT_CJS_FIELD_H_
diff --git a/fpdfsdk/javascript/cjs_runtime.cpp b/fpdfsdk/javascript/cjs_runtime.cpp
index 7419ab1cc2..9421d3dee3 100644
--- a/fpdfsdk/javascript/cjs_runtime.cpp
+++ b/fpdfsdk/javascript/cjs_runtime.cpp
@@ -9,7 +9,6 @@
#include <algorithm>
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
-#include "fpdfsdk/javascript/Field.h"
#include "fpdfsdk/javascript/Icon.h"
#include "fpdfsdk/javascript/JS_Define.h"
#include "fpdfsdk/javascript/JS_GlobalData.h"
@@ -23,6 +22,7 @@
#include "fpdfsdk/javascript/cjs_document.h"
#include "fpdfsdk/javascript/cjs_event_context.h"
#include "fpdfsdk/javascript/cjs_eventhandler.h"
+#include "fpdfsdk/javascript/cjs_field.h"
#include "fpdfsdk/javascript/cjs_font.h"
#include "fpdfsdk/javascript/cjs_global.h"
#include "fpdfsdk/javascript/cjs_globalarrays.h"
diff --git a/fpdfsdk/javascript/event.cpp b/fpdfsdk/javascript/event.cpp
index fcb5b046b1..cd40c204e7 100644
--- a/fpdfsdk/javascript/event.cpp
+++ b/fpdfsdk/javascript/event.cpp
@@ -6,12 +6,12 @@
#include "fpdfsdk/javascript/event.h"
-#include "fpdfsdk/javascript/Field.h"
#include "fpdfsdk/javascript/JS_Define.h"
#include "fpdfsdk/javascript/JS_Object.h"
#include "fpdfsdk/javascript/JS_Value.h"
#include "fpdfsdk/javascript/cjs_event_context.h"
#include "fpdfsdk/javascript/cjs_eventhandler.h"
+#include "fpdfsdk/javascript/cjs_field.h"
const JSPropertySpec CJS_Event::PropertySpecs[] = {
{"change", get_change_static, set_change_static},