https://bugs.documentfoundation.org/show_bug.cgi?id=164006
Bug ID: 164006
Summary: Hyphenator service: createPossibleHyphens may create
extra zero elements in getHyphenationPositions
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: sdk
Assignee: [email protected]
Reporter: [email protected]
Consider this Basic code:
sub testHyphenator
hyphenator = createUnoService("com.sun.star.linguistic2.Hyphenator")
locale = new com.sun.star.lang.Locale
locale.Language = "ru"
locale.Country = "RU"
if not hyphenator.hasLocale(locale) then MsgBox("Russian hyphenator must be
installed")
result = hyphenator.createPossibleHyphens("Переносимое", locale, array())
MsgBox Join (result.getHyphenationPositions(), ", ")
end sub
Make sure that the bundled Russian dictionaries (including hyphenator) are
installed. Run the code.
It shows "3, 5, 7, 0", and the fourth element is unexpected. It must be "3, 5,
7", in accordance to the documentation [1], telling:
> sequence<short> getHyphenationPositions( )
> Returns
> an ascending sequence of numbers where each number is an offset within the
> original word which denotes a hyphenation position ...
[1]
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1linguistic2_1_1XPossibleHyphens.html#a8f81658ad635eb427dbd6182b792866a
--
You are receiving this mail because:
You are the assignee for the bug.