From 588516e12af81741174b16feb22bef6d5f5fc66e Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Mon, 16 Aug 2010 14:55:27 +0200 Subject: #i113861# prepare caching of ImplFontCharMap objects on UNX --- vcl/inc/vcl/glyphcache.hxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'vcl/inc') diff --git a/vcl/inc/vcl/glyphcache.hxx b/vcl/inc/vcl/glyphcache.hxx index a77c1626dc24..ecb591abbae4 100644 --- a/vcl/inc/vcl/glyphcache.hxx +++ b/vcl/inc/vcl/glyphcache.hxx @@ -48,7 +48,6 @@ class ImplFontOptions; namespace basegfx { class B2DPolyPolygon; } class RawBitmap; -class CmapResult; #include #include @@ -190,7 +189,7 @@ public: virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const = 0; virtual ULONG GetKernPairs( ImplKernPairData** ) const { return 0; } virtual int GetGlyphKernValue( int, int ) const { return 0; } - virtual bool GetFontCodeRanges( CmapResult& ) const { return false; } + virtual ImplFontCharMap* GetImplFontCharMap() const = 0; Point TransformPoint( const Point& ) const; GlyphData& GetGlyphData( int nGlyphIndex ); -- cgit From 7d7809aeea8923b004cd9b1982bc20a46b30d0d8 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Tue, 17 Aug 2010 15:22:46 +0200 Subject: #i113604# allow refcounting for const ImplFontCharMap objects --- vcl/inc/vcl/impfont.hxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vcl/inc') diff --git a/vcl/inc/vcl/impfont.hxx b/vcl/inc/vcl/impfont.hxx index a1104bbf4a86..e38e1dea78d4 100644 --- a/vcl/inc/vcl/impfont.hxx +++ b/vcl/inc/vcl/impfont.hxx @@ -196,8 +196,8 @@ public: int GetIndexFromChar( sal_uInt32 ) const; sal_uInt32 GetCharFromIndex( int ) const; - void AddReference(); - void DeReference(); + void AddReference() const; + void DeReference() const; int GetGlyphIndex( sal_uInt32 ) const; @@ -213,8 +213,8 @@ private: const int* mpStartGlyphs; // range-specific mapper to glyphs const USHORT* mpGlyphIds; // individual glyphid mappings int mnRangeCount; - int mnCharCount; - int mnRefCount; + int mnCharCount; // covered codepoints + mutable int mnRefCount; }; // CmapResult is a normalized version of the many CMAP formats -- cgit From 34c6b390e191e8aca888ccc52351fc469f59b663 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Wed, 15 Sep 2010 12:01:51 +0200 Subject: #i113861# shared ImplFontCharMap objects better be constant --- vcl/inc/vcl/glyphcache.hxx | 2 +- vcl/inc/vcl/metric.hxx | 4 ++-- vcl/inc/vcl/salgdi.hxx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'vcl/inc') diff --git a/vcl/inc/vcl/glyphcache.hxx b/vcl/inc/vcl/glyphcache.hxx index ecb591abbae4..0e77d5dd6bc4 100644 --- a/vcl/inc/vcl/glyphcache.hxx +++ b/vcl/inc/vcl/glyphcache.hxx @@ -189,7 +189,7 @@ public: virtual void FetchFontMetric( ImplFontMetricData&, long& rFactor ) const = 0; virtual ULONG GetKernPairs( ImplKernPairData** ) const { return 0; } virtual int GetGlyphKernValue( int, int ) const { return 0; } - virtual ImplFontCharMap* GetImplFontCharMap() const = 0; + virtual const ImplFontCharMap* GetImplFontCharMap() const = 0; Point TransformPoint( const Point& ) const; GlyphData& GetGlyphData( int nGlyphIndex ); diff --git a/vcl/inc/vcl/metric.hxx b/vcl/inc/vcl/metric.hxx index eae6b38c5f9d..6328890c1749 100644 --- a/vcl/inc/vcl/metric.hxx +++ b/vcl/inc/vcl/metric.hxx @@ -95,7 +95,7 @@ public: class VCL_DLLPUBLIC FontCharMap { private: - ImplFontCharMap* mpImpl; + const ImplFontCharMap* mpImpl; public: FontCharMap(); @@ -118,7 +118,7 @@ public: private: friend class OutputDevice; - void Reset( ImplFontCharMap* pNewMap = NULL ); + void Reset( const ImplFontCharMap* pNewMap = NULL ); // prevent assignment and copy construction FontCharMap( const FontCharMap& ); diff --git a/vcl/inc/vcl/salgdi.hxx b/vcl/inc/vcl/salgdi.hxx index cbe3581bedc4..d8276406746e 100644 --- a/vcl/inc/vcl/salgdi.hxx +++ b/vcl/inc/vcl/salgdi.hxx @@ -239,7 +239,7 @@ public: // return only PairCount if (pKernPairs == NULL) virtual ULONG GetKernPairs( ULONG nMaxPairCount, ImplKernPairData* ) = 0; // get the repertoire of the current font - virtual ImplFontCharMap* GetImplFontCharMap() const = 0; + virtual const ImplFontCharMap* GetImplFontCharMap() const = 0; // graphics must fill supplied font list virtual void GetDevFontList( ImplDevFontList* ) = 0; // graphics should call ImplAddDevFontSubstitute on supplied -- cgit