| 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_ap.h" | 7 #include "core/include/fpdfdoc/fpdf_ap.h" |
| 8 #include "../../include/fpdfdoc/fpdf_doc.h" | 8 #include "core/include/fpdfdoc/fpdf_doc.h" |
| 9 #include "../../include/fpdfdoc/fpdf_vt.h" | 9 #include "core/include/fpdfdoc/fpdf_vt.h" |
| 10 #include "doc_utils.h" | 10 #include "doc_utils.h" |
| 11 #include "pdf_vt.h" | 11 #include "pdf_vt.h" |
| 12 | 12 |
| 13 FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict) { | 13 FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict) { |
| 14 if (!pAnnotDict || | 14 if (!pAnnotDict || |
| 15 pAnnotDict->GetConstString("Subtype") != FX_BSTRC("Widget")) { | 15 pAnnotDict->GetConstString("Subtype") != FX_BSTRC("Widget")) { |
| 16 return FALSE; | 16 return FALSE; |
| 17 } | 17 } |
| 18 CFX_ByteString field_type = FPDF_GetFieldAttr(pAnnotDict, "FT")->GetString(); | 18 CFX_ByteString field_type = FPDF_GetFieldAttr(pAnnotDict, "FT")->GetString(); |
| 19 FX_DWORD flags = FPDF_GetFieldAttr(pAnnotDict, "Ff") | 19 FX_DWORD flags = FPDF_GetFieldAttr(pAnnotDict, "Ff") |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 << "\n"; | 929 << "\n"; |
| 930 break; | 930 break; |
| 931 case CT_CMYK: | 931 case CT_CMYK: |
| 932 sColorStream << color.fColor1 << " " << color.fColor2 << " " | 932 sColorStream << color.fColor1 << " " << color.fColor2 << " " |
| 933 << color.fColor3 << " " << color.fColor4 << " " | 933 << color.fColor3 << " " << color.fColor4 << " " |
| 934 << (bFillOrStroke ? "k" : "K") << "\n"; | 934 << (bFillOrStroke ? "k" : "K") << "\n"; |
| 935 break; | 935 break; |
| 936 } | 936 } |
| 937 return sColorStream.GetByteString(); | 937 return sColorStream.GetByteString(); |
| 938 } | 938 } |
| OLD | NEW |