Chromium Code Reviews| Index: core/fpdfdoc/cpvt_generateap.cpp |
| diff --git a/core/fpdfdoc/cpvt_generateap.cpp b/core/fpdfdoc/cpvt_generateap.cpp |
| index f15869b13004d4021c5f15f9b30ac76a566abf83..2afd8da792314dbe3b58c499d22e725c9e8e9502 100644 |
| --- a/core/fpdfdoc/cpvt_generateap.cpp |
| +++ b/core/fpdfdoc/cpvt_generateap.cpp |
| @@ -14,6 +14,7 @@ |
| #include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h" |
| #include "core/fpdfdoc/cpvt_color.h" |
| #include "core/fpdfdoc/cpvt_fontmap.h" |
| +#include "core/fpdfdoc/include/cpdf_annot.h" |
| #include "core/fpdfdoc/include/cpdf_formfield.h" |
| #include "core/fpdfdoc/include/cpvt_word.h" |
| @@ -619,6 +620,9 @@ bool CPVT_GenerateAP::GenerateCircleAP(CPDF_Document* pDoc, |
| if (pAnnotDict->KeyExist("AP")) |
| return false; |
| + if (CPDF_Annot::IsAnnotationHidden(pAnnotDict)) |
|
Lei Zhang
2016/08/15 18:39:39
Maybe it is time to combine the AP key check and t
tonikitoo
2016/08/15 18:59:31
Done.
|
| + return false; |
| + |
| CFX_ByteTextBuf sAppStream; |
| CFX_ByteString sExtGSDictName = "GS"; |
| sAppStream << "/" << sExtGSDictName << " gs "; |
| @@ -695,6 +699,9 @@ bool CPVT_GenerateAP::GenerateHighlightAP(CPDF_Document* pDoc, |
| if (pAnnotDict->KeyExist("AP")) |
| return false; |
| + if (CPDF_Annot::IsAnnotationHidden(pAnnotDict)) |
| + return false; |
| + |
| CFX_ByteTextBuf sAppStream; |
| CFX_ByteString sExtGSDictName = "GS"; |
| sAppStream << "/" << sExtGSDictName << " gs "; |
| @@ -725,6 +732,9 @@ bool CPVT_GenerateAP::GenerateInkAP(CPDF_Document* pDoc, |
| if (pAnnotDict->KeyExist("AP")) |
| return false; |
| + if (CPDF_Annot::IsAnnotationHidden(pAnnotDict)) |
| + return false; |
| + |
| FX_FLOAT fBorderWidth = GetBorderWidth(*pAnnotDict); |
| bool bIsStroke = fBorderWidth > 0; |
| @@ -781,6 +791,9 @@ bool CPVT_GenerateAP::GenerateUnderlineAP(CPDF_Document* pDoc, |
| if (pAnnotDict->KeyExist("AP")) |
| return false; |
| + if (CPDF_Annot::IsAnnotationHidden(pAnnotDict)) |
| + return false; |
| + |
| CFX_ByteTextBuf sAppStream; |
| CFX_ByteString sExtGSDictName = "GS"; |
| sAppStream << "/" << sExtGSDictName << " gs "; |
| @@ -810,6 +823,9 @@ bool CPVT_GenerateAP::GenerateSquareAP(CPDF_Document* pDoc, |
| if (pAnnotDict->KeyExist("AP")) |
| return false; |
| + if (CPDF_Annot::IsAnnotationHidden(pAnnotDict)) |
| + return false; |
| + |
| CFX_ByteTextBuf sAppStream; |
| CFX_ByteString sExtGSDictName = "GS"; |
| sAppStream << "/" << sExtGSDictName << " gs "; |
| @@ -860,6 +876,9 @@ bool CPVT_GenerateAP::GenerateSquigglyAP(CPDF_Document* pDoc, |
| if (pAnnotDict->KeyExist("AP")) |
| return false; |
| + if (CPDF_Annot::IsAnnotationHidden(pAnnotDict)) |
| + return false; |
| + |
| CFX_ByteTextBuf sAppStream; |
| CFX_ByteString sExtGSDictName = "GS"; |
| sAppStream << "/" << sExtGSDictName << " gs "; |
| @@ -911,6 +930,9 @@ bool CPVT_GenerateAP::GenerateStrikeOutAP(CPDF_Document* pDoc, |
| if (pAnnotDict->KeyExist("AP")) |
| return false; |
| + if (CPDF_Annot::IsAnnotationHidden(pAnnotDict)) |
| + return false; |
| + |
| CFX_ByteTextBuf sAppStream; |
| CFX_ByteString sExtGSDictName = "GS"; |
| sAppStream << "/" << sExtGSDictName << " gs "; |