diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/Library_vcl.mk | 1 | ||||
-rw-r--r-- | vcl/generic/glyphs/gcach_ftyp.hxx | 1 | ||||
-rw-r--r-- | vcl/generic/print/genpspgraphics.cxx | 40 | ||||
-rw-r--r-- | vcl/headless/svptext.cxx | 25 | ||||
-rw-r--r-- | vcl/inc/PhysicalFontFace.hxx | 87 | ||||
-rw-r--r-- | vcl/inc/generic/genpspgraphics.h | 107 | ||||
-rw-r--r-- | vcl/inc/graphite_layout.hxx | 5 | ||||
-rw-r--r-- | vcl/inc/graphite_serverfont.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/outdev.h | 4 | ||||
-rw-r--r-- | vcl/inc/outfont.hxx | 46 | ||||
-rw-r--r-- | vcl/inc/quartz/salgdi.h | 1 | ||||
-rw-r--r-- | vcl/inc/unx/salgdi.h | 1 | ||||
-rw-r--r-- | vcl/inc/win/salgdi.h | 11 | ||||
-rw-r--r-- | vcl/source/font/PhysicalFontFace.cxx | 231 | ||||
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 211 | ||||
-rw-r--r-- | vcl/source/gdi/pdffontcache.cxx | 9 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 67 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.hxx | 41 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salgdi3.cxx | 51 | ||||
-rw-r--r-- | vcl/win/source/gdi/salgdi3.cxx | 46 |
20 files changed, 523 insertions, 464 deletions
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index f5dedd791742..80c6405964dd 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -183,6 +183,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/filter/wmf/winwmf \ vcl/source/filter/wmf/wmf \ vcl/source/filter/wmf/wmfwr \ + vcl/source/font/PhysicalFontFace \ vcl/source/fontsubset/cff \ vcl/source/fontsubset/fontsubset \ vcl/source/fontsubset/gsub \ diff --git a/vcl/generic/glyphs/gcach_ftyp.hxx b/vcl/generic/glyphs/gcach_ftyp.hxx index 6da2ce3b88d8..a0915ea72bdd 100644 --- a/vcl/generic/glyphs/gcach_ftyp.hxx +++ b/vcl/generic/glyphs/gcach_ftyp.hxx @@ -21,6 +21,7 @@ #define INCLUDED_VCL_GENERIC_GLYPHS_GCACH_FTYP_HXX #include "generic/glyphcache.hxx" +#include "PhysicalFontFace.hxx" #include <config_graphite.h> #if ENABLE_GRAPHITE diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx index a0ba001d1273..515dc0eee675 100644 --- a/vcl/generic/print/genpspgraphics.cxx +++ b/vcl/generic/print/genpspgraphics.cxx @@ -17,34 +17,37 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/types.h> + // for mmap etc. #if defined( UNX ) -# include <stdlib.h> -# include <unistd.h> -# include <fcntl.h> -# include <sys/mman.h> -# include <sys/stat.h> -# include <sys/types.h> +#include <unistd.h> +#include <fcntl.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <sys/types.h> #endif +#include <comphelper/string.hxx> +#include <i18nlangtag/mslangid.hxx> +#include <vcl/bmpacc.hxx> +#include <vcl/jobdata.hxx> +#include <vcl/printerinfomanager.hxx> +#include <vcl/settings.hxx> +#include <vcl/svapp.hxx> +#include <vcl/sysdata.hxx> + +#include "fontsubset.hxx" #include "generic/geninst.h" #include "generic/genpspgraphics.h" #include "generic/glyphcache.hxx" - -#include "vcl/jobdata.hxx" -#include "vcl/printerinfomanager.hxx" -#include "vcl/bmpacc.hxx" -#include "vcl/svapp.hxx" -#include "vcl/sysdata.hxx" -#include "vcl/settings.hxx" - #include "generic/printergfx.hxx" -#include "salbmp.hxx" #include "impfont.hxx" +#include "langboost.hxx" #include "outfont.hxx" -#include "fontsubset.hxx" +#include "PhysicalFontFace.hxx" +#include "salbmp.hxx" #include "salprn.hxx" -#include "langboost.hxx" #include <config_graphite.h> #if ENABLE_GRAPHITE @@ -52,9 +55,6 @@ #include <graphite_serverfont.hxx> #endif -#include <comphelper/string.hxx> -#include <i18nlangtag/mslangid.hxx> - using namespace psp; diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx index f04822974a5e..7fd3cd30e587 100644 --- a/vcl/headless/svptext.cxx +++ b/vcl/headless/svptext.cxx @@ -17,40 +17,37 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "sal/config.h" +#include <sal/types.h> #include <cassert> +#include <basebmp/scanlineformats.hxx> +#include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/range/b2drange.hxx> #include <basegfx/range/b2ibox.hxx> -#include <basegfx/polygon/b2dpolypolygon.hxx> - -#include <basebmp/scanlineformats.hxx> - -#include <tools/debug.hxx> - -#include <outfont.hxx> -#include <impfont.hxx> #include <rtl/instance.hxx> +#include <tools/debug.hxx> +#include <vcl/sysdata.hxx> -#include "vcl/sysdata.hxx" #include "generic/geninst.h" #include "generic/genpspgraphics.h" #include "generic/glyphcache.hxx" -#include "headless/svpgdi.hxx" #include "headless/svpbmp.hxx" +#include "headless/svpgdi.hxx" +#include "impfont.hxx" +#include "outfont.hxx" +#include "PhysicalFontFace.hxx" using namespace basegfx; using namespace basebmp; -class SvpGlyphPeer -: public GlyphCachePeer +class SvpGlyphPeer : public GlyphCachePeer { public: SvpGlyphPeer() {} BitmapDeviceSharedPtr GetGlyphBmp( ServerFont&, sal_GlyphId, - basebmp::Format nBmpFormat, B2IPoint& rTargetPos ); + basebmp::Format nBmpFormat, B2IPoint& rTargetPos ); protected: virtual void RemovingFont( ServerFont& ); diff --git a/vcl/inc/PhysicalFontFace.hxx b/vcl/inc/PhysicalFontFace.hxx new file mode 100644 index 000000000000..f457bcd5c7f4 --- /dev/null +++ b/vcl/inc/PhysicalFontFace.hxx @@ -0,0 +1,87 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#pragma once + +#include <vcl/dllapi.h> + +#include "outfont.hxx" + +class ImplFontEntry; +struct FontMatchStatus; +class FontSelectPattern; +class PhysicalFontFamily; + + +struct FontMatchStatus +{ +public: + int mnFaceMatch; + int mnHeightMatch; + int mnWidthMatch; + const OUString* mpTargetStyleName; +}; + +// - PhysicalFontFace - + +// TODO: no more direct access to members +// TODO: add reference counting +// TODO: get rid of height/width for scalable fonts +// TODO: make cloning cheaper + +// abstract base class for physical font faces +class VCL_PLUGIN_PUBLIC PhysicalFontFace : public ImplDevFontAttributes +{ +public: + // by using an PhysicalFontFace object as a factory for its corresponding + // ImplFontEntry an ImplFontEntry can be extended to cache device and + // font instance specific data + virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const = 0; + + virtual int GetHeight() const { return mnHeight; } + virtual int GetWidth() const { return mnWidth; } + virtual sal_IntPtr GetFontId() const = 0; + int GetFontMagic() const { return mnMagic; } + bool IsScalable() const { return (mnHeight == 0); } + bool CheckMagic( int n ) const { return (n == mnMagic); } + PhysicalFontFace* GetNextFace() const { return mpNext; } + PhysicalFontFace* CreateAlias() const { return Clone(); } + + bool IsBetterMatch( const FontSelectPattern&, FontMatchStatus& ) const; + sal_Int32 CompareWithSize( const PhysicalFontFace& ) const; + sal_Int32 CompareIgnoreSize( const PhysicalFontFace& ) const; + virtual ~PhysicalFontFace() {} + virtual PhysicalFontFace* Clone() const = 0; + +protected: + explicit PhysicalFontFace( const ImplDevFontAttributes&, int nMagic ); + void SetBitmapSize( int nW, int nH ) { mnWidth=nW; mnHeight=nH; } + + long mnWidth; // Width (in pixels) + long mnHeight; // Height (in pixels) + +private: +friend class PhysicalFontFamily; + const int mnMagic; // poor man's RTTI + PhysicalFontFace* mpNext; +}; + + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ + diff --git a/vcl/inc/generic/genpspgraphics.h b/vcl/inc/generic/genpspgraphics.h index 132b1414c9e8..ea7d381545fc 100644 --- a/vcl/inc/generic/genpspgraphics.h +++ b/vcl/inc/generic/genpspgraphics.h @@ -21,12 +21,14 @@ #define INCLUDED_VCL_INC_GENERIC_GENPSPGRAPHICS_H -#include "fontmanager.hxx" +#include <vcl/vclenum.hxx> -#include "vclpluginapi.h" +#include "fontmanager.hxx" #include "salgdi.hxx" -#include "vcl/vclenum.hxx" -#include <sallayout.hxx> +#include "sallayout.hxx" +#include "vclpluginapi.h" + +class PhysicalFontFace; namespace psp { struct JobData; class PrinterGfx; } @@ -37,18 +39,18 @@ class SalInfoPrinter; class VCL_DLLPUBLIC GenPspGraphics : public SalGraphics { protected: - psp::JobData* m_pJobData; - psp::PrinterGfx* m_pPrinterGfx; + psp::JobData* m_pJobData; + psp::PrinterGfx* m_pPrinterGfx; - ServerFont* m_pServerFont[ MAX_FALLBACK ]; - bool m_bFontVertical; - SalInfoPrinter* m_pInfoPrinter; + ServerFont* m_pServerFont[ MAX_FALLBACK ]; + bool m_bFontVertical; + SalInfoPrinter* m_pInfoPrinter; public: - GenPspGraphics(); - virtual ~GenPspGraphics(); + GenPspGraphics(); + virtual ~GenPspGraphics(); - void Init( psp::JobData* pJob, psp::PrinterGfx* pGfx, - SalInfoPrinter* pInfoPrinter ); + void Init( psp::JobData* pJob, psp::PrinterGfx* pGfx, + SalInfoPrinter* pInfoPrinter ); // helper methods static const void * DoGetEmbedFontData ( psp::fontID aFont, const sal_Ucs* pUnicodes, @@ -57,18 +59,20 @@ public: static void DoFreeEmbedFontData( const void* pData, long nLen ); // helper methods for sharing with X11SalGraphics - static const Ucs2SIntMap* DoGetFontEncodingVector( psp::fontID aFont, const Ucs2OStrMap** pNonEncoded ); - static void DoGetGlyphWidths( psp::fontID aFont, - bool bVertical, - Int32Vector& rWidths, - Ucs2UIntMap& rUnicodeEnc ); + static const Ucs2SIntMap* DoGetFontEncodingVector( psp::fontID aFont, + const Ucs2OStrMap** pNonEncoded ); + static void DoGetGlyphWidths( psp::fontID aFont, + bool bVertical, + Int32Vector& rWidths, + Ucs2UIntMap& rUnicodeEnc ); static ImplDevFontAttributes Info2DevFontAttributes( const psp::FastPrintFontInfo& ); - static void AnnounceFonts( PhysicalFontCollection*, const psp::FastPrintFontInfo& ); + static void AnnounceFonts( PhysicalFontCollection*, + const psp::FastPrintFontInfo& ); // overload all pure virtual methods virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ); - virtual sal_uInt16 GetBitCount() const; + virtual sal_uInt16 GetBitCount() const; virtual long GetGraphicsWidth() const; virtual void ResetClipRegion(); @@ -83,14 +87,16 @@ public: virtual void SetROPFillColor( SalROPColor nROPColor ); virtual void SetTextColor( SalColor nSalColor ); - virtual sal_uInt16 SetFont( FontSelectPattern*, int nFallbackLevel ); + virtual sal_uInt16 SetFont( FontSelectPattern*, int nFallbackLevel ); virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ); virtual const ImplFontCharMap* GetImplFontCharMap() const; - virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const; + virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const; virtual void GetDevFontList( PhysicalFontCollection* ); // graphics must drop any cached font info - virtual void ClearDevFontCache(); - virtual bool AddTempDevFont( PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ); + virtual void ClearDevFontCache(); + virtual bool AddTempDevFont( PhysicalFontCollection*, + const OUString& rFileURL, + const OUString& rFontName ); virtual bool CreateFontSubset( const OUString& rToFile, const PhysicalFontFace*, @@ -98,9 +104,9 @@ public: sal_uInt8* pEncoding, sal_Int32* pWidths, int nGlyphs, - FontSubsetInfo& rInfo - ); - virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded ); + FontSubsetInfo& rInfo ); + virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, + const Ucs2OStrMap** ppNonEncoded ); virtual const void* GetEmbedFontData( const PhysicalFontFace*, const sal_Ucs* pUnicodes, sal_Int32* pWidths, @@ -112,7 +118,7 @@ public: Int32Vector& rWidths, Ucs2UIntMap& rUnicodeEnc ); virtual bool GetGlyphBoundRect( sal_GlyphId, Rectangle& ); - virtual bool GetGlyphOutline( sal_GlyphId, ::basegfx::B2DPolyPolygon& ); + virtual bool GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& ); virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ); virtual void DrawServerFontLayout( const ServerFontLayout& ); virtual bool supportsOperation( OutDevSupportType ) const; @@ -125,20 +131,20 @@ public: virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ); - virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency ); - virtual bool drawPolyLine( - const basegfx::B2DPolygon&, - double fTransparency, - const basegfx::B2DVector& rLineWidths, - basegfx::B2DLineJoin, - com::sun::star::drawing::LineCap); - virtual bool drawPolyLineBezier( sal_uInt32 nPoints, + virtual bool drawPolyPolygon( const basegfx::B2DPolyPolygon&, + double fTransparency ); + virtual bool drawPolyLine( const basegfx::B2DPolygon&, + double fTransparency, + const basegfx::B2DVector& rLineWidths, + basegfx::B2DLineJoin, + css::drawing::LineCap); + virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ); - virtual bool drawPolygonBezier( sal_uInt32 nPoints, + virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ); - virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, + virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry ); @@ -164,23 +170,26 @@ public: SalColor nMaskColor ); virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight ); virtual SalColor getPixel( long nX, long nY ); - virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ); - virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ); + virtual void invert( long nX, long nY, long nWidth, long nHeight, + SalInvert nFlags ); + virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, + SalInvert nFlags ); - virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize ); + virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight, + void* pPtr, sal_uIntPtr nSize ); virtual bool drawAlphaBitmap( const SalTwoRect&, const SalBitmap& rSourceBitmap, const SalBitmap& rAlphaBitmap ); - virtual bool drawTransformedBitmap( - const basegfx::B2DPoint& rNull, - const basegfx::B2DPoint& rX, - const basegfx::B2DPoint& rY, - const SalBitmap& rSourceBitmap, - const SalBitmap* pAlphaBitmap); - virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency ); + virtual bool drawTransformedBitmap( const basegfx::B2DPoint& rNull, + const basegfx::B2DPoint& rX, + const basegfx::B2DPoint& rY, + const SalBitmap& rSourceBitmap, + const SalBitmap* pAlphaBitmap); + virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, + sal_uInt8 nTransparency ); virtual SystemGraphicsData GetGraphicsData() const; - virtual SystemFontData GetSysFontData( int nFallbacklevel ) const; + virtual SystemFontData GetSysFontData( int nFallbacklevel ) const; }; #endif // INCLUDED_VCL_INC_GENERIC_GENPSPGRAPHICS_H diff --git a/vcl/inc/graphite_layout.hxx b/vcl/inc/graphite_layout.hxx index 2d037c498dec..fc6dca1c5d57 100644 --- a/vcl/inc/graphite_layout.hxx +++ b/vcl/inc/graphite_layout.hxx @@ -35,13 +35,16 @@ #include <graphite2/Font.h> #include <graphite2/Segment.h> // Platform -#include <sallayout.hxx> #include <vcl/dllapi.h> + +#include "sallayout.hxx" + // Module // Module type definitions and forward declarations. // SAL/VCL types class ServerFont; +class PhysicalFontFace; // Graphite types namespace grutils { class GrFeatureParser; } diff --git a/vcl/inc/graphite_serverfont.hxx b/vcl/inc/graphite_serverfont.hxx index 3a783bd75474..9f22e4fcdf04 100644 --- a/vcl/inc/graphite_serverfont.hxx +++ b/vcl/inc/graphite_serverfont.hxx @@ -26,6 +26,8 @@ #ifndef _MSC_VER #include <graphite_layout.hxx> +class PhysicalFontFace; + // Modules class VCL_PLUGIN_PUBLIC GraphiteLayoutImpl : public GraphiteLayout diff --git a/vcl/inc/outdev.h b/vcl/inc/outdev.h index 383bb71a7ca5..9baba35dc988 100644 --- a/vcl/inc/outdev.h +++ b/vcl/inc/outdev.h @@ -21,10 +21,12 @@ #define INCLUDED_VCL_INC_OUTDEV_H #include <list> -#include <outfont.hxx> #include <set> #include <vector> +#include "outfont.hxx" +#include "PhysicalFontFace.hxx" + class Size; class Font; class VirtualDevice; diff --git a/vcl/inc/outfont.hxx b/vcl/inc/outfont.hxx index 2afa7a2275b7..12adb7cc7837 100644 --- a/vcl/inc/outfont.hxx +++ b/vcl/inc/outfont.hxx @@ -30,6 +30,7 @@ #include <boost/unordered_map.hpp> +class PhysicalFontFace; class PhysicalFontFamily; class ImplGetDevFontList; class ImplGetDevSizeList; @@ -110,51 +111,6 @@ public: // TODO: hide members behind accessor methods bool mbEmbeddable; // true: the font can be embedded }; - -// - PhysicalFontFace - - -// TODO: no more direct access to members -// TODO: add reference counting -// TODO: get rid of height/width for scalable fonts -// TODO: make cloning cheaper - -// abstract base class for physical font faces -class VCL_PLUGIN_PUBLIC PhysicalFontFace : public ImplDevFontAttributes -{ -public: - // by using an PhysicalFontFace object as a factory for its corresponding - // ImplFontEntry an ImplFontEntry can be extended to cache device and - // font instance specific data - virtual ImplFontEntry* CreateFontInstance( FontSelectPattern& ) const = 0; - - virtual int GetHeight() const { return mnHeight; } - virtual int GetWidth() const { return mnWidth; } - virtual sal_IntPtr GetFontId() const = 0; - int GetFontMagic() const { return mnMagic; } - bool IsScalable() const { return (mnHeight == 0); } - bool CheckMagic( int n ) const { return (n == mnMagic); } - PhysicalFontFace* GetNextFace() const { return mpNext; } - PhysicalFontFace* CreateAlias() const { return Clone(); } - - bool IsBetterMatch( const FontSelectPattern&, FontMatchStatus& ) const; - sal_Int32 CompareWithSize( const PhysicalFontFace& ) const; - sal_Int32 CompareIgnoreSize( const PhysicalFontFace& ) const; - virtual ~PhysicalFontFace() {} - virtual PhysicalFontFace* Clone() const = 0; - -protected: - explicit PhysicalFontFace( const ImplDevFontAttributes&, int nMagic ); - void SetBitmapSize( int nW, int nH ) { mnWidth=nW; mnHeight=nH; } - - long mnWidth; // Width (in pixels) - long mnHeight; // Height (in pixels) - -private: -friend class PhysicalFontFamily; - const int mnMagic; // poor man's RTTI - PhysicalFontFace* mpNext; -}; - class FontSelectPatternAttributes : public ImplFontAttributes { public: diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 5fb10ce6bf1e..cf611fe1fb9f 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -47,6 +47,7 @@ extern "C" { #include <vcl/fontcapabilities.hxx> #include "outfont.hxx" +#include "PhysicalFontFace.hxx" #include "salgdi.hxx" #include "quartz/salgdicommon.hxx" diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index 561fdd756204..da91204b6b2a 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -46,6 +46,7 @@ class PspSalInfoPrinter; class ServerFont; class ImplLayoutArgs; class ServerFontLayout; +class PhysicalFontFace; namespace basegfx { class B2DTrapezoid; diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index bc76b3242d2d..c649cc3cc9ab 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -20,13 +20,14 @@ #ifndef INCLUDED_VCL_INC_WIN_SALGDI_H #define INCLUDED_VCL_INC_WIN_SALGDI_H -#include <sallayout.hxx> -#include <salgdi.hxx> -#include <outfont.hxx> -#include <impfont.hxx> +#include "sallayout.hxx" +#include "salgdi.hxx" +#include "outfont.hxx" +#include "PhysicalFontFace.hxx" +#include "impfont.hxx" #include <vcl/fontcapabilities.hxx> -#include "boost/scoped_ptr.hpp" +#include <boost/scoped_ptr.hpp> #include <boost/unordered_set.hpp> #include <config_graphite.h> diff --git a/vcl/source/font/PhysicalFontFace.cxx b/vcl/source/font/PhysicalFontFace.cxx new file mode 100644 index 000000000000..c454d3d09970 --- /dev/null +++ b/vcl/source/font/PhysicalFontFace.cxx @@ -0,0 +1,231 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#include <sal/types.h> + +#include <tools/fontenum.hxx> + +#include "outfont.hxx" + +#include "PhysicalFontFace.hxx" + + +PhysicalFontFace::PhysicalFontFace( const ImplDevFontAttributes& rDFA, int nMagic ) + : ImplDevFontAttributes( rDFA ) + , mnWidth(0) + , mnHeight(0) + , mnMagic( nMagic ) + , mpNext( NULL ) +{ + // StarSymbol is a unicode font, but it still deserves the symbol flag + if( !IsSymbolFont() ) + if ( IsStarSymbol( GetFamilyName() ) ) + SetSymbolFlag( true ); +} + +sal_Int32 PhysicalFontFace::CompareIgnoreSize( const PhysicalFontFace& rOther ) const +{ + // compare their width, weight, italic, style name and family name + if( GetWidthType() < rOther.GetWidthType() ) + return -1; + else if( GetWidthType() > rOther.GetWidthType() ) + return 1; + + if( GetWeight() < rOther.GetWeight() ) + return -1; + else if( GetWeight() > rOther.GetWeight() ) + return 1; + + if( GetSlant() < rOther.GetSlant() ) + return -1; + else if( GetSlant() > rOther.GetSlant() ) + return 1; + + sal_Int32 nRet = GetFamilyName().compareTo( rOther.GetFamilyName() ); + + if (nRet == 0) + { + nRet = GetStyleName().compareTo( rOther.GetStyleName() ); + } + + return nRet; +} + +sal_Int32 PhysicalFontFace::CompareWithSize( const PhysicalFontFace& rOther ) const +{ + sal_Int32 nCompare = CompareIgnoreSize( rOther ); + if (nCompare != 0) + return nCompare; + + if( mnHeight < rOther.mnHeight ) + return -1; + else if( mnHeight > rOther.mnHeight ) + return 1; + + if( mnWidth < rOther.mnWidth ) + return -1; + else if( mnWidth > rOther.mnWidth ) + return 1; + + return 0; +} + +bool PhysicalFontFace::IsBetterMatch( const FontSelectPattern& rFSD, FontMatchStatus& rStatus ) const +{ + int nMatch = 0; + + const OUString& rFontName = rFSD.maTargetName; + if( rFontName.equalsIgnoreAsciiCase( GetFamilyName() ) ) + nMatch += 240000; + + if( rStatus.mpTargetStyleName + && GetStyleName().equalsIgnoreAsciiCase( *rStatus.mpTargetStyleName ) ) + nMatch += 120000; + + if( (rFSD.GetPitch() != PITCH_DONTKNOW) && (rFSD.GetPitch() == GetPitch()) ) + nMatch += 20000; + + // prefer NORMAL font width + // TODO: change when the upper layers can tell their width preference + if( GetWidthType() == WIDTH_NORMAL ) + nMatch += 400; + else if( (GetWidthType() == WIDTH_SEMI_EXPANDED) || (GetWidthType() == WIDTH_SEMI_CONDENSED) ) + nMatch += 300; + + if( rFSD.GetWeight() != WEIGHT_DONTKNOW ) + { + // if not bold or requiring emboldening prefer light fonts to bold fonts + FontWeight ePatternWeight = rFSD.mbEmbolden ? WEIGHT_NORMAL : rFSD.GetWeight(); + + int nReqWeight = (int)ePatternWeight; + if ( ePatternWeight > WEIGHT_MEDIUM ) + nReqWeight += 100; + + int nGivenWeight = (int)GetWeight(); + if( GetWeight() > WEIGHT_MEDIUM ) + nGivenWeight += 100; + + int nWeightDiff = nReqWeight - nGivenWeight; + + if ( nWeightDiff == 0 ) + nMatch += 1000; + else if ( nWeightDiff == +1 || nWeightDiff == -1 ) + nMatch += 700; + else if ( nWeightDiff < +50 && nWeightDiff > -50) + nMatch += 200; + } + else // requested weight == WEIGHT_DONTKNOW + { + // prefer NORMAL font weight + // TODO: change when the upper layers can tell their weight preference + if( GetWeight() == WEIGHT_NORMAL ) + nMatch += 450; + else if( GetWeight() == WEIGHT_MEDIUM ) + nMatch += 350; + else if( (GetWeight() == WEIGHT_SEMILIGHT) || (GetWeight() == WEIGHT_SEMIBOLD) ) + nMatch += 200; + else if( GetWeight() == WEIGHT_LIGHT ) + nMatch += 150; + } + + // if requiring custom matrix to fake italic, prefer upright font + FontItalic ePatternItalic = rFSD.maItalicMatrix != ItalicMatrix() ? ITALIC_NONE : rFSD.GetSlant(); + + if ( ePatternItalic == ITALIC_NONE ) + { + if( GetSlant() == ITALIC_NONE ) + nMatch += 900; + } + else + { + if( ePatternItalic == GetSlant() ) + nMatch += 900; + else if( GetSlant() != ITALIC_NONE ) + nMatch += 600; + } + + if( mbDevice ) + nMatch += 1; + + int nHeightMatch = 0; + int nWidthMatch = 0; + + if( IsScalable() ) + { + if( rFSD.mnOrientation != 0 ) + nMatch += 80; + else if( rFSD.mnWidth != 0 ) + nMatch += 25; + else + nMatch += 5; + } + else + { + if( rFSD.mnHeight == mnHeight ) + { + nMatch += 20; + if( rFSD.mnWidth == mnWidth ) + nMatch += 10; + } + else + { + // for non-scalable fonts the size difference is very important + // prefer the smaller font face because of clipping/overlapping issues + int nHeightDiff = (rFSD.mnHeight - mnHeight) * 1000; + nHeightMatch = (nHeightDiff >= 0) ? -nHeightDiff : 100+nHeightDiff; + if( rFSD.mnHeight ) + nHeightMatch /= rFSD.mnHeight; + + if( (rFSD.mnWidth != 0) && (mnWidth != 0) && (rFSD.mnWidth != mnWidth) ) + { + int nWidthDiff = (rFSD.mnWidth - mnWidth) * 100; + nWidthMatch = (nWidthDiff >= 0) ? -nWidthDiff : +nWidthDiff; + } + } + } + + if( rStatus.mnFaceMatch > nMatch ) + return false; + else if( rStatus.mnFaceMatch < nMatch ) + { + rStatus.mnFaceMatch = nMatch; + rStatus.mnHeightMatch = nHeightMatch; + rStatus.mnWidthMatch = nWidthMatch; + return true; + } + + // when two fonts are still competing prefer the + // one with the best matching height + if( rStatus.mnHeightMatch > nHeightMatch ) + return false; + else if( rStatus.mnHeightMatch < nHeightMatch ) + { + rStatus.mnHeightMatch = nHeightMatch; + rStatus.mnWidthMatch = nWidthMatch; + return true; + } + + if( rStatus.mnWidthMatch > nWidthMatch ) + return false; + + rStatus.mnWidthMatch = nWidthMatch; + return true; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index e624d0bf1e1c..8dd4b9206302 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -699,217 +699,6 @@ static void ImplCalcType( sal_uLong& rType, FontWeight& rWeight, FontWidth& rWid } } -PhysicalFontFace::PhysicalFontFace( const ImplDevFontAttributes& rDFA, int nMagic ) -: ImplDevFontAttributes( rDFA ), - mnWidth(0), - mnHeight(0), - mnMagic( nMagic ), - mpNext( NULL ) -{ - // StarSymbol is a unicode font, but it still deserves the symbol flag - if( !IsSymbolFont() ) - if ( IsStarSymbol( GetFamilyName() ) ) - SetSymbolFlag( true ); -} - -sal_Int32 PhysicalFontFace::CompareIgnoreSize( const PhysicalFontFace& rOther ) const -{ - // compare their width, weight, italic, style name and family name - if( GetWidthType() < rOther.GetWidthType() ) - return -1; - else if( GetWidthType() > rOther.GetWidthType() ) - return 1; - - if( GetWeight() < rOther.GetWeight() ) - return -1; - else if( GetWeight() > rOther.GetWeight() ) - return 1; - - if( GetSlant() < rOther.GetSlant() ) - return -1; - else if( GetSlant() > rOther.GetSlant() ) - return 1; - - sal_Int32 nRet = GetFamilyName().compareTo( rOther.GetFamilyName() ); - - if (nRet == 0) - { - nRet = GetStyleName().compareTo( rOther.GetStyleName() ); - } - - return nRet; -} - -sal_Int32 PhysicalFontFace::CompareWithSize( const PhysicalFontFace& rOther ) const -{ - sal_Int32 nCompare = CompareIgnoreSize( rOther ); - if (nCompare != 0) - return nCompare; - - if( mnHeight < rOther.mnHeight ) - return -1; - else if( mnHeight > rOther.mnHeight ) - return 1; - - if( mnWidth < rOther.mnWidth ) - return -1; - else if( mnWidth > rOther.mnWidth ) - return 1; - - return 0; -} - -struct FontMatchStatus -{ -public: - int mnFaceMatch; - int mnHeightMatch; - int mnWidthMatch; - const OUString* mpTargetStyleName; -}; - -bool PhysicalFontFace::IsBetterMatch( const FontSelectPattern& rFSD, FontMatchStatus& rStatus ) const -{ - int nMatch = 0; - - const OUString& rFontName = rFSD.maTargetName; - if( rFontName.equalsIgnoreAsciiCase( GetFamilyName() ) ) - nMatch += 240000; - - if( rStatus.mpTargetStyleName - && GetStyleName().equalsIgnoreAsciiCase( *rStatus.mpTargetStyleName ) ) - nMatch += 120000; - - if( (rFSD.GetPitch() != PITCH_DONTKNOW) && (rFSD.GetPitch() == GetPitch()) ) - nMatch += 20000; - - // prefer NORMAL font width - // TODO: change when the upper layers can tell their width preference - if( GetWidthType() == WIDTH_NORMAL ) - nMatch += 400; - else if( (GetWidthType() == WIDTH_SEMI_EXPANDED) || (GetWidthType() == WIDTH_SEMI_CONDENSED) ) - nMatch += 300; - - if( rFSD.GetWeight() != WEIGHT_DONTKNOW ) - { - // if not bold or requiring emboldening prefer light fonts to bold fonts - FontWeight ePatternWeight = rFSD.mbEmbolden ? WEIGHT_NORMAL : rFSD.GetWeight(); - - int nReqWeight = (int)ePatternWeight; - if ( ePatternWeight > WEIGHT_MEDIUM ) - nReqWeight += 100; - - int nGivenWeight = (int)GetWeight(); - if( GetWeight() > WEIGHT_MEDIUM ) - nGivenWeight += 100; - - int nWeightDiff = nReqWeight - nGivenWeight; - - if ( nWeightDiff == 0 ) - nMatch += 1000; - else if ( nWeightDiff == +1 || nWeightDiff == -1 ) - nMatch += 700; - else if ( nWeightDiff < +50 && nWeightDiff > -50) - nMatch += 200; - } - else // requested weight == WEIGHT_DONTKNOW - { - // prefer NORMAL font weight - // TODO: change when the upper layers can tell their weight preference - if( GetWeight() == WEIGHT_NORMAL ) - nMatch += 450; - else if( GetWeight() == WEIGHT_MEDIUM ) - nMatch += 350; - else if( (GetWeight() == WEIGHT_SEMILIGHT) || (GetWeight() == WEIGHT_SEMIBOLD) ) - nMatch += 200; - else if( GetWeight() == WEIGHT_LIGHT ) - nMatch += 150; - } - - // if requiring custom matrix to fake italic, prefer upright font - FontItalic ePatternItalic = rFSD.maItalicMatrix != ItalicMatrix() ? ITALIC_NONE : rFSD.GetSlant(); - - if ( ePatternItalic == ITALIC_NONE ) - { - if( GetSlant() == ITALIC_NONE ) - nMatch += 900; - } - else - { - if( ePatternItalic == GetSlant() ) - nMatch += 900; - else if( GetSlant() != ITALIC_NONE ) - nMatch += 600; - } - - if( mbDevice ) - nMatch += 1; - - int nHeightMatch = 0; - int nWidthMatch = 0; - - if( IsScalable() ) - { - if( rFSD.mnOrientation != 0 ) - nMatch += 80; - else if( rFSD.mnWidth != 0 ) - nMatch += 25; - else - nMatch += 5; - } - else - { - if( rFSD.mnHeight == mnHeight ) - { - nMatch += 20; - if( rFSD.mnWidth == mnWidth ) - nMatch += 10; - } - else - { - // for non-scalable fonts the size difference is very important - // prefer the smaller font face because of clipping/overlapping issues - int nHeightDiff = (rFSD.mnHeight - mnHeight) * 1000; - nHeightMatch = (nHeightDiff >= 0) ? -nHeightDiff : 100+nHeightDiff; - if( rFSD.mnHeight ) - nHeightMatch /= rFSD.mnHeight; - - if( (rFSD.mnWidth != 0) && (mnWidth != 0) && (rFSD.mnWidth != mnWidth) ) - { - int nWidthDiff = (rFSD.mnWidth - mnWidth) * 100; - nWidthMatch = (nWidthDiff >= 0) ? -nWidthDiff : +nWidthDiff; - } - } - } - - if( rStatus.mnFaceMatch > nMatch ) - return false; - else if( rStatus.mnFaceMatch < nMatch ) - { - rStatus.mnFaceMatch = nMatch; - rStatus.mnHeightMatch = nHeightMatch; - rStatus.mnWidthMatch = nWidthMatch; - return true; - } - - // when two fonts are still competing prefer the - // one with the best matching height - if( rStatus.mnHeightMatch > nHeightMatch ) - return false; - else if( rStatus.mnHeightMatch < nHeightMatch ) - { - rStatus.mnHeightMatch = nHeightMatch; - rStatus.mnWidthMatch = nWidthMatch; - return true; - } - - if( rStatus.mnWidthMatch > nWidthMatch ) - return false; - - rStatus.mnWidthMatch = nWidthMatch; - return true; -} - ImplFontEntry::ImplFontEntry( const FontSelectPattern& rFontSelData ) : maFontSelData( rFontSelData ) , maMetric( rFontSelData ) diff --git a/vcl/source/gdi/pdffontcache.cxx b/vcl/source/gdi/pdffontcache.cxx index 294cbfe00cfb..ccb131dd7cc9 100644 --- a/vcl/source/gdi/pdffontcache.cxx +++ b/vcl/source/gdi/pdffontcache.cxx @@ -17,11 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/types.h> + +#include "outfont.hxx" +#include "PhysicalFontFace.hxx" +#include "salgdi.hxx" +#include "sallayout.hxx" #include "pdffontcache.hxx" -#include <salgdi.hxx> -#include <outfont.hxx> -#include <sallayout.hxx> using namespace vcl; diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 681c75448c39..bf8c70742db2 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -17,64 +17,55 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "sal/config.h" +#include <sal/types.h> #include <math.h> #include <algorithm> +#include <lcms2.h> -#include <tools/urlobj.hxx> - -#include <pdfwriter_impl.hxx> - +#include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/polygon/b2dpolygon.hxx> -#include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> -#include <basegfx/polygon/b2dpolypolygontools.hxx> +#include <basegfx/polygon/b2dpolypolygon.hxx> #include <basegfx/polygon/b2dpolypolygoncutter.hxx> -#include <basegfx/matrix/b2dhommatrix.hxx> - -#include <osl/thread.h> +#include <basegfx/polygon/b2dpolypolygontools.hxx> +#include <boost/scoped_array.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/util/URL.hpp> +#include <com/sun/star/util/URLTransformer.hpp> +#include <comphelper/processfactory.hxx> +#include <comphelper/string.hxx> +#include <cppuhelper/implbase1.hxx> +#include <i18nlangtag/languagetag.hxx> #include <osl/file.h> - +#include <osl/thread.h> #include <rtl/crc.h> #include <rtl/digest.h> #include <rtl/ustrbuf.hxx> - #include <tools/debug.hxx> -#include <tools/zcodec.hxx> #include <tools/stream.hxx> - -#include <i18nlangtag/languagetag.hxx> - -#include <vcl/virdev.hxx> -#include <vcl/bmpacc.hxx> +#include <tools/urlobj.hxx> +#include <tools/zcodec.hxx> #include <vcl/bitmapex.hxx> +#include <vcl/bmpacc.hxx> +#include <vcl/cvtgrf.hxx> #include <vcl/image.hxx> +#include <vcl/lineinfo.hxx> #include <vcl/metric.hxx> +#include <vcl/settings.hxx> +#include <vcl/strhelper.hxx> #include <vcl/svapp.hxx> -#include <vcl/lineinfo.hxx> -#include "vcl/cvtgrf.hxx" -#include "vcl/strhelper.hxx" -#include "vcl/settings.hxx" - -#include <fontsubset.hxx> -#include <outdev.h> -#include <sallayout.hxx> -#include <textlayout.hxx> -#include <salgdi.hxx> - -#include <lcms2.h> - -#include <comphelper/processfactory.hxx> -#include <comphelper/string.hxx> +#include <vcl/virdev.hxx> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/util/URLTransformer.hpp> -#include <com/sun/star/util/URL.hpp> +#include "fontsubset.hxx" +#include "outdev.h" +#include "PhysicalFontFace.hxx" +#include "salgdi.hxx" +#include "sallayout.hxx" +#include "textlayout.hxx" -#include "cppuhelper/implbase1.hxx" +#include "pdfwriter_impl.hxx" -#include <boost/scoped_array.hpp> #if !defined(ANDROID) && !defined(IOS) // NSS header files for PDF signing support diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index c4ae22e05467..4fe749ae9e71 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -19,33 +19,31 @@ #ifndef INCLUDED_VCL_SOURCE_GDI_PDFWRITER_IMPL_HXX #define INCLUDED_VCL_SOURCE_GDI_PDFWRITER_IMPL_HXX -#include "vcl/pdfwriter.hxx" -#include "rtl/ustring.hxx" -#include "osl/file.h" -#include "tools/gen.hxx" -#include "tools/stream.hxx" -#include "vcl/outdev.hxx" -#include "vcl/bitmapex.hxx" -#include "vcl/gradient.hxx" -#include "vcl/hatch.hxx" -#include "vcl/wall.hxx" -#include "outdata.hxx" -#include "rtl/strbuf.hxx" -#include "rtl/cipher.h" -#include "rtl/digest.h" -#include "com/sun/star/util/XURLTransformer.hpp" -#include "com/sun/star/lang/Locale.hpp" -#include <sal/macros.h> - -#include <sallayout.hxx> -#include "pdffontcache.hxx" - #include <vector> #include <map> #include <boost/unordered_map.hpp> #include <list> #include <boost/shared_array.hpp> +#include <com/sun/star/lang/Locale.hpp> +#include <com/sun/star/util/XURLTransformer.hpp> +#include <osl/file.h> +#include <rtl/cipher.h> +#include <rtl/digest.h> +#include <rtl/strbuf.hxx> +#include <rtl/ustring.hxx> +#include <tools/gen.hxx> +#include <tools/stream.hxx> +#include <vcl/bitmapex.hxx> +#include <vcl/gradient.hxx> +#include <vcl/hatch.hxx> +#include <vcl/outdev.hxx> +#include <vcl/pdfwriter.hxx> +#include <vcl/wall.hxx> + +#include "sallayout.hxx" +#include "outdata.hxx" +#include "pdffontcache.hxx" class StyleSettings; class FontSelectPattern; @@ -54,6 +52,7 @@ class FontSubsetInfo; class ZCodec; class EncHashTransporter; struct BitStreamState; +class PhysicalFontFace; // the maximum password length #define ENCRYPTED_PWD_SIZE 32 diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx index 2c8949d01547..389db5df6d9e 100644 --- a/vcl/unx/generic/gdi/salgdi3.cxx +++ b/vcl/unx/generic/gdi/salgdi3.cxx @@ -17,10 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/types.h> #include <string.h> #include <stdio.h> -#include <stdlib.h> #include <math.h> #include <unistd.h> #include <fcntl.h> @@ -29,44 +29,35 @@ #include <sys/stat.h> #include <sys/types.h> -#include "sal/alloca.h" -#include "sal/types.h" - -#include "rtl/tencinfo.h" - -#include "osl/file.hxx" -#include "osl/module.hxx" - -#include "tools/debug.hxx" -#include "tools/stream.hxx" - -#include "basegfx/polygon/b2dpolypolygon.hxx" - -#include "i18nlangtag/mslangid.hxx" - +#include <basegfx/polygon/b2dpolypolygon.hxx> #include <boost/unordered_set.hpp> - -#include <vcl/sysdata.hxx> +#include <i18nlangtag/mslangid.hxx> +#include <osl/file.hxx> +#include <osl/module.hxx> +#include <rtl/tencinfo.h> +#include <sal/alloca.h> +#include <tools/debug.hxx> +#include <tools/stream.hxx> #include <vcl/settings.hxx> +#include <vcl/sysdata.hxx> +#include <vcl/jobdata.hxx> +#include <vcl/printerinfomanager.hxx> +#include <vcl/svapp.hxx> -#include "generic/printergfx.hxx" #include "fontmanager.hxx" -#include "vcl/jobdata.hxx" -#include "vcl/printerinfomanager.hxx" -#include "vcl/svapp.hxx" - -#include "unx/salunx.h" +#include "gcach_xpeer.hxx" +#include "generic/genpspgraphics.h" +#include "generic/printergfx.hxx" +#include "impfont.hxx" +#include "outdev.h" +#include "PhysicalFontFace.hxx" +#include "salframe.hxx" #include "unx/saldata.hxx" #include "unx/saldisp.hxx" #include "unx/salgdi.h" -#include "generic/genpspgraphics.h" +#include "unx/salunx.h" #include "unx/salvd.h" - -#include "gcach_xpeer.hxx" #include "xrender_peer.hxx" -#include "impfont.hxx" -#include "salframe.hxx" -#include "outdev.h" #include <config_graphite.h> #if ENABLE_GRAPHITE diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index b18e4e95d350..e56e6423941c 100644 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -17,43 +17,37 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/types.h> #include <config_folders.h> -#include <string.h> +#include <algorithm> #include <malloc.h> - +#include <map> +#include <set> +#include <string.h> #include <svsys.h> -#include "rtl/logfile.hxx" -#include "rtl/bootstrap.hxx" - -#include "i18nlangtag/mslangid.hxx" - -#include "osl/file.hxx" -#include "osl/process.h" - -#include "basegfx/polygon/b2dpolygon.hxx" -#include "basegfx/matrix/b2dhommatrixtools.hxx" - -#include "unotools/fontcfg.hxx" - -#include "tools/stream.hxx" -#include "tools/helpers.hxx" +#include <vector> -#include <vcl/sysdata.hxx> +#include <basegfx/matrix/b2dhommatrixtools.hxx> +#include <basegfx/polygon/b2dpolygon.hxx> +#include <i18nlangtag/mslangid.hxx> +#include <osl/file.hxx> +#include <osl/process.h> +#include <rtl/bootstrap.hxx> +#include <rtl/logfile.hxx> +#include <tools/helpers.hxx> +#include <tools/stream.hxx> +#include <unotools/fontcfg.hxx> #include <vcl/settings.hxx> - -#include "win/saldata.hxx" -#include "win/salgdi.h" +#include <vcl/sysdata.hxx> #include "fontsubset.hxx" #include "outdev.h" +#include "PhysicalFontFace.hxx" #include "sft.hxx" +#include "win/saldata.hxx" +#include "win/salgdi.h" -#include <algorithm> - -#include <vector> -#include <set> -#include <map> using namespace vcl; |