Apache OpenOffice (AOO) Bugzilla – Issue 114520
API: field at the beginning of a paragraph is "merged" with following word (if any)
Last modified: 2017-05-20 10:45:33 UTC
gotoEndOfWord does not see mailing field if not set at beginning of line.
Created attachment 71704 [details] Bug sample
sample code is as follows : oText = oDocument.getText oCursor = oText.createTextCursorByRange(oText.getStart) ' document elements loop do ' current word selection oResult = oCursor.gotoEndOfWord(True) ' word value MsgBox "Word value [" + n + "] : " + oCursor.String ' next step n = n + 1 Proceed = oCursor.gotoNextWord (false) Loop While Proceed If you have a look in attached document, see macro in Macro:module1:main macro, file containing mailing fields is GotoEndofWord Sample.odt
Reassigned to JSK
Assign to new default-assignee
Reassigned to TBO.
"BASIC runtime error. Object variable not set." @ oDocument = oDesktop.LoadComponentFromURL("D:\01 Sauvegarde\Work\Pvbn\Issue Sample\GotoEndofWord Sample.odt","_blank",0,NoArgs()) ? AOO410m14(Build:9760) - Rev. 1573601 2014-03-03 17:47:48 (Mo, 03 Mrz 2014) Win 7
No info from author.
Created attachment 82985 [details] field at start of paragraph is merged with following word
Interesting in API programming I have looked for the meaning of this bug. I created a new example doc by using user fields so it is to see that the described behaviour is not limited to mail merge fields. There is a simple macro inside the doc like the original macro, which iterates over the words of the text in the document and display it between ">|" and "|<". The results for the included fields are: If a field is located at the beginning of a paragraph it will be "merged" with the following word. Otherwise fields are not treated as words. In view of this result the original description was directed wrong because there was a lonely field in one paragraph. So the reporter meant it was right treated as word. That's why I change the topic.
Reset the assignee to the default "issues@openoffice.apache.org".