本文整理汇总了C++中PP_AttrProp::markReadOnly方法的典型用法代码示例。如果您正苦于以下问题:C++ PP_AttrProp::markReadOnly方法的具体用法?C++ PP_AttrProp::markReadOnly怎么用?C++ PP_AttrProp::markReadOnly使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PP_AttrProp
的用法示例。
在下文中一共展示了PP_AttrProp::markReadOnly方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createAP
bool pp_TableAttrProp::createAP(UT_sint32 * pSubscript)
{
PP_AttrProp * pNew = new PP_AttrProp();
if (!pNew)
return false;
UT_sint32 u;
if (m_vecTable.addItem(pNew,&u) != 0)
{
delete pNew;
return false;
}
pNew->setIndex(u); //$HACK
if (pSubscript)
{
*pSubscript = u;
}
else
{
// create default empty AP
pNew->markReadOnly();
m_vecTableSorted.addItem(pNew, NULL);
}
return true;
}
示例2: _realInsertSpan
//.........这里部分代码省略.........
{
pf_Frag_Text * pfPrevText = static_cast<pf_Frag_Text *>(pf->getPrev());
indexAP = pfPrevText->getIndexAP();
// append to the end of the previous frag rather than prepend to the current one.
pf = pf->getPrev();
fragOffset = pf->getLength();
}
else
{
indexAP = _chooseIndexAP(pf,fragOffset);
// PLAM: This is the list of field attrs that should not inherit
// PLAM: to the span following a field.
const gchar * pFieldAttrs[12];
pFieldAttrs[0] = "type"; pFieldAttrs[1] = NULL;
pFieldAttrs[2] = "param"; pFieldAttrs[3] = NULL;
pFieldAttrs[4] = "name"; pFieldAttrs[5] = NULL;
pFieldAttrs[6] = "endnote-id"; pFieldAttrs[7] = NULL;
pFieldAttrs[8] = NULL; pFieldAttrs[9] = NULL;
pFieldAttrs[10] = NULL; pFieldAttrs[11] = NULL;
const PP_AttrProp * pAP = NULL;
if (!getAttrProp(indexAP, &pAP))
return false;
if (pAP->areAnyOfTheseNamesPresent(pFieldAttrs, NULL))
{
// We do not want to inherit a char style from a field.
pFieldAttrs[8] = "style";
PP_AttrProp * pAPNew = pAP->cloneWithElimination(pFieldAttrs, NULL);
if (!pAPNew)
return false;
pAPNew->markReadOnly();
if (!m_varset.addIfUniqueAP(pAPNew, &indexAP))
return false;
}
}
}
else
{
// is existing fragment a field? If so do nothing
// Or should we display a message to the user?
if(pf->getField() != NULL)
{
return false;
}
indexAP = _chooseIndexAP(pf,fragOffset);
}
PT_BlockOffset blockOffset = _computeBlockOffset(pfs,pf) + fragOffset;
PX_ChangeRecord_Span * pcr = NULL;
if(attributes || properties)
{
// we need to add the attrs and props passed to us ...
PT_AttrPropIndex indexNewAP;
bool bMerged;
bMerged = m_varset.mergeAP(PTC_AddFmt,indexAP,attributes,properties,&indexNewAP,getDocument());
UT_ASSERT_HARMLESS( bMerged );
if(bMerged)
indexAP = indexNewAP;
}