summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/pdffontcache.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-03-31 12:25:11 +0000
committerKurt Zenker <kz@openoffice.org>2008-03-31 12:25:11 +0000
commit5a09e619a14000e8c03d1215b94c2621d89863c1 (patch)
treebcee80fb0fda3aaf5c05c3b9e48a4318d3b556ff /vcl/source/gdi/pdffontcache.cxx
parentff4663132137fbf985cb8856faa158959ac85db9 (diff)
INTEGRATION: CWS pdffix02 (1.5.26); FILE MERGED
2008/01/28 10:44:16 hdu 1.5.26.4: #i85554# code cleanup to prepare for UCS4 switch for PDF export 2008/01/24 16:24:20 hdu 1.5.26.3: "#i85554# minor cleanups for PDF export - avoid hardcoded use of 16bit sal_Unicode, especially in interfaces - improve const correctness for subsetting/embedding font candidates 2008/01/24 12:34:06 hdu 1.5.26.2: #i85554# code cleanup to prepare for UCS4 support in PDF export 2008/01/17 16:28:46 hdu 1.5.26.1: #i83121# adjust to recent sallayout.hxx changes
Diffstat (limited to 'vcl/source/gdi/pdffontcache.cxx')
-rw-r--r--vcl/source/gdi/pdffontcache.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/vcl/source/gdi/pdffontcache.cxx b/vcl/source/gdi/pdffontcache.cxx
index 685c09536beb..048c8dcd25e2 100644
--- a/vcl/source/gdi/pdffontcache.cxx
+++ b/vcl/source/gdi/pdffontcache.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: pdffontcache.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: ihi $ $Date: 2007-11-26 15:12:37 $
+ * last change: $Author: kz $ $Date: 2008-03-31 13:25:11 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -42,14 +42,14 @@
using namespace vcl;
-PDFFontCache::FontIdentifier::FontIdentifier( ImplFontData* pFont, bool bVertical ) :
+PDFFontCache::FontIdentifier::FontIdentifier( const ImplFontData* pFont, bool bVertical ) :
m_nFontId( pFont->GetFontId() ),
m_nMagic( pFont->GetFontMagic() ),
m_bVertical( bVertical )
{
}
-PDFFontCache::FontData& PDFFontCache::getFont( ImplFontData* pFont, bool bVertical )
+PDFFontCache::FontData& PDFFontCache::getFont( const ImplFontData* pFont, bool bVertical )
{
FontIdentifier aId( pFont, bVertical );
FontToIndexMap::iterator it = m_aFontToIndex.find( aId );
@@ -60,7 +60,7 @@ PDFFontCache::FontData& PDFFontCache::getFont( ImplFontData* pFont, bool bVertic
return m_aFonts.back();
}
-sal_Int32 PDFFontCache::getGlyphWidth( ImplFontData* pFont, sal_uInt32 nGlyph, bool bVertical, SalGraphics* pGraphics )
+sal_Int32 PDFFontCache::getGlyphWidth( const ImplFontData* pFont, sal_GlyphId nGlyph, bool bVertical, SalGraphics* pGraphics )
{
sal_Int32 nWidth = 0;
FontData& rFontData( getFont( pFont, bVertical ) );
@@ -70,12 +70,11 @@ sal_Int32 PDFFontCache::getGlyphWidth( ImplFontData* pFont, sal_uInt32 nGlyph, b
}
if( ! rFontData.m_nWidths.empty() )
{
- sal_uInt32 nIndex = nGlyph;
+ sal_GlyphId nIndex = nGlyph;
if( (nGlyph & GF_ISCHAR) != 0 )
{
- const sal_Unicode cCode = sal::static_int_cast<sal_Unicode>(nGlyph & GF_IDXMASK); // TODO: UCS4 support
- std::map<sal_Unicode,sal_uInt32>::const_iterator it =
- rFontData.m_aGlyphIdToIndex.find( cCode );
+ const sal_Ucs cCode = static_cast<sal_Ucs>(nGlyph & GF_IDXMASK);
+ Ucs2UIntMap::const_iterator it = rFontData.m_aGlyphIdToIndex.find( cCode );
// allow symbol aliasing U+00xx -> U+F0xx if there is no direct match
if( it == rFontData.m_aGlyphIdToIndex.end()