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 CFX_WideString GetFullName(CPDF_Dictionary* pFieldDict); |
10 void InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Docu
ment* pDocument); | 10 void InitInterFormDict(CPDF_Dictionary*& pFormDict, CPDF_Docu
ment* pDocument); |
(...skipping 1474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1485 } | 1485 } |
1486 pFields->Add(pFieldDict); | 1486 pFields->Add(pFieldDict); |
1487 } | 1487 } |
1488 } | 1488 } |
1489 return pDoc; | 1489 return pDoc; |
1490 } | 1490 } |
1491 const struct _SupportFieldEncoding { | 1491 const struct _SupportFieldEncoding { |
1492 FX_LPCSTR m_name; | 1492 FX_LPCSTR m_name; |
1493 FX_INT32 m_codePage; | 1493 FX_INT32 m_codePage; |
1494 } g_fieldEncoding[] = { | 1494 } g_fieldEncoding[] = { |
1495 "BigFive", 950, | 1495 { "BigFive", 950 }, |
1496 "GBK", 936, | 1496 { "GBK", 936 }, |
1497 "Shift-JIS", 932, | 1497 { "Shift-JIS", 932 }, |
1498 "UHC", 949, | 1498 { "UHC", 949 }, |
1499 }; | 1499 }; |
1500 static void FPDFDOC_FDF_GetFieldValue(CPDF_Dictionary *pFieldDict, CFX_WideStrin
g &csValue, CFX_ByteString &bsEncoding) | 1500 static void FPDFDOC_FDF_GetFieldValue(CPDF_Dictionary *pFieldDict, CFX_WideStrin
g &csValue, CFX_ByteString &bsEncoding) |
1501 { | 1501 { |
1502 ASSERT(pFieldDict != NULL); | 1502 ASSERT(pFieldDict != NULL); |
1503 CFX_ByteString csBValue = pFieldDict->GetString("V"); | 1503 CFX_ByteString csBValue = pFieldDict->GetString("V"); |
1504 FX_INT32 iCount = sizeof(g_fieldEncoding) / sizeof(g_fieldEncoding[0]); | 1504 FX_INT32 iCount = sizeof(g_fieldEncoding) / sizeof(g_fieldEncoding[0]); |
1505 FX_INT32 i = 0; | 1505 FX_INT32 i = 0; |
1506 for (; i < iCount; ++i) | 1506 for (; i < iCount; ++i) |
1507 if (bsEncoding == g_fieldEncoding[i].m_name) { | 1507 if (bsEncoding == g_fieldEncoding[i].m_name) { |
1508 break; | 1508 break; |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1655 continue; | 1655 continue; |
1656 } | 1656 } |
1657 CPDF_FormControl* pControl = NULL; | 1657 CPDF_FormControl* pControl = NULL; |
1658 if (m_ControlMap.Lookup(pAnnotDict, (void*&)pControl)) { | 1658 if (m_ControlMap.Lookup(pAnnotDict, (void*&)pControl)) { |
1659 return iNewPage; | 1659 return iNewPage; |
1660 } | 1660 } |
1661 } | 1661 } |
1662 } while (TRUE); | 1662 } while (TRUE); |
1663 return -1; | 1663 return -1; |
1664 } | 1664 } |
OLD | NEW |