summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorHerbert Duerr <hdu@openoffice.org>2001-07-06 12:09:07 +0000
committerHerbert Duerr <hdu@openoffice.org>2001-07-06 12:09:07 +0000
commit4f4cb4c480d2adaa6985a26270a1bd18344bf971 (patch)
tree240b777c162f278d8d5525001ad500b43982ef15 /vcl
parentffd9ebef939a370a743037059f23e8452730868e (diff)
#81268# implement OutputDevice::GetFontCharMap()
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/outdev3.cxx40
1 files changed, 38 insertions, 2 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index ffb0cca0af3e..b748d978a66b 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: outdev3.cxx,v $
*
- * $Revision: 1.51 $
+ * $Revision: 1.52 $
*
- * last change: $Author: th $ $Date: 2001-07-06 13:03:17 $
+ * last change: $Author: hdu $ $Date: 2001-07-06 13:09:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -8369,3 +8369,39 @@ BOOL OutputDevice::GetGlyphOutline( xub_Unicode cChar, PolyPolygon& rPolyPoly, B
return bRet;
}
+
+// -----------------------------------------------------------------------
+
+BOOL OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const
+{
+ rFontCharMap.ImplSetDefaultRanges();
+
+#ifndef REMOTE_APPSERVER
+ // we need a graphics
+ if ( !mpGraphics )
+ {
+ if ( !((OutputDevice*)this)->ImplGetGraphics() )
+ return FALSE;
+ }
+#else
+ // Da wegen Clipping hier NULL zurueckkommen kann, koennen wir nicht
+ // den Rueckgabewert nehmen
+ ((OutputDevice*)this)->ImplGetServerGraphics();
+#endif
+
+ if ( mbNewFont )
+ ((OutputDevice*)this)->ImplNewFont();
+ if ( mbInitFont )
+ ((OutputDevice*)this)->ImplInitFont();
+
+ ULONG nPairs = mpGraphics->GetFontCodeRanges( NULL );
+ if( !nPairs )
+ return FALSE;
+
+ sal_UCS4* pCodes = new sal_UCS4[ 2 * nPairs ];
+ mpGraphics->GetFontCodeRanges( pCodes );
+ rFontCharMap.ImplSetRanges( nPairs, pCodes );
+ return TRUE;
+}
+
+// -----------------------------------------------------------------------