summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorth <th@openoffice.org>2000-11-30 11:46:46 +0000
committerth <th@openoffice.org>2000-11-30 11:46:46 +0000
commit955a338c6a0dbb396c9b8a74a634dc561d6e399d (patch)
tree27163ceb3bed42c66019285b6c1473eb2f5e557a /vcl/win
parent8acc67a72d6b80dc764617973fd246e34e1e6a44 (diff)
#80607# - If ExtTextInput ended, because buffer is delete, restore Cursor state
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/source/window/salframe.cxx45
1 files changed, 25 insertions, 20 deletions
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index fcb788879d00..8d0b9bbd1bec 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: salframe.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: th $ $Date: 2000-11-24 18:54:59 $
+ * last change: $Author: th $ $Date: 2000-11-30 12:46:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -3529,29 +3529,34 @@ static BOOL ImplHandleIMECompositionInput( SalFrame* pFrame,
// Only when we get new composition data, we must send this event
if ( (nTextLen > 0) || !(lParam & GCS_RESULTSTR) )
{
- if ( pFrame->maFrameData.mbCandidateMode )
- aEvt.mnCursorFlags |= SAL_EXTTEXTINPUT_CURSOR_INVISIBLE;
- if ( lParam & CS_NOMOVECARET )
- aEvt.mnCursorFlags |= SAL_EXTTEXTINPUT_CURSOR_OVERWRITE;
-
- // Because Cursor-Position and DeltaStart never updated
- // from the korean input engine, we must handle this here
- if ( lParam & CS_INSERTCHAR )
+ // End the mode, if the last character is deleted
+ if ( !nTextLen && !pFrame->maFrameData.mbCandidateMode )
{
- aEvt.mnCursorPos = nTextLen;
- if ( aEvt.mnCursorPos && (lParam & CS_NOMOVECARET) )
- aEvt.mnCursorPos--;
+ pFrame->maFrameData.mpProc( pFrame->maFrameData.mpInst, pFrame,
+ SALEVENT_EXTTEXTINPUT, (void*)&aEvt );
+ pFrame->maFrameData.mpProc( pFrame->maFrameData.mpInst, pFrame,
+ SALEVENT_ENDEXTTEXTINPUT, (void*)NULL );
}
else
- aEvt.mnCursorPos = LOWORD( ImmGetCompositionStringW( hIMC, GCS_CURSORPOS, 0, 0 ) );
-
- pFrame->maFrameData.mpProc( pFrame->maFrameData.mpInst, pFrame,
- SALEVENT_EXTTEXTINPUT, (void*)&aEvt );
- // End the mode, if the last character is deleted
- if ( !nTextLen )
{
+ // Because Cursor-Position and DeltaStart never updated
+ // from the korean input engine, we must handle this here
+ if ( lParam & CS_INSERTCHAR )
+ {
+ aEvt.mnCursorPos = nTextLen;
+ if ( aEvt.mnCursorPos && (lParam & CS_NOMOVECARET) )
+ aEvt.mnCursorPos--;
+ }
+ else
+ aEvt.mnCursorPos = LOWORD( ImmGetCompositionStringW( hIMC, GCS_CURSORPOS, 0, 0 ) );
+
+ if ( pFrame->maFrameData.mbCandidateMode )
+ aEvt.mnCursorFlags |= SAL_EXTTEXTINPUT_CURSOR_INVISIBLE;
+ if ( lParam & CS_NOMOVECARET )
+ aEvt.mnCursorFlags |= SAL_EXTTEXTINPUT_CURSOR_OVERWRITE;
+
pFrame->maFrameData.mpProc( pFrame->maFrameData.mpInst, pFrame,
- SALEVENT_ENDEXTTEXTINPUT, (void*)NULL );
+ SALEVENT_EXTTEXTINPUT, (void*)&aEvt );
}
ImplUpdateIMECursorPos( pFrame, hIMC );
}