Finding the body page that contains a marker
I am building an application that reports the page number of a given type of marker. This is normally quite simple as I just need to test for the TextLoc and resolve that to give the correct body page number.
It's not so easy if the marker is located in a paragraph that spans multiple pages. In that case the reported location is the start location of the containing paragraph and that could be several pages away from the actual marker location.
I understand that the offset of the marker location gives its true location, but how do we relate that to an actual page?
My initial attempt has been to compare the marker's TextLoc offset with the occurence of TextItems with dataType of Constants.FTI_PageBegin. Am I on the right track, or am I missing somthing really obvious?
I haven't posted any code yet because I wanted to discuss this at the conceptual level first.
Thanks
Ian
