#i113604# allow refcounting for const ImplFontCharMap objects
This commit is contained in:
parent
588516e12a
commit
7d7809aeea
3 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -327,14 +327,14 @@ ImplFontCharMap* ImplFontCharMap::GetDefaultMap( bool bSymbols)
|
|||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void ImplFontCharMap::AddReference()
|
||||
void ImplFontCharMap::AddReference( void ) const
|
||||
{
|
||||
++mnRefCount;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
void ImplFontCharMap::DeReference()
|
||||
void ImplFontCharMap::DeReference( void ) const
|
||||
{
|
||||
if( --mnRefCount <= 0 )
|
||||
if( (this != pDefaultUnicodeImplFontCharMap) && (this != pDefaultSymbolImplFontCharMap) )
|
||||
|
|
|
@ -2907,7 +2907,7 @@ BOOL WinSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
|
|||
if( aRawCffData.get() )
|
||||
{
|
||||
pWinFontData->UpdateFromHDC( mhDC );
|
||||
/*const*/ImplFontCharMap* pCharMap = pWinFontData->GetImplFontCharMap();
|
||||
const ImplFontCharMap* pCharMap = pWinFontData->GetImplFontCharMap();
|
||||
|
||||
long nRealGlyphIds[ 256 ];
|
||||
for( int i = 0; i < nGlyphCount; ++i )
|
||||
|
@ -3172,7 +3172,7 @@ void WinSalGraphics::GetGlyphWidths( const ImplFontData* pFont,
|
|||
rUnicodeEnc.clear();
|
||||
}
|
||||
const ImplWinFontData* pWinFont = static_cast<const ImplWinFontData*>(pFont);
|
||||
ImplFontCharMap* pMap = pWinFont->GetImplFontCharMap();
|
||||
const ImplFontCharMap* pMap = pWinFont->GetImplFontCharMap();
|
||||
DBG_ASSERT( pMap && pMap->GetCharCount(), "no map" );
|
||||
|
||||
int nCharCount = pMap->GetCharCount();
|
||||
|
|
Loading…
Reference in a new issue