• R/O
  • HTTP
  • SSH
  • HTTPS

nvdajp: 提交

NVDA with Japanese branch


Commit MetaInfo

修訂0ab42d2d63a5e339450d13caac93a92e561dabcb (tree)
時間2012-03-10 20:41:51
作者Michael Curran <mick@kulg...>
CommiterMichael Curran

Log Message

nvdaHelperRemote winword support: fix a freeze seen when using IME in XP with MS Word, introduced with the new inprocess winword support. specifically: When the IME composition window is active, MS Word's range.moveEnd successfully moves by 1 unit at the end of the line/document, yet range.end does not actually change (in our code this means that range.end is equivilent to range.start). This was causing an infinite loop. Now the loop is broken straight away if after moveEnd the end is <= to start.

Change Summary

差異

--- a/nvdaHelper/remote/winword.cpp
+++ b/nvdaHelper/remote/winword.cpp
@@ -478,6 +478,11 @@ void winword_getTextInRange_helper(HWND hwnd, winword_getTextInRange_args* args)
478478 _com_dispatch_raw_propput(pDispatchRange,wdDISPID_RANGE_END,VT_I4,args->endOffset);
479479 chunkEndOffset=args->endOffset;
480480 }
481+ //When using IME, the last moveEnd succeeds but the end does not really move
482+ if(chunkEndOffset<=chunkStartOffset) {
483+ LOG_DEBUGWARNING(L"moveEnd successfull but range did not expand! chunkStartOffset "<<chunkStartOffset<<L", chunkEndOffset "<<chunkEndOffset);
484+ break;
485+ }
481486 _com_dispatch_raw_propget(pDispatchRange,wdDISPID_RANGE_TEXT,VT_BSTR,&text);
482487 if(text) {
483488 //Force a new chunk before and after control+b (note characters)
Show on old repository browser