Accessing nested table in the Plugin through boss hiearchy
Hi,
I have "pasteInto" my table in to a text frame. This text frame is now "inline anchored" into another text frame. This is how it looks in the Layers window

The Content hierarchy shows up like so
TraceContentHierarchy() ********Begin
kDocBoss, uid 0x1
Publish1146Test2-Converted.indd
kSpreadBoss, uid 0xce
Spread 1 content by hierarchy...
kSpreadLayerBoss, uid 0xcf
kPageBoss, uid 0xd3
kSpreadLayerBoss, uid 0xd0
kSpreadLayerBoss, uid 0xd1
kSplineItemBoss, uid 0x2b85
kMultiColumnItemBoss, uid 0x2b87
kFrameItemBoss, uid 0x2b99
kSpreadLayerBoss, uid 0xd2
kMasterPagesBoss, uid 0xd5
A-Parent master spread content by hierarchy...
kSpreadLayerBoss, uid 0xd6
kPageBoss, uid 0xda
kPageBoss, uid 0xdb
kSpreadLayerBoss, uid 0xd7
kSpreadLayerBoss, uid 0xd8
kSpreadLayerBoss, uid 0xd9
TraceContentHierarchy() ********End
The nested table is now accessible from script through the following code
topmostTextFrame.texts[0].paragraphs[0].rectangles[0].textFrames[0].tables[0];
My question is what would be the C++ equivalent of this code. I have the UIDRef for the topmostTextFrame but I am unable to identify the boss classes that will help me get to the nested table.
Here is what I have got
void TraverseToNestedTableItem(const UIDRef& pPageItem)
{
InterfacePtr<IHierarchy> pageItemHierarchy(pPageItem, UseDefaultIID());
int32 nChildren = pageItemHierarchy->GetChildCount();
for (int32 child = 0; child < nChildren; ++child)
{
IDataBase* db = pPageItem.GetDataBase();
UIDRef childUIDRef(pPageItem.GetDataBase(), pageItemHierarchy->GetChildUID(child));
if (db->GetClass(childUIDRef.GetUID()) == kMultiColumnItemBoss)
{
UIDList InlineList(db);
InterfacePtr<IMultiColumnTextFrame>mcf(childUIDRef, UseDefaultIID());
if (mcf)
{
Utils<IFrameUtils>()->GetUIDListOfInlines(mcf, false, &InlineList);
int32 inlineLen = InlineList.Length();
for (int32 j = 0; j < inlineLen; ++j)
{
UIDRef inlineRef(childUIDRef.GetDataBase(), InlineList[j]);
bool16 exists = inlineRef.ExistsInDB();
auto classID = db->GetClass(InlineList[j]);
DebugClassUtilsBuffer className;
DebugClassUtils::GetIDName(&className, classID);
InterfacePtr<IHierarchy> inlineItemHierarchy(inlineRef, UseDefaultIID());
InterfacePtr<IHierarchy> inlineItem(inlineItemHierarchy->QueryChild(0));
if (inlineItem)
{
DebugClassUtilsBuffer className;
DebugClassUtils::GetIDName(&className, ::GetClass(inlineItem))
}
}
}
}
}
}
Both of those diagnostics are giving me 'kSplineItemBoss'.
Please suggest how to traverse to the nested table
Ref: Solved: Re: Clipping a table in a textframe with pasteInto - Adobe Community - 14973447
Thanks,
Edit: I realize that the content hierarchy wasn't pasted as it should have been. Here's a pic of how it shows up to show the nesting structure

