void updateTableFields(int nTab)
{
SfxItemPool* pPool = mrObj.GetPool();
EditTextObjectImpl::ContentInfosType& rContents = mrObj.GetContents(); for (std::unique_ptr<ContentInfo> & i : rContents)
{
ContentInfo& rContent = *i; for (XEditAttribute & rAttr : rContent.GetCharAttribs())
{ const SfxPoolItem* pItem = rAttr.GetItem(); if (pItem->Which() != EE_FEATURE_FIELD) // This is not a field item. continue;
const SvxFieldItem* pFI = static_cast<const SvxFieldItem*>(pItem); const SvxFieldData* pData = pFI->GetField(); if (pData->GetClassId() != text::textfield::Type::TABLE) // This is not a table field. continue;
// Create a new table field with the new ID, and set it to the // attribute object.
SvxFieldItem aNewItem(SvxTableField(nTab), EE_FEATURE_FIELD);
rAttr.SetItem(*pPool, aNewItem);
}
}
}
void UpdatePageRelativeURLs(const std::function<void(const SvxFieldItem & rFieldItem, SvxFieldItemUpdater& rFieldItemUpdater)>& rItemCallback)
{
EditTextObjectImpl::ContentInfosType& rContents = mrObj.GetContents(); for (std::unique_ptr<ContentInfo> & i : rContents)
{
ContentInfo& rContent = *i; for (XEditAttribute & rAttr : rContent.GetCharAttribs())
{ const SfxPoolItem* pItem = rAttr.GetItem(); if (pItem->Which() != EE_FEATURE_FIELD) // This is not a field item. continue;
SvxFieldItemUpdaterImpl aUpdater(rAttr.GetItemHolder());
rItemCallback(static_cast<const SvxFieldItem&>(*pItem), aUpdater);
}
}
}
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.