[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl' - 3 commits - vcl/inc vcl/win

Jan Holesovsky kendy at collabora.com
Thu Nov 13 15:50:56 PST 2014


 vcl/inc/win/salgdi.h             |    6 ------
 vcl/win/source/gdi/salgdi.cxx    |    9 +--------
 vcl/win/source/gdi/salgdi3.cxx   |    6 ------
 vcl/win/source/gdi/winlayout.cxx |    2 --
 4 files changed, 1 insertion(+), 22 deletions(-)

New commits:
commit 151fdd5e4990389c2c2ceb3e69fb64d0e438db40
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Nov 14 00:47:42 2014 +0100

    vcl: Fix leak.
    
    Change-Id: I201e50060c44bba3c0eb20026be1daccd3b2e945

diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index e5735bd..b920a50 100644
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -615,7 +615,7 @@ WinSalGraphics::~WinSalGraphics()
     // delete cache data
     delete [] mpStdClipRgnData;
 
-    delete mpFontKernPairs;
+    delete [] mpFontKernPairs;
 }
 
 bool WinSalGraphics::isPrinter() const
commit 5da6b157bf669482f71fdffe83d0ce6f1a44f938
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Nov 14 00:46:26 2014 +0100

    vcl: mpFontCharSets is never set.
    
    Change-Id: Ic9102dabe9a74e7ad2aaa5c8cad2bae1b2c7b1ec

diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index d26e0e6..82cfb38 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -121,9 +121,6 @@ private:
     mutable const Ucs2SIntMap*      mpEncodingVector;
     mutable vcl::FontCapabilities   maFontCapabilities;
 
-    // TODO: get rid of the members below needed to work with the Win9x non-unicode API
-    BYTE*                   mpFontCharSets;     // all Charsets for the current font (used on W98 for kerning)
-    BYTE                    mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried
     BYTE                meWinCharSet;
     BYTE                mnPitchAndFamily;
     bool                    mbAliasSymbolsHigh;
@@ -171,8 +168,6 @@ private:
     RGNDATA*                mpClipRgnData;      // ClipRegion-Data
     RGNDATA*                mpStdClipRgnData;   // Cache Standard-ClipRegion-Data
     ImplFontAttrCache*      mpFontAttrCache;    // Cache font attributes from files in so/share/fonts
-    BYTE*                   mpFontCharSets;     // All Charsets for the current font
-    BYTE                    mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried
     bool                    mbFontKernInit;     // FALSE: FontKerns must be queried
     KERNINGPAIR*            mpFontKernPairs;    // Kerning Pairs of the current Font
     sal_uIntPtr                 mnFontKernPairCount;// Number of Kerning Pairs of the current Font
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index 0a33c77..e5735bd 100644
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -581,9 +581,7 @@ WinSalGraphics::WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hW
     mhDefFont(0),
     mhDefPal(0),
     mpStdClipRgnData(NULL),
-    mpFontCharSets(NULL),
     mpFontAttrCache(NULL),
-    mnFontCharSetCount(0),
     mpFontKernPairs(NULL),
     mnFontKernPairCount(0),
     mbFontKernInit(false),
@@ -617,8 +615,6 @@ WinSalGraphics::~WinSalGraphics()
     // delete cache data
     delete [] mpStdClipRgnData;
 
-    delete mpFontCharSets;
-
     delete mpFontKernPairs;
 }
 
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index f3933d9..ba3f5d7e 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1098,8 +1098,6 @@ ImplWinFontData::ImplWinFontData( const ImplDevFontAttributes& rDFS,
     mbFontCapabilitiesRead( false ),
     mpUnicodeMap( NULL ),
     mpEncodingVector( NULL ),
-    mpFontCharSets( NULL ),
-    mnFontCharSetCount( 0 ),
     meWinCharSet( eWinCharSet ),
     mnPitchAndFamily( nPitchAndFamily ),
     mbAliasSymbolsHigh( false ),
@@ -1135,8 +1133,6 @@ ImplWinFontData::ImplWinFontData( const ImplDevFontAttributes& rDFS,
 
 ImplWinFontData::~ImplWinFontData()
 {
-    delete[] mpFontCharSets;
-
     if( mpUnicodeMap )
         mpUnicodeMap = 0;
 #if ENABLE_GRAPHITE
@@ -1586,8 +1582,6 @@ sal_uInt16 WinSalGraphics::SetFont( FontSelectPattern* pFont, int nFallbackLevel
         mnFontKernPairCount = 0;
     }
 
-    mnFontCharSetCount = 0;
-
     // some printers have higher internal resolution, so their
     // text output would be different from what we calculated
     // => suggest DrawTextArray to workaround this problem
commit 24f357d0b2b4ef4c2c3a8a469d7c73cac8b20501
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Fri Nov 14 00:42:55 2014 +0100

    vcl: mpLogFont is never set.
    
    Change-Id: I2ea287da7448c5094eb13a3083c7c0f82ed25760

diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 5e4d32f..d26e0e6 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -170,7 +170,6 @@ private:
     COLORREF                mnTextColor;        // TextColor
     RGNDATA*                mpClipRgnData;      // ClipRegion-Data
     RGNDATA*                mpStdClipRgnData;   // Cache Standard-ClipRegion-Data
-    LOGFONTA*               mpLogFont;          // LOG-Font which is currently selected (only W9x)
     ImplFontAttrCache*      mpFontAttrCache;    // Cache font attributes from files in so/share/fonts
     BYTE*                   mpFontCharSets;     // All Charsets for the current font
     BYTE                    mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index 8f8f7ab..0a33c77 100644
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -581,7 +581,6 @@ WinSalGraphics::WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hW
     mhDefFont(0),
     mhDefPal(0),
     mpStdClipRgnData(NULL),
-    mpLogFont(NULL),
     mpFontCharSets(NULL),
     mpFontAttrCache(NULL),
     mnFontCharSetCount(0),
@@ -618,8 +617,6 @@ WinSalGraphics::~WinSalGraphics()
     // delete cache data
     delete [] mpStdClipRgnData;
 
-    delete mpLogFont;
-
     delete mpFontCharSets;
 
     delete mpFontKernPairs;
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 2bdc8e3..52fdfb6 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -2739,8 +2739,6 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
         }
 
         BYTE eCharSet = ANSI_CHARSET;
-        if( mpLogFont )
-            eCharSet = mpLogFont->lfCharSet;
 #if ENABLE_GRAPHITE
         if (rFontFace.SupportsGraphite())
             pWinLayout = new GraphiteWinLayout(getHDC(), rFontFace, rFontInstance, bUseOpenGL);


More information about the Libreoffice-commits mailing list