summaryrefslogtreecommitdiff
path: root/vcl/win
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2003-04-24 14:17:30 +0000
committerRüdiger Timm <rt@openoffice.org>2003-04-24 14:17:30 +0000
commit377e91fb621f3eb737a8a95227feddb9addae583 (patch)
tree0d5383d033dccf8a9b645463d59dece30b8020a6 /vcl/win
parenta45544f7e95f2305ae6b133c916a221f501ea3e4 (diff)
INTEGRATION: CWS sb4 (1.93.6); FILE MERGED
2003/04/23 11:45:30 ssa 1.93.6.1: #102812# new method: GetInputLanguage
Diffstat (limited to 'vcl/win')
-rw-r--r--vcl/win/source/window/salframe.cxx27
1 files changed, 22 insertions, 5 deletions
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 69e33828edda..7ff0170fbbc9 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.93 $
+ * $Revision: 1.94 $
*
- * last change: $Author: vg $ $Date: 2003-04-15 16:12:31 $
+ * last change: $Author: rt $ $Date: 2003-04-24 15:17:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -3302,22 +3302,39 @@ static UINT ImplStrToNum( const sal_Char* pStr )
// -----------------------------------------------------------------------
+LanguageType SalFrame::GetInputLanguage()
+{
+ if( !maFrameData.mnInputLang )
+ return LANGUAGE_DONTKNOW;
+ else
+ return (LanguageType) maFrameData.mnInputLang;
+}
+
+// -----------------------------------------------------------------------
+
static sal_Unicode ImplGetCharCode( SalFrame* pFrame, WPARAM nCharCode )
{
+ BOOL bLanguageChange = FALSE;
+ UINT nLang = LOWORD( GetKeyboardLayout( 0 ) );
+ if ( nLang && nLang != pFrame->maFrameData.mnInputLang )
+ {
+ // keep input lang up-to-date
+ pFrame->maFrameData.mnInputLang = nLang;
+ bLanguageChange = TRUE;
+ }
+
// If we are on Windows NT we use Unicode FrameProcs and so we
// get Unicode charcodes directly from Windows
if ( aSalShlData.mbWNT )
return (sal_Unicode)nCharCode;
- UINT nLang = LOWORD( GetKeyboardLayout( 0 ) );
if ( !nLang )
{
pFrame->maFrameData.mnInputLang = 0;
pFrame->maFrameData.mnInputCodePage = GetACP();
}
- else if ( nLang != pFrame->maFrameData.mnInputLang )
+ else if ( bLanguageChange )
{
- pFrame->maFrameData.mnInputLang = nLang;
sal_Char aBuf[10];
if ( GetLocaleInfoA( MAKELCID( nLang, SORT_DEFAULT ), LOCALE_IDEFAULTANSICODEPAGE,
aBuf, sizeof(aBuf) ) > 0 )