diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-19 12:31:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-19 12:33:34 +0000 |
commit | a33fcd1dbcb458002d6e52244bb4f7de41df2d30 (patch) | |
tree | 29361efdecae947e2670cfbc2031d66bc26b004d /vcl/unx | |
parent | 27d7aea00d22ad3fcdff2e7b267be1cf5c28d43c (diff) |
bPrinter is always false, simplify
Change-Id: If40d1ccdec77c1bf0753411da71ac5c0b42c2765
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 19 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/openglx11cairotextrender.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/openglx11cairotextrender.hxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salgdi.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/x11cairotextrender.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/x11cairotextrender.hxx | 2 |
6 files changed, 15 insertions, 21 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 12fce1d281c4..edc0c02c364a 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -40,9 +40,8 @@ #include <cairo-xlib.h> #include <cairo-xlib-xrender.h> -CairoTextRender::CairoTextRender(bool bPrinter): - mbPrinter(bPrinter), - mnTextColor(MAKE_SALCOLOR(0x00, 0x00, 0x00)) //black +CairoTextRender::CairoTextRender() + : mnTextColor(MAKE_SALCOLOR(0x00, 0x00, 0x00)) //black { for( int i = 0; i < MAX_FALLBACK; ++i ) mpServerFont[i] = NULL; @@ -89,13 +88,9 @@ bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev // register to use the font mpServerFont[ nFallbackLevel ] = pServerFont; - // apply font specific-hint settings if needed - // TODO: also disable it for reference devices - if( !mbPrinter ) - { - ImplServerFontEntry* pSFE = static_cast<ImplServerFontEntry*>( pEntry->mpFontEntry ); - pSFE->HandleFontOptions(); - } + // apply font specific-hint settings + ImplServerFontEntry* pSFE = static_cast<ImplServerFontEntry*>( pEntry->mpFontEntry ); + pSFE->HandleFontOptions(); return true; } @@ -370,9 +365,9 @@ bool CairoTextRender::GetFontCapabilities(vcl::FontCapabilities &rGetImplFontCap sal_uInt16 CairoTextRender::SetFont( FontSelectPattern *pEntry, int nFallbackLevel ) { sal_uInt16 nRetVal = 0; - if( !setFont( pEntry, nFallbackLevel ) ) + if (!setFont(pEntry, nFallbackLevel)) nRetVal |= SAL_SETFONT_BADFONT; - if( mbPrinter || (mpServerFont[ nFallbackLevel ] != NULL) ) + if (mpServerFont[nFallbackLevel]) nRetVal |= SAL_SETFONT_USEDRAWTEXTARRAY; return nRetVal; } diff --git a/vcl/unx/generic/gdi/openglx11cairotextrender.cxx b/vcl/unx/generic/gdi/openglx11cairotextrender.cxx index 64bf196ef54c..57cae498dd60 100644 --- a/vcl/unx/generic/gdi/openglx11cairotextrender.cxx +++ b/vcl/unx/generic/gdi/openglx11cairotextrender.cxx @@ -15,8 +15,8 @@ #include <cairo-svg.h> -OpenGLX11CairoTextRender::OpenGLX11CairoTextRender(bool bPrinter, X11SalGraphics& rParent): - X11CairoTextRender(bPrinter, rParent) +OpenGLX11CairoTextRender::OpenGLX11CairoTextRender(X11SalGraphics& rParent) + : X11CairoTextRender(rParent) { } diff --git a/vcl/unx/generic/gdi/openglx11cairotextrender.hxx b/vcl/unx/generic/gdi/openglx11cairotextrender.hxx index 171949651635..73360218bb7a 100644 --- a/vcl/unx/generic/gdi/openglx11cairotextrender.hxx +++ b/vcl/unx/generic/gdi/openglx11cairotextrender.hxx @@ -15,7 +15,7 @@ class OpenGLX11CairoTextRender : public X11CairoTextRender { public: - OpenGLX11CairoTextRender(bool bPrinter, X11SalGraphics& rParent); + OpenGLX11CairoTextRender(X11SalGraphics& rParent); virtual cairo_surface_t* getCairoSurface() SAL_OVERRIDE; virtual void getSurfaceOffset(double& nDX, double& nDY) SAL_OVERRIDE; diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 8bd40736e3ec..375a9dd1966a 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -86,11 +86,11 @@ X11SalGraphics::X11SalGraphics(): if (OpenGLHelper::isVCLOpenGLEnabled()) { mxImpl.reset(new X11OpenGLSalGraphicsImpl(*this)); - mxTextRenderImpl.reset((new OpenGLX11CairoTextRender(false, *this))); + mxTextRenderImpl.reset((new OpenGLX11CairoTextRender(*this))); } else { - mxTextRenderImpl.reset((new X11CairoTextRender(false, *this))); + mxTextRenderImpl.reset((new X11CairoTextRender(*this))); mxImpl.reset(new X11SalGraphicsImpl(*this)); } diff --git a/vcl/unx/generic/gdi/x11cairotextrender.cxx b/vcl/unx/generic/gdi/x11cairotextrender.cxx index f3aa47d07800..30549bae07ea 100644 --- a/vcl/unx/generic/gdi/x11cairotextrender.cxx +++ b/vcl/unx/generic/gdi/x11cairotextrender.cxx @@ -42,9 +42,8 @@ struct _XRegion BOX extents; }; -X11CairoTextRender::X11CairoTextRender(bool bPrinter, X11SalGraphics& rParent): - CairoTextRender(bPrinter), - mrParent(rParent) +X11CairoTextRender::X11CairoTextRender(X11SalGraphics& rParent) + : mrParent(rParent) { } diff --git a/vcl/unx/generic/gdi/x11cairotextrender.hxx b/vcl/unx/generic/gdi/x11cairotextrender.hxx index 1449b3aa0dc5..28470c3933a2 100644 --- a/vcl/unx/generic/gdi/x11cairotextrender.hxx +++ b/vcl/unx/generic/gdi/x11cairotextrender.hxx @@ -37,7 +37,7 @@ protected: size_t GetHeight() const; public: - X11CairoTextRender(bool bPrinter, X11SalGraphics& rParent); + X11CairoTextRender(X11SalGraphics& rParent); virtual GlyphCache& getPlatformGlyphCache() SAL_OVERRIDE; virtual cairo_surface_t* getCairoSurface() SAL_OVERRIDE; |