Issue 114520 - API: field at the beginning of a paragraph is "merged" with following word (if any)
Summary: API: field at the beginning of a paragraph is "merged" with following word (i...
Status: REOPENED
Alias: None
Product: Writer
Classification: Application
Component: programming (show other issues)
Version: OOO320m12
Hardware: Unknown Windows 7
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: needmoreinfo
Depends on:
Blocks:
 
Reported: 2010-09-15 11:05 UTC by olivier_chenot
Modified: 2017-05-20 10:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Bug sample (18.85 KB, text/plain)
2010-09-15 11:06 UTC, olivier_chenot
no flags Details
field at start of paragraph is merged with following word (11.80 KB, application/vnd.oasis.opendocument.text)
2014-03-26 10:35 UTC, mroe
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description olivier_chenot 2010-09-15 11:05:29 UTC
gotoEndOfWord does not see mailing field if not set at beginning of line.
Comment 1 olivier_chenot 2010-09-15 11:06:11 UTC
Created attachment 71704 [details]
Bug sample
Comment 2 olivier_chenot 2010-09-15 11:12:04 UTC
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
Comment 3 eric.savary 2010-09-15 11:16:14 UTC
Reassigned to JSK
Comment 4 hans_werner67 2011-03-28 11:59:10 UTC
Assign to new default-assignee
Comment 5 eric.savary 2011-04-11 07:21:54 UTC
Reassigned to TBO.
Comment 6 Edwin Sharp 2014-03-13 08:24:41 UTC
"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
Comment 7 Edwin Sharp 2014-03-26 08:43:16 UTC
No info from author.
Comment 8 mroe 2014-03-26 10:35:54 UTC
Created attachment 82985 [details]
field at start of paragraph is merged with following word
Comment 9 mroe 2014-03-26 10:36:40 UTC
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.
Comment 10 Marcus 2017-05-20 10:45:33 UTC
Reset the assignee to the default "issues@openoffice.apache.org".