Move fpdfsdk/src up to fpdfsdk/.
This CL moves the files in fpdfsdk/src/ up one level to fpdfsdk/ and fixes
up the include paths, include guards and build files.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1799773002 .
diff --git a/fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp b/fpdfsdk/formfiller/FFL_CBA_Fontmap.cpp
similarity index 100%
rename from fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp
rename to fpdfsdk/formfiller/FFL_CBA_Fontmap.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp b/fpdfsdk/formfiller/FFL_CheckBox.cpp
similarity index 100%
rename from fpdfsdk/src/formfiller/FFL_CheckBox.cpp
rename to fpdfsdk/formfiller/FFL_CheckBox.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp b/fpdfsdk/formfiller/FFL_ComboBox.cpp
similarity index 100%
rename from fpdfsdk/src/formfiller/FFL_ComboBox.cpp
rename to fpdfsdk/formfiller/FFL_ComboBox.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_FormFiller.cpp b/fpdfsdk/formfiller/FFL_FormFiller.cpp
similarity index 100%
rename from fpdfsdk/src/formfiller/FFL_FormFiller.cpp
rename to fpdfsdk/formfiller/FFL_FormFiller.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_IFormFiller.cpp b/fpdfsdk/formfiller/FFL_IFormFiller.cpp
similarity index 100%
rename from fpdfsdk/src/formfiller/FFL_IFormFiller.cpp
rename to fpdfsdk/formfiller/FFL_IFormFiller.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_ListBox.cpp b/fpdfsdk/formfiller/FFL_ListBox.cpp
similarity index 100%
rename from fpdfsdk/src/formfiller/FFL_ListBox.cpp
rename to fpdfsdk/formfiller/FFL_ListBox.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_PushButton.cpp b/fpdfsdk/formfiller/FFL_PushButton.cpp
similarity index 100%
rename from fpdfsdk/src/formfiller/FFL_PushButton.cpp
rename to fpdfsdk/formfiller/FFL_PushButton.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_RadioButton.cpp b/fpdfsdk/formfiller/FFL_RadioButton.cpp
similarity index 100%
rename from fpdfsdk/src/formfiller/FFL_RadioButton.cpp
rename to fpdfsdk/formfiller/FFL_RadioButton.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_TextField.cpp b/fpdfsdk/formfiller/FFL_TextField.cpp
similarity index 100%
rename from fpdfsdk/src/formfiller/FFL_TextField.cpp
rename to fpdfsdk/formfiller/FFL_TextField.cpp
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/fpdf_dataavail.cpp
similarity index 97%
rename from fpdfsdk/src/fpdf_dataavail.cpp
rename to fpdfsdk/fpdf_dataavail.cpp
index 6dc706a..0a1ebef 100644
--- a/fpdfsdk/src/fpdf_dataavail.cpp
+++ b/fpdfsdk/fpdf_dataavail.cpp
@@ -114,8 +114,8 @@
delete (CFPDF_DataAvail*)avail;
}
-DLLEXPORT int STDCALL
-FPDFAvail_IsDocAvail(FPDF_AVAIL avail, FX_DOWNLOADHINTS* hints) {
+DLLEXPORT int STDCALL FPDFAvail_IsDocAvail(FPDF_AVAIL avail,
+ FX_DOWNLOADHINTS* hints) {
if (!avail || !hints)
return PDF_DATA_ERROR;
CFPDF_DownloadHintsWrap hints_wrap(hints);
diff --git a/fpdfsdk/src/fpdf_dataavail_embeddertest.cpp b/fpdfsdk/fpdf_dataavail_embeddertest.cpp
similarity index 100%
rename from fpdfsdk/src/fpdf_dataavail_embeddertest.cpp
rename to fpdfsdk/fpdf_dataavail_embeddertest.cpp
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp
similarity index 100%
rename from fpdfsdk/src/fpdf_ext.cpp
rename to fpdfsdk/fpdf_ext.cpp
diff --git a/fpdfsdk/src/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp
similarity index 100%
rename from fpdfsdk/src/fpdf_flatten.cpp
rename to fpdfsdk/fpdf_flatten.cpp
diff --git a/fpdfsdk/src/fpdf_progressive.cpp b/fpdfsdk/fpdf_progressive.cpp
similarity index 100%
rename from fpdfsdk/src/fpdf_progressive.cpp
rename to fpdfsdk/fpdf_progressive.cpp
diff --git a/fpdfsdk/src/fpdf_searchex.cpp b/fpdfsdk/fpdf_searchex.cpp
similarity index 100%
rename from fpdfsdk/src/fpdf_searchex.cpp
rename to fpdfsdk/fpdf_searchex.cpp
diff --git a/fpdfsdk/src/fpdf_sysfontinfo.cpp b/fpdfsdk/fpdf_sysfontinfo.cpp
similarity index 100%
rename from fpdfsdk/src/fpdf_sysfontinfo.cpp
rename to fpdfsdk/fpdf_sysfontinfo.cpp
diff --git a/fpdfsdk/src/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp
similarity index 100%
rename from fpdfsdk/src/fpdf_transformpage.cpp
rename to fpdfsdk/fpdf_transformpage.cpp
diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/fpdfdoc.cpp
similarity index 94%
rename from fpdfsdk/src/fpdfdoc.cpp
rename to fpdfsdk/fpdfdoc.cpp
index a6d09b7..9fa9f4f 100644
--- a/fpdfsdk/src/fpdfdoc.cpp
+++ b/fpdfsdk/fpdfdoc.cpp
@@ -174,8 +174,9 @@
return action.GetDest(pDoc).GetObject();
}
-DLLEXPORT unsigned long STDCALL
-FPDFAction_GetFilePath(FPDF_ACTION pDict, void* buffer, unsigned long buflen) {
+DLLEXPORT unsigned long STDCALL FPDFAction_GetFilePath(FPDF_ACTION pDict,
+ void* buffer,
+ unsigned long buflen) {
unsigned long type = FPDFAction_GetType(pDict);
if (type != PDFACTION_REMOTEGOTO && type != PDFACTION_LAUNCH)
return 0;
@@ -216,8 +217,9 @@
return dest.GetPageIndex(pDoc);
}
-DLLEXPORT FPDF_LINK STDCALL
-FPDFLink_GetLinkAtPoint(FPDF_PAGE page, double x, double y) {
+DLLEXPORT FPDF_LINK STDCALL FPDFLink_GetLinkAtPoint(FPDF_PAGE page,
+ double x,
+ double y) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return nullptr;
@@ -230,8 +232,9 @@
.GetDict();
}
-DLLEXPORT int STDCALL
-FPDFLink_GetLinkZOrderAtPoint(FPDF_PAGE page, double x, double y) {
+DLLEXPORT int STDCALL FPDFLink_GetLinkZOrderAtPoint(FPDF_PAGE page,
+ double x,
+ double y) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return -1;
diff --git a/fpdfsdk/src/fpdfdoc_embeddertest.cpp b/fpdfsdk/fpdfdoc_embeddertest.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfdoc_embeddertest.cpp
rename to fpdfsdk/fpdfdoc_embeddertest.cpp
diff --git a/fpdfsdk/src/fpdfdoc_unittest.cpp b/fpdfsdk/fpdfdoc_unittest.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfdoc_unittest.cpp
rename to fpdfsdk/fpdfdoc_unittest.cpp
diff --git a/fpdfsdk/src/fpdfedit_embeddertest.cpp b/fpdfsdk/fpdfedit_embeddertest.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfedit_embeddertest.cpp
rename to fpdfsdk/fpdfedit_embeddertest.cpp
diff --git a/fpdfsdk/src/fpdfeditimg.cpp b/fpdfsdk/fpdfeditimg.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfeditimg.cpp
rename to fpdfsdk/fpdfeditimg.cpp
diff --git a/fpdfsdk/src/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfeditpage.cpp
rename to fpdfsdk/fpdfeditpage.cpp
diff --git a/fpdfsdk/src/fpdfext_embeddertest.cpp b/fpdfsdk/fpdfext_embeddertest.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfext_embeddertest.cpp
rename to fpdfsdk/fpdfext_embeddertest.cpp
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfformfill.cpp
rename to fpdfsdk/fpdfformfill.cpp
diff --git a/fpdfsdk/src/fpdfformfill_embeddertest.cpp b/fpdfsdk/fpdfformfill_embeddertest.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfformfill_embeddertest.cpp
rename to fpdfsdk/fpdfformfill_embeddertest.cpp
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfppo.cpp
rename to fpdfsdk/fpdfppo.cpp
diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfsave.cpp
rename to fpdfsdk/fpdfsave.cpp
diff --git a/fpdfsdk/src/fpdfsave_embeddertest.cpp b/fpdfsdk/fpdfsave_embeddertest.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfsave_embeddertest.cpp
rename to fpdfsdk/fpdfsave_embeddertest.cpp
diff --git a/fpdfsdk/src/fpdftext.cpp b/fpdfsdk/fpdftext.cpp
similarity index 100%
rename from fpdfsdk/src/fpdftext.cpp
rename to fpdfsdk/fpdftext.cpp
diff --git a/fpdfsdk/src/fpdftext_embeddertest.cpp b/fpdfsdk/fpdftext_embeddertest.cpp
similarity index 100%
rename from fpdfsdk/src/fpdftext_embeddertest.cpp
rename to fpdfsdk/fpdftext_embeddertest.cpp
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
similarity index 99%
rename from fpdfsdk/src/fpdfview.cpp
rename to fpdfsdk/fpdfview.cpp
index 1f6d11d..48fe066 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -230,8 +230,8 @@
FPDF_InitLibraryWithConfig(nullptr);
}
-DLLEXPORT void STDCALL FPDF_InitLibraryWithConfig(
- const FPDF_LIBRARY_CONFIG* cfg) {
+DLLEXPORT void STDCALL
+FPDF_InitLibraryWithConfig(const FPDF_LIBRARY_CONFIG* cfg) {
g_pCodecModule = new CCodec_ModuleMgr();
CFX_GEModule::Create(cfg ? cfg->m_pUserFontPaths : nullptr);
diff --git a/fpdfsdk/src/fpdfview_c_api_test.c b/fpdfsdk/fpdfview_c_api_test.c
similarity index 99%
rename from fpdfsdk/src/fpdfview_c_api_test.c
rename to fpdfsdk/fpdfview_c_api_test.c
index 52bbd11..2f0cb49 100644
--- a/fpdfsdk/src/fpdfview_c_api_test.c
+++ b/fpdfsdk/fpdfview_c_api_test.c
@@ -7,7 +7,7 @@
#include <stdio.h>
-#include "fpdfsdk/src/fpdfview_c_api_test.h"
+#include "fpdfsdk/fpdfview_c_api_test.h"
#include "public/fpdf_dataavail.h"
#include "public/fpdf_doc.h"
diff --git a/fpdfsdk/src/fpdfview_c_api_test.h b/fpdfsdk/fpdfview_c_api_test.h
similarity index 73%
rename from fpdfsdk/src/fpdfview_c_api_test.h
rename to fpdfsdk/fpdfview_c_api_test.h
index 755d821..d5b84a2 100644
--- a/fpdfsdk/src/fpdfview_c_api_test.h
+++ b/fpdfsdk/fpdfview_c_api_test.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef FPDFSDK_SRC_FPDFVIEW_C_API_TEST_H_
-#define FPDFSDK_SRC_FPDFVIEW_C_API_TEST_H_
+#ifndef FPDFSDK_FPDFVIEW_C_API_TEST_H_
+#define FPDFSDK_FPDFVIEW_C_API_TEST_H_
#ifdef __cplusplus
extern "C" {
@@ -17,4 +17,4 @@
}
#endif
-#endif // FPDFSDK_SRC_FPDFVIEW_C_API_TEST_H_
+#endif // FPDFSDK_FPDFVIEW_C_API_TEST_H_
diff --git a/fpdfsdk/src/fpdfview_embeddertest.cpp b/fpdfsdk/fpdfview_embeddertest.cpp
similarity index 99%
rename from fpdfsdk/src/fpdfview_embeddertest.cpp
rename to fpdfsdk/fpdfview_embeddertest.cpp
index da7313d..29eb91a 100644
--- a/fpdfsdk/src/fpdfview_embeddertest.cpp
+++ b/fpdfsdk/fpdfview_embeddertest.cpp
@@ -5,7 +5,7 @@
#include <limits>
#include <string>
-#include "fpdfsdk/src/fpdfview_c_api_test.h"
+#include "fpdfsdk/fpdfview_c_api_test.h"
#include "public/fpdfview.h"
#include "testing/embedder_test.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
rename to fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
similarity index 99%
rename from fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
rename to fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
index 18f3d49..ede9b7e 100644
--- a/fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
@@ -44,8 +44,7 @@
m_pXFADoc(nullptr),
m_pXFADocView(nullptr),
m_pApp(pProvider),
- m_pJSContext(nullptr) {
-}
+ m_pJSContext(nullptr) {}
CPDFXFA_Document::~CPDFXFA_Document() {
if (m_pXFADoc) {
@@ -700,8 +699,7 @@
}
}
void CPDFXFA_Document::ImportData(IXFA_Doc* hDoc,
- const CFX_WideStringC& wsFilePath) {
-}
+ const CFX_WideStringC& wsFilePath) {}
void CPDFXFA_Document::GotoURL(IXFA_Doc* hDoc,
const CFX_WideStringC& bsURL,
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_page.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp
rename to fpdfsdk/fpdfxfa/fpdfxfa_page.cpp
diff --git a/fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_util.cpp
similarity index 100%
rename from fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp
rename to fpdfsdk/fpdfxfa/fpdfxfa_util.cpp
diff --git a/fpdfsdk/src/fsdk_actionhandler.cpp b/fpdfsdk/fsdk_actionhandler.cpp
similarity index 99%
rename from fpdfsdk/src/fsdk_actionhandler.cpp
rename to fpdfsdk/fsdk_actionhandler.cpp
index 7bca1b7..0b3ee54 100644
--- a/fpdfsdk/src/fsdk_actionhandler.cpp
+++ b/fpdfsdk/fsdk_actionhandler.cpp
@@ -15,8 +15,7 @@
#include "third_party/base/stl_util.h"
CPDFSDK_ActionHandler::CPDFSDK_ActionHandler()
- : m_pFormActionHandler(new CPDFSDK_FormActionHandler) {
-}
+ : m_pFormActionHandler(new CPDFSDK_FormActionHandler) {}
FX_BOOL CPDFSDK_ActionHandler::DoAction_DocOpen(const CPDF_Action& action,
CPDFSDK_Document* pDocument) {
diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/fsdk_annothandler.cpp
similarity index 99%
rename from fpdfsdk/src/fsdk_annothandler.cpp
rename to fpdfsdk/fsdk_annothandler.cpp
index 989f535..f2456b0 100644
--- a/fpdfsdk/src/fsdk_annothandler.cpp
+++ b/fpdfsdk/fsdk_annothandler.cpp
@@ -1091,8 +1091,7 @@
}
}
-CPDFSDK_AnnotIterator::~CPDFSDK_AnnotIterator() {
-}
+CPDFSDK_AnnotIterator::~CPDFSDK_AnnotIterator() {}
CPDFSDK_Annot* CPDFSDK_AnnotIterator::NextAnnot() {
if (m_pos < m_iteratorAnnotList.size())
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/fsdk_baseannot.cpp
similarity index 99%
rename from fpdfsdk/src/fsdk_baseannot.cpp
rename to fpdfsdk/fsdk_baseannot.cpp
index 276d302..606f02c 100644
--- a/fpdfsdk/src/fsdk_baseannot.cpp
+++ b/fpdfsdk/fsdk_baseannot.cpp
@@ -485,13 +485,11 @@
}
CPDFSDK_Annot::CPDFSDK_Annot(CPDFSDK_PageView* pPageView)
- : m_pPageView(pPageView), m_bSelected(FALSE), m_nTabOrder(-1) {
-}
+ : m_pPageView(pPageView), m_bSelected(FALSE), m_nTabOrder(-1) {}
CPDFSDK_BAAnnot::CPDFSDK_BAAnnot(CPDF_Annot* pAnnot,
CPDFSDK_PageView* pPageView)
- : CPDFSDK_Annot(pPageView), m_pAnnot(pAnnot) {
-}
+ : CPDFSDK_Annot(pPageView), m_pAnnot(pAnnot) {}
CPDF_Annot* CPDFSDK_BAAnnot::GetPDFAnnot() const {
return m_pAnnot;
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/fsdk_baseform.cpp
similarity index 99%
rename from fpdfsdk/src/fsdk_baseform.cpp
rename to fpdfsdk/fsdk_baseform.cpp
index 89d2772..141e1f5 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/fsdk_baseform.cpp
@@ -1988,8 +1988,9 @@
CPDFSDK_XFAWidget::CPDFSDK_XFAWidget(IXFA_Widget* pAnnot,
CPDFSDK_PageView* pPageView,
CPDFSDK_InterForm* pInterForm)
- : CPDFSDK_Annot(pPageView), m_pInterForm(pInterForm), m_hXFAWidget(pAnnot) {
-}
+ : CPDFSDK_Annot(pPageView),
+ m_pInterForm(pInterForm),
+ m_hXFAWidget(pAnnot) {}
FX_BOOL CPDFSDK_XFAWidget::IsXFAField() {
return TRUE;
@@ -2726,8 +2727,7 @@
GenerateResults();
}
-CBA_AnnotIterator::~CBA_AnnotIterator() {
-}
+CBA_AnnotIterator::~CBA_AnnotIterator() {}
CPDFSDK_Annot* CBA_AnnotIterator::GetFirstAnnot() {
return m_Annots.empty() ? nullptr : m_Annots.front();
diff --git a/fpdfsdk/src/fsdk_baseform_embeddertest.cpp b/fpdfsdk/fsdk_baseform_embeddertest.cpp
similarity index 100%
rename from fpdfsdk/src/fsdk_baseform_embeddertest.cpp
rename to fpdfsdk/fsdk_baseform_embeddertest.cpp
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp
similarity index 100%
rename from fpdfsdk/src/fsdk_mgr.cpp
rename to fpdfsdk/fsdk_mgr.cpp
diff --git a/fpdfsdk/src/fsdk_rendercontext.cpp b/fpdfsdk/fsdk_rendercontext.cpp
similarity index 95%
rename from fpdfsdk/src/fsdk_rendercontext.cpp
rename to fpdfsdk/fsdk_rendercontext.cpp
index 3b671ca..c91772d 100644
--- a/fpdfsdk/src/fsdk_rendercontext.cpp
+++ b/fpdfsdk/fsdk_rendercontext.cpp
@@ -36,8 +36,7 @@
m_IPause = IPause;
}
-IFSDK_PAUSE_Adapter::~IFSDK_PAUSE_Adapter() {
-}
+IFSDK_PAUSE_Adapter::~IFSDK_PAUSE_Adapter() {}
FX_BOOL IFSDK_PAUSE_Adapter::NeedToPauseNow() {
if (m_IPause->NeedToPauseNow) {
diff --git a/fpdfsdk/src/fxedit/fxet_ap.cpp b/fpdfsdk/fxedit/fxet_ap.cpp
similarity index 100%
rename from fpdfsdk/src/fxedit/fxet_ap.cpp
rename to fpdfsdk/fxedit/fxet_ap.cpp
diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
similarity index 100%
rename from fpdfsdk/src/fxedit/fxet_edit.cpp
rename to fpdfsdk/fxedit/fxet_edit.cpp
diff --git a/fpdfsdk/src/fxedit/fxet_list.cpp b/fpdfsdk/fxedit/fxet_list.cpp
similarity index 100%
rename from fpdfsdk/src/fxedit/fxet_list.cpp
rename to fpdfsdk/fxedit/fxet_list.cpp
diff --git a/fpdfsdk/src/fxedit/fxet_module.cpp b/fpdfsdk/fxedit/fxet_module.cpp
similarity index 100%
rename from fpdfsdk/src/fxedit/fxet_module.cpp
rename to fpdfsdk/fxedit/fxet_module.cpp
diff --git a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp b/fpdfsdk/fxedit/fxet_pageobjs.cpp
similarity index 100%
rename from fpdfsdk/src/fxedit/fxet_pageobjs.cpp
rename to fpdfsdk/fxedit/fxet_pageobjs.cpp
diff --git a/fpdfsdk/src/javascript/Consts.cpp b/fpdfsdk/javascript/Consts.cpp
similarity index 97%
rename from fpdfsdk/src/javascript/Consts.cpp
rename to fpdfsdk/javascript/Consts.cpp
index b7cc2d0..3fdbb40 100644
--- a/fpdfsdk/src/javascript/Consts.cpp
+++ b/fpdfsdk/javascript/Consts.cpp
@@ -4,12 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/Consts.h"
+#include "fpdfsdk/javascript/Consts.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Value.h"
BEGIN_JS_STATIC_CONST(CJS_Border)
JS_STATIC_CONST_ENTRY_STRING(L"s", L"solid")
diff --git a/fpdfsdk/src/javascript/Consts.h b/fpdfsdk/javascript/Consts.h
similarity index 94%
rename from fpdfsdk/src/javascript/Consts.h
rename to fpdfsdk/javascript/Consts.h
index 6cd1d1d..165e91f 100644
--- a/fpdfsdk/src/javascript/Consts.h
+++ b/fpdfsdk/javascript/Consts.h
@@ -4,10 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_CONSTS_H_
-#define FPDFSDK_SRC_JAVASCRIPT_CONSTS_H_
+#ifndef FPDFSDK_JAVASCRIPT_CONSTS_H_
+#define FPDFSDK_JAVASCRIPT_CONSTS_H_
-#include "fpdfsdk/src/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Define.h"
/* ------------------------------ border ------------------------------ */
@@ -113,4 +113,4 @@
static void DefineJSObjects(CJS_Runtime* pRuntmie);
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_CONSTS_H_
+#endif // FPDFSDK_JAVASCRIPT_CONSTS_H_
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
similarity index 98%
rename from fpdfsdk/src/javascript/Document.cpp
rename to fpdfsdk/javascript/Document.cpp
index 672a3a3..032ca54 100644
--- a/fpdfsdk/src/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -4,23 +4,23 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/Document.h"
+#include "fpdfsdk/javascript/Document.h"
#include <vector>
#include "core/include/fpdfapi/cpdf_document.h"
#include "fpdfsdk/include/fsdk_mgr.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/Field.h"
-#include "fpdfsdk/src/javascript/Icon.h"
-#include "fpdfsdk/src/javascript/JS_Context.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_EventHandler.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Runtime.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
-#include "fpdfsdk/src/javascript/app.h"
-#include "fpdfsdk/src/javascript/resource.h"
+#include "fpdfsdk/javascript/Field.h"
+#include "fpdfsdk/javascript/Icon.h"
+#include "fpdfsdk/javascript/JS_Context.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_EventHandler.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Runtime.h"
+#include "fpdfsdk/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/app.h"
+#include "fpdfsdk/javascript/resource.h"
#include "third_party/base/numerics/safe_math.h"
static v8::Isolate* GetIsolate(IJS_Context* cc) {
diff --git a/fpdfsdk/src/javascript/Document.h b/fpdfsdk/javascript/Document.h
similarity index 98%
rename from fpdfsdk/src/javascript/Document.h
rename to fpdfsdk/javascript/Document.h
index 06c4121..8ae6c1d 100644
--- a/fpdfsdk/src/javascript/Document.h
+++ b/fpdfsdk/javascript/Document.h
@@ -4,14 +4,14 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_DOCUMENT_H_
-#define FPDFSDK_SRC_JAVASCRIPT_DOCUMENT_H_
+#ifndef FPDFSDK_JAVASCRIPT_DOCUMENT_H_
+#define FPDFSDK_JAVASCRIPT_DOCUMENT_H_
#include <list>
#include <memory>
#include <vector>
-#include "fpdfsdk/src/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Define.h"
class PrintParamsObj : public CJS_EmbedObj {
public:
@@ -362,4 +362,4 @@
JS_STATIC_METHOD(mailDoc, Document);
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_DOCUMENT_H_
+#endif // FPDFSDK_JAVASCRIPT_DOCUMENT_H_
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
similarity index 99%
rename from fpdfsdk/src/javascript/Field.cpp
rename to fpdfsdk/javascript/Field.cpp
index 0c0dfd1..abe18f4 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/Field.h"
+#include "fpdfsdk/javascript/Field.h"
#include <algorithm>
#include <memory>
@@ -13,16 +13,16 @@
#include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment.
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/Document.h"
-#include "fpdfsdk/src/javascript/Icon.h"
-#include "fpdfsdk/src/javascript/JS_Context.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_EventHandler.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Runtime.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
-#include "fpdfsdk/src/javascript/PublicMethods.h"
-#include "fpdfsdk/src/javascript/color.h"
+#include "fpdfsdk/javascript/Document.h"
+#include "fpdfsdk/javascript/Icon.h"
+#include "fpdfsdk/javascript/JS_Context.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_EventHandler.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Runtime.h"
+#include "fpdfsdk/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/PublicMethods.h"
+#include "fpdfsdk/javascript/color.h"
BEGIN_JS_STATIC_CONST(CJS_Field)
END_JS_STATIC_CONST()
diff --git a/fpdfsdk/src/javascript/Field.h b/fpdfsdk/javascript/Field.h
similarity index 99%
rename from fpdfsdk/src/javascript/Field.h
rename to fpdfsdk/javascript/Field.h
index 49103c8..171b081 100644
--- a/fpdfsdk/src/javascript/Field.h
+++ b/fpdfsdk/javascript/Field.h
@@ -4,14 +4,14 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_FIELD_H_
-#define FPDFSDK_SRC_JAVASCRIPT_FIELD_H_
+#ifndef FPDFSDK_JAVASCRIPT_FIELD_H_
+#define FPDFSDK_JAVASCRIPT_FIELD_H_
#include <string>
#include <vector>
#include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" // For CPWL_Color.
-#include "fpdfsdk/src/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Define.h"
class CPDFSDK_Widget;
class Document;
@@ -582,4 +582,4 @@
JS_STATIC_METHOD(signatureValidate, Field);
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_FIELD_H_
+#endif // FPDFSDK_JAVASCRIPT_FIELD_H_
diff --git a/fpdfsdk/src/javascript/Icon.cpp b/fpdfsdk/javascript/Icon.cpp
similarity index 86%
rename from fpdfsdk/src/javascript/Icon.cpp
rename to fpdfsdk/javascript/Icon.cpp
index 0bad2c5..d3c2ba8 100644
--- a/fpdfsdk/src/javascript/Icon.cpp
+++ b/fpdfsdk/javascript/Icon.cpp
@@ -4,12 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/Icon.h"
+#include "fpdfsdk/javascript/Icon.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Value.h"
/* ---------------------- Icon ---------------------- */
diff --git a/fpdfsdk/src/javascript/Icon.h b/fpdfsdk/javascript/Icon.h
similarity index 83%
rename from fpdfsdk/src/javascript/Icon.h
rename to fpdfsdk/javascript/Icon.h
index 512002d..bd125d8 100644
--- a/fpdfsdk/src/javascript/Icon.h
+++ b/fpdfsdk/javascript/Icon.h
@@ -4,10 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_ICON_H_
-#define FPDFSDK_SRC_JAVASCRIPT_ICON_H_
+#ifndef FPDFSDK_JAVASCRIPT_ICON_H_
+#define FPDFSDK_JAVASCRIPT_ICON_H_
-#include "fpdfsdk/src/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Define.h"
class Icon : public CJS_EmbedObj {
public:
@@ -34,4 +34,4 @@
JS_STATIC_PROP(name, Icon);
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_ICON_H_
+#endif // FPDFSDK_JAVASCRIPT_ICON_H_
diff --git a/fpdfsdk/src/javascript/JS_Context.cpp b/fpdfsdk/javascript/JS_Context.cpp
similarity index 97%
rename from fpdfsdk/src/javascript/JS_Context.cpp
rename to fpdfsdk/javascript/JS_Context.cpp
index 304abfa..c382b07 100644
--- a/fpdfsdk/src/javascript/JS_Context.cpp
+++ b/fpdfsdk/javascript/JS_Context.cpp
@@ -4,12 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/JS_Context.h"
+#include "fpdfsdk/javascript/JS_Context.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/JS_EventHandler.h"
-#include "fpdfsdk/src/javascript/JS_Runtime.h"
-#include "fpdfsdk/src/javascript/resource.h"
+#include "fpdfsdk/javascript/JS_EventHandler.h"
+#include "fpdfsdk/javascript/JS_Runtime.h"
+#include "fpdfsdk/javascript/resource.h"
/* -------------------------- CJS_Context -------------------------- */
diff --git a/fpdfsdk/src/javascript/JS_Context.h b/fpdfsdk/javascript/JS_Context.h
similarity index 97%
rename from fpdfsdk/src/javascript/JS_Context.h
rename to fpdfsdk/javascript/JS_Context.h
index 93ef152..cd57187 100644
--- a/fpdfsdk/src/javascript/JS_Context.h
+++ b/fpdfsdk/javascript/JS_Context.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_JS_CONTEXT_H_
-#define FPDFSDK_SRC_JAVASCRIPT_JS_CONTEXT_H_
+#ifndef FPDFSDK_JAVASCRIPT_JS_CONTEXT_H_
+#define FPDFSDK_JAVASCRIPT_JS_CONTEXT_H_
#include "core/include/fxcrt/fx_string.h"
#include "core/include/fxcrt/fx_system.h"
@@ -134,4 +134,4 @@
FX_BOOL m_bMsgBoxEnable;
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_JS_CONTEXT_H_
+#endif // FPDFSDK_JAVASCRIPT_JS_CONTEXT_H_
diff --git a/fpdfsdk/src/javascript/JS_Define.h b/fpdfsdk/javascript/JS_Define.h
similarity index 97%
rename from fpdfsdk/src/javascript/JS_Define.h
rename to fpdfsdk/javascript/JS_Define.h
index e16c5a0..3c148cf 100644
--- a/fpdfsdk/src/javascript/JS_Define.h
+++ b/fpdfsdk/javascript/JS_Define.h
@@ -4,21 +4,21 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_JS_DEFINE_H_
-#define FPDFSDK_SRC_JAVASCRIPT_JS_DEFINE_H_
+#ifndef FPDFSDK_JAVASCRIPT_JS_DEFINE_H_
+#define FPDFSDK_JAVASCRIPT_JS_DEFINE_H_
#include <vector>
#include "fpdfsdk/include/jsapi/fxjs_v8.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
-#include "fpdfsdk/src/javascript/resource.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/resource.h"
struct JSConstSpec {
const wchar_t* pName;
double number;
const wchar_t* string; // NOLINT
- uint8_t t; // 0:double 1:str
+ uint8_t t; // 0:double 1:str
};
struct JSPropertySpec {
@@ -50,11 +50,11 @@
#define BEGIN_JS_STATIC_PROP(js_class_name) \
JSPropertySpec js_class_name::JS_Class_Properties[] = {
-#define JS_STATIC_PROP_ENTRY(prop_name) \
- { \
+#define JS_STATIC_PROP_ENTRY(prop_name) \
+ { \
JS_WIDESTRING(prop_name), get_##prop_name##_static, \
- set_##prop_name##_static \
- } \
+ set_##prop_name##_static \
+ } \
,
#define END_JS_STATIC_PROP() \
@@ -490,4 +490,4 @@
CJS_Value::Type GET_VALUE_TYPE(v8::Local<v8::Value> p);
-#endif // FPDFSDK_SRC_JAVASCRIPT_JS_DEFINE_H_
+#endif // FPDFSDK_JAVASCRIPT_JS_DEFINE_H_
diff --git a/fpdfsdk/src/javascript/JS_EventHandler.cpp b/fpdfsdk/javascript/JS_EventHandler.cpp
similarity index 97%
rename from fpdfsdk/src/javascript/JS_EventHandler.cpp
rename to fpdfsdk/javascript/JS_EventHandler.cpp
index e11cfa3..697cfeb 100644
--- a/fpdfsdk/src/javascript/JS_EventHandler.cpp
+++ b/fpdfsdk/javascript/JS_EventHandler.cpp
@@ -4,16 +4,16 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/JS_EventHandler.h"
+#include "fpdfsdk/javascript/JS_EventHandler.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/Document.h"
-#include "fpdfsdk/src/javascript/Field.h"
-#include "fpdfsdk/src/javascript/JS_Context.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Runtime.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/Document.h"
+#include "fpdfsdk/javascript/Field.h"
+#include "fpdfsdk/javascript/JS_Context.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Runtime.h"
+#include "fpdfsdk/javascript/JS_Value.h"
/* ---------------------------- CJS_EventHandler ---------------------------- */
diff --git a/fpdfsdk/src/javascript/JS_EventHandler.h b/fpdfsdk/javascript/JS_EventHandler.h
similarity index 97%
rename from fpdfsdk/src/javascript/JS_EventHandler.h
rename to fpdfsdk/javascript/JS_EventHandler.h
index 2af19d9..5a81974 100644
--- a/fpdfsdk/src/javascript/JS_EventHandler.h
+++ b/fpdfsdk/javascript/JS_EventHandler.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_JS_EVENTHANDLER_H_
-#define FPDFSDK_SRC_JAVASCRIPT_JS_EVENTHANDLER_H_
+#ifndef FPDFSDK_JAVASCRIPT_JS_EVENTHANDLER_H_
+#define FPDFSDK_JAVASCRIPT_JS_EVENTHANDLER_H_
#include "core/include/fxcrt/fx_string.h"
#include "core/include/fxcrt/fx_system.h"
@@ -217,4 +217,4 @@
CPDFSDK_Annot* m_pTargetAnnot;
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_JS_EVENTHANDLER_H_
+#endif // FPDFSDK_JAVASCRIPT_JS_EVENTHANDLER_H_
diff --git a/fpdfsdk/src/javascript/JS_GlobalData.cpp b/fpdfsdk/javascript/JS_GlobalData.cpp
similarity index 99%
rename from fpdfsdk/src/javascript/JS_GlobalData.cpp
rename to fpdfsdk/javascript/JS_GlobalData.cpp
index 1491d01..1408dbe 100644
--- a/fpdfsdk/src/javascript/JS_GlobalData.cpp
+++ b/fpdfsdk/javascript/JS_GlobalData.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/JS_GlobalData.h"
+#include "fpdfsdk/javascript/JS_GlobalData.h"
#include "core/include/fdrm/fx_crypt.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
diff --git a/fpdfsdk/src/javascript/JS_GlobalData.h b/fpdfsdk/javascript/JS_GlobalData.h
similarity index 94%
rename from fpdfsdk/src/javascript/JS_GlobalData.h
rename to fpdfsdk/javascript/JS_GlobalData.h
index 6a07fa8..28833d8 100644
--- a/fpdfsdk/src/javascript/JS_GlobalData.h
+++ b/fpdfsdk/javascript/JS_GlobalData.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_JS_GLOBALDATA_H_
-#define FPDFSDK_SRC_JAVASCRIPT_JS_GLOBALDATA_H_
+#ifndef FPDFSDK_JAVASCRIPT_JS_GLOBALDATA_H_
+#define FPDFSDK_JAVASCRIPT_JS_GLOBALDATA_H_
#include "core/include/fxcrt/fx_basic.h"
@@ -103,4 +103,4 @@
CFX_WideString m_sFilePath;
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_JS_GLOBALDATA_H_
+#endif // FPDFSDK_JAVASCRIPT_JS_GLOBALDATA_H_
diff --git a/fpdfsdk/src/javascript/JS_Object.cpp b/fpdfsdk/javascript/JS_Object.cpp
similarity index 95%
rename from fpdfsdk/src/javascript/JS_Object.cpp
rename to fpdfsdk/javascript/JS_Object.cpp
index 3f0fe8c..e6af576 100644
--- a/fpdfsdk/src/javascript/JS_Object.cpp
+++ b/fpdfsdk/javascript/JS_Object.cpp
@@ -4,12 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Object.h"
#include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment.
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/JS_Context.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Context.h"
+#include "fpdfsdk/javascript/JS_Define.h"
namespace {
@@ -65,8 +65,7 @@
m_pV8Object.Reset(m_pIsolate, pObject);
}
-CJS_Object::~CJS_Object() {
-}
+CJS_Object::~CJS_Object() {}
void CJS_Object::MakeWeak() {
m_pV8Object.SetWeak(this, DisposeObject,
diff --git a/fpdfsdk/src/javascript/JS_Object.h b/fpdfsdk/javascript/JS_Object.h
similarity index 94%
rename from fpdfsdk/src/javascript/JS_Object.h
rename to fpdfsdk/javascript/JS_Object.h
index deae2d2..983b713 100644
--- a/fpdfsdk/src/javascript/JS_Object.h
+++ b/fpdfsdk/javascript/JS_Object.h
@@ -4,15 +4,15 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_
-#define FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_
+#ifndef FPDFSDK_JAVASCRIPT_JS_OBJECT_H_
+#define FPDFSDK_JAVASCRIPT_JS_OBJECT_H_
#include <map>
#include <memory>
#include "fpdfsdk/include/fsdk_define.h" // For FX_UINT
#include "fpdfsdk/include/jsapi/fxjs_v8.h"
-#include "fpdfsdk/src/javascript/JS_Runtime.h"
+#include "fpdfsdk/javascript/JS_Runtime.h"
class CJS_Context;
class CJS_Object;
@@ -113,4 +113,4 @@
CPDFDoc_Environment* const m_pApp;
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_JS_OBJECT_H_
+#endif // FPDFSDK_JAVASCRIPT_JS_OBJECT_H_
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/javascript/JS_Runtime.cpp
similarity index 92%
rename from fpdfsdk/src/javascript/JS_Runtime.cpp
rename to fpdfsdk/javascript/JS_Runtime.cpp
index dd7ef0f..d56a8ac 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp
+++ b/fpdfsdk/javascript/JS_Runtime.cpp
@@ -4,28 +4,28 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/JS_Runtime.h"
+#include "fpdfsdk/javascript/JS_Runtime.h"
#include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment.
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/Consts.h"
-#include "fpdfsdk/src/javascript/Document.h"
-#include "fpdfsdk/src/javascript/Field.h"
-#include "fpdfsdk/src/javascript/Icon.h"
-#include "fpdfsdk/src/javascript/JS_Context.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_EventHandler.h"
-#include "fpdfsdk/src/javascript/JS_GlobalData.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
-#include "fpdfsdk/src/javascript/PublicMethods.h"
-#include "fpdfsdk/src/javascript/app.h"
-#include "fpdfsdk/src/javascript/color.h"
-#include "fpdfsdk/src/javascript/console.h"
-#include "fpdfsdk/src/javascript/event.h"
-#include "fpdfsdk/src/javascript/global.h"
-#include "fpdfsdk/src/javascript/report.h"
-#include "fpdfsdk/src/javascript/util.h"
+#include "fpdfsdk/javascript/Consts.h"
+#include "fpdfsdk/javascript/Document.h"
+#include "fpdfsdk/javascript/Field.h"
+#include "fpdfsdk/javascript/Icon.h"
+#include "fpdfsdk/javascript/JS_Context.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_EventHandler.h"
+#include "fpdfsdk/javascript/JS_GlobalData.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/PublicMethods.h"
+#include "fpdfsdk/javascript/app.h"
+#include "fpdfsdk/javascript/color.h"
+#include "fpdfsdk/javascript/console.h"
+#include "fpdfsdk/javascript/event.h"
+#include "fpdfsdk/javascript/global.h"
+#include "fpdfsdk/javascript/report.h"
+#include "fpdfsdk/javascript/util.h"
#include "third_party/base/stl_util.h"
#ifdef PDF_ENABLE_XFA
diff --git a/fpdfsdk/src/javascript/JS_Runtime.h b/fpdfsdk/javascript/JS_Runtime.h
similarity index 93%
rename from fpdfsdk/src/javascript/JS_Runtime.h
rename to fpdfsdk/javascript/JS_Runtime.h
index c7b0009..3779164 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.h
+++ b/fpdfsdk/javascript/JS_Runtime.h
@@ -4,18 +4,18 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_JS_RUNTIME_H_
-#define FPDFSDK_SRC_JAVASCRIPT_JS_RUNTIME_H_
+#ifndef FPDFSDK_JAVASCRIPT_JS_RUNTIME_H_
+#define FPDFSDK_JAVASCRIPT_JS_RUNTIME_H_
-#include <set>
#include <map>
+#include <set>
#include <utility>
#include <vector>
#include "core/include/fxcrt/fx_basic.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
#include "fpdfsdk/include/jsapi/fxjs_v8.h"
-#include "fpdfsdk/src/javascript/JS_EventHandler.h"
+#include "fpdfsdk/javascript/JS_EventHandler.h"
class CJS_Context;
@@ -88,4 +88,4 @@
std::set<Observer*> m_observers;
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_JS_RUNTIME_H_
+#endif // FPDFSDK_JAVASCRIPT_JS_RUNTIME_H_
diff --git a/fpdfsdk/src/javascript/JS_Runtime_Stub.cpp b/fpdfsdk/javascript/JS_Runtime_Stub.cpp
similarity index 99%
rename from fpdfsdk/src/javascript/JS_Runtime_Stub.cpp
rename to fpdfsdk/javascript/JS_Runtime_Stub.cpp
index ab20e0e..d796280 100644
--- a/fpdfsdk/src/javascript/JS_Runtime_Stub.cpp
+++ b/fpdfsdk/javascript/JS_Runtime_Stub.cpp
@@ -159,8 +159,7 @@
};
// static
-void IJS_Runtime::Initialize(unsigned int slot, void* isolate) {
-}
+void IJS_Runtime::Initialize(unsigned int slot, void* isolate) {}
// static
IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) {
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/javascript/JS_Value.cpp
similarity index 96%
rename from fpdfsdk/src/javascript/JS_Value.cpp
rename to fpdfsdk/javascript/JS_Value.cpp
index 70ccdb5..8e5e463 100644
--- a/fpdfsdk/src/javascript/JS_Value.cpp
+++ b/fpdfsdk/javascript/JS_Value.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/JS_Value.h"
#include <time.h>
@@ -13,9 +13,9 @@
#include <limits>
#include <vector>
-#include "fpdfsdk/src/javascript/Document.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/Document.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Object.h"
static const FX_DWORD g_nan[2] = {0, 0x7FF80000};
static double GetNan() {
@@ -23,12 +23,10 @@
}
CJS_Value::CJS_Value(CJS_Runtime* pRuntime)
- : m_eType(VT_unknown), m_pJSRuntime(pRuntime) {
-}
+ : m_eType(VT_unknown), m_pJSRuntime(pRuntime) {}
CJS_Value::CJS_Value(CJS_Runtime* pRuntime, v8::Local<v8::Value> pValue, Type t)
- : m_eType(t), m_pValue(pValue), m_pJSRuntime(pRuntime) {
-}
+ : m_eType(t), m_pValue(pValue), m_pJSRuntime(pRuntime) {}
CJS_Value::CJS_Value(CJS_Runtime* pRuntime, const int& iValue)
: m_pJSRuntime(pRuntime) {
@@ -290,11 +288,9 @@
: CJS_Value(value), m_bIsSetting(0) {}
CJS_PropValue::CJS_PropValue(CJS_Runtime* pRuntime)
- : CJS_Value(pRuntime), m_bIsSetting(0) {
-}
+ : CJS_Value(pRuntime), m_bIsSetting(0) {}
-CJS_PropValue::~CJS_PropValue() {
-}
+CJS_PropValue::~CJS_PropValue() {}
void CJS_PropValue::operator<<(int iValue) {
ASSERT(!m_bIsSetting);
@@ -412,8 +408,7 @@
return m_pValue;
}
-CJS_Array::CJS_Array(CJS_Runtime* pRuntime) : m_pJSRuntime(pRuntime) {
-}
+CJS_Array::CJS_Array(CJS_Runtime* pRuntime) : m_pJSRuntime(pRuntime) {}
CJS_Array::~CJS_Array() {}
@@ -454,8 +449,7 @@
return m_pArray;
}
-CJS_Date::CJS_Date(CJS_Runtime* pRuntime) : m_pJSRuntime(pRuntime) {
-}
+CJS_Date::CJS_Date(CJS_Runtime* pRuntime) : m_pJSRuntime(pRuntime) {}
CJS_Date::CJS_Date(CJS_Runtime* pRuntime, double dMsecTime)
: m_pJSRuntime(pRuntime) {
@@ -660,10 +654,10 @@
}
double _TimeFromYearMonth(int y, int m) {
- static int daysMonth[12] = {
- 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
- static int leapDaysMonth[12] = {
- 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335};
+ static int daysMonth[12] = {0, 31, 59, 90, 120, 151,
+ 181, 212, 243, 273, 304, 334};
+ static int leapDaysMonth[12] = {0, 31, 60, 91, 121, 152,
+ 182, 213, 244, 274, 305, 335};
int* pMonth = daysMonth;
if (_isLeapYear(y))
pMonth = leapDaysMonth;
@@ -814,7 +808,8 @@
v8::Local<v8::Object> o = v->ToObject(context).ToLocalChecked();
v = o->Get(context, v8::String::NewFromUtf8(pIsolate, "parse",
v8::NewStringType::kNormal)
- .ToLocalChecked()).ToLocalChecked();
+ .ToLocalChecked())
+ .ToLocalChecked();
if (v->IsFunction()) {
v8::Local<v8::Function> funC = v8::Local<v8::Function>::Cast(v);
diff --git a/fpdfsdk/src/javascript/JS_Value.h b/fpdfsdk/javascript/JS_Value.h
similarity index 97%
rename from fpdfsdk/src/javascript/JS_Value.h
rename to fpdfsdk/javascript/JS_Value.h
index f6c1c36..70f76ce 100644
--- a/fpdfsdk/src/javascript/JS_Value.h
+++ b/fpdfsdk/javascript/JS_Value.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_JS_VALUE_H_
-#define FPDFSDK_SRC_JAVASCRIPT_JS_VALUE_H_
+#ifndef FPDFSDK_JAVASCRIPT_JS_VALUE_H_
+#define FPDFSDK_JAVASCRIPT_JS_VALUE_H_
#include <vector>
@@ -227,4 +227,4 @@
size_t nKeywords,
...);
-#endif // FPDFSDK_SRC_JAVASCRIPT_JS_VALUE_H_
+#endif // FPDFSDK_JAVASCRIPT_JS_VALUE_H_
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
similarity index 96%
rename from fpdfsdk/src/javascript/PublicMethods.cpp
rename to fpdfsdk/javascript/PublicMethods.cpp
index 014dea2..d154fc1 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/PublicMethods.h"
+#include "fpdfsdk/javascript/PublicMethods.h"
#include <algorithm>
#include <string>
@@ -13,16 +13,16 @@
#include "core/include/fxcrt/fx_ext.h"
#include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment.
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/Field.h"
-#include "fpdfsdk/src/javascript/JS_Context.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_EventHandler.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Runtime.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
-#include "fpdfsdk/src/javascript/color.h"
-#include "fpdfsdk/src/javascript/resource.h"
-#include "fpdfsdk/src/javascript/util.h"
+#include "fpdfsdk/javascript/Field.h"
+#include "fpdfsdk/javascript/JS_Context.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_EventHandler.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Runtime.h"
+#include "fpdfsdk/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/color.h"
+#include "fpdfsdk/javascript/resource.h"
+#include "fpdfsdk/javascript/util.h"
#define DOUBLE_CORRECT 0.000000000000001
@@ -53,31 +53,14 @@
IMPLEMENT_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods)
-static const FX_WCHAR* const months[] = {L"Jan",
- L"Feb",
- L"Mar",
- L"Apr",
- L"May",
- L"Jun",
- L"Jul",
- L"Aug",
- L"Sep",
- L"Oct",
- L"Nov",
- L"Dec"};
+static const FX_WCHAR* const months[] = {L"Jan", L"Feb", L"Mar", L"Apr",
+ L"May", L"Jun", L"Jul", L"Aug",
+ L"Sep", L"Oct", L"Nov", L"Dec"};
-static const FX_WCHAR* const fullmonths[] = {L"January",
- L"February",
- L"March",
- L"April",
- L"May",
- L"June",
- L"July",
- L"August",
- L"September",
- L"October",
- L"November",
- L"December"};
+static const FX_WCHAR* const fullmonths[] = {
+ L"January", L"February", L"March", L"April",
+ L"May", L"June", L"July", L"August",
+ L"September", L"October", L"November", L"December"};
FX_BOOL CJS_PublicMethods::IsNumber(const FX_WCHAR* str) {
CFX_WideString sTrim = StrTrim(str);
diff --git a/fpdfsdk/src/javascript/PublicMethods.h b/fpdfsdk/javascript/PublicMethods.h
similarity index 97%
rename from fpdfsdk/src/javascript/PublicMethods.h
rename to fpdfsdk/javascript/PublicMethods.h
index d0c81e0..8961c5a 100644
--- a/fpdfsdk/src/javascript/PublicMethods.h
+++ b/fpdfsdk/javascript/PublicMethods.h
@@ -4,13 +4,13 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_PUBLICMETHODS_H_
-#define FPDFSDK_SRC_JAVASCRIPT_PUBLICMETHODS_H_
+#ifndef FPDFSDK_JAVASCRIPT_PUBLICMETHODS_H_
+#define FPDFSDK_JAVASCRIPT_PUBLICMETHODS_H_
#include <string>
#include <vector>
-#include "fpdfsdk/src/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Define.h"
class CJS_PublicMethods : public CJS_Object {
public:
@@ -172,4 +172,4 @@
static CJS_Array AF_MakeArrayFromList(CJS_Runtime* pRuntime, CJS_Value val);
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_PUBLICMETHODS_H_
+#endif // FPDFSDK_JAVASCRIPT_PUBLICMETHODS_H_
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/javascript/app.cpp
similarity index 97%
rename from fpdfsdk/src/javascript/app.cpp
rename to fpdfsdk/javascript/app.cpp
index 767555f..2f81791 100644
--- a/fpdfsdk/src/javascript/app.cpp
+++ b/fpdfsdk/javascript/app.cpp
@@ -4,21 +4,21 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/app.h"
+#include "fpdfsdk/javascript/app.h"
#include <memory>
#include <vector>
#include "fpdfsdk/include/fsdk_mgr.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/Document.h"
-#include "fpdfsdk/src/javascript/JS_Context.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_EventHandler.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Runtime.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
-#include "fpdfsdk/src/javascript/resource.h"
+#include "fpdfsdk/javascript/Document.h"
+#include "fpdfsdk/javascript/JS_Context.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_EventHandler.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Runtime.h"
+#include "fpdfsdk/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/resource.h"
BEGIN_JS_STATIC_CONST(CJS_TimerObj)
END_JS_STATIC_CONST()
diff --git a/fpdfsdk/src/javascript/app.h b/fpdfsdk/javascript/app.h
similarity index 97%
rename from fpdfsdk/src/javascript/app.h
rename to fpdfsdk/javascript/app.h
index faebcbd..764f73b 100644
--- a/fpdfsdk/src/javascript/app.h
+++ b/fpdfsdk/javascript/app.h
@@ -4,12 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_APP_H_
-#define FPDFSDK_SRC_JAVASCRIPT_APP_H_
+#ifndef FPDFSDK_JAVASCRIPT_APP_H_
+#define FPDFSDK_JAVASCRIPT_APP_H_
#include <vector>
-#include "fpdfsdk/src/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Define.h"
class CJS_Runtime;
class CJS_Timer;
@@ -208,4 +208,4 @@
JS_STATIC_METHOD(setTimeOut, app);
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_APP_H_
+#endif // FPDFSDK_JAVASCRIPT_APP_H_
diff --git a/fpdfsdk/src/javascript/color.cpp b/fpdfsdk/javascript/color.cpp
similarity index 95%
rename from fpdfsdk/src/javascript/color.cpp
rename to fpdfsdk/javascript/color.cpp
index 4339b4e..2681a86 100644
--- a/fpdfsdk/src/javascript/color.cpp
+++ b/fpdfsdk/javascript/color.cpp
@@ -4,17 +4,17 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/color.h"
+#include "fpdfsdk/javascript/color.h"
#include <vector>
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/JS_Context.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_EventHandler.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Runtime.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/JS_Context.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_EventHandler.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Runtime.h"
+#include "fpdfsdk/javascript/JS_Value.h"
/* -------------------------- color -------------------------- */
@@ -58,8 +58,7 @@
m_crLTGray = CPWL_Color(COLORTYPE_GRAY, 0.75);
}
-color::~color() {
-}
+color::~color() {}
void color::ConvertPWLColorToArray(const CPWL_Color& color, CJS_Array& array) {
switch (color.nColorType) {
diff --git a/fpdfsdk/src/javascript/color.h b/fpdfsdk/javascript/color.h
similarity index 94%
rename from fpdfsdk/src/javascript/color.h
rename to fpdfsdk/javascript/color.h
index 6163374..cb5e59d 100644
--- a/fpdfsdk/src/javascript/color.h
+++ b/fpdfsdk/javascript/color.h
@@ -4,13 +4,13 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_COLOR_H_
-#define FPDFSDK_SRC_JAVASCRIPT_COLOR_H_
+#ifndef FPDFSDK_JAVASCRIPT_COLOR_H_
+#define FPDFSDK_JAVASCRIPT_COLOR_H_
#include <vector>
#include "fpdfsdk/include/pdfwindow/PWL_Wnd.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Define.h"
class color : public CJS_EmbedObj {
public:
@@ -84,4 +84,4 @@
JS_STATIC_METHOD(equal, color);
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_COLOR_H_
+#endif // FPDFSDK_JAVASCRIPT_COLOR_H_
diff --git a/fpdfsdk/src/javascript/console.cpp b/fpdfsdk/javascript/console.cpp
similarity index 85%
rename from fpdfsdk/src/javascript/console.cpp
rename to fpdfsdk/javascript/console.cpp
index 8beb083..4cce32d 100644
--- a/fpdfsdk/src/javascript/console.cpp
+++ b/fpdfsdk/javascript/console.cpp
@@ -4,16 +4,16 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/console.h"
+#include "fpdfsdk/javascript/console.h"
#include <vector>
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/JS_Context.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_EventHandler.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/JS_Context.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_EventHandler.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Value.h"
/* ------------------------ console ------------------------ */
diff --git a/fpdfsdk/src/javascript/console.h b/fpdfsdk/javascript/console.h
similarity index 88%
rename from fpdfsdk/src/javascript/console.h
rename to fpdfsdk/javascript/console.h
index 651899b..589dbc8 100644
--- a/fpdfsdk/src/javascript/console.h
+++ b/fpdfsdk/javascript/console.h
@@ -4,12 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_CONSOLE_H_
-#define FPDFSDK_SRC_JAVASCRIPT_CONSOLE_H_
+#ifndef FPDFSDK_JAVASCRIPT_CONSOLE_H_
+#define FPDFSDK_JAVASCRIPT_CONSOLE_H_
#include <vector>
-#include "fpdfsdk/src/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Define.h"
class console : public CJS_EmbedObj {
public:
@@ -48,4 +48,4 @@
JS_STATIC_METHOD(show, console);
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_CONSOLE_H_
+#endif // FPDFSDK_JAVASCRIPT_CONSOLE_H_
diff --git a/fpdfsdk/src/javascript/event.cpp b/fpdfsdk/javascript/event.cpp
similarity index 95%
rename from fpdfsdk/src/javascript/event.cpp
rename to fpdfsdk/javascript/event.cpp
index f964908..7549451 100644
--- a/fpdfsdk/src/javascript/event.cpp
+++ b/fpdfsdk/javascript/event.cpp
@@ -4,15 +4,15 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/event.h"
+#include "fpdfsdk/javascript/event.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/Field.h"
-#include "fpdfsdk/src/javascript/JS_Context.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_EventHandler.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/Field.h"
+#include "fpdfsdk/javascript/JS_Context.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_EventHandler.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Value.h"
/* -------------------------- event -------------------------- */
@@ -49,8 +49,7 @@
event::event(CJS_Object* pJsObject) : CJS_EmbedObj(pJsObject) {}
-event::~event() {
-}
+event::~event() {}
FX_BOOL event::change(IJS_Context* cc,
CJS_PropValue& vp,
diff --git a/fpdfsdk/src/javascript/event.h b/fpdfsdk/javascript/event.h
similarity index 94%
rename from fpdfsdk/src/javascript/event.h
rename to fpdfsdk/javascript/event.h
index cf37bf6..57b3416 100644
--- a/fpdfsdk/src/javascript/event.h
+++ b/fpdfsdk/javascript/event.h
@@ -4,10 +4,10 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_EVENT_H_
-#define FPDFSDK_SRC_JAVASCRIPT_EVENT_H_
+#ifndef FPDFSDK_JAVASCRIPT_EVENT_H_
+#define FPDFSDK_JAVASCRIPT_EVENT_H_
-#include "fpdfsdk/src/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Define.h"
class event : public CJS_EmbedObj {
public:
@@ -73,4 +73,4 @@
JS_STATIC_PROP(willCommit, event);
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_EVENT_H_
+#endif // FPDFSDK_JAVASCRIPT_EVENT_H_
diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/javascript/global.cpp
similarity index 94%
rename from fpdfsdk/src/javascript/global.cpp
rename to fpdfsdk/javascript/global.cpp
index 234e132..c22c05d 100644
--- a/fpdfsdk/src/javascript/global.cpp
+++ b/fpdfsdk/javascript/global.cpp
@@ -4,19 +4,19 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/global.h"
+#include "fpdfsdk/javascript/global.h"
#include <vector>
#include "core/include/fxcrt/fx_ext.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/JS_Context.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_EventHandler.h"
-#include "fpdfsdk/src/javascript/JS_GlobalData.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
-#include "fpdfsdk/src/javascript/resource.h"
+#include "fpdfsdk/javascript/JS_Context.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_EventHandler.h"
+#include "fpdfsdk/javascript/JS_GlobalData.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/resource.h"
/* ---------------------------- global ---------------------------- */
@@ -97,8 +97,7 @@
}
JSGlobalAlternate::JSGlobalAlternate(CJS_Object* pJSObject)
- : CJS_EmbedObj(pJSObject), m_pApp(NULL) {
-}
+ : CJS_EmbedObj(pJSObject), m_pApp(NULL) {}
JSGlobalAlternate::~JSGlobalAlternate() {
DestroyGlobalPersisitentVariables();
@@ -298,17 +297,14 @@
m_pGlobalData->SetGlobalVariableString(name, pData->sData);
m_pGlobalData->SetGlobalVariablePersistent(name, pData->bPersistent);
break;
- case JS_GLOBALDATA_TYPE_OBJECT:
- {
- CJS_GlobalVariableArray array;
- v8::Local<v8::Object> obj = v8::Local<v8::Object>::New(
- GetJSObject()->GetIsolate(), pData->pData);
- ObjectToArray(cc, obj, array);
- m_pGlobalData->SetGlobalVariableObject(name, array);
- m_pGlobalData->SetGlobalVariablePersistent(name,
- pData->bPersistent);
- }
- break;
+ case JS_GLOBALDATA_TYPE_OBJECT: {
+ CJS_GlobalVariableArray array;
+ v8::Local<v8::Object> obj = v8::Local<v8::Object>::New(
+ GetJSObject()->GetIsolate(), pData->pData);
+ ObjectToArray(cc, obj, array);
+ m_pGlobalData->SetGlobalVariableObject(name, array);
+ m_pGlobalData->SetGlobalVariablePersistent(name, pData->bPersistent);
+ } break;
case JS_GLOBALDATA_TYPE_NULL:
m_pGlobalData->SetGlobalVariableNull(name);
m_pGlobalData->SetGlobalVariablePersistent(name, pData->bPersistent);
diff --git a/fpdfsdk/src/javascript/global.h b/fpdfsdk/javascript/global.h
similarity index 93%
rename from fpdfsdk/src/javascript/global.h
rename to fpdfsdk/javascript/global.h
index e8172e6..335b540 100644
--- a/fpdfsdk/src/javascript/global.h
+++ b/fpdfsdk/javascript/global.h
@@ -4,13 +4,13 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_GLOBAL_H_
-#define FPDFSDK_SRC_JAVASCRIPT_GLOBAL_H_
+#ifndef FPDFSDK_JAVASCRIPT_GLOBAL_H_
+#define FPDFSDK_JAVASCRIPT_GLOBAL_H_
#include <map>
#include <vector>
-#include "fpdfsdk/src/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Define.h"
class CJS_GlobalData;
class CJS_GlobalVariableArray;
@@ -89,4 +89,4 @@
JS_SPECIAL_STATIC_METHOD(setPersistent, JSGlobalAlternate, global);
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_GLOBAL_H_
+#endif // FPDFSDK_JAVASCRIPT_GLOBAL_H_
diff --git a/fpdfsdk/src/javascript/public_methods_embeddertest.cpp b/fpdfsdk/javascript/public_methods_embeddertest.cpp
similarity index 98%
rename from fpdfsdk/src/javascript/public_methods_embeddertest.cpp
rename to fpdfsdk/javascript/public_methods_embeddertest.cpp
index cf6f968..a298cfc 100644
--- a/fpdfsdk/src/javascript/public_methods_embeddertest.cpp
+++ b/fpdfsdk/javascript/public_methods_embeddertest.cpp
@@ -5,7 +5,7 @@
#include <cmath>
#include "core/include/fxcrt/fx_string.h"
-#include "fpdfsdk/src/javascript/PublicMethods.h"
+#include "fpdfsdk/javascript/PublicMethods.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/js_embedder_test.h"
diff --git a/fpdfsdk/src/javascript/report.cpp b/fpdfsdk/javascript/report.cpp
similarity index 86%
rename from fpdfsdk/src/javascript/report.cpp
rename to fpdfsdk/javascript/report.cpp
index 8374f3c..ca7e199 100644
--- a/fpdfsdk/src/javascript/report.cpp
+++ b/fpdfsdk/javascript/report.cpp
@@ -4,14 +4,14 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/report.h"
+#include "fpdfsdk/javascript/report.h"
#include <vector>
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Value.h"
/* ---------------------- report ---------------------- */
diff --git a/fpdfsdk/src/javascript/report.h b/fpdfsdk/javascript/report.h
similarity index 84%
rename from fpdfsdk/src/javascript/report.h
rename to fpdfsdk/javascript/report.h
index 55d7464..3cd3b3b 100644
--- a/fpdfsdk/src/javascript/report.h
+++ b/fpdfsdk/javascript/report.h
@@ -4,12 +4,12 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_REPORT_H_
-#define FPDFSDK_SRC_JAVASCRIPT_REPORT_H_
+#ifndef FPDFSDK_JAVASCRIPT_REPORT_H_
+#define FPDFSDK_JAVASCRIPT_REPORT_H_
#include <vector>
-#include "fpdfsdk/src/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Define.h"
class Report : public CJS_EmbedObj {
public:
@@ -38,4 +38,4 @@
JS_STATIC_METHOD(writeText, Report);
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_REPORT_H_
+#endif // FPDFSDK_JAVASCRIPT_REPORT_H_
diff --git a/fpdfsdk/src/javascript/resource.cpp b/fpdfsdk/javascript/resource.cpp
similarity index 97%
rename from fpdfsdk/src/javascript/resource.cpp
rename to fpdfsdk/javascript/resource.cpp
index 7031da3..88721ef 100644
--- a/fpdfsdk/src/javascript/resource.cpp
+++ b/fpdfsdk/javascript/resource.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/resource.h"
+#include "fpdfsdk/javascript/resource.h"
CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT id) {
switch (id) {
diff --git a/fpdfsdk/src/javascript/resource.h b/fpdfsdk/javascript/resource.h
similarity index 90%
rename from fpdfsdk/src/javascript/resource.h
rename to fpdfsdk/javascript/resource.h
index be3ae13..4f35f27 100644
--- a/fpdfsdk/src/javascript/resource.h
+++ b/fpdfsdk/javascript/resource.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_RESOURCE_H_
-#define FPDFSDK_SRC_JAVASCRIPT_RESOURCE_H_
+#ifndef FPDFSDK_JAVASCRIPT_RESOURCE_H_
+#define FPDFSDK_JAVASCRIPT_RESOURCE_H_
#include "core/include/fxcrt/fx_string.h" // For CFX_WideString.
#include "fpdfsdk/include/fsdk_define.h" // For FX_UINT.
@@ -36,4 +36,4 @@
const char* property_name,
const CFX_WideString& details);
-#endif // FPDFSDK_SRC_JAVASCRIPT_RESOURCE_H_
+#endif // FPDFSDK_JAVASCRIPT_RESOURCE_H_
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/javascript/util.cpp
similarity index 96%
rename from fpdfsdk/src/javascript/util.cpp
rename to fpdfsdk/javascript/util.cpp
index 52a9362..d488cb2 100644
--- a/fpdfsdk/src/javascript/util.cpp
+++ b/fpdfsdk/javascript/util.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/src/javascript/util.h"
+#include "fpdfsdk/javascript/util.h"
#include <time.h>
@@ -13,14 +13,14 @@
#include "core/include/fxcrt/fx_ext.h"
#include "fpdfsdk/include/javascript/IJavaScript.h"
-#include "fpdfsdk/src/javascript/JS_Context.h"
-#include "fpdfsdk/src/javascript/JS_Define.h"
-#include "fpdfsdk/src/javascript/JS_EventHandler.h"
-#include "fpdfsdk/src/javascript/JS_Object.h"
-#include "fpdfsdk/src/javascript/JS_Runtime.h"
-#include "fpdfsdk/src/javascript/JS_Value.h"
-#include "fpdfsdk/src/javascript/PublicMethods.h"
-#include "fpdfsdk/src/javascript/resource.h"
+#include "fpdfsdk/javascript/JS_Context.h"
+#include "fpdfsdk/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_EventHandler.h"
+#include "fpdfsdk/javascript/JS_Object.h"
+#include "fpdfsdk/javascript/JS_Runtime.h"
+#include "fpdfsdk/javascript/JS_Value.h"
+#include "fpdfsdk/javascript/PublicMethods.h"
+#include "fpdfsdk/javascript/resource.h"
#if _FX_OS_ == _FX_ANDROID_
#include <ctype.h>
@@ -44,8 +44,7 @@
util::util(CJS_Object* pJSObject) : CJS_EmbedObj(pJSObject) {}
-util::~util() {
-}
+util::~util() {}
struct stru_TbConvert {
const FX_WCHAR* lpszJSMark;
diff --git a/fpdfsdk/src/javascript/util.h b/fpdfsdk/javascript/util.h
similarity index 91%
rename from fpdfsdk/src/javascript/util.h
rename to fpdfsdk/javascript/util.h
index 6e3a5d2..50fa31a 100644
--- a/fpdfsdk/src/javascript/util.h
+++ b/fpdfsdk/javascript/util.h
@@ -4,13 +4,13 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_SRC_JAVASCRIPT_UTIL_H_
-#define FPDFSDK_SRC_JAVASCRIPT_UTIL_H_
+#ifndef FPDFSDK_JAVASCRIPT_UTIL_H_
+#define FPDFSDK_JAVASCRIPT_UTIL_H_
#include <string>
#include <vector>
-#include "fpdfsdk/src/javascript/JS_Define.h"
+#include "fpdfsdk/javascript/JS_Define.h"
class util : public CJS_EmbedObj {
public:
@@ -64,4 +64,4 @@
JS_STATIC_METHOD(byteToChar, util);
};
-#endif // FPDFSDK_SRC_JAVASCRIPT_UTIL_H_
+#endif // FPDFSDK_JAVASCRIPT_UTIL_H_
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/jsapi/fxjs_v8.cpp
similarity index 93%
rename from fpdfsdk/src/jsapi/fxjs_v8.cpp
rename to fpdfsdk/jsapi/fxjs_v8.cpp
index 86f6ced..156f1c9 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/jsapi/fxjs_v8.cpp
@@ -227,7 +227,8 @@
CFXJS_ObjDefinition::ForID(pIsolate, nObjDefnID);
pObjDef->GetInstanceTemplate()->Set(
v8::String::NewFromUtf8(pIsolate, bsMethodName.c_str(),
- v8::NewStringType::kNormal).ToLocalChecked(),
+ v8::NewStringType::kNormal)
+ .ToLocalChecked(),
v8::FunctionTemplate::New(pIsolate, pMethodCall, v8::Local<v8::Value>(),
pObjDef->GetSignature()),
v8::ReadOnly);
@@ -245,7 +246,8 @@
CFXJS_ObjDefinition::ForID(pIsolate, nObjDefnID);
pObjDef->GetInstanceTemplate()->SetAccessor(
v8::String::NewFromUtf8(pIsolate, bsPropertyName.c_str(),
- v8::NewStringType::kNormal).ToLocalChecked(),
+ v8::NewStringType::kNormal)
+ .ToLocalChecked(),
pPropGet, pPropPut);
}
@@ -281,10 +283,11 @@
v8::Isolate::Scope isolate_scope(pIsolate);
v8::HandleScope handle_scope(pIsolate);
CFX_ByteString bsMethodName = CFX_WideString(sMethodName).UTF8Encode();
- GetGlobalObjectTemplate(pIsolate)->Set(
- v8::String::NewFromUtf8(pIsolate, bsMethodName.c_str(),
- v8::NewStringType::kNormal).ToLocalChecked(),
- v8::FunctionTemplate::New(pIsolate, pMethodCall), v8::ReadOnly);
+ GetGlobalObjectTemplate(pIsolate)
+ ->Set(v8::String::NewFromUtf8(pIsolate, bsMethodName.c_str(),
+ v8::NewStringType::kNormal)
+ .ToLocalChecked(),
+ v8::FunctionTemplate::New(pIsolate, pMethodCall), v8::ReadOnly);
}
void FXJS_DefineGlobalConst(v8::Isolate* pIsolate,
@@ -344,8 +347,8 @@
CFX_ByteString bs = CFX_WideString(pObjDef->m_ObjName).UTF8Encode();
v8::Local<v8::String> m_ObjName =
v8::String::NewFromUtf8(pIsolate, bs.c_str(),
- v8::NewStringType::kNormal,
- bs.GetLength()).ToLocalChecked();
+ v8::NewStringType::kNormal, bs.GetLength())
+ .ToLocalChecked();
v8::Local<v8::Object> obj =
FXJS_NewFxDynamicObj(pIsolate, pIRuntime, i, true);
@@ -425,10 +428,11 @@
CFX_ByteString bsScript = CFX_WideString(script).UTF8Encode();
v8::Local<v8::Context> context = pIsolate->GetCurrentContext();
v8::Local<v8::Script> compiled_script;
- if (!v8::Script::Compile(
- context, v8::String::NewFromUtf8(
- pIsolate, bsScript.c_str(), v8::NewStringType::kNormal,
- bsScript.GetLength()).ToLocalChecked())
+ if (!v8::Script::Compile(context,
+ v8::String::NewFromUtf8(pIsolate, bsScript.c_str(),
+ v8::NewStringType::kNormal,
+ bsScript.GetLength())
+ .ToLocalChecked())
.ToLocal(&compiled_script)) {
v8::String::Utf8Value error(try_catch.Exception());
// TODO(tsepez): return error via pError->message.
@@ -508,9 +512,10 @@
// wide-strings isn't handled by v8, so use UTF8 as a common
// intermediate format.
CFX_ByteString utf8_message = message.UTF8Encode();
- pIsolate->ThrowException(
- v8::String::NewFromUtf8(pIsolate, utf8_message.c_str(),
- v8::NewStringType::kNormal).ToLocalChecked());
+ pIsolate->ThrowException(v8::String::NewFromUtf8(pIsolate,
+ utf8_message.c_str(),
+ v8::NewStringType::kNormal)
+ .ToLocalChecked());
}
const wchar_t* FXJS_GetTypeof(v8::Local<v8::Value> pObj) {
@@ -585,7 +590,8 @@
if (!pIsolate)
pIsolate = v8::Isolate::GetCurrent();
return v8::String::NewFromUtf8(pIsolate, bs.c_str(),
- v8::NewStringType::kNormal).ToLocalChecked();
+ v8::NewStringType::kNormal)
+ .ToLocalChecked();
}
v8::Local<v8::Value> FXJS_GetObjectElement(v8::Isolate* pIsolate,
@@ -595,7 +601,8 @@
return v8::Local<v8::Value>();
v8::Local<v8::Value> val;
if (!pObj->Get(pIsolate->GetCurrentContext(),
- FXJS_WSToJSString(pIsolate, PropertyName)).ToLocal(&val))
+ FXJS_WSToJSString(pIsolate, PropertyName))
+ .ToLocal(&val))
return v8::Local<v8::Value>();
return val;
}
@@ -618,7 +625,8 @@
return;
pObj->Set(pIsolate->GetCurrentContext(),
FXJS_WSToJSString(pIsolate, PropertyName),
- FXJS_WSToJSString(pIsolate, sValue)).FromJust();
+ FXJS_WSToJSString(pIsolate, sValue))
+ .FromJust();
}
void FXJS_PutObjectNumber(v8::Isolate* pIsolate,
@@ -629,7 +637,8 @@
return;
pObj->Set(pIsolate->GetCurrentContext(),
FXJS_WSToJSString(pIsolate, PropertyName),
- v8::Int32::New(pIsolate, nValue)).FromJust();
+ v8::Int32::New(pIsolate, nValue))
+ .FromJust();
}
void FXJS_PutObjectNumber(v8::Isolate* pIsolate,
@@ -640,7 +649,8 @@
return;
pObj->Set(pIsolate->GetCurrentContext(),
FXJS_WSToJSString(pIsolate, PropertyName),
- v8::Number::New(pIsolate, (double)fValue)).FromJust();
+ v8::Number::New(pIsolate, (double)fValue))
+ .FromJust();
}
void FXJS_PutObjectNumber(v8::Isolate* pIsolate,
@@ -651,7 +661,8 @@
return;
pObj->Set(pIsolate->GetCurrentContext(),
FXJS_WSToJSString(pIsolate, PropertyName),
- v8::Number::New(pIsolate, (double)dValue)).FromJust();
+ v8::Number::New(pIsolate, (double)dValue))
+ .FromJust();
}
void FXJS_PutObjectBoolean(v8::Isolate* pIsolate,
@@ -662,7 +673,8 @@
return;
pObj->Set(pIsolate->GetCurrentContext(),
FXJS_WSToJSString(pIsolate, PropertyName),
- v8::Boolean::New(pIsolate, bValue)).FromJust();
+ v8::Boolean::New(pIsolate, bValue))
+ .FromJust();
}
void FXJS_PutObjectObject(v8::Isolate* pIsolate,
@@ -672,7 +684,8 @@
if (pObj.IsEmpty())
return;
pObj->Set(pIsolate->GetCurrentContext(),
- FXJS_WSToJSString(pIsolate, PropertyName), pPut).FromJust();
+ FXJS_WSToJSString(pIsolate, PropertyName), pPut)
+ .FromJust();
}
void FXJS_PutObjectNull(v8::Isolate* pIsolate,
@@ -681,8 +694,8 @@
if (pObj.IsEmpty())
return;
pObj->Set(pIsolate->GetCurrentContext(),
- FXJS_WSToJSString(pIsolate, PropertyName),
- v8::Local<v8::Object>()).FromJust();
+ FXJS_WSToJSString(pIsolate, PropertyName), v8::Local<v8::Object>())
+ .FromJust();
}
v8::Local<v8::Array> FXJS_NewArray(v8::Isolate* pIsolate) {
@@ -808,5 +821,3 @@
void FXJS_ValueCopy(v8::Local<v8::Value>& pTo, v8::Local<v8::Value> pFrom) {
pTo = pFrom;
}
-
-
diff --git a/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp b/fpdfsdk/jsapi/fxjs_v8_embeddertest.cpp
similarity index 100%
rename from fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp
rename to fpdfsdk/jsapi/fxjs_v8_embeddertest.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_Button.cpp b/fpdfsdk/pdfwindow/PWL_Button.cpp
similarity index 96%
rename from fpdfsdk/src/pdfwindow/PWL_Button.cpp
rename to fpdfsdk/pdfwindow/PWL_Button.cpp
index 2c6c36c..1a57784 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Button.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Button.cpp
@@ -10,8 +10,7 @@
CPWL_Button::CPWL_Button() : m_bMouseDown(FALSE) {}
-CPWL_Button::~CPWL_Button() {
-}
+CPWL_Button::~CPWL_Button() {}
CFX_ByteString CPWL_Button::GetClassName() const {
return "CPWL_Button";
diff --git a/fpdfsdk/src/pdfwindow/PWL_Caret.cpp b/fpdfsdk/pdfwindow/PWL_Caret.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_Caret.cpp
rename to fpdfsdk/pdfwindow/PWL_Caret.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp b/fpdfsdk/pdfwindow/PWL_ComboBox.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp
rename to fpdfsdk/pdfwindow/PWL_ComboBox.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_Edit.cpp
rename to fpdfsdk/pdfwindow/PWL_Edit.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp b/fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp
rename to fpdfsdk/pdfwindow/PWL_EditCtrl.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/pdfwindow/PWL_FontMap.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
rename to fpdfsdk/pdfwindow/PWL_FontMap.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_Icon.cpp b/fpdfsdk/pdfwindow/PWL_Icon.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_Icon.cpp
rename to fpdfsdk/pdfwindow/PWL_Icon.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_IconList.cpp b/fpdfsdk/pdfwindow/PWL_IconList.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_IconList.cpp
rename to fpdfsdk/pdfwindow/PWL_IconList.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_Label.cpp b/fpdfsdk/pdfwindow/PWL_Label.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_Label.cpp
rename to fpdfsdk/pdfwindow/PWL_Label.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/pdfwindow/PWL_ListBox.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_ListBox.cpp
rename to fpdfsdk/pdfwindow/PWL_ListBox.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp b/fpdfsdk/pdfwindow/PWL_ListCtrl.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp
rename to fpdfsdk/pdfwindow/PWL_ListCtrl.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_Note.cpp b/fpdfsdk/pdfwindow/PWL_Note.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_Note.cpp
rename to fpdfsdk/pdfwindow/PWL_Note.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp b/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp
rename to fpdfsdk/pdfwindow/PWL_ScrollBar.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_Signature.cpp b/fpdfsdk/pdfwindow/PWL_Signature.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_Signature.cpp
rename to fpdfsdk/pdfwindow/PWL_Signature.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp b/fpdfsdk/pdfwindow/PWL_SpecialButton.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
rename to fpdfsdk/pdfwindow/PWL_SpecialButton.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_Utils.cpp b/fpdfsdk/pdfwindow/PWL_Utils.cpp
similarity index 100%
rename from fpdfsdk/src/pdfwindow/PWL_Utils.cpp
rename to fpdfsdk/pdfwindow/PWL_Utils.cpp
diff --git a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
similarity index 99%
rename from fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
rename to fpdfsdk/pdfwindow/PWL_Wnd.cpp
index 28bd0e0..597db35 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Wnd.cpp
+++ b/fpdfsdk/pdfwindow/PWL_Wnd.cpp
@@ -85,9 +85,7 @@
Default();
}
- ~CPWL_MsgControl() {
- Default();
- }
+ ~CPWL_MsgControl() { Default(); }
void Default() {
m_aMousePath.RemoveAll();