| Index: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
|
| diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
|
| index 685ee047aa4fb3d426ef9c8e9547fec42c0c8b8e..251697ea865512bc22c088a4367c4b28426307db 100644
|
| --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
|
| +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
|
| @@ -281,7 +281,7 @@ FX_DWORD CPDF_Parser::SetEncryptHandler()
|
| }
|
| m_Syntax.SetEncrypt(pCryptoHandler);
|
| } else if (m_pEncryptDict) {
|
| - CFX_ByteString filter = m_pEncryptDict->GetString(FX_BSTRC("Filter"));
|
| + CFX_ByteString filter = m_pEncryptDict->GetStringAt("Filter");
|
| CPDF_SecurityHandler* pSecurityHandler = NULL;
|
| FX_DWORD err = PDFPARSE_ERROR_HANDLER;
|
| if (filter == FX_BSTRC("Standard")) {
|
| @@ -787,7 +787,7 @@ FX_BOOL CPDF_Parser::RebuildCrossRef()
|
| CPDF_Dictionary* pDict = pStream->GetDict();
|
| if (pDict) {
|
| if (pDict->KeyExist(FX_BSTRC("Type"))) {
|
| - CFX_ByteString bsValue = pDict->GetString(FX_BSTRC("Type"));
|
| + CFX_ByteString bsValue = pDict->GetStringAt("Type");
|
| if (bsValue == FX_BSTRC("XRef") && pDict->KeyExist(FX_BSTRC("Size"))) {
|
| CPDF_Object* pRoot = pDict->GetElement(FX_BSTRC("Root"));
|
| if (pRoot && pRoot->GetDict() && pRoot->GetDict()->GetElement(FX_BSTRC("Pages"))) {
|
| @@ -1464,7 +1464,7 @@ FX_DWORD CPDF_Parser::GetPermissions(FX_BOOL bCheckRevision)
|
| return (FX_DWORD) - 1;
|
| }
|
| FX_DWORD dwPermission = m_pSecurityHandler->GetPermissions();
|
| - if (m_pEncryptDict && m_pEncryptDict->GetString(FX_BSTRC("Filter")) == FX_BSTRC("Standard")) {
|
| + if (m_pEncryptDict && m_pEncryptDict->GetStringAt("Filter") == "Standard") {
|
| dwPermission &= 0xFFFFFFFC;
|
| dwPermission |= 0xFFFFF0C0;
|
| if(bCheckRevision && m_pEncryptDict->GetInteger(FX_BSTRC("R")) == 2) {
|
| @@ -3048,7 +3048,9 @@ FX_BOOL CPDF_DataAvail::IsObjectsAvail(CFX_PtrArray& obj_array, FX_BOOL bParsePa
|
| pObj = pObj->GetDict();
|
| case PDFOBJ_DICTIONARY: {
|
| CPDF_Dictionary *pDict = pObj->GetDict();
|
| - if (pDict && pDict->GetString("Type") == "Page" && !bParsePage) {
|
| + if (!bParsePage &&
|
| + pDict &&
|
| + pDict->GetStringAt("Type") == "Page") {
|
| continue;
|
| }
|
| FX_POSITION pos = pDict->GetStartPos();
|
| @@ -3479,7 +3481,7 @@ FX_BOOL CPDF_DataAvail::CheckPage(IFX_DownloadHints* pHints)
|
| pObj->Release();
|
| continue;
|
| }
|
| - CFX_ByteString type = pObj->GetDict()->GetString(FX_BSTRC("Type"));
|
| + CFX_ByteString type = pObj->GetDict()->GetStringAt("Type");
|
| if (type == FX_BSTRC("Pages")) {
|
| m_PagesArray.Add(pObj);
|
| continue;
|
| @@ -4163,7 +4165,7 @@ FX_BOOL CPDF_DataAvail::CheckUnkownPageNode(FX_DWORD dwPageNo, CPDF_PageNode *pP
|
| }
|
| pPageNode->m_dwPageNo = dwPageNo;
|
| CPDF_Dictionary* pDict = pPage->GetDict();
|
| - CFX_ByteString type = pDict ? pDict->GetString(FX_BSTRC("Type")) : CFX_ByteString();
|
| + CFX_ByteString type = pDict ? pDict->GetStringAt("Type") : CFX_ByteString();
|
| if (type == FX_BSTRC("Pages")) {
|
| pPageNode->m_type = PDF_PAGENODE_PAGES;
|
| CPDF_Object *pKids = pDict->GetElement(FX_BSTRC("Kids"));
|
|
|