Hi Giuseppe,

On 06/05/07 14:25, Giuseppe Castagno wrote:

Frank Meies - Sun Germany - Development - Software Engineer wrote:

in order to fix this issue I guess you have to set the current cursor position in SwFEShell::InsertLabel() to the end of the paragraph containing the label text and avoid the call of SelectFlyFrm(). This should be done depending on a new parameter which has to be added to the function signature.

that's what I have in mind.
When the program flow is from AutoCaption, instead of selecting the frame containing the object, go to the end of the only paragraph inside it.

My problem is this is the first time I look into the guts of Writer core code, and I have no idea what is the correct way to set the visual cursor at the end of a paragraph, having available the internal text node.

Any hint where to look for a similar code sequence? Or more simply the method(s) that can be used from SwFEShell class to position the visual cursor. Then with LXR and doxygen I'll look into it myself.

You can try to call the GotoFly() function instead of the SelectFlyFrm() function. The third parameter should be set to FALSE in order to set the cursor into the frame. After this a MovePara( fnParaCurr, fnParaEnd ) call on the pCurrCrsr sets the current cursor to the end of the caption. It might be necessary to call ShowCrsr() afterwards.

Hope this helps,

Frank

--
Frank Meies (fme) - OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to