How can I get the current paragraph?
I want to get the current paragraph where the insertion point is.
How can I do this in FDK?
I want to get the current paragraph where the insertion point is.
How can I do this in FDK?
Ch,
I can answer some of these questions but if you decided that this thread is answered, please give the credit to Mike.
Regarding the check for an FO_Pgf object, you should not need that. I think there is some obscure case where F_ApiGetTextRange() gives you an object that is not a paragraph... I forget exactly but I think it has to do with a text line graphic object or something like that. I could be wrong. In any case, if you have a normal text flow with an insertion point, you will get a paragraph object.
This line will abort the operation if any text is selected. Do you really want that?
if (insertionPoint.beg.objId != insertionPoint.end.objId)
This line will abort the operation if multiple paragraphs are selected. Do you really want that? Without this check, you would still get the text of the first selected paragraph.
if (insertionPoint.beg.offset != insertionPoint.end.offset)
Otherwise, the code looks OK to me, at least as far as the FDK calls. Are you having problems with it?
Russ
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.