blob: e023ae79f1417a76e9d1f436545b46056f007edb [file] [log] [blame]
jaepark27362762016-08-11 13:10:39 -07001// Copyright 2016 PDFium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#include "fpdfsdk/include/cpdfsdk_baannot.h"
8
9#include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
dsinclairf34518b2016-09-13 12:03:48 -070010#include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
jaepark27362762016-08-11 13:10:39 -070011#include "core/fpdfapi/fpdf_parser/include/cpdf_number.h"
12#include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h"
13#include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h"
14#include "fpdfsdk/include/cpdfsdk_datetime.h"
dsinclairf34518b2016-09-13 12:03:48 -070015#include "fpdfsdk/include/cpdfsdk_document.h"
16#include "fpdfsdk/include/cpdfsdk_pageview.h"
jaepark27362762016-08-11 13:10:39 -070017
18CPDFSDK_BAAnnot::CPDFSDK_BAAnnot(CPDF_Annot* pAnnot,
19 CPDFSDK_PageView* pPageView)
20 : CPDFSDK_Annot(pPageView), m_pAnnot(pAnnot) {}
21
22CPDFSDK_BAAnnot::~CPDFSDK_BAAnnot() {}
23
24CPDF_Annot* CPDFSDK_BAAnnot::GetPDFAnnot() const {
25 return m_pAnnot;
26}
27
jaepark35512aa2016-08-29 17:15:08 -070028CPDF_Annot* CPDFSDK_BAAnnot::GetPDFPopupAnnot() const {
29 return m_pAnnot->GetPopupAnnot();
30}
31
jaepark27362762016-08-11 13:10:39 -070032CPDF_Dictionary* CPDFSDK_BAAnnot::GetAnnotDict() const {
33 return m_pAnnot->GetAnnotDict();
34}
35
36void CPDFSDK_BAAnnot::SetRect(const CFX_FloatRect& rect) {
37 ASSERT(rect.right - rect.left >= GetMinWidth());
38 ASSERT(rect.top - rect.bottom >= GetMinHeight());
39
dsinclair38fd8442016-09-15 10:15:32 -070040 m_pAnnot->GetAnnotDict()->SetRectFor("Rect", rect);
jaepark27362762016-08-11 13:10:39 -070041}
42
43CFX_FloatRect CPDFSDK_BAAnnot::GetRect() const {
jaeparka1d21112016-08-25 13:33:34 -070044 return m_pAnnot->GetRect();
jaepark27362762016-08-11 13:10:39 -070045}
46
jaepark956553e2016-08-31 06:49:27 -070047CPDF_Annot::Subtype CPDFSDK_BAAnnot::GetAnnotSubtype() const {
jaepark9ed91372016-08-26 16:16:10 -070048 return m_pAnnot->GetSubtype();
jaepark27362762016-08-11 13:10:39 -070049}
50
51void CPDFSDK_BAAnnot::DrawAppearance(CFX_RenderDevice* pDevice,
52 const CFX_Matrix* pUser2Device,
53 CPDF_Annot::AppearanceMode mode,
54 const CPDF_RenderOptions* pOptions) {
55 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device,
56 mode, pOptions);
57}
58
59FX_BOOL CPDFSDK_BAAnnot::IsAppearanceValid() {
dsinclair38fd8442016-09-15 10:15:32 -070060 return !!m_pAnnot->GetAnnotDict()->GetDictFor("AP");
jaepark27362762016-08-11 13:10:39 -070061}
62
63FX_BOOL CPDFSDK_BAAnnot::IsAppearanceValid(CPDF_Annot::AppearanceMode mode) {
dsinclair38fd8442016-09-15 10:15:32 -070064 CPDF_Dictionary* pAP = m_pAnnot->GetAnnotDict()->GetDictFor("AP");
jaepark27362762016-08-11 13:10:39 -070065 if (!pAP)
66 return FALSE;
67
68 // Choose the right sub-ap
69 const FX_CHAR* ap_entry = "N";
70 if (mode == CPDF_Annot::Down)
71 ap_entry = "D";
72 else if (mode == CPDF_Annot::Rollover)
73 ap_entry = "R";
74 if (!pAP->KeyExist(ap_entry))
75 ap_entry = "N";
76
77 // Get the AP stream or subdirectory
dsinclair38fd8442016-09-15 10:15:32 -070078 CPDF_Object* psub = pAP->GetDirectObjectFor(ap_entry);
jaepark27362762016-08-11 13:10:39 -070079 return !!psub;
80}
81
82void CPDFSDK_BAAnnot::DrawBorder(CFX_RenderDevice* pDevice,
83 const CFX_Matrix* pUser2Device,
84 const CPDF_RenderOptions* pOptions) {
85 m_pAnnot->DrawBorder(pDevice, pUser2Device, pOptions);
86}
87
88void CPDFSDK_BAAnnot::ClearCachedAP() {
89 m_pAnnot->ClearCachedAP();
90}
91
92void CPDFSDK_BAAnnot::SetContents(const CFX_WideString& sContents) {
93 if (sContents.IsEmpty())
dsinclair38fd8442016-09-15 10:15:32 -070094 m_pAnnot->GetAnnotDict()->RemoveFor("Contents");
jaepark27362762016-08-11 13:10:39 -070095 else
dsinclair38fd8442016-09-15 10:15:32 -070096 m_pAnnot->GetAnnotDict()->SetStringFor("Contents",
97 PDF_EncodeText(sContents));
jaepark27362762016-08-11 13:10:39 -070098}
99
100CFX_WideString CPDFSDK_BAAnnot::GetContents() const {
dsinclair38fd8442016-09-15 10:15:32 -0700101 return m_pAnnot->GetAnnotDict()->GetUnicodeTextFor("Contents");
jaepark27362762016-08-11 13:10:39 -0700102}
103
104void CPDFSDK_BAAnnot::SetAnnotName(const CFX_WideString& sName) {
105 if (sName.IsEmpty())
dsinclair38fd8442016-09-15 10:15:32 -0700106 m_pAnnot->GetAnnotDict()->RemoveFor("NM");
jaepark27362762016-08-11 13:10:39 -0700107 else
dsinclair38fd8442016-09-15 10:15:32 -0700108 m_pAnnot->GetAnnotDict()->SetStringFor("NM", PDF_EncodeText(sName));
jaepark27362762016-08-11 13:10:39 -0700109}
110
111CFX_WideString CPDFSDK_BAAnnot::GetAnnotName() const {
dsinclair38fd8442016-09-15 10:15:32 -0700112 return m_pAnnot->GetAnnotDict()->GetUnicodeTextFor("NM");
jaepark27362762016-08-11 13:10:39 -0700113}
114
115void CPDFSDK_BAAnnot::SetModifiedDate(const FX_SYSTEMTIME& st) {
116 CPDFSDK_DateTime dt(st);
117 CFX_ByteString str = dt.ToPDFDateTimeString();
118
119 if (str.IsEmpty())
dsinclair38fd8442016-09-15 10:15:32 -0700120 m_pAnnot->GetAnnotDict()->RemoveFor("M");
jaepark27362762016-08-11 13:10:39 -0700121 else
dsinclair38fd8442016-09-15 10:15:32 -0700122 m_pAnnot->GetAnnotDict()->SetStringFor("M", str);
jaepark27362762016-08-11 13:10:39 -0700123}
124
125FX_SYSTEMTIME CPDFSDK_BAAnnot::GetModifiedDate() const {
126 FX_SYSTEMTIME systime;
dsinclair38fd8442016-09-15 10:15:32 -0700127 CFX_ByteString str = m_pAnnot->GetAnnotDict()->GetStringFor("M");
jaepark27362762016-08-11 13:10:39 -0700128
129 CPDFSDK_DateTime dt(str);
130 dt.ToSystemTime(systime);
131
132 return systime;
133}
134
135void CPDFSDK_BAAnnot::SetFlags(uint32_t nFlags) {
dsinclair38fd8442016-09-15 10:15:32 -0700136 m_pAnnot->GetAnnotDict()->SetIntegerFor("F", nFlags);
jaepark27362762016-08-11 13:10:39 -0700137}
138
139uint32_t CPDFSDK_BAAnnot::GetFlags() const {
dsinclair38fd8442016-09-15 10:15:32 -0700140 return m_pAnnot->GetAnnotDict()->GetIntegerFor("F");
jaepark27362762016-08-11 13:10:39 -0700141}
142
143void CPDFSDK_BAAnnot::SetAppState(const CFX_ByteString& str) {
144 if (str.IsEmpty())
dsinclair38fd8442016-09-15 10:15:32 -0700145 m_pAnnot->GetAnnotDict()->RemoveFor("AS");
jaepark27362762016-08-11 13:10:39 -0700146 else
dsinclair38fd8442016-09-15 10:15:32 -0700147 m_pAnnot->GetAnnotDict()->SetStringFor("AS", str);
jaepark27362762016-08-11 13:10:39 -0700148}
149
150CFX_ByteString CPDFSDK_BAAnnot::GetAppState() const {
dsinclair38fd8442016-09-15 10:15:32 -0700151 return m_pAnnot->GetAnnotDict()->GetStringFor("AS");
jaepark27362762016-08-11 13:10:39 -0700152}
153
154void CPDFSDK_BAAnnot::SetStructParent(int key) {
dsinclair38fd8442016-09-15 10:15:32 -0700155 m_pAnnot->GetAnnotDict()->SetIntegerFor("StructParent", key);
jaepark27362762016-08-11 13:10:39 -0700156}
157
158int CPDFSDK_BAAnnot::GetStructParent() const {
dsinclair38fd8442016-09-15 10:15:32 -0700159 return m_pAnnot->GetAnnotDict()->GetIntegerFor("StructParent");
jaepark27362762016-08-11 13:10:39 -0700160}
161
162// border
163void CPDFSDK_BAAnnot::SetBorderWidth(int nWidth) {
dsinclair38fd8442016-09-15 10:15:32 -0700164 CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArrayFor("Border");
jaepark27362762016-08-11 13:10:39 -0700165
166 if (pBorder) {
167 pBorder->SetAt(2, new CPDF_Number(nWidth));
168 } else {
dsinclair38fd8442016-09-15 10:15:32 -0700169 CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDictFor("BS");
jaepark27362762016-08-11 13:10:39 -0700170
171 if (!pBSDict) {
172 pBSDict = new CPDF_Dictionary;
dsinclair38fd8442016-09-15 10:15:32 -0700173 m_pAnnot->GetAnnotDict()->SetFor("BS", pBSDict);
jaepark27362762016-08-11 13:10:39 -0700174 }
175
dsinclair38fd8442016-09-15 10:15:32 -0700176 pBSDict->SetIntegerFor("W", nWidth);
jaepark27362762016-08-11 13:10:39 -0700177 }
178}
179
180int CPDFSDK_BAAnnot::GetBorderWidth() const {
dsinclair38fd8442016-09-15 10:15:32 -0700181 if (CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArrayFor("Border")) {
jaepark27362762016-08-11 13:10:39 -0700182 return pBorder->GetIntegerAt(2);
183 }
dsinclair38fd8442016-09-15 10:15:32 -0700184 if (CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDictFor("BS")) {
185 return pBSDict->GetIntegerFor("W", 1);
jaepark27362762016-08-11 13:10:39 -0700186 }
187 return 1;
188}
189
190void CPDFSDK_BAAnnot::SetBorderStyle(BorderStyle nStyle) {
dsinclair38fd8442016-09-15 10:15:32 -0700191 CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDictFor("BS");
jaepark27362762016-08-11 13:10:39 -0700192 if (!pBSDict) {
193 pBSDict = new CPDF_Dictionary;
dsinclair38fd8442016-09-15 10:15:32 -0700194 m_pAnnot->GetAnnotDict()->SetFor("BS", pBSDict);
jaepark27362762016-08-11 13:10:39 -0700195 }
196
197 switch (nStyle) {
198 case BorderStyle::SOLID:
dsinclair38fd8442016-09-15 10:15:32 -0700199 pBSDict->SetNameFor("S", "S");
jaepark27362762016-08-11 13:10:39 -0700200 break;
201 case BorderStyle::DASH:
dsinclair38fd8442016-09-15 10:15:32 -0700202 pBSDict->SetNameFor("S", "D");
jaepark27362762016-08-11 13:10:39 -0700203 break;
204 case BorderStyle::BEVELED:
dsinclair38fd8442016-09-15 10:15:32 -0700205 pBSDict->SetNameFor("S", "B");
jaepark27362762016-08-11 13:10:39 -0700206 break;
207 case BorderStyle::INSET:
dsinclair38fd8442016-09-15 10:15:32 -0700208 pBSDict->SetNameFor("S", "I");
jaepark27362762016-08-11 13:10:39 -0700209 break;
210 case BorderStyle::UNDERLINE:
dsinclair38fd8442016-09-15 10:15:32 -0700211 pBSDict->SetNameFor("S", "U");
jaepark27362762016-08-11 13:10:39 -0700212 break;
213 default:
214 break;
215 }
216}
217
218BorderStyle CPDFSDK_BAAnnot::GetBorderStyle() const {
dsinclair38fd8442016-09-15 10:15:32 -0700219 CPDF_Dictionary* pBSDict = m_pAnnot->GetAnnotDict()->GetDictFor("BS");
jaepark27362762016-08-11 13:10:39 -0700220 if (pBSDict) {
dsinclair38fd8442016-09-15 10:15:32 -0700221 CFX_ByteString sBorderStyle = pBSDict->GetStringFor("S", "S");
jaepark27362762016-08-11 13:10:39 -0700222 if (sBorderStyle == "S")
223 return BorderStyle::SOLID;
224 if (sBorderStyle == "D")
225 return BorderStyle::DASH;
226 if (sBorderStyle == "B")
227 return BorderStyle::BEVELED;
228 if (sBorderStyle == "I")
229 return BorderStyle::INSET;
230 if (sBorderStyle == "U")
231 return BorderStyle::UNDERLINE;
232 }
233
dsinclair38fd8442016-09-15 10:15:32 -0700234 CPDF_Array* pBorder = m_pAnnot->GetAnnotDict()->GetArrayFor("Border");
jaepark27362762016-08-11 13:10:39 -0700235 if (pBorder) {
236 if (pBorder->GetCount() >= 4) {
237 CPDF_Array* pDP = pBorder->GetArrayAt(3);
238 if (pDP && pDP->GetCount() > 0)
239 return BorderStyle::DASH;
240 }
241 }
242
243 return BorderStyle::SOLID;
244}
245
246void CPDFSDK_BAAnnot::SetColor(FX_COLORREF color) {
247 CPDF_Array* pArray = new CPDF_Array;
248 pArray->AddNumber((FX_FLOAT)FXSYS_GetRValue(color) / 255.0f);
249 pArray->AddNumber((FX_FLOAT)FXSYS_GetGValue(color) / 255.0f);
250 pArray->AddNumber((FX_FLOAT)FXSYS_GetBValue(color) / 255.0f);
dsinclair38fd8442016-09-15 10:15:32 -0700251 m_pAnnot->GetAnnotDict()->SetFor("C", pArray);
jaepark27362762016-08-11 13:10:39 -0700252}
253
254void CPDFSDK_BAAnnot::RemoveColor() {
dsinclair38fd8442016-09-15 10:15:32 -0700255 m_pAnnot->GetAnnotDict()->RemoveFor("C");
jaepark27362762016-08-11 13:10:39 -0700256}
257
258FX_BOOL CPDFSDK_BAAnnot::GetColor(FX_COLORREF& color) const {
dsinclair38fd8442016-09-15 10:15:32 -0700259 if (CPDF_Array* pEntry = m_pAnnot->GetAnnotDict()->GetArrayFor("C")) {
jaepark27362762016-08-11 13:10:39 -0700260 size_t nCount = pEntry->GetCount();
261 if (nCount == 1) {
262 FX_FLOAT g = pEntry->GetNumberAt(0) * 255;
263
264 color = FXSYS_RGB((int)g, (int)g, (int)g);
265
266 return TRUE;
267 } else if (nCount == 3) {
268 FX_FLOAT r = pEntry->GetNumberAt(0) * 255;
269 FX_FLOAT g = pEntry->GetNumberAt(1) * 255;
270 FX_FLOAT b = pEntry->GetNumberAt(2) * 255;
271
272 color = FXSYS_RGB((int)r, (int)g, (int)b);
273
274 return TRUE;
275 } else if (nCount == 4) {
276 FX_FLOAT c = pEntry->GetNumberAt(0);
277 FX_FLOAT m = pEntry->GetNumberAt(1);
278 FX_FLOAT y = pEntry->GetNumberAt(2);
279 FX_FLOAT k = pEntry->GetNumberAt(3);
280
281 FX_FLOAT r = 1.0f - std::min(1.0f, c + k);
282 FX_FLOAT g = 1.0f - std::min(1.0f, m + k);
283 FX_FLOAT b = 1.0f - std::min(1.0f, y + k);
284
285 color = FXSYS_RGB((int)(r * 255), (int)(g * 255), (int)(b * 255));
286
287 return TRUE;
288 }
289 }
290
291 return FALSE;
292}
293
294void CPDFSDK_BAAnnot::WriteAppearance(const CFX_ByteString& sAPType,
295 const CFX_FloatRect& rcBBox,
296 const CFX_Matrix& matrix,
297 const CFX_ByteString& sContents,
298 const CFX_ByteString& sAPState) {
dsinclair38fd8442016-09-15 10:15:32 -0700299 CPDF_Dictionary* pAPDict = m_pAnnot->GetAnnotDict()->GetDictFor("AP");
jaepark27362762016-08-11 13:10:39 -0700300
301 if (!pAPDict) {
302 pAPDict = new CPDF_Dictionary;
dsinclair38fd8442016-09-15 10:15:32 -0700303 m_pAnnot->GetAnnotDict()->SetFor("AP", pAPDict);
jaepark27362762016-08-11 13:10:39 -0700304 }
305
306 CPDF_Stream* pStream = nullptr;
307 CPDF_Dictionary* pParentDict = nullptr;
308
309 if (sAPState.IsEmpty()) {
310 pParentDict = pAPDict;
dsinclair38fd8442016-09-15 10:15:32 -0700311 pStream = pAPDict->GetStreamFor(sAPType);
jaepark27362762016-08-11 13:10:39 -0700312 } else {
dsinclair38fd8442016-09-15 10:15:32 -0700313 CPDF_Dictionary* pAPTypeDict = pAPDict->GetDictFor(sAPType);
jaepark27362762016-08-11 13:10:39 -0700314 if (!pAPTypeDict) {
315 pAPTypeDict = new CPDF_Dictionary;
dsinclair38fd8442016-09-15 10:15:32 -0700316 pAPDict->SetFor(sAPType, pAPTypeDict);
jaepark27362762016-08-11 13:10:39 -0700317 }
318 pParentDict = pAPTypeDict;
dsinclair38fd8442016-09-15 10:15:32 -0700319 pStream = pAPTypeDict->GetStreamFor(sAPState);
jaepark27362762016-08-11 13:10:39 -0700320 }
321
322 if (!pStream) {
323 pStream = new CPDF_Stream(nullptr, 0, nullptr);
324 CPDF_Document* pDoc = m_pPageView->GetPDFDocument();
325 int32_t objnum = pDoc->AddIndirectObject(pStream);
dsinclair38fd8442016-09-15 10:15:32 -0700326 pParentDict->SetReferenceFor(sAPType, pDoc, objnum);
jaepark27362762016-08-11 13:10:39 -0700327 }
328
329 CPDF_Dictionary* pStreamDict = pStream->GetDict();
330 if (!pStreamDict) {
331 pStreamDict = new CPDF_Dictionary;
dsinclair38fd8442016-09-15 10:15:32 -0700332 pStreamDict->SetNameFor("Type", "XObject");
333 pStreamDict->SetNameFor("Subtype", "Form");
334 pStreamDict->SetIntegerFor("FormType", 1);
jaepark27362762016-08-11 13:10:39 -0700335 pStream->InitStream(nullptr, 0, pStreamDict);
336 }
337
338 if (pStreamDict) {
dsinclair38fd8442016-09-15 10:15:32 -0700339 pStreamDict->SetMatrixFor("Matrix", matrix);
340 pStreamDict->SetRectFor("BBox", rcBBox);
jaepark27362762016-08-11 13:10:39 -0700341 }
342
343 pStream->SetData((uint8_t*)sContents.c_str(), sContents.GetLength(), FALSE,
344 FALSE);
345}
346
347FX_BOOL CPDFSDK_BAAnnot::IsVisible() const {
348 uint32_t nFlags = GetFlags();
349 return !((nFlags & ANNOTFLAG_INVISIBLE) || (nFlags & ANNOTFLAG_HIDDEN) ||
350 (nFlags & ANNOTFLAG_NOVIEW));
351}
352
353CPDF_Action CPDFSDK_BAAnnot::GetAction() const {
dsinclair38fd8442016-09-15 10:15:32 -0700354 return CPDF_Action(m_pAnnot->GetAnnotDict()->GetDictFor("A"));
jaepark27362762016-08-11 13:10:39 -0700355}
356
357void CPDFSDK_BAAnnot::SetAction(const CPDF_Action& action) {
358 ASSERT(action.GetDict());
dsinclair38fd8442016-09-15 10:15:32 -0700359 if (action.GetDict() != m_pAnnot->GetAnnotDict()->GetDictFor("A")) {
jaepark27362762016-08-11 13:10:39 -0700360 CPDF_Document* pDoc = m_pPageView->GetPDFDocument();
361 CPDF_Dictionary* pDict = action.GetDict();
362 if (pDict && pDict->GetObjNum() == 0) {
363 pDoc->AddIndirectObject(pDict);
364 }
dsinclair38fd8442016-09-15 10:15:32 -0700365 m_pAnnot->GetAnnotDict()->SetReferenceFor("A", pDoc, pDict->GetObjNum());
jaepark27362762016-08-11 13:10:39 -0700366 }
367}
368
369void CPDFSDK_BAAnnot::RemoveAction() {
dsinclair38fd8442016-09-15 10:15:32 -0700370 m_pAnnot->GetAnnotDict()->RemoveFor("A");
jaepark27362762016-08-11 13:10:39 -0700371}
372
373CPDF_AAction CPDFSDK_BAAnnot::GetAAction() const {
dsinclair38fd8442016-09-15 10:15:32 -0700374 return CPDF_AAction(m_pAnnot->GetAnnotDict()->GetDictFor("AA"));
jaepark27362762016-08-11 13:10:39 -0700375}
376
377void CPDFSDK_BAAnnot::SetAAction(const CPDF_AAction& aa) {
dsinclair38fd8442016-09-15 10:15:32 -0700378 if (aa.GetDict() != m_pAnnot->GetAnnotDict()->GetDictFor("AA"))
379 m_pAnnot->GetAnnotDict()->SetFor("AA", aa.GetDict());
jaepark27362762016-08-11 13:10:39 -0700380}
381
382void CPDFSDK_BAAnnot::RemoveAAction() {
dsinclair38fd8442016-09-15 10:15:32 -0700383 m_pAnnot->GetAnnotDict()->RemoveFor("AA");
jaepark27362762016-08-11 13:10:39 -0700384}
385
386CPDF_Action CPDFSDK_BAAnnot::GetAAction(CPDF_AAction::AActionType eAAT) {
387 CPDF_AAction AAction = GetAAction();
388
389 if (AAction.ActionExist(eAAT))
390 return AAction.GetAction(eAAT);
391
392 if (eAAT == CPDF_AAction::ButtonUp)
393 return GetAction();
394
395 return CPDF_Action();
396}
397
398void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice,
399 CFX_Matrix* pUser2Device,
400 CPDF_RenderOptions* pOptions) {
401 m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal);
402 m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device,
403 CPDF_Annot::Normal, nullptr);
404}
jaepark35512aa2016-08-29 17:15:08 -0700405
406void CPDFSDK_BAAnnot::SetOpenState(bool bOpenState) {
407 if (CPDF_Annot* pAnnot = m_pAnnot->GetPopupAnnot())
408 pAnnot->SetOpenState(bOpenState);
409}