To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=44643
Issue #:|44643
Summary:|parseAnyToken parses incorrectly for ANY_LETTER
Component:|api
Version:|680m84
Platform:|PC
URL:|
OS/Version:|All
Status:|NEW
Status whiteboard:|
Keywords:|
Resolution:|
Issue type:|DEFECT
Priority:|P3
Subcomponent:|code
Assigned to:|sw
Reported by:|kohei
------- Additional comments from [EMAIL PROTECTED] Wed Mar 9 13:59:48 -0800
2005 -------
When a string prefixe with a numeral element is parsed by
XCharacterClassification::parseAnyToken for the type KParseTokens::ANY_LETTER,
it incorrectly returns the numeral element, instead of an empty string.
Example Code in BASIC ----------------------------
Sub parseTest
sCC = createUnoService( "com.sun.star.i18n.CharacterClassification" )
sString = array( "MW-15", "A23.4.556", "99.34", "3.4.5" )
n = UBound( sString ) + 1
Dim aLocale as new com.sun.star.lang.Locale
aLocale.Country = "US"
aLocale.Language = "en"
i = 0
while i < n
nType = com.sun.star.i18n.KParseTokens.ANY_LETTER
res = sCC.parseAnyToken( sString(i), 0, aLocale, nType, "",
nType, "" )
sPrefix = left( sString(i), res.EndPos )
msgbox sPrefix
i = i + 1
wend
End Sub
--------------------------------------------------
This code parses four strings
"MW-15", "A23.4.556", "99.34", "3.4.5"
from position 0, and returns the portion that qualifies for the ANY_LETTER
token. But the acutal returned strings are
"MW", "A", "99.34", "3.4"
I think the parse result is incorrect for the 3rd and 4th strings, which both
should return an empty string if I understand the logistics of this function
correctly.
Kohei
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]