summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/Document.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-21 15:55:42 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-21 15:55:42 -0700
commit69ceb6a9761b3ccb228a2405e9a493a3666e0601 (patch)
treeaeda419b1fc75d5c2d2147b172edd47ae12298ac /fpdfsdk/src/javascript/Document.cpp
parent3b2ab45f0a883046a7c457e8435b5a9b2c1c4156 (diff)
downloadpdfium-69ceb6a9761b3ccb228a2405e9a493a3666e0601.tar.xz
More master side changes for convergence with XFA.
- Add new CPDFSDK_Document::GetPDFDocument() - FPDFDocumentFromCPDFDocument() to match XFA - rename some JS variables to be consistent with XFA - remove unused param from CJS_GlobalData(). - kill dead code used XFA only. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1413883005 .
Diffstat (limited to 'fpdfsdk/src/javascript/Document.cpp')
-rw-r--r--fpdfsdk/src/javascript/Document.cpp28
1 files changed, 12 insertions, 16 deletions
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp
index 8908dfb664..4c7e1910cb 100644
--- a/fpdfsdk/src/javascript/Document.cpp
+++ b/fpdfsdk/src/javascript/Document.cpp
@@ -785,9 +785,7 @@ FX_BOOL Document::mailDoc(IJS_Context* cc,
FX_BOOL Document::author(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
- ASSERT(m_pDocument != NULL);
-
- CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
+ CPDF_Dictionary* pDictionary = m_pDocument->GetPDFDocument()->GetInfo();
if (!pDictionary)
return FALSE;
@@ -809,9 +807,7 @@ FX_BOOL Document::author(IJS_Context* cc,
FX_BOOL Document::info(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
- ASSERT(m_pDocument != NULL);
-
- CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
+ CPDF_Dictionary* pDictionary = m_pDocument->GetPDFDocument()->GetInfo();
if (!pDictionary)
return FALSE;
@@ -868,7 +864,7 @@ FX_BOOL Document::info(IJS_Context* cc,
FX_BOOL Document::creationDate(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
- CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
+ CPDF_Dictionary* pDictionary = m_pDocument->GetPDFDocument()->GetInfo();
if (!pDictionary)
return FALSE;
@@ -889,7 +885,7 @@ FX_BOOL Document::creationDate(IJS_Context* cc,
FX_BOOL Document::creator(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
- CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
+ CPDF_Dictionary* pDictionary = m_pDocument->GetPDFDocument()->GetInfo();
if (!pDictionary)
return FALSE;
@@ -945,7 +941,7 @@ FX_BOOL Document::delay(IJS_Context* cc,
FX_BOOL Document::keywords(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
- CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
+ CPDF_Dictionary* pDictionary = m_pDocument->GetPDFDocument()->GetInfo();
if (!pDictionary)
return FALSE;
@@ -966,7 +962,7 @@ FX_BOOL Document::keywords(IJS_Context* cc,
FX_BOOL Document::modDate(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
- CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
+ CPDF_Dictionary* pDictionary = m_pDocument->GetPDFDocument()->GetInfo();
if (!pDictionary)
return FALSE;
@@ -987,7 +983,7 @@ FX_BOOL Document::modDate(IJS_Context* cc,
FX_BOOL Document::producer(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
- CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
+ CPDF_Dictionary* pDictionary = m_pDocument->GetPDFDocument()->GetInfo();
if (!pDictionary)
return FALSE;
@@ -1008,7 +1004,7 @@ FX_BOOL Document::producer(IJS_Context* cc,
FX_BOOL Document::subject(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
- CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
+ CPDF_Dictionary* pDictionary = m_pDocument->GetPDFDocument()->GetInfo();
if (!pDictionary)
return FALSE;
@@ -1029,10 +1025,10 @@ FX_BOOL Document::subject(IJS_Context* cc,
FX_BOOL Document::title(IJS_Context* cc,
CJS_PropValue& vp,
CFX_WideString& sError) {
- if (m_pDocument == NULL || m_pDocument->GetDocument() == NULL)
+ if (m_pDocument == NULL || m_pDocument->GetPDFDocument() == NULL)
return FALSE;
- CPDF_Dictionary* pDictionary = m_pDocument->GetDocument()->GetInfo();
+ CPDF_Dictionary* pDictionary = m_pDocument->GetPDFDocument()->GetInfo();
if (!pDictionary)
return FALSE;
@@ -1522,7 +1518,7 @@ FX_BOOL Document::getPageNthWord(IJS_Context* cc,
int nWordNo = params.GetSize() > 1 ? params[1].ToInt() : 0;
bool bStrip = params.GetSize() > 2 ? params[2].ToBool() : true;
- CPDF_Document* pDocument = m_pDocument->GetDocument();
+ CPDF_Document* pDocument = m_pDocument->GetPDFDocument();
if (!pDocument)
return FALSE;
@@ -1594,7 +1590,7 @@ FX_BOOL Document::getPageNumWords(IJS_Context* cc,
int nPageNo = params.GetSize() > 0 ? params[0].ToInt() : 0;
- CPDF_Document* pDocument = m_pDocument->GetDocument();
+ CPDF_Document* pDocument = m_pDocument->GetPDFDocument();
ASSERT(pDocument != NULL);
CJS_Context* pContext = static_cast<CJS_Context*>(cc);