| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "../../include/fpdfdoc/fpdf_doc.h" | 7 #include "../../include/fpdfdoc/fpdf_doc.h" |
| 8 #include "../../include/fxcrt/fx_xml.h" | 8 #include "../../include/fxcrt/fx_xml.h" |
| 9 CFX_WideString» GetFullName(CPDF_Dictionary* pFieldDict); | 9 #include "doc_utils.h" |
| 10 void» » » InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Docu
ment* pDocument); | 10 |
| 11 FX_DWORD» » CountInterFormFonts(CPDF_Dictionary* pFormDict); | |
| 12 CPDF_Font*» » GetInterFormFont(CPDF_Dictionary* pFormDict, CPDF_Docume
nt* pDocument, FX_DWORD index, CFX_ByteString& csNameTag); | |
| 13 CPDF_Font*» » GetInterFormFont(CPDF_Dictionary* pFormDict, CPDF_Docume
nt* pDocument, CFX_ByteString csNameTag); | |
| 14 CPDF_Font*» » GetInterFormFont(CPDF_Dictionary* pFormDict, CPDF_Docume
nt* pDocument, CFX_ByteString csFontName, CFX_ByteString& csNameTag); | |
| 15 CPDF_Font*» » GetNativeInterFormFont(CPDF_Dictionary* pFormDict, CPDF_
Document* pDocument, FX_BYTE charSet, CFX_ByteString& csNameTag); | |
| 16 CPDF_Font*» » GetNativeInterFormFont(CPDF_Dictionary* pFormDict, CPDF_
Document* pDocument, CFX_ByteString& csNameTag); | |
| 17 FX_BOOL»» » FindInterFormFont(CPDF_Dictionary* pFormDict, const CPDF
_Font* pFont, CFX_ByteString& csNameTag); | |
| 18 FX_BOOL»» » FindInterFormFont(CPDF_Dictionary* pFormDict, CPDF_Docum
ent* pDocument, CFX_ByteString csFontName, CPDF_Font*& pFont, CFX_ByteString& cs
NameTag); | |
| 19 void» » » AddInterFormFont(CPDF_Dictionary*& pFormDict, CPDF_Docum
ent* pDocument, const CPDF_Font* pFont, CFX_ByteString& csNameTag); | |
| 20 CPDF_Font*» » AddNativeInterFormFont(CPDF_Dictionary*& pFormDict, CPDF
_Document* pDocument, FX_BYTE charSet, CFX_ByteString& csNameTag); | |
| 21 CPDF_Font*» » AddNativeInterFormFont(CPDF_Dictionary*& pFormDict, CPDF
_Document* pDocument, CFX_ByteString& csNameTag); | |
| 22 void» » » RemoveInterFormFont(CPDF_Dictionary* pFormDict, const CP
DF_Font* pFont); | |
| 23 void» » » RemoveInterFormFont(CPDF_Dictionary* pFormDict, CFX_Byte
String csNameTag); | |
| 24 CPDF_Font*» » GetDefaultInterFormFont(CPDF_Dictionary* pFormDict, CPDF
_Document* pDocument); | |
| 25 void» » » SetDefaultInterFormFont(CPDF_Dictionary*& pFormDict, CPD
F_Document* pDocument, const CPDF_Font* pFont); | |
| 26 void» » » SaveCheckedFieldStatus(CPDF_FormField* pField, CFX_ByteA
rray& statusArray); | |
| 27 FX_BOOL»» » NeedPDFEncodeForFieldFullName(const CFX_WideString& csFi
eldName); | |
| 28 FX_BOOL»» » NeedPDFEncodeForFieldTree(CPDF_Dictionary* pFieldDict, i
nt nLevel = 0); | |
| 29 void» » » EncodeFieldName(const CFX_WideString& csName, CFX_ByteSt
ring& csT); | |
| 30 void» » » UpdateEncodeFieldName(CPDF_Dictionary* pFieldDict, int n
Level = 0); | |
| 31 const int nMaxRecursion = 32; | 11 const int nMaxRecursion = 32; |
| 12 |
| 32 class _CFieldNameExtractor | 13 class _CFieldNameExtractor |
| 33 { | 14 { |
| 34 public: | 15 public: |
| 35 _CFieldNameExtractor(const CFX_WideString& full_name) | 16 _CFieldNameExtractor(const CFX_WideString& full_name) |
| 36 { | 17 { |
| 37 m_pStart = full_name.c_str(); | 18 m_pStart = full_name.c_str(); |
| 38 m_pEnd = m_pStart + full_name.GetLength(); | 19 m_pEnd = m_pStart + full_name.GetLength(); |
| 39 m_pCur = m_pStart; | 20 m_pCur = m_pStart; |
| 40 } | 21 } |
| 41 void GetNext(FX_LPCWSTR &pSubName, FX_STRSIZE& size) | 22 void GetNext(FX_LPCWSTR &pSubName, FX_STRSIZE& size) |
| (...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1656 continue; | 1637 continue; |
| 1657 } | 1638 } |
| 1658 CPDF_FormControl* pControl = NULL; | 1639 CPDF_FormControl* pControl = NULL; |
| 1659 if (m_ControlMap.Lookup(pAnnotDict, (void*&)pControl)) { | 1640 if (m_ControlMap.Lookup(pAnnotDict, (void*&)pControl)) { |
| 1660 return iNewPage; | 1641 return iNewPage; |
| 1661 } | 1642 } |
| 1662 } | 1643 } |
| 1663 } while (TRUE); | 1644 } while (TRUE); |
| 1664 return -1; | 1645 return -1; |
| 1665 } | 1646 } |
| OLD | NEW |