summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/print/genpspgraphics.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2017-12-14 18:42:57 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2017-12-15 11:13:22 +0100
commit8b700794b2746070814e9ff416ecd7bbb1c902e7 (patch)
tree33f7d4601405d518ebd476b69122d092c01d8219 /vcl/unx/generic/print/genpspgraphics.cxx
parent2ba36f21bad74cbbd68611afddaf9bbdc8ffda50 (diff)
Protect all LogicalFontInstance constructors
This way LogicalFontInstance can just be constructed by a PhysicalFontFace based factory. The patch also drops the wrong "Java logical font" comment added by commit 125cdf3404e60cf78f2a5547e9a06ce994df5c8e. Change-Id: Ibd5d7da0c3a65dbfa2c8ae6b05cf616d39b749f2 Reviewed-on: https://gerrit.libreoffice.org/46475 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/unx/generic/print/genpspgraphics.cxx')
-rw-r--r--vcl/unx/generic/print/genpspgraphics.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx
index 40004fac5bf0..7d52960f12b0 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -41,9 +41,9 @@
#include <config_cairo_canvas.h>
#include <fontsubset.hxx>
+#include <unx/freetype_glyphcache.hxx>
#include <unx/geninst.h>
#include <unx/genpspgraphics.h>
-#include <unx/glyphcache.hxx>
#include <unx/printergfx.hxx>
#include <impfont.hxx>
#include <langboost.hxx>
@@ -523,7 +523,7 @@ void GenPspGraphics::invert(long,long,long,long,SalInvert)
OSL_FAIL("Warning: PrinterGfx::Invert() not implemented");
}
-class ImplPspFontData : public PhysicalFontFace
+class ImplPspFontData : public FreetypeFontFace
{
private:
sal_IntPtr mnFontId;
@@ -532,20 +532,13 @@ public:
explicit ImplPspFontData( const psp::FastPrintFontInfo& );
virtual sal_IntPtr GetFontId() const override { return mnFontId; }
virtual PhysicalFontFace* Clone() const override { return new ImplPspFontData( *this ); }
- virtual LogicalFontInstance* CreateFontInstance( const FontSelectPattern& ) const override;
};
-ImplPspFontData::ImplPspFontData( const psp::FastPrintFontInfo& rInfo )
-: PhysicalFontFace( GenPspGraphics::Info2FontAttributes(rInfo) ),
+ImplPspFontData::ImplPspFontData(const psp::FastPrintFontInfo& rInfo)
+: FreetypeFontFace(nullptr, GenPspGraphics::Info2FontAttributes(rInfo)),
mnFontId( rInfo.m_nID )
{}
-LogicalFontInstance* ImplPspFontData::CreateFontInstance( const FontSelectPattern& rFSD ) const
-{
- FreetypeFontInstance* pEntry = new FreetypeFontInstance( rFSD );
- return pEntry;
-}
-
class PspCommonSalLayout : public CommonSalLayout
{
public: