Index: fpdfsdk/src/javascript/Document.cpp |
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp |
index 8908dfb66488aa2e659329fa0f4e8e36127ec2f6..4c7e1910cb474071be5de3087d8652b0f92de56f 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); |