[Libreoffice-commits] .: vcl/win

Tor Lillqvist tml at kemper.freedesktop.org
Sun Jan 23 18:01:06 PST 2011


 vcl/win/source/app/saldata.cxx     |   48 ----
 vcl/win/source/gdi/salgdi.cxx      |    7 
 vcl/win/source/gdi/salgdi3.cxx     |  417 +++++++------------------------------
 vcl/win/source/gdi/salprn.cxx      |   37 +--
 vcl/win/source/gdi/winlayout.cxx   |   25 --
 vcl/win/source/window/salframe.cxx |  276 +++++-------------------
 vcl/win/source/window/salobj.cxx   |   18 -
 7 files changed, 178 insertions(+), 650 deletions(-)

New commits:
commit 804a8c5697a008b375f3f0bd70d1db49fbbc7187
Author: Tor Lillqvist <tlillqvist at novell.com>
Date:   Mon Jan 24 04:00:57 2011 +0200

    Kill Win9x and NT4 code

diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx
index 8f9babf..3c8d21f 100644
--- a/vcl/win/source/app/saldata.cxx
+++ b/vcl/win/source/app/saldata.cxx
@@ -118,75 +118,37 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 )
 
 // =======================================================================
 
-LONG ImplSetWindowLong( HWND hWnd, int nIndex, DWORD dwNewLong )
-{
-    if ( aSalShlData.mbWNT )
-        return SetWindowLongW( hWnd, nIndex, dwNewLong );
-    else
-        return SetWindowLongA( hWnd, nIndex, dwNewLong );
-}
-
-// -----------------------------------------------------------------------
-
-LONG ImplGetWindowLong( HWND hWnd, int nIndex )
-{
-    if ( aSalShlData.mbWNT )
-        return GetWindowLongW( hWnd, nIndex );
-    else
-        return GetWindowLongA( hWnd, nIndex );
-}
-
-// -----------------------------------------------------------------------
-
 WIN_BOOL ImplPostMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
 {
-    if ( aSalShlData.mbWNT )
-        return PostMessageW( hWnd, nMsg, wParam, lParam );
-    else
-        return PostMessageA( hWnd, nMsg, wParam, lParam );
+    return PostMessageW( hWnd, nMsg, wParam, lParam );
 }
 
 // -----------------------------------------------------------------------
 
 WIN_BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
 {
-    WIN_BOOL bRet;
-    if ( aSalShlData.mbWNT )
-        bRet = SendMessageW( hWnd, nMsg, wParam, lParam );
-    else
-        bRet = SendMessageA( hWnd, nMsg, wParam, lParam );
-
-    return bRet;
+    return SendMessageW( hWnd, nMsg, wParam, lParam );
 }
 
 // -----------------------------------------------------------------------
 
 WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax )
 {
-    if ( aSalShlData.mbWNT )
-        return GetMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax );
-    else
-        return GetMessageA( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax );
+    return GetMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax );
 }
 
 // -----------------------------------------------------------------------
 
 WIN_BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg )
 {
-    if ( aSalShlData.mbWNT )
-        return PeekMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg );
-    else
-        return PeekMessageA( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg );
+    return PeekMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg );
 }
 
 // -----------------------------------------------------------------------
 
 LONG ImplDispatchMessage( CONST MSG *lpMsg )
 {
-    if ( aSalShlData.mbWNT )
-        return DispatchMessageW( lpMsg );
-    else
-        return DispatchMessageA( lpMsg );
+    return DispatchMessageW( lpMsg );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index 16c8b11..6f024e2 100644
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -479,11 +479,8 @@ void ImplUpdateSysColorEntries()
     // create new sys color list
     ImplInsertSysColorEntry( COLOR_ACTIVEBORDER );
     ImplInsertSysColorEntry( COLOR_INACTIVEBORDER );
-    if( aSalShlData.mnVersion >= 410 )
-    {
-        ImplInsertSysColorEntry( COLOR_GRADIENTACTIVECAPTION );
-        ImplInsertSysColorEntry( COLOR_GRADIENTINACTIVECAPTION );
-    }
+    ImplInsertSysColorEntry( COLOR_GRADIENTACTIVECAPTION );
+    ImplInsertSysColorEntry( COLOR_GRADIENTINACTIVECAPTION );
     ImplInsertSysColorEntry( COLOR_3DFACE );
     ImplInsertSysColorEntry( COLOR_3DHILIGHT );
     ImplInsertSysColorEntry( COLOR_3DLIGHT );
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index ae62c6e..5f005ad 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1343,54 +1343,23 @@ int CALLBACK SalEnumQueryFontProcExW( const ENUMLOGFONTEXW*,
 
 // -----------------------------------------------------------------------
 
-int CALLBACK SalEnumQueryFontProcExA( const ENUMLOGFONTEXA*,
-                                      const NEWTEXTMETRICEXA*,
-                                      DWORD, LPARAM lParam )
-{
-    *((bool*)(void*)lParam) = true;
-    return 0;
-}
-
-// -----------------------------------------------------------------------
-
 bool ImplIsFontAvailable( HDC hDC, const UniString& rName )
 {
     bool bAvailable = false;
 
-    if ( aSalShlData.mbWNT )
-    {
-        // Test, if Font available
-        LOGFONTW aLogFont;
-        memset( &aLogFont, 0, sizeof( aLogFont ) );
-        aLogFont.lfCharSet = DEFAULT_CHARSET;
-
-        UINT nNameLen = rName.Len();
-        if ( nNameLen > (sizeof( aLogFont.lfFaceName )/sizeof( wchar_t ))-1 )
-            nNameLen = (sizeof( aLogFont.lfFaceName )/sizeof( wchar_t ))-1;
-        memcpy( aLogFont.lfFaceName, rName.GetBuffer(), nNameLen*sizeof( wchar_t ) );
-        aLogFont.lfFaceName[nNameLen] = 0;
-
-        EnumFontFamiliesExW( hDC, &aLogFont, (FONTENUMPROCW)SalEnumQueryFontProcExW,
-                             (LPARAM)(void*)&bAvailable, 0 );
-    }
-    else
-    {
-        ByteString aTemp = ImplSalGetWinAnsiString( rName );
-
-        // Test, if Font available
-        LOGFONTA aLogFont;
-        memset( &aLogFont, 0, sizeof( aLogFont ) );
-        aLogFont.lfCharSet = DEFAULT_CHARSET;
+    // Test, if Font available
+    LOGFONTW aLogFont;
+    memset( &aLogFont, 0, sizeof( aLogFont ) );
+    aLogFont.lfCharSet = DEFAULT_CHARSET;
 
-        UINT nNameLen = aTemp.Len();
-        if ( nNameLen > sizeof( aLogFont.lfFaceName )-1 )
-            nNameLen = sizeof( aLogFont.lfFaceName )-1;
-        memcpy( aLogFont.lfFaceName, aTemp.GetBuffer(), nNameLen );
-        aLogFont.lfFaceName[nNameLen] = 0;
+    UINT nNameLen = rName.Len();
+    if ( nNameLen > (sizeof( aLogFont.lfFaceName )/sizeof( wchar_t ))-1 )
+        nNameLen = (sizeof( aLogFont.lfFaceName )/sizeof( wchar_t ))-1;
+    memcpy( aLogFont.lfFaceName, rName.GetBuffer(), nNameLen*sizeof( wchar_t ) );
+    aLogFont.lfFaceName[nNameLen] = 0;
 
-        EnumFontFamiliesExA( hDC, &aLogFont, (FONTENUMPROCA)SalEnumQueryFontProcExA,
-                             (LPARAM)(void*)&bAvailable, 0 );
-    }
+    EnumFontFamiliesExW( hDC, &aLogFont, (FONTENUMPROCW)SalEnumQueryFontProcExW,
+                         (LPARAM)(void*)&bAvailable, 0 );
 
     return bAvailable;
 }
@@ -1470,80 +1439,6 @@ void ImplGetLogFontFromFontSelect( HDC hDC,
 
 // -----------------------------------------------------------------------
 
-static void ImplGetLogFontFromFontSelect( HDC hDC,
-                                   const ImplFontSelectData* pFont,
-                                   LOGFONTA& rLogFont,
-                                   bool /*bTestVerticalAvail*/ )
-{
-    ByteString aName;
-    if( pFont->mpFontData )
-        aName = ImplSalGetWinAnsiString( pFont->mpFontData->maName );
-    else
-        aName = ImplSalGetWinAnsiString( pFont->maName.GetToken( 0 ) );
-
-    int nNameLen = aName.Len();
-    if( nNameLen > LF_FACESIZE )
-        nNameLen = LF_FACESIZE;
-    memcpy( rLogFont.lfFaceName, aName.GetBuffer(), nNameLen );
-    if( nNameLen < LF_FACESIZE )
-        rLogFont.lfFaceName[nNameLen] = '\0';
-
-    if( !pFont->mpFontData )
-    {
-        rLogFont.lfCharSet = pFont->IsSymbolFont() ? SYMBOL_CHARSET : DEFAULT_CHARSET;
-        rLogFont.lfPitchAndFamily = ImplPitchToWin( pFont->mePitch )
-                                  | ImplFamilyToWin( pFont->meFamily );
-    }
-    else
-    {
-        const ImplWinFontData* pWinFontData = static_cast<const ImplWinFontData*>( pFont->mpFontData );
-        rLogFont.lfCharSet        = pWinFontData->GetCharSet();
-        rLogFont.lfPitchAndFamily = pWinFontData->GetPitchAndFamily();
-    }
-
-    rLogFont.lfWeight           = ImplWeightToWin( pFont->meWeight );
-    rLogFont.lfHeight           = (LONG)-pFont->mnHeight;
-    rLogFont.lfWidth            = (LONG)pFont->mnWidth;
-    rLogFont.lfUnderline        = 0;
-    rLogFont.lfStrikeOut        = 0;
-    rLogFont.lfItalic           = (pFont->meItalic) != ITALIC_NONE;
-    rLogFont.lfEscapement       = pFont->mnOrientation;
-    rLogFont.lfOrientation      = rLogFont.lfEscapement; // ignored by W98
-    rLogFont.lfClipPrecision    = CLIP_DEFAULT_PRECIS;
-    rLogFont.lfQuality          = DEFAULT_QUALITY;
-    rLogFont.lfOutPrecision     = OUT_TT_PRECIS;
-    if( pFont->mnOrientation )
-        rLogFont.lfClipPrecision |= CLIP_LH_ANGLES;
-
-    // disable antialiasing if requested
-    if( pFont->mbNonAntialiased )
-        rLogFont.lfQuality = NONANTIALIASED_QUALITY;
-
-    // select vertical mode if requested and available
-    if( pFont->mbVertical && nNameLen )
-    {
-        // vertical fonts start with an '@'
-        memmove( &rLogFont.lfFaceName[1], &rLogFont.lfFaceName[0],
-                    sizeof(rLogFont.lfFaceName)-sizeof(rLogFont.lfFaceName[0]) );
-        rLogFont.lfFaceName[0] = '@';
-
-        // check availability of vertical mode for this font
-        bool bAvailable = false;
-        EnumFontFamiliesExA( hDC, &rLogFont, (FONTENUMPROCA)SalEnumQueryFontProcExA,
-                         (LPARAM)&bAvailable, 0 );
-
-        if( !bAvailable )
-        {
-            // restore non-vertical name if vertical mode is not supported
-            memcpy( rLogFont.lfFaceName, aName.GetBuffer(), nNameLen );
-            if( nNameLen < LF_FACESIZE )
-                rLogFont.lfFaceName[nNameLen] = '\0';
-        }
-    }
-}
-
-// -----------------------------------------------------------------------
-
 HFONT WinSalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFontScale, HFONT& o_rOldFont )
 {
     HFONT hNewFont = 0;
@@ -1553,122 +1448,62 @@ HFONT WinSalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFont
         // only required for virtual devices, see below for details
         hdcScreen = GetDC(0);
 
-    if( aSalShlData.mbWNT )
-    {
-        LOGFONTW aLogFont;
-        ImplGetLogFontFromFontSelect( mhDC, i_pFont, aLogFont, true );
-
-        // on the display we prefer Courier New when Courier is a
-        // bitmap only font and we need to stretch or rotate it
-        if( mbScreen
-        &&  (i_pFont->mnWidth != 0
-          || i_pFont->mnOrientation != 0
-          || i_pFont->mpFontData == NULL
-          || (i_pFont->mpFontData->GetHeight() != i_pFont->mnHeight))
-        && !bImplSalCourierScalable
-        && bImplSalCourierNew
-        && (ImplSalWICompareAscii( aLogFont.lfFaceName, "Courier" ) == 0) )
-            lstrcpynW( aLogFont.lfFaceName, L"Courier New", 11 );
-
-        // #i47675# limit font requests to MAXFONTHEIGHT
-        // TODO: share MAXFONTHEIGHT font instance
-        if( (-aLogFont.lfHeight <= MAXFONTHEIGHT)
-        &&  (+aLogFont.lfWidth <= MAXFONTHEIGHT) )
-        {
-            o_rFontScale = 1.0;
-        }
-        else if( -aLogFont.lfHeight >= +aLogFont.lfWidth )
-        {
-            o_rFontScale = -aLogFont.lfHeight / (float)MAXFONTHEIGHT;
-            aLogFont.lfHeight = -MAXFONTHEIGHT;
-            aLogFont.lfWidth = FRound( aLogFont.lfWidth / o_rFontScale );
-        }
-        else // #i95867# also limit font widths
-        {
-            o_rFontScale = +aLogFont.lfWidth / (float)MAXFONTHEIGHT;
-            aLogFont.lfWidth = +MAXFONTHEIGHT;
-            aLogFont.lfHeight = FRound( aLogFont.lfHeight / o_rFontScale );
-        }
+    LOGFONTW aLogFont;
+    ImplGetLogFontFromFontSelect( mhDC, i_pFont, aLogFont, true );
 
-        hNewFont = ::CreateFontIndirectW( &aLogFont );
-        if( hdcScreen )
-        {
-            // select font into screen hdc first to get an antialiased font
-            // see knowledge base article 305290:
-            // "PRB: Fonts Not Drawn Antialiased on Device Context for DirectDraw Surface"
-            SelectFont( hdcScreen, SelectFont( hdcScreen , hNewFont ) );
-        }
-        o_rOldFont = ::SelectFont( mhDC, hNewFont );
+    // on the display we prefer Courier New when Courier is a
+    // bitmap only font and we need to stretch or rotate it
+    if( mbScreen
+    &&  (i_pFont->mnWidth != 0
+      || i_pFont->mnOrientation != 0
+      || i_pFont->mpFontData == NULL
+      || (i_pFont->mpFontData->GetHeight() != i_pFont->mnHeight))
+    && !bImplSalCourierScalable
+    && bImplSalCourierNew
+    && (ImplSalWICompareAscii( aLogFont.lfFaceName, "Courier" ) == 0) )
+        lstrcpynW( aLogFont.lfFaceName, L"Courier New", 11 );
 
-        TEXTMETRICW aTextMetricW;
-        if( !::GetTextMetricsW( mhDC, &aTextMetricW ) )
-        {
-            // the selected font doesn't work => try a replacement
-            // TODO: use its font fallback instead
-            lstrcpynW( aLogFont.lfFaceName, L"Courier New", 11 );
-            aLogFont.lfPitchAndFamily = FIXED_PITCH;
-            HFONT hNewFont2 = CreateFontIndirectW( &aLogFont );
-            SelectFont( mhDC, hNewFont2 );
-            DeleteFont( hNewFont );
-            hNewFont = hNewFont2;
-        }
+    // #i47675# limit font requests to MAXFONTHEIGHT
+    // TODO: share MAXFONTHEIGHT font instance
+    if( (-aLogFont.lfHeight <= MAXFONTHEIGHT)
+    &&  (+aLogFont.lfWidth <= MAXFONTHEIGHT) )
+    {
+        o_rFontScale = 1.0;
     }
-    else
+    else if( -aLogFont.lfHeight >= +aLogFont.lfWidth )
     {
-        if( !mpLogFont )
-             // mpLogFont is needed for getting the kerning pairs
-             // TODO: get them from somewhere else
-            mpLogFont = new LOGFONTA;
-        LOGFONTA& aLogFont = *mpLogFont;
-        ImplGetLogFontFromFontSelect( mhDC, i_pFont, aLogFont, true );
-
-        // on the display we prefer Courier New when Courier is a
-        // bitmap only font and we need to stretch or rotate it
-        if( mbScreen
-        &&  (i_pFont->mnWidth != 0
-          || i_pFont->mnOrientation != 0
-          || i_pFont->mpFontData == NULL
-          || (i_pFont->mpFontData->GetHeight() != i_pFont->mnHeight))
-        && !bImplSalCourierScalable
-        && bImplSalCourierNew
-        && (stricmp( aLogFont.lfFaceName, "Courier" ) == 0) )
-            strncpy( aLogFont.lfFaceName, "Courier New", 11 );
-
-        // limit font requests to MAXFONTHEIGHT to work around driver problems
-        // TODO: share MAXFONTHEIGHT font instance
-        if( -aLogFont.lfHeight <= MAXFONTHEIGHT )
-            o_rFontScale = 1.0;
-        else
-        {
-            o_rFontScale = -aLogFont.lfHeight / (float)MAXFONTHEIGHT;
-            aLogFont.lfHeight = -MAXFONTHEIGHT;
-            aLogFont.lfWidth = static_cast<LONG>( aLogFont.lfWidth / o_rFontScale );
-        }
+        o_rFontScale = -aLogFont.lfHeight / (float)MAXFONTHEIGHT;
+        aLogFont.lfHeight = -MAXFONTHEIGHT;
+        aLogFont.lfWidth = FRound( aLogFont.lfWidth / o_rFontScale );
+    }
+    else // #i95867# also limit font widths
+    {
+        o_rFontScale = +aLogFont.lfWidth / (float)MAXFONTHEIGHT;
+        aLogFont.lfWidth = +MAXFONTHEIGHT;
+        aLogFont.lfHeight = FRound( aLogFont.lfHeight / o_rFontScale );
+    }
 
-        hNewFont = ::CreateFontIndirectA( &aLogFont );
-        if( hdcScreen )
-        {
-            // select font into screen hdc first to get an antialiased font
-            // see knowledge base article 305290:
-            // "PRB: Fonts Not Drawn Antialiased on Device Context for DirectDraw Surface"
-            ::SelectFont( hdcScreen, ::SelectFont( hdcScreen , hNewFont ) );
-        }
-        o_rOldFont = ::SelectFont( mhDC, hNewFont );
+    hNewFont = ::CreateFontIndirectW( &aLogFont );
+    if( hdcScreen )
+    {
+        // select font into screen hdc first to get an antialiased font
+        // see knowledge base article 305290:
+        // "PRB: Fonts Not Drawn Antialiased on Device Context for DirectDraw Surface"
+        SelectFont( hdcScreen, SelectFont( hdcScreen , hNewFont ) );
+    }
+    o_rOldFont = ::SelectFont( mhDC, hNewFont );
 
-        TEXTMETRICA aTextMetricA;
-        // when the font doesn't work try a replacement
-        if ( !::GetTextMetricsA( mhDC, &aTextMetricA ) )
-        {
-            // the selected font doesn't work => try a replacement
-            // TODO: use its font fallback instead
-            LOGFONTA aTempLogFont = aLogFont;
-            strncpy( aTempLogFont.lfFaceName, "Courier New", 11 );
-            aTempLogFont.lfPitchAndFamily = FIXED_PITCH;
-            HFONT hNewFont2 = CreateFontIndirectA( &aTempLogFont );
-            ::SelectFont( mhDC, hNewFont2 );
-            ::DeleteFont( hNewFont );
-            hNewFont = hNewFont2;
-        }
+    TEXTMETRICW aTextMetricW;
+    if( !::GetTextMetricsW( mhDC, &aTextMetricW ) )
+    {
+        // the selected font doesn't work => try a replacement
+        // TODO: use its font fallback instead
+        lstrcpynW( aLogFont.lfFaceName, L"Courier New", 11 );
+        aLogFont.lfPitchAndFamily = FIXED_PITCH;
+        HFONT hNewFont2 = CreateFontIndirectW( &aLogFont );
+        SelectFont( mhDC, hNewFont2 );
+        DeleteFont( hNewFont );
+        hNewFont = hNewFont2;
     }
 
     if( hdcScreen )
@@ -1756,18 +1591,9 @@ void WinSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLe
     // temporarily change the HDC to the font in the fallback level
     HFONT hOldFont = SelectFont( mhDC, mhFonts[nFallbackLevel] );
 
-    if ( aSalShlData.mbWNT )
-    {
-        wchar_t aFaceName[LF_FACESIZE+60];
-        if( ::GetTextFaceW( mhDC, sizeof(aFaceName)/sizeof(wchar_t), aFaceName ) )
-            pMetric->maName = reinterpret_cast<const sal_Unicode*>(aFaceName);
-    }
-    else
-    {
-        char aFaceName[LF_FACESIZE+60];
-        if( ::GetTextFaceA( mhDC, sizeof(aFaceName), aFaceName ) )
-            pMetric->maName = ImplSalGetUniString( aFaceName );
-    }
+    wchar_t aFaceName[LF_FACESIZE+60];
+    if( ::GetTextFaceW( mhDC, sizeof(aFaceName)/sizeof(wchar_t), aFaceName ) )
+        pMetric->maName = reinterpret_cast<const sal_Unicode*>(aFaceName);
 
     // get the font metric
     TEXTMETRICA aWinMetric;
@@ -1831,11 +1657,6 @@ void WinSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLe
 
         pMetric->mnAscent   += nHalfTmpExtLeading;
         pMetric->mnDescent  += nOtherHalfTmpExtLeading;
-
-        // #109280# HACK korean only: increase descent for wavelines and impr
-        if( !aSalShlData.mbWNT )
-            if( mpWinFontData[nFallbackLevel]->SupportsKorean() )
-                pMetric->mnDescent += pMetric->mnExtLeading;
     }
 
     pMetric->mnMinKashida = GetMinKashidaWidth();
@@ -1989,45 +1810,21 @@ ULONG WinSalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs )
         }
         mnFontKernPairCount = 0;
 
-        if ( aSalShlData.mbWNT )
+        KERNINGPAIR* pPairs = NULL;
+        int nCount = ::GetKerningPairsW( mhDC, 0, NULL );
+        if( nCount )
         {
-            KERNINGPAIR* pPairs = NULL;
-            int nCount = ::GetKerningPairsW( mhDC, 0, NULL );
-            if( nCount )
-            {
 #ifdef GCP_KERN_HACK
-                pPairs = new KERNINGPAIR[ nCount+1 ];
-                mpFontKernPairs = pPairs;
-                mnFontKernPairCount = nCount;
-                ::GetKerningPairsW( mhDC, nCount, pPairs );
+            pPairs = new KERNINGPAIR[ nCount+1 ];
+            mpFontKernPairs = pPairs;
+            mnFontKernPairCount = nCount;
+            ::GetKerningPairsW( mhDC, nCount, pPairs );
 #else // GCP_KERN_HACK
-                pPairs = pKernPairs;
-                nCount = (nCount < nPairs) : nCount : nPairs;
-                ::GetKerningPairsW( mhDC, nCount, pPairs );
-                return nCount;
+            pPairs = pKernPairs;
+            nCount = (nCount < nPairs) : nCount : nPairs;
+            ::GetKerningPairsW( mhDC, nCount, pPairs );
+            return nCount;
 #endif // GCP_KERN_HACK
-            }
-        }
-        else
-        {
-            if ( !mnFontCharSetCount )
-                ImplGetAllFontCharSets( this );
-
-            if ( mnFontCharSetCount <= 1 )
-                ImplAddKerningPairs( this );
-            else
-            {
-                // Query All Kerning Pairs from all possible CharSets
-                for ( BYTE i = 0; i < mnFontCharSetCount; i++ )
-                {
-                    mpLogFont->lfCharSet = mpFontCharSets[i];
-                    HFONT hNewFont = CreateFontIndirectA( mpLogFont );
-                    HFONT hOldFont = SelectFont( mhDC, hNewFont );
-                    ImplAddKerningPairs( this );
-                    SelectFont( mhDC, hOldFont );
-                    DeleteFont( hNewFont );
-                }
-            }
         }
 
         mbFontKernInit = FALSE;
@@ -2259,19 +2056,7 @@ void ImplReleaseTempFonts( SalData& rSalData )
         }
         else
         {
-            if( aSalShlData.mbWNT )
-                ::RemoveFontResourceW( reinterpret_cast<LPCWSTR>(p->maFontFilePath.getStr()) );
-            else
-            {
-                // poor man's string conversion because converter is gone
-                int nLen = p->maFontFilePath.getLength();
-                char* pNameA = new char[ nLen + 1 ];
-                for( int i = 0; i < nLen; ++i )
-                    pNameA[i] = (char)(p->maFontFilePath.getStr())[i];
-                pNameA[ nLen ] = 0;
-                ::RemoveFontResourceA( pNameA );
-                delete[] pNameA;
-            }
+            ::RemoveFontResourceW( reinterpret_cast<LPCWSTR>(p->maFontFilePath.getStr()) );
         }
 
         rSalData.mpTempFontItem = p->mpNextItem;
@@ -2413,14 +2198,6 @@ bool WinSalGraphics::AddTempDevFont( ImplDevFontList* pFontList,
         return false;
 
     UINT nPreferedCharSet = DEFAULT_CHARSET;
-    if ( !aSalShlData.mbWNT )
-    {
-        // for W98 guess charset preference from active codepage
-        CHARSETINFO aCharSetInfo;
-        DWORD nCP = GetACP();
-        if ( TranslateCharsetInfo( (DWORD*)nCP, &aCharSetInfo, TCI_SRCCODEPAGE ) )
-            nPreferedCharSet = aCharSetInfo.ciCharset;
-    }
 
     // create matching FontData struct
     aDFA.mbSymbolFlag = false; // TODO: how to know it without accessing the font?
@@ -2525,24 +2302,12 @@ void WinSalGraphics::GetDevFontList( ImplDevFontList* pFontList )
     if ( TranslateCharsetInfo( (DWORD*)nCP, &aCharSetInfo, TCI_SRCCODEPAGE ) )
         aInfo.mnPreferedCharSet = aCharSetInfo.ciCharset;
 
-    if ( aSalShlData.mbWNT )
-    {
-        LOGFONTW aLogFont;
-        memset( &aLogFont, 0, sizeof( aLogFont ) );
-        aLogFont.lfCharSet = DEFAULT_CHARSET;
-        aInfo.mpLogFontW = &aLogFont;
-        EnumFontFamiliesExW( mhDC, &aLogFont,
-            (FONTENUMPROCW)SalEnumFontsProcExW, (LPARAM)(void*)&aInfo, 0 );
-    }
-    else
-    {
-        LOGFONTA aLogFont;
-        memset( &aLogFont, 0, sizeof( aLogFont ) );
-        aLogFont.lfCharSet = DEFAULT_CHARSET;
-        aInfo.mpLogFontA = &aLogFont;
-        EnumFontFamiliesExA( mhDC, &aLogFont,
-            (FONTENUMPROCA)SalEnumFontsProcExA, (LPARAM)(void*)&aInfo, 0 );
-    }
+    LOGFONTW aLogFont;
+    memset( &aLogFont, 0, sizeof( aLogFont ) );
+    aLogFont.lfCharSet = DEFAULT_CHARSET;
+    aInfo.mpLogFontW = &aLogFont;
+    EnumFontFamiliesExW( mhDC, &aLogFont,
+        (FONTENUMPROCW)SalEnumFontsProcExW, (LPARAM)(void*)&aInfo, 0 );
 
     // Feststellen, was es fuer Courier-Schriften auf dem Bildschirm gibt,
     // um in SetFont() evt. Courier auf Courier New zu mappen
@@ -2582,10 +2347,7 @@ BOOL WinSalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect )
     aGM.gmptGlyphOrigin.x = aGM.gmptGlyphOrigin.y = 0;
     aGM.gmBlackBoxX = aGM.gmBlackBoxY = 0;
     DWORD nSize = GDI_ERROR;
-    if ( aSalShlData.mbWNT )
-        nSize = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags, &aGM, 0, NULL, &aMat );
-    else if( (nGGOFlags & GGO_GLYPH_INDEX) || (nIndex <= 255) )
-        nSize = ::GetGlyphOutlineA( hDC, nIndex, nGGOFlags, &aGM, 0, NULL, &aMat );
+    nSize = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags, &aGM, 0, NULL, &aMat );
 
     if( nSize == GDI_ERROR )
         return false;
@@ -2621,10 +2383,7 @@ BOOL WinSalGraphics::GetGlyphOutline( long nIndex,
 
     GLYPHMETRICS aGlyphMetrics;
     DWORD nSize1 = GDI_ERROR;
-    if ( aSalShlData.mbWNT )
-        nSize1 = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags, &aGlyphMetrics, 0, NULL, &aMat );
-    else if( (nGGOFlags & GGO_GLYPH_INDEX) || (nIndex <= 255) )
-        nSize1 = ::GetGlyphOutlineA( hDC, nIndex, nGGOFlags, &aGlyphMetrics, 0, NULL, &aMat );
+    nSize1 = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags, &aGlyphMetrics, 0, NULL, &aMat );
 
     if( !nSize1 )       // blank glyphs are ok
         bRet = TRUE;
@@ -2632,12 +2391,8 @@ BOOL WinSalGraphics::GetGlyphOutline( long nIndex,
     {
         BYTE*   pData = new BYTE[ nSize1 ];
         DWORD   nSize2;
-        if ( aSalShlData.mbWNT )
-            nSize2 = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags,
-                &aGlyphMetrics, nSize1, pData, &aMat );
-        else
-            nSize2 = ::GetGlyphOutlineA( hDC, nIndex, nGGOFlags,
-                &aGlyphMetrics, nSize1, pData, &aMat );
+        nSize2 = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags,
+                                     &aGlyphMetrics, nSize1, pData, &aMat );
 
         if( nSize1 == nSize2 )
         {
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index d8ec03b..28a9684 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -1715,15 +1715,12 @@ ULONG WinSalInfoPrinter::GetCapabilities( const ImplJobSetup* pSetupData, USHORT
                 return nRet;
             return 0;
         case PRINTER_CAPABILITIES_COLLATECOPIES:
-            if ( aSalShlData.mbW40 )
+            nRet = ImplDeviceCaps( this, DC_COLLATE, NULL, pSetupData );
+            if ( nRet && (nRet != GDI_ERROR) )
             {
-                nRet = ImplDeviceCaps( this, DC_COLLATE, NULL, pSetupData );
+                nRet = ImplDeviceCaps( this, DC_COPIES, NULL, pSetupData );
                 if ( nRet && (nRet != GDI_ERROR) )
-                {
-                    nRet = ImplDeviceCaps( this, DC_COPIES, NULL, pSetupData );
-                    if ( nRet && (nRet != GDI_ERROR) )
-                         return nRet;
-                }
+                    return nRet;
             }
             return 0;
 
@@ -1840,14 +1837,11 @@ static LPDEVMODEA ImplSalSetCopies( LPDEVMODEA pDevMode, ULONG nCopies, BOOL bCo
         pDevMode = pNewDevMode;
         pDevMode->dmFields |= DM_COPIES;
         pDevMode->dmCopies	= (short)(USHORT)nCopies;
-        if ( aSalShlData.mbW40 )
-        {
-            pDevMode->dmFields |= DM_COLLATE;
-            if ( bCollate )
-                pDevMode->dmCollate = DMCOLLATE_TRUE;
-            else
-                pDevMode->dmCollate = DMCOLLATE_FALSE;
-        }
+        pDevMode->dmFields |= DM_COLLATE;
+        if ( bCollate )
+            pDevMode->dmCollate = DMCOLLATE_TRUE;
+        else
+            pDevMode->dmCollate = DMCOLLATE_FALSE;
     }
 
     return pNewDevMode;
@@ -1866,14 +1860,11 @@ static LPDEVMODEW ImplSalSetCopies( LPDEVMODEW pDevMode, ULONG nCopies, BOOL bCo
         pDevMode = pNewDevMode;
         pDevMode->dmFields |= DM_COPIES;
         pDevMode->dmCopies	= (short)(USHORT)nCopies;
-        if ( aSalShlData.mbW40 )
-        {
-            pDevMode->dmFields |= DM_COLLATE;
-            if ( bCollate )
-                pDevMode->dmCollate = DMCOLLATE_TRUE;
-            else
-                pDevMode->dmCollate = DMCOLLATE_FALSE;
-        }
+        pDevMode->dmFields |= DM_COLLATE;
+        if ( bCollate )
+            pDevMode->dmCollate = DMCOLLATE_TRUE;
+        else
+            pDevMode->dmCollate = DMCOLLATE_FALSE;
     }
 
     return pNewDevMode;
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 65a416c..fccd54b 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -58,9 +58,11 @@
 
 #define USE_UNISCRIBE
 #ifdef USE_UNISCRIBE
+#define ULONG WIN_ULONG
 #include <Usp10.h>
 #include <ShLwApi.h>
 #include <winver.h>
+#undef ULONG
 #endif // USE_UNISCRIBE
 
 #include <hash_map>
@@ -246,22 +248,11 @@ HFONT WinLayout::DisableFontScaling() const
         return 0;
 
     HFONT hHugeFont = 0;
-    if( aSalShlData.mbWNT )
-    {
-        LOGFONTW aLogFont;
-        ::GetObjectW( mhFont, sizeof(LOGFONTW), &aLogFont);
-        aLogFont.lfHeight = (LONG)(mfFontScale * aLogFont.lfHeight);
-        aLogFont.lfWidth  = (LONG)(mfFontScale * aLogFont.lfWidth);
-        hHugeFont = ::CreateFontIndirectW( &aLogFont);
-    }
-    else
-    {
-        LOGFONTA aLogFont;
-        ::GetObjectA( mhFont, sizeof(LOGFONTA), &aLogFont);
-        aLogFont.lfHeight = (LONG)(mfFontScale * aLogFont.lfHeight);
-        aLogFont.lfWidth  = (LONG)(mfFontScale * aLogFont.lfWidth);
-        hHugeFont = ::CreateFontIndirectA( &aLogFont);
-    }
+    LOGFONTW aLogFont;
+    ::GetObjectW( mhFont, sizeof(LOGFONTW), &aLogFont);
+    aLogFont.lfHeight = (LONG)(mfFontScale * aLogFont.lfHeight);
+    aLogFont.lfWidth  = (LONG)(mfFontScale * aLogFont.lfWidth);
+    hHugeFont = ::CreateFontIndirectW( &aLogFont);
 
     if( !hHugeFont )
         return 0;
@@ -674,7 +665,7 @@ void SimpleWinLayout::DrawText( SalGraphics& rGraphics ) const
 
      // #108267#, limit the number of glyphs to avoid paint errors
     UINT limitedGlyphCount = Min( 8192, mnGlyphCount );
-    if( mnDrawOptions || aSalShlData.mbWNT )
+    if( mnDrawOptions )
     {
         // #108267#, break up into glyph portions of a limited size required by Win32 API
         const unsigned int maxGlyphCount = 8192;
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index a0b455c..833fd2d 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -500,45 +500,31 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst,
     }
 
     // create frame
-    if ( aSalShlData.mbWNT )
+    LPCWSTR pClassName;
+    if ( bSubFrame )
     {
-        LPCWSTR pClassName;
-        if ( bSubFrame )
-        {
-            if ( nSalFrameStyle & (SAL_FRAME_STYLE_MOVEABLE|SAL_FRAME_STYLE_NOSHADOW) ) // check if shadow not wanted
-                pClassName = SAL_SUBFRAME_CLASSNAMEW;
-            else
-                pClassName = SAL_TMPSUBFRAME_CLASSNAMEW;    // undecorated floaters will get shadow on XP
-        }
+        if ( nSalFrameStyle & (SAL_FRAME_STYLE_MOVEABLE|SAL_FRAME_STYLE_NOSHADOW) ) // check if shadow not wanted
+            pClassName = SAL_SUBFRAME_CLASSNAMEW;
         else
-        {
-            if ( nSalFrameStyle & SAL_FRAME_STYLE_MOVEABLE )
-                pClassName = SAL_FRAME_CLASSNAMEW;
-            else
-                pClassName = SAL_TMPSUBFRAME_CLASSNAMEW;
-        }
-        hWnd = CreateWindowExW( nExSysStyle, pClassName, L"", nSysStyle,
-                                CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
-                                hWndParent, 0, pInst->mhInst, (void*)pFrame );
-        if( !hWnd )
-            ImplWriteLastError( GetLastError(), "CreateWindowEx" );
-#if OSL_DEBUG_LEVEL > 1
-        // set transparency value
-        if( bLayeredAPI == 1 && GetWindowExStyle( hWnd ) & WS_EX_LAYERED )
-            lpfnSetLayeredWindowAttributes( hWnd, 0, 230, 0x00000002 /*LWA_ALPHA*/ );
-#endif
+            pClassName = SAL_TMPSUBFRAME_CLASSNAMEW;    // undecorated floaters will get shadow on XP
     }
     else
     {
-        LPCSTR pClassName;
-        if ( bSubFrame )
-            pClassName = SAL_SUBFRAME_CLASSNAMEA;
+        if ( nSalFrameStyle & SAL_FRAME_STYLE_MOVEABLE )
+            pClassName = SAL_FRAME_CLASSNAMEW;
         else
-            pClassName = SAL_FRAME_CLASSNAMEA;
-        hWnd = CreateWindowExA( nExSysStyle, pClassName, "", nSysStyle,
-                                CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
-                                hWndParent, 0, pInst->mhInst, (void*)pFrame );
+            pClassName = SAL_TMPSUBFRAME_CLASSNAMEW;
     }
+    hWnd = CreateWindowExW( nExSysStyle, pClassName, L"", nSysStyle,
+                            CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
+                            hWndParent, 0, pInst->mhInst, (void*)pFrame );
+    if( !hWnd )
+        ImplWriteLastError( GetLastError(), "CreateWindowEx" );
+#if OSL_DEBUG_LEVEL > 1
+    // set transparency value
+    if( bLayeredAPI == 1 && GetWindowExStyle( hWnd ) & WS_EX_LAYERED )
+        lpfnSetLayeredWindowAttributes( hWnd, 0, 230, 0x00000002 /*LWA_ALPHA*/ );
+#endif
     if ( !hWnd )
     {
         delete pFrame;
@@ -609,22 +595,10 @@ HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, BOOL bAsChild )
         nExSysStyle = 0;
     }
 
-    HWND hWnd = NULL;
-    if ( aSalShlData.mbWNT )
-    {
-        LPCWSTR pClassName = SAL_SUBFRAME_CLASSNAMEW;
-        hWnd = CreateWindowExW( nExSysStyle, pClassName, L"", nSysStyle,
-                                CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
-                                hWndParent, 0, hInstance, (void*)GetWindowPtr( oldhWnd ) );
-    }
-    else
-    {
-        LPCSTR pClassName = SAL_SUBFRAME_CLASSNAMEA;
-        hWnd = CreateWindowExA( nExSysStyle, pClassName, "", nSysStyle,
-                                CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
-                                hWndParent, 0, hInstance, (void*)GetWindowPtr( oldhWnd ) );
-    }
-    return hWnd;
+    LPCWSTR pClassName = SAL_SUBFRAME_CLASSNAMEW;
+    return CreateWindowExW( nExSysStyle, pClassName, L"", nSysStyle,
+                            CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
+                            hWndParent, 0, hInstance, (void*)GetWindowPtr( oldhWnd ) );
 }
 
 // =======================================================================
@@ -1342,37 +1316,7 @@ static void ImplSalShow( HWND hWnd, BOOL bVisible, BOOL bNoActivate )
     }
     else
     {
-        // See also Bug #91813# and #68467#
-        if ( pFrame->mbFullScreen &&
-             pFrame->mbPresentation &&
-             (aSalShlData.mnVersion < 500) &&
-             !::GetParent( hWnd ) )
-        {
-            // Damit im Impress-Player in der Taskleiste nicht durch
-            // einen Windows-Fehler hin- und wieder mal ein leerer
-            // Button stehen bleibt, muessen wir hier die Taskleiste
-            // etwas austricksen. Denn wenn wir im FullScreenMode sind
-            // und das Fenster hiden kommt Windows anscheinend etwas aus
-            // dem tritt und somit minimieren wir das Fenster damit es
-            // nicht flackert
-            ANIMATIONINFO aInfo;
-            aInfo.cbSize = sizeof( aInfo );
-            SystemParametersInfo( SPI_GETANIMATION, 0, &aInfo, 0 );
-            if ( aInfo.iMinAnimate )
-            {
-                int nOldAni = aInfo.iMinAnimate;
-                aInfo.iMinAnimate = 0;
-                SystemParametersInfo( SPI_SETANIMATION, 0, &aInfo, 0 );
-                ShowWindow( pFrame->mhWnd, SW_SHOWMINNOACTIVE );
-                aInfo.iMinAnimate = nOldAni;
-                SystemParametersInfo( SPI_SETANIMATION, 0, &aInfo, 0 );
-            }
-            else
-                ShowWindow( hWnd, SW_SHOWMINNOACTIVE );
-            ShowWindow( hWnd, SW_HIDE );
-        }
-        else
-            ShowWindow( hWnd, SW_HIDE );
+        ShowWindow( hWnd, SW_HIDE );
     }
 }
 
@@ -2527,52 +2471,23 @@ static void ImplGetKeyNameText( LONG lParam, sal_Unicode* pBuf,
     int nKeyLen = 0;
     if ( lParam )
     {
-        if ( aSalShlData.mbWNT )
+        nKeyLen = GetKeyNameTextW( lParam, aKeyBuf, nMaxKeyLen );
+        // #i12401# the current unicows.dll has a bug in CharUpperBuffW, which corrupts the stack
+        // fall back to the ANSI version instead
+        DBG_ASSERT( nKeyLen <= nMaxKeyLen, "Invalid key name length!" );
+        if( nKeyLen > nMaxKeyLen )
+            nKeyLen = 0;
+        else if( nKeyLen > 0 )
         {
-            nKeyLen = GetKeyNameTextW( lParam, aKeyBuf, nMaxKeyLen );
-            // #i12401# the current unicows.dll has a bug in CharUpperBuffW, which corrupts the stack
-            // fall back to the ANSI version instead
-            DBG_ASSERT( nKeyLen <= nMaxKeyLen, "Invalid key name length!" );
-            if( nKeyLen > nMaxKeyLen )
-                nKeyLen = 0;
-            else if( nKeyLen > 0 )
-            {
-                // Capitalize just the first letter of key names
-                CharLowerBuffW( aKeyBuf, nKeyLen );
+            // Capitalize just the first letter of key names
+            CharLowerBuffW( aKeyBuf, nKeyLen );
 
-                bool bUpper = true;
-                for( WCHAR *pW=aKeyBuf, *pE=pW+nKeyLen; pW < pE; ++pW )
-                {
-                    if( bUpper )
-                        CharUpperBuffW( pW, 1 );
-                    bUpper = (*pW=='+') || (*pW=='-') || (*pW==' ') || (*pW=='.');
-                }
-            }
-        }
-        else // !mbWnt
-        {
-            sal_Char aAnsiKeyBuf[ nMaxKeyLen ];
-            int nAnsiKeyLen = GetKeyNameTextA( lParam, aAnsiKeyBuf, nMaxKeyLen );
-            DBG_ASSERT( nAnsiKeyLen <= nMaxKeyLen, "Invalid key name length!" );
-            if( nAnsiKeyLen > nMaxKeyLen )
-                nAnsiKeyLen = 0;
-            else if( nAnsiKeyLen > 0 )
+            bool bUpper = true;
+            for( WCHAR *pW=aKeyBuf, *pE=pW+nKeyLen; pW < pE; ++pW )
             {
-                // Capitalize just the first letter of key names
-                // TODO: check MCBS key names
-                CharLowerBuffA( aAnsiKeyBuf, nAnsiKeyLen );
-
-                bool bUpper = true;
-                for( sal_Char *pA=aAnsiKeyBuf, *pE=pA+nAnsiKeyLen; pA < pE; ++pA )
-                {
-                    if( bUpper )
-                        CharUpperBuffA( pA, 1 );
-                    bUpper = (*pA=='+') || (*pA=='-') || (*pA==' ') || (*pA=='.');
-                }
-
-                // Convert to Unicode and copy the data in the Unicode Buffer
-                nKeyLen = MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED,
-                    aAnsiKeyBuf, nAnsiKeyLen, aKeyBuf, nMaxKeyLen );
+                if( bUpper )
+                    CharUpperBuffW( pW, 1 );
+                bUpper = (*pW=='+') || (*pW=='-') || (*pW==' ') || (*pW=='.');
             }
         }
     }
@@ -2923,11 +2838,8 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
         aStyleSettings.SetTitleHeight( GetSystemMetrics( SM_CYCAPTION ) );
         aStyleSettings.SetActiveBorderColor( ImplWinColorToSal( GetSysColor( COLOR_ACTIVEBORDER ) ) );
         aStyleSettings.SetDeactiveBorderColor( ImplWinColorToSal( GetSysColor( COLOR_INACTIVEBORDER ) ) );
-        if ( aSalShlData.mnVersion >= 410 )
-        {
-            aStyleSettings.SetActiveColor2( ImplWinColorToSal( GetSysColor( COLOR_GRADIENTACTIVECAPTION ) ) );
-            aStyleSettings.SetDeactiveColor( ImplWinColorToSal( GetSysColor( COLOR_GRADIENTINACTIVECAPTION ) ) );
-        }
+        aStyleSettings.SetActiveColor2( ImplWinColorToSal( GetSysColor( COLOR_GRADIENTACTIVECAPTION ) ) );
+        aStyleSettings.SetDeactiveColor( ImplWinColorToSal( GetSysColor( COLOR_GRADIENTINACTIVECAPTION ) ) );
         aStyleSettings.SetFaceColor( ImplWinColorToSal( GetSysColor( COLOR_3DFACE ) ) );
         aStyleSettings.SetInactiveTabColor( aStyleSettings.GetFaceColor() );
         aStyleSettings.SetLightColor( ImplWinColorToSal( GetSysColor( COLOR_3DHILIGHT ) ) );
@@ -3026,39 +2938,19 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
     Font    aAppFont = aStyleSettings.GetAppFont();
     Font    aIconFont = aStyleSettings.GetIconFont();
     HDC     hDC = GetDC( 0 );
-    if ( aSalShlData.mbWNT )
-    {
-        NONCLIENTMETRICSW aNonClientMetrics;
-        aNonClientMetrics.cbSize = sizeof( aNonClientMetrics );
-        if ( SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, sizeof( aNonClientMetrics ), &aNonClientMetrics, 0 ) )
-        {
-            ImplSalUpdateStyleFontW( hDC, aNonClientMetrics.lfMenuFont, aMenuFont );
-            ImplSalUpdateStyleFontW( hDC, aNonClientMetrics.lfCaptionFont, aTitleFont );
-            ImplSalUpdateStyleFontW( hDC, aNonClientMetrics.lfSmCaptionFont, aFloatTitleFont );
-            ImplSalUpdateStyleFontW( hDC, aNonClientMetrics.lfStatusFont, aHelpFont );
-            ImplSalUpdateStyleFontW( hDC, aNonClientMetrics.lfMessageFont, aAppFont );
-
-            LOGFONTW aLogFont;
-            if ( SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0, &aLogFont, 0 ) )
-                ImplSalUpdateStyleFontW( hDC, aLogFont, aIconFont );
-        }
-    }
-    else
+    NONCLIENTMETRICSW aNonClientMetrics;
+    aNonClientMetrics.cbSize = sizeof( aNonClientMetrics );
+    if ( SystemParametersInfoW( SPI_GETNONCLIENTMETRICS, sizeof( aNonClientMetrics ), &aNonClientMetrics, 0 ) )
     {
-        NONCLIENTMETRICSA aNonClientMetrics;
-        aNonClientMetrics.cbSize = sizeof( aNonClientMetrics );
-        if ( SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, sizeof( aNonClientMetrics ), &aNonClientMetrics, 0 ) )
-        {
-            ImplSalUpdateStyleFontA( hDC, aNonClientMetrics.lfMenuFont, aMenuFont );
-            ImplSalUpdateStyleFontA( hDC, aNonClientMetrics.lfCaptionFont, aTitleFont );
-            ImplSalUpdateStyleFontA( hDC, aNonClientMetrics.lfSmCaptionFont, aFloatTitleFont );
-            ImplSalUpdateStyleFontA( hDC, aNonClientMetrics.lfStatusFont, aHelpFont );
-            ImplSalUpdateStyleFontA( hDC, aNonClientMetrics.lfMessageFont, aAppFont );
-
-            LOGFONTA aLogFont;
-            if ( SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0, &aLogFont, 0 ) )
-                ImplSalUpdateStyleFontA( hDC, aLogFont, aIconFont );
-        }
+        ImplSalUpdateStyleFontW( hDC, aNonClientMetrics.lfMenuFont, aMenuFont );
+        ImplSalUpdateStyleFontW( hDC, aNonClientMetrics.lfCaptionFont, aTitleFont );
+        ImplSalUpdateStyleFontW( hDC, aNonClientMetrics.lfSmCaptionFont, aFloatTitleFont );
+        ImplSalUpdateStyleFontW( hDC, aNonClientMetrics.lfStatusFont, aHelpFont );
+        ImplSalUpdateStyleFontW( hDC, aNonClientMetrics.lfMessageFont, aAppFont );
+
+        LOGFONTW aLogFont;
+        if ( SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0, &aLogFont, 0 ) )
+            ImplSalUpdateStyleFontW( hDC, aLogFont, aIconFont );
     }
 
     // get screen font resolution to calculate toolbox item size
@@ -3680,30 +3572,10 @@ static void ImplUpdateInputLang( WinSalFrame* pFrame )
         bLanguageChange = TRUE;
     }
 
-    // If we are on Windows NT we use Unicode FrameProcs and so we
-    // get Unicode charcodes directly from Windows
-    // no need to set up a code page
-    if ( aSalShlData.mbWNT )
-        return;
-
-    if ( !nLang )
-    {
-        pFrame->mnInputLang     = 0;
-        pFrame->mnInputCodePage = GetACP();
-    }
-    else if ( bLanguageChange )
-    {
-        sal_Char aBuf[10];
-        if ( GetLocaleInfoA( MAKELCID( nLang, SORT_DEFAULT ), LOCALE_IDEFAULTANSICODEPAGE,
-                             aBuf, sizeof(aBuf) ) > 0 )
-        {
-            pFrame->mnInputCodePage = ImplStrToNum( aBuf );
-            if ( !pFrame->mnInputCodePage )
-                pFrame->mnInputCodePage = GetACP();
-        }
-        else
-            pFrame->mnInputCodePage = GetACP();
-    }
+    // We are on Windows NT so we use Unicode FrameProcs and get
+    // Unicode charcodes directly from Windows no need to set up a
+    // code page
+    return;
 }
 
 
@@ -3711,31 +3583,9 @@ static sal_Unicode ImplGetCharCode( WinSalFrame* pFrame, WPARAM nCharCode )
 {
     ImplUpdateInputLang( pFrame );
 
-    // If we are on Windows NT we use Unicode FrameProcs and so we
+    // We are on Windows NT so we use Unicode FrameProcs and we
     // get Unicode charcodes directly from Windows
-    if ( aSalShlData.mbWNT )
-        return (sal_Unicode)nCharCode;
-
-    sal_Char    aCharBuf[2];
-    int         nCharLen;
-    WCHAR       c;
-    if ( nCharCode > 0xFF )
-    {
-        aCharBuf[0] = (sal_Char)(nCharCode>>8);
-        aCharBuf[1] = (sal_Char)nCharCode;
-        nCharLen = 2;
-    }
-    else
-    {
-        aCharBuf[0] = (sal_Char)nCharCode;
-        nCharLen = 1;
-    }
-    if ( ::MultiByteToWideChar( pFrame->mnInputCodePage,
-                                MB_PRECOMPOSED,
-                                aCharBuf, nCharLen, &c, 1 ) )
-        return (sal_Unicode)c;
-    else
-        return (sal_Unicode)nCharCode;
+    return (sal_Unicode)nCharCode;
 }
 
 // -----------------------------------------------------------------------
@@ -4541,16 +4391,8 @@ static void ImplHandleSettingsChangeMsg( HWND hWnd, UINT nMsg,
     {
         if ( lParam )
         {
-            if ( aSalShlData.mbWNT )
-            {
-                if ( ImplSalWICompareAscii( (const wchar_t*)lParam, "devices" ) == 0 )
-                    nSalEvent = SALEVENT_PRINTERCHANGED;
-            }
-            else
-            {
-                if ( stricmp( (const char*)lParam, "devices" ) == 0 )
-                    nSalEvent = SALEVENT_PRINTERCHANGED;
-            }
+            if ( ImplSalWICompareAscii( (const wchar_t*)lParam, "devices" ) == 0 )
+                nSalEvent = SALEVENT_PRINTERCHANGED;
         }
     }
 
diff --git a/vcl/win/source/window/salobj.cxx b/vcl/win/source/window/salobj.cxx
index 79cef06..fe5f049 100644
--- a/vcl/win/source/window/salobj.cxx
+++ b/vcl/win/source/window/salobj.cxx
@@ -492,20 +492,10 @@ SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent )
     // Hook installieren, wenn es das erste SalObject ist
     if ( !pSalData->mpFirstObject )
     {
-        if ( aSalShlData.mbWNT )
-        {
-            pSalData->mhSalObjMsgHook = SetWindowsHookExW( WH_CALLWNDPROC,
-                                                           SalSysMsgProc,
-                                                           pSalData->mhInst,
-                                                           pSalData->mnAppThreadId );
-        }
-        else
-        {
-            pSalData->mhSalObjMsgHook = SetWindowsHookExA( WH_CALLWNDPROC,
-                                                           SalSysMsgProc,
-                                                           pSalData->mhInst,
-                                                           pSalData->mnAppThreadId );
-        }
+        pSalData->mhSalObjMsgHook = SetWindowsHookExW( WH_CALLWNDPROC,
+                                                       SalSysMsgProc,
+                                                       pSalData->mhInst,
+                                                       pSalData->mnAppThreadId );
     }
 
     if ( !pSalData->mbObjClassInit )


More information about the Libreoffice-commits mailing list