diff options
Diffstat (limited to 'fpdfsdk/src/fsdk_baseannot.cpp')
-rw-r--r-- | fpdfsdk/src/fsdk_baseannot.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp index 132d30b857..bd73ee3211 100644 --- a/fpdfsdk/src/fsdk_baseannot.cpp +++ b/fpdfsdk/src/fsdk_baseannot.cpp @@ -892,9 +892,8 @@ CPDF_Action CPDFSDK_BAAnnot::GetAction() const { } void CPDFSDK_BAAnnot::SetAction(const CPDF_Action& action) { - ASSERT(action); - if ((CPDF_Action&)action != - CPDF_Action(m_pAnnot->GetAnnotDict()->GetDictBy("A"))) { + ASSERT(action.GetDict()); + if (action.GetDict() != m_pAnnot->GetAnnotDict()->GetDictBy("A")) { CPDF_Document* pDoc = m_pPageView->GetPDFDocument(); CPDF_Dictionary* pDict = action.GetDict(); if (pDict && pDict->GetObjNum() == 0) { @@ -909,12 +908,12 @@ void CPDFSDK_BAAnnot::RemoveAction() { } CPDF_AAction CPDFSDK_BAAnnot::GetAAction() const { - return m_pAnnot->GetAnnotDict()->GetDictBy("AA"); + return CPDF_AAction(m_pAnnot->GetAnnotDict()->GetDictBy("AA")); } void CPDFSDK_BAAnnot::SetAAction(const CPDF_AAction& aa) { - if ((CPDF_AAction&)aa != m_pAnnot->GetAnnotDict()->GetDictBy("AA")) - m_pAnnot->GetAnnotDict()->SetAt("AA", (CPDF_AAction&)aa); + if (aa.GetDict() != m_pAnnot->GetAnnotDict()->GetDictBy("AA")) + m_pAnnot->GetAnnotDict()->SetAt("AA", aa.GetDict()); } void CPDFSDK_BAAnnot::RemoveAAction() { |