本文整理汇总了C++中CPDF_Dictionary::GetBooleanBy方法的典型用法代码示例。如果您正苦于以下问题:C++ CPDF_Dictionary::GetBooleanBy方法的具体用法?C++ CPDF_Dictionary::GetBooleanBy怎么用?C++ CPDF_Dictionary::GetBooleanBy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPDF_Dictionary
的用法示例。
在下文中一共展示了CPDF_Dictionary::GetBooleanBy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ToDictionary
CPDF_AnnotList::CPDF_AnnotList(CPDF_Page* pPage)
: m_pDocument(pPage->m_pDocument) {
if (!pPage->m_pFormDict)
return;
CPDF_Array* pAnnots = pPage->m_pFormDict->GetArrayBy("Annots");
if (!pAnnots)
return;
CPDF_Dictionary* pRoot = m_pDocument->GetRoot();
CPDF_Dictionary* pAcroForm = pRoot->GetDictBy("AcroForm");
FX_BOOL bRegenerateAP =
pAcroForm && pAcroForm->GetBooleanBy("NeedAppearances");
for (size_t i = 0; i < pAnnots->GetCount(); ++i) {
CPDF_Dictionary* pDict = ToDictionary(pAnnots->GetDirectObjectAt(i));
if (!pDict)
continue;
uint32_t dwObjNum = pDict->GetObjNum();
if (dwObjNum == 0) {
dwObjNum = m_pDocument->AddIndirectObject(pDict);
CPDF_Reference* pAction = new CPDF_Reference(m_pDocument, dwObjNum);
pAnnots->InsertAt(i, pAction);
pAnnots->RemoveAt(i + 1);
pDict = pAnnots->GetDictAt(i);
}
// Skip creating Popup annotation in the PDF document since PDFium provides
// its own Popup annotations.
if (pDict->GetStringBy("Subtype") == "Popup")
continue;
m_AnnotList.push_back(
std::unique_ptr<CPDF_Annot>(new CPDF_Annot(pDict, m_pDocument, false)));
if (bRegenerateAP && pDict->GetStringBy("Subtype") == "Widget" &&
CPDF_InterForm::IsUpdateAPEnabled()) {
FPDF_GenerateAP(m_pDocument, pDict);
}
}
size_t nAnnotListSize = m_AnnotList.size();
for (size_t i = 0; i < nAnnotListSize; ++i) {
std::unique_ptr<CPDF_Annot> pPopupAnnot(
CreatePopupAnnot(m_AnnotList[i].get(), m_pDocument));
if (pPopupAnnot)
m_AnnotList.push_back(std::move(pPopupAnnot));
}
}