Closed
Bug 405747
Opened 17 years ago
Closed 17 years ago
implement IAccessible2::locale
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: surkov, Assigned: surkov)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
2.21 KB,
patch
|
neil
:
superreview+
damons
:
approval1.9+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #290503 -
Flags: review?(aaronleventhal)
Comment 1•17 years ago
|
||
Comment on attachment 290503 [details] [diff] [review] patch Can you add some comments for each block and then request sr=neil? For example: // Format: XX-xx // We just want the XX which represents the language -- we don't need the specific country Using nsDependantSubstring is probably more efficient than nsAutoString foo(Substring(...))
Attachment #290503 -
Flags: review?(aaronleventhal) → review+
Assignee | ||
Updated•17 years ago
|
Assignee: aaronleventhal → surkov.alexander
Assignee | ||
Comment 2•17 years ago
|
||
I can't use nsDependentSubstring at least because it hasn't get() method. Probably Neil has an idea.
Attachment #290503 -
Attachment is obsolete: true
Attachment #290552 -
Flags: superreview?(neil)
Comment 3•17 years ago
|
||
Use SysAllocStringLen?
Assignee | ||
Comment 4•17 years ago
|
||
(In reply to comment #3) > Use SysAllocStringLen? > for the first case only?
Comment 6•17 years ago
|
||
(In reply to comment #4) > (In reply to comment #3) > > Use SysAllocStringLen? > for the first case only? For at least the second and fourth cases, in order to fix comment #2, but you always know the length, so you can use it for the other cases too.
Assignee | ||
Comment 7•17 years ago
|
||
(In reply to comment #6) > (In reply to comment #4) > > (In reply to comment #3) > > > Use SysAllocStringLen? > > for the first case only? > For at least the second and fourth cases, in order to fix comment #2, but you > always know the length, so you can use it for the other cases too. > Do you count cases by SysAllocString entries? Then I do get for the second case, but I didn't catch about fourth and other cases. Or am I able to get pointer on certain char by someway in order to use SysAllocStringLen?
Comment 8•17 years ago
|
||
Comment on attachment 290552 [details] [diff] [review] patch2 >+ nsAutoString country(Substring(lang, 3, 5)); >+ aLocale->country = ::SysAllocString(country.get()); For instance, ::SysAllocStringLen(lang.get() + 3, 2);
Assignee | ||
Comment 9•17 years ago
|
||
excellent, thanks Neil
Attachment #290552 -
Attachment is obsolete: true
Attachment #290674 -
Flags: superreview?(neil)
Attachment #290552 -
Flags: superreview?(neil)
Comment 10•17 years ago
|
||
Comment on attachment 290674 [details] [diff] [review] patch3 >+ if (lang.Length() == 2) { >+ aLocale->language = ::SysAllocString(lang.get()); >+ return S_OK; >+ } You could change this to ::SysAllocStringLen(lang.get(), 2); >+ if (lang.Length() == 5) { >+ aLocale->country = ::SysAllocStringLen(lang.get() + 3, 2); >+ return S_OK; >+ } Or you could leave this as ::SysAllocString(lang.get() + 3);
Attachment #290674 -
Flags: superreview?(neil) → superreview+
Updated•17 years ago
|
Attachment #290674 -
Flags: approval1.9?
Updated•17 years ago
|
Attachment #290674 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 11•17 years ago
|
||
checked in with Neil's comment (option 2).
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•