Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | API: field at the beginning of a paragraph is "merged" with following word (if any) | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Writer | Reporter: | olivier_chenot <olivier.chenot> | ||||||
Component: | programming | Assignee: | AOO issues mailing list <issues> | ||||||
Status: | REOPENED --- | QA Contact: | |||||||
Severity: | Trivial | ||||||||
Priority: | P3 | CC: | elish, issues | ||||||
Version: | OOO320m12 | Keywords: | needmoreinfo | ||||||
Target Milestone: | --- | ||||||||
Hardware: | Unknown | ||||||||
OS: | Windows 7 | ||||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||||
Developer Difficulty: | --- | ||||||||
Attachments: |
|
Description
olivier_chenot
2010-09-15 11:05:29 UTC
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". |