summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2013-10-21 10:59:38 +0300
committerTor Lillqvist <tml@collabora.com>2013-10-21 11:18:45 +0300
commitfdeb14e4ee73ca1e1213f0dcde61600d9baac657 (patch)
tree533b6c2ac8cf117f28c33decfea5b60544615be9 /vcl
parent48bb54aa7eafa85c5b0a2574fb3fa167614ddcbc (diff)
Simplify further after the kerning pair changes
The ImplKernPairData struct was used now only by the VCL Windows code, and was apparently supposed to be identical to the Win32 KERNINGPAIR struct anyway. GetKernPairs() was called just once with zero and NULL parameters anyway, so it can be simplified. Change-Id: Iaa288868d1e590e0385377abc5b9d9d331d39d97
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/generic/glyphcache.hxx1
-rw-r--r--vcl/inc/outfont.hxx12
-rw-r--r--vcl/inc/salgdi.hxx1
-rw-r--r--vcl/inc/win/salgdi.h3
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx18
-rw-r--r--vcl/win/source/gdi/winlayout.cxx2
6 files changed, 4 insertions, 33 deletions
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
index 179c2b25c2fb..7e1acaff7e3b 100644
--- a/vcl/inc/generic/glyphcache.hxx
+++ b/vcl/inc/generic/glyphcache.hxx
@@ -29,7 +29,6 @@ class ServerFont;
class GlyphCachePeer;
class ServerFontLayoutEngine;
class ServerFontLayout;
-struct ImplKernPairData;
class ImplFontOptions;
#include <tools/gen.hxx>
diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx
index f88a88bcfc0d..6e3210bf3703 100644
--- a/vcl/inc/outfont.hxx
+++ b/vcl/inc/outfont.hxx
@@ -268,18 +268,6 @@ private:
mutable int mnFallbackCount;
};
-// --------------------
-// - ImplKernPairData -
-// --------------------
-
-struct ImplKernPairData
-{
- sal_uInt16 mnChar1;
- sal_uInt16 mnChar2;
- long mnKern;
-};
-
-
// -----------------------
// - ImplFontMetricData -
// -----------------------
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 442a5a9ad2de..d4a219d09005 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -35,7 +35,6 @@ class ImplDevFontList;
class SalBitmap;
class FontSelectPattern;
class ImplFontMetricData;
-struct ImplKernPairData;
class PhysicalFontFace;
class ImplFontCharMap;
class SalLayout;
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index ccbee184a3fb..b54c8765b213 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -270,8 +270,7 @@ private:
bool tryDrawBitmapGdiPlus(const SalTwoRect& rTR, const SalBitmap& rSrcBitmap);
// get kernign pairs of the current font
- // return only PairCount if (pKernPairs == NULL)
- sal_uLong GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs );
+ sal_uLong GetKernPairs();
public:
// public SalGraphics methods, the interface to the independent vcl part
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 9a4779a23bdf..a9efe50bf508 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1738,11 +1738,8 @@ void WinSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLe
// -----------------------------------------------------------------------
-sal_uLong WinSalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs )
+sal_uLong WinSalGraphics::GetKernPairs()
{
- DBG_ASSERT( sizeof( KERNINGPAIR ) == sizeof( ImplKernPairData ),
- "WinSalGraphics::GetKernPairs(): KERNINGPAIR != ImplKernPairData" );
-
if ( mbFontKernInit )
{
if( mpFontKernPairs )
@@ -1767,18 +1764,7 @@ sal_uLong WinSalGraphics::GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKer
std::sort( mpFontKernPairs, mpFontKernPairs + mnFontKernPairCount, ImplCmpKernData );
}
- if( !pKernPairs )
- return mnFontKernPairCount;
- else if( mpFontKernPairs )
- {
- if ( nPairs < mnFontKernPairCount )
- nPairs = mnFontKernPairCount;
- memcpy( pKernPairs, mpFontKernPairs,
- nPairs*sizeof( ImplKernPairData ) );
- return nPairs;
- }
-
- return 0;
+ return mnFontKernPairCount;
}
// -----------------------------------------------------------------------
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 78a2d2d3b588..f240f17e68a5 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -2928,7 +2928,7 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
{
// TODO: directly cache kerning info in the rFontInstance
// TODO: get rid of kerning methods+data in WinSalGraphics object
- GetKernPairs( 0, NULL );
+ GetKernPairs();
rFontInstance.SetKernData( mnFontKernPairCount, mpFontKernPairs );
}