I have this macro that works as expected. I type any junk word for e.g. testd on a new line, place the cursor at the beginning of the word and run the macro. The word is added to standard dic. I can verify Tools - Spellings - options - standard dic - edit
Sub wort_einfuegen()
V_Cursor = ThisComponent.GetCurrentController.ViewCursor
T_Cursor = ThisComponent.text.createtextcursor()
T_Cursor.gotoRange(V_Cursor,false)
With T_Cursor
.gotoEndofWord(True)
re_text = .String
End with
dl = createUnoService ("com.sun.star.linguistic2.DictionaryList")
wb = dl.GetDictionaryByName("standard.dic")
wb.Add(re_text, False, "")
End sub
The problem is - if I type this word:
testी
A blank line is added to the dict file. Is this a bug or this is expected behavior?
Update:
I think this must be a bug because I typed these 2 words :
भारत
इंडिया
Placed the cursor at the beginning of each word and run the same macro. The first word got added to the standard dic but the second word did not.