? toolkit/toolkit.vpj
Index: toolkit/inc/toolkit/awt/vclxfont.hxx
===================================================================
RCS file: /cvs/gsl/toolkit/inc/toolkit/awt/vclxfont.hxx,v
retrieving revision 1.4
retrieving revision 1.4.218.2
diff -u -b -I $Revision.*$ -I $Author.*$ -r1.4 -r1.4.218.2
--- toolkit/inc/toolkit/awt/vclxfont.hxx	9 Sep 2005 12:44:01 -0000	1.4
+++ toolkit/inc/toolkit/awt/vclxfont.hxx	11 Apr 2007 09:14:44 -0000	1.4.218.2
@@ -40,8 +40,8 @@
 #include <toolkit/dllapi.h>
 #endif
 
-#ifndef _COM_SUN_STAR_AWT_XFONT_HPP_
-#include <com/sun/star/awt/XFont.hpp>
+#ifndef _COM_SUN_STAR_AWT_XFONT2_HPP_
+#include <com/sun/star/awt/XFont2.hpp>
 #endif
 #ifndef _COM_SUN_STAR_AWT_XDEVICE_HPP_
 #include <com/sun/star/awt/XDevice.hpp>
@@ -69,7 +69,7 @@
 //	class VCLXFont
 //	----------------------------------------------------
 
-class TOOLKIT_DLLPUBLIC VCLXFont :	public ::com::sun::star::awt::XFont, 
+class TOOLKIT_DLLPUBLIC VCLXFont :	public ::com::sun::star::awt::XFont2, 
 					public ::com::sun::star::lang::XTypeProvider,
 					public ::com::sun::star::lang::XUnoTunnel,
 					public ::cppu::OWeakObject
@@ -113,6 +113,9 @@
     sal_Int32										SAL_CALL getStringWidth( const ::rtl::OUString& str ) throw(::com::sun::star::uno::RuntimeException);
     sal_Int32										SAL_CALL getStringWidthArray( const ::rtl::OUString& str, ::com::sun::star::uno::Sequence< sal_Int32 >& rDXArray ) throw(::com::sun::star::uno::RuntimeException);
     void											SAL_CALL getKernPairs( ::com::sun::star::uno::Sequence< sal_Unicode >& rnChars1, ::com::sun::star::uno::Sequence< sal_Unicode >& rnChars2, ::com::sun::star::uno::Sequence< sal_Int16 >& rnKerns ) throw(::com::sun::star::uno::RuntimeException);
+
+    // ::com::sun::star::lang::XFont2
+    sal_Bool                                        SAL_CALL hasGlyphs( const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException);
 };
 
 
Index: toolkit/source/awt/vclxfont.cxx
===================================================================
RCS file: /cvs/gsl/toolkit/source/awt/vclxfont.cxx,v
retrieving revision 1.6
retrieving revision 1.6.86.2
diff -u -b -I $Revision.*$ -I $Author.*$ -r1.6 -r1.6.86.2
--- toolkit/source/awt/vclxfont.cxx	12 Oct 2006 10:30:48 -0000	1.6
+++ toolkit/source/awt/vclxfont.cxx	11 Apr 2007 09:15:35 -0000	1.6.86.2
@@ -92,6 +92,7 @@
 {
 	::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType,
 										SAL_STATIC_CAST( ::com::sun::star::awt::XFont*, this ),
+                                        SAL_STATIC_CAST( ::com::sun::star::awt::XFont2*, this ),
 										SAL_STATIC_CAST( ::com::sun::star::lang::XUnoTunnel*, this ),
 										SAL_STATIC_CAST( ::com::sun::star::lang::XTypeProvider*, this ) );
 	return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
@@ -102,7 +103,7 @@
 
 // ::com::sun::star::lang::XTypeProvider
 IMPL_XTYPEPROVIDER_START( VCLXFont )
-	getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont>* ) NULL )
+    getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFont2>* ) NULL )
 IMPL_XTYPEPROVIDER_END
 
 
@@ -239,5 +240,21 @@
 	}
 }
 
+// ::com::sun::star::awt::XFont2
+sal_Bool VCLXFont::hasGlyphs( const ::rtl::OUString& aText )
+    throw(::com::sun::star::uno::RuntimeException)
+{
+	::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
 
+    OutputDevice* pOutDev = VCLUnoHelper::GetOutputDevice( mxDevice );
+    if ( pOutDev )
+    {
+        String aStr( aText );
+        if ( pOutDev->HasGlyphs( maFont, aStr, 0, aStr.Len() ) == STRING_LEN )
+        {
+            return sal_True;
+        }
+    }
 
+    return sal_False;
+}
