summaryrefslogtreecommitdiff
path: root/vcl/win/source/gdi/salgdi.cxx
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-11-13 13:18:46 +0100
committerJan Holesovsky <kendy@collabora.com>2014-11-13 15:52:40 +0100
commit146e4f8bac3b76c33726219858aa0c823167a0a6 (patch)
tree2260b404fd56c01e58f278157cbc5795d4ecbc56 /vcl/win/source/gdi/salgdi.cxx
parentc17f215c613d9da9c0cd30d6597fefcfa37be76e (diff)
vcl: Abstract the Windows text rendering into a TextRenderImpl descendant.
Change-Id: I7ee9d7e705bb0344ba59c3edd10ed85390636cd4
Diffstat (limited to 'vcl/win/source/gdi/salgdi.cxx')
-rw-r--r--vcl/win/source/gdi/salgdi.cxx30
1 files changed, 6 insertions, 24 deletions
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index 6be65a2329c2..9ef479385ff9 100644
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -35,6 +35,7 @@
#include "salgdiimpl.hxx"
#include "gdiimpl.hxx"
#include "opengl/win/gdiimpl.hxx"
+#include <wintextrender.hxx>
#include <vcl/opengl/OpenGLHelper.hxx>
@@ -502,8 +503,6 @@ void WinSalGraphics::DeInitGraphics()
SelectPen( getHDC(), mhDefPen );
if ( mhDefBrush )
SelectBrush( getHDC(), mhDefBrush );
- if ( mhDefFont )
- SelectFont( getHDC(), mhDefFont );
}
HDC ImplGetCachedDC( sal_uLong nID, HBITMAP hBmp )
@@ -573,33 +572,22 @@ WinSalGraphics::WinSalGraphics(WinSalGraphics::Type eType, bool bScreen, HWND hW
mbWindow(eType == WinSalGraphics::WINDOW),
mhWnd(hWnd),
mbScreen(bScreen),
- mfCurrentFontScale(1.0),
mhRegion(0),
mhDefPen(0),
mhDefBrush(0),
- mhDefFont(0),
mhDefPal(0),
mpStdClipRgnData(NULL),
- mpLogFont(NULL),
- mpFontCharSets(NULL),
- mpFontAttrCache(NULL),
- mnFontCharSetCount(0),
- mpFontKernPairs(NULL),
- mnFontKernPairCount(0),
- mbFontKernInit(false),
mnPenWidth(GSL_PEN_WIDTH)
{
if (OpenGLHelper::isVCLOpenGLEnabled() && !mbPrinter)
+ {
mpImpl.reset(new WinOpenGLSalGraphicsImpl(*this));
+ mpTextRenderImpl.reset((new WinTextRender(mbPrinter, *this)));
+ }
else
- mpImpl.reset(new WinSalGraphicsImpl(*this));
-
- for( int i = 0; i < MAX_FALLBACK; ++i )
{
- mhFonts[ i ] = 0;
- mpWinFontData[ i ] = NULL;
- mpWinFontEntry[ i ] = NULL;
- mfFontScale[ i ] = 1.0;
+ mpImpl.reset(new WinSalGraphicsImpl(*this));
+ mpTextRenderImpl.reset((new WinTextRender(mbPrinter, *this)));
}
}
@@ -616,12 +604,6 @@ WinSalGraphics::~WinSalGraphics()
// delete cache data
delete [] mpStdClipRgnData;
-
- delete mpLogFont;
-
- delete mpFontCharSets;
-
- delete mpFontKernPairs;
}
bool WinSalGraphics::isPrinter() const