ReactOS  0.4.15-dev-1397-g19779b3
olefont.c File Reference
#include <assert.h>
#include <stdarg.h>
#include <string.h>
#include "winerror.h"
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/list.h"
#include "objbase.h"
#include "oleauto.h"
#include "ole2.h"
#include "olectl.h"
#include "wine/debug.h"
#include "connpt.h"
#include "oaidl.h"
Include dependency graph for olefont.c:

Go to the source code of this file.

Classes

struct  _HFONTItem
 
struct  OLEFontImpl
 
struct  enum_data
 
struct  IClassFactoryImpl
 

Macros

#define COBJMACROS
 
#define NONAMELESSUNION
 
#define NONAMELESSSTRUCT
 
#define FONTPERSIST_ITALIC   0x02
 
#define FONTPERSIST_UNDERLINE   0x04
 
#define FONTPERSIST_STRIKETHROUGH   0x08
 

Typedefs

typedef struct _HFONTItem HFONTItem
 
typedef struct _HFONTItemPHFONTItem
 
typedef struct OLEFontImpl OLEFontImpl
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ole)
 
static HDC get_dc (void)
 
static void delete_dc (void)
 
static void HFONTItem_Delete (PHFONTItem item)
 
static HFONTItemfind_hfontitem (HFONT hfont)
 
static HRESULT add_hfontitem (HFONT hfont)
 
static HRESULT inc_int_ref (HFONT hfont)
 
static HRESULT dec_int_ref (HFONT hfont)
 
static HRESULT inc_ext_ref (HFONT hfont)
 
static HRESULT dec_ext_ref (HFONT hfont)
 
static WCHARstrdupW (const WCHAR *str)
 
static OLEFontImplimpl_from_IFont (IFont *iface)
 
static OLEFontImplimpl_from_IDispatch (IDispatch *iface)
 
static OLEFontImplimpl_from_IPersistStream (IPersistStream *iface)
 
static OLEFontImplimpl_from_IConnectionPointContainer (IConnectionPointContainer *iface)
 
static OLEFontImplimpl_from_IPersistPropertyBag (IPersistPropertyBag *iface)
 
static OLEFontImplimpl_from_IPersistStreamInit (IPersistStreamInit *iface)
 
static OLEFontImplOLEFontImpl_Construct (const FONTDESC *fontDesc)
 
static void OLEFontImpl_Destroy (OLEFontImpl *fontDesc)
 
static ULONG WINAPI OLEFontImpl_AddRef (IFont *iface)
 
HRESULT WINAPI OleCreateFontIndirect (LPFONTDESC lpFontDesc, REFIID riid, LPVOID *ppvObj)
 
static void OLEFont_SendNotify (OLEFontImpl *this, DISPID dispID)
 
static HRESULT WINAPI OLEFontImpl_QueryInterface (IFont *iface, REFIID riid, void **ppvObject)
 
static ULONG WINAPI OLEFontImpl_Release (IFont *iface)
 
static int CALLBACK font_enum_proc (const LOGFONTW *elf, const TEXTMETRICW *ntm, DWORD type, LPARAM lp)
 
static void realize_font (OLEFontImpl *This)
 
static HRESULT WINAPI OLEFontImpl_get_Name (IFont *iface, BSTR *pname)
 
static HRESULT WINAPI OLEFontImpl_put_Name (IFont *iface, BSTR name)
 
static HRESULT WINAPI OLEFontImpl_get_Size (IFont *iface, CY *psize)
 
static HRESULT WINAPI OLEFontImpl_put_Size (IFont *iface, CY size)
 
static HRESULT WINAPI OLEFontImpl_get_Bold (IFont *iface, BOOL *pbold)
 
static HRESULT WINAPI OLEFontImpl_put_Bold (IFont *iface, BOOL bold)
 
static HRESULT WINAPI OLEFontImpl_get_Italic (IFont *iface, BOOL *pitalic)
 
static HRESULT WINAPI OLEFontImpl_put_Italic (IFont *iface, BOOL italic)
 
static HRESULT WINAPI OLEFontImpl_get_Underline (IFont *iface, BOOL *punderline)
 
static HRESULT WINAPI OLEFontImpl_put_Underline (IFont *iface, BOOL underline)
 
static HRESULT WINAPI OLEFontImpl_get_Strikethrough (IFont *iface, BOOL *pstrikethrough)
 
static HRESULT WINAPI OLEFontImpl_put_Strikethrough (IFont *iface, BOOL strikethrough)
 
static HRESULT WINAPI OLEFontImpl_get_Weight (IFont *iface, short *pweight)
 
static HRESULT WINAPI OLEFontImpl_put_Weight (IFont *iface, short weight)
 
static HRESULT WINAPI OLEFontImpl_get_Charset (IFont *iface, short *pcharset)
 
static HRESULT WINAPI OLEFontImpl_put_Charset (IFont *iface, short charset)
 
static HRESULT WINAPI OLEFontImpl_get_hFont (IFont *iface, HFONT *phfont)
 
static HRESULT WINAPI OLEFontImpl_Clone (IFont *iface, IFont **ppfont)
 
static HRESULT WINAPI OLEFontImpl_IsEqual (IFont *iface, IFont *pFontOther)
 
static HRESULT WINAPI OLEFontImpl_SetRatio (IFont *iface, LONG cyLogical, LONG cyHimetric)
 
static HRESULT WINAPI OLEFontImpl_QueryTextMetrics (IFont *iface, TEXTMETRICOLE *ptm)
 
static HRESULT WINAPI OLEFontImpl_AddRefHfont (IFont *iface, HFONT hfont)
 
static HRESULT WINAPI OLEFontImpl_ReleaseHfont (IFont *iface, HFONT hfont)
 
static HRESULT WINAPI OLEFontImpl_SetHdc (IFont *iface, HDC hdc)
 
static HRESULT WINAPI OLEFontImpl_IDispatch_QueryInterface (IDispatch *iface, REFIID riid, VOID **ppvoid)
 
static ULONG WINAPI OLEFontImpl_IDispatch_Release (IDispatch *iface)
 
static ULONG WINAPI OLEFontImpl_IDispatch_AddRef (IDispatch *iface)
 
static HRESULT WINAPI OLEFontImpl_GetTypeInfoCount (IDispatch *iface, unsigned int *pctinfo)
 
static HRESULT WINAPI OLEFontImpl_GetTypeInfo (IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI OLEFontImpl_GetIDsOfNames (IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI OLEFontImpl_Invoke (IDispatch *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
 
static HRESULT WINAPI OLEFontImpl_IPersistStream_QueryInterface (IPersistStream *iface, REFIID riid, VOID **ppvoid)
 
static ULONG WINAPI OLEFontImpl_IPersistStream_Release (IPersistStream *iface)
 
static ULONG WINAPI OLEFontImpl_IPersistStream_AddRef (IPersistStream *iface)
 
static HRESULT WINAPI OLEFontImpl_GetClassID (IPersistStream *iface, CLSID *pClassID)
 
static HRESULT WINAPI OLEFontImpl_IsDirty (IPersistStream *iface)
 
static HRESULT WINAPI OLEFontImpl_Load (IPersistStream *iface, IStream *pLoadStream)
 
static HRESULT WINAPI OLEFontImpl_Save (IPersistStream *iface, IStream *pOutStream, BOOL fClearDirty)
 
static HRESULT WINAPI OLEFontImpl_GetSizeMax (IPersistStream *iface, ULARGE_INTEGER *pcbSize)
 
static HRESULT WINAPI OLEFontImpl_IConnectionPointContainer_QueryInterface (IConnectionPointContainer *iface, REFIID riid, VOID **ppvoid)
 
static ULONG WINAPI OLEFontImpl_IConnectionPointContainer_Release (IConnectionPointContainer *iface)
 
static ULONG WINAPI OLEFontImpl_IConnectionPointContainer_AddRef (IConnectionPointContainer *iface)
 
static HRESULT WINAPI OLEFontImpl_EnumConnectionPoints (IConnectionPointContainer *iface, IEnumConnectionPoints **ppEnum)
 
static HRESULT WINAPI OLEFontImpl_FindConnectionPoint (IConnectionPointContainer *iface, REFIID riid, IConnectionPoint **ppCp)
 
static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_QueryInterface (IPersistPropertyBag *iface, REFIID riid, LPVOID *ppvObj)
 
static ULONG WINAPI OLEFontImpl_IPersistPropertyBag_AddRef (IPersistPropertyBag *iface)
 
static ULONG WINAPI OLEFontImpl_IPersistPropertyBag_Release (IPersistPropertyBag *iface)
 
static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_GetClassID (IPersistPropertyBag *iface, CLSID *classid)
 
static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_InitNew (IPersistPropertyBag *iface)
 
static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_Load (IPersistPropertyBag *iface, IPropertyBag *pPropBag, IErrorLog *pErrorLog)
 
static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_Save (IPersistPropertyBag *iface, IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
 
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_QueryInterface (IPersistStreamInit *iface, REFIID riid, LPVOID *ppvObj)
 
static ULONG WINAPI OLEFontImpl_IPersistStreamInit_AddRef (IPersistStreamInit *iface)
 
static ULONG WINAPI OLEFontImpl_IPersistStreamInit_Release (IPersistStreamInit *iface)
 
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_GetClassID (IPersistStreamInit *iface, CLSID *classid)
 
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_IsDirty (IPersistStreamInit *iface)
 
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_Load (IPersistStreamInit *iface, LPSTREAM pStm)
 
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_Save (IPersistStreamInit *iface, LPSTREAM pStm, BOOL fClearDirty)
 
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_GetSizeMax (IPersistStreamInit *iface, ULARGE_INTEGER *pcbSize)
 
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_InitNew (IPersistStreamInit *iface)
 
static IClassFactoryImplimpl_from_IClassFactory (IClassFactory *iface)
 
static HRESULT WINAPI SFCF_QueryInterface (IClassFactory *iface, REFIID riid, void **obj)
 
static ULONG WINAPI SFCF_AddRef (LPCLASSFACTORY iface)
 
static ULONG WINAPI SFCF_Release (LPCLASSFACTORY iface)
 
static HRESULT WINAPI SFCF_CreateInstance (LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
 
static HRESULT WINAPI SFCF_LockServer (LPCLASSFACTORY iface, BOOL dolock)
 
void _get_STDFONT_CF (LPVOID *ppv)
 

Variables

static HDC olefont_hdc
 
static struct list OLEFontImpl_hFontList = LIST_INIT(OLEFontImpl_hFontList)
 
static LONG ifont_cnt = 0
 
static CRITICAL_SECTION OLEFontImpl_csHFONTLIST = { &OLEFontImpl_csHFONTLIST_debug, -1, 0, 0, 0, 0 }
 
static CRITICAL_SECTION_DEBUG OLEFontImpl_csHFONTLIST_debug
 
static const IFontVtbl OLEFontImpl_VTable
 
static const IDispatchVtbl OLEFontImpl_IDispatch_VTable
 
static const IPersistStreamVtbl OLEFontImpl_IPersistStream_VTable
 
static const IConnectionPointContainerVtbl OLEFontImpl_IConnectionPointContainer_VTable
 
static const IPersistPropertyBagVtbl OLEFontImpl_IPersistPropertyBag_VTable
 
static const IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable
 
static const IClassFactoryVtbl SFCF_Vtbl
 
static IClassFactoryImpl STDFONT_CF = {{&SFCF_Vtbl}, 1 }
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 28 of file olefont.c.

◆ FONTPERSIST_ITALIC

#define FONTPERSIST_ITALIC   0x02

Definition at line 51 of file olefont.c.

◆ FONTPERSIST_STRIKETHROUGH

#define FONTPERSIST_STRIKETHROUGH   0x08

Definition at line 53 of file olefont.c.

◆ FONTPERSIST_UNDERLINE

#define FONTPERSIST_UNDERLINE   0x04

Definition at line 52 of file olefont.c.

◆ NONAMELESSSTRUCT

#define NONAMELESSSTRUCT

Definition at line 30 of file olefont.c.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 29 of file olefont.c.

Typedef Documentation

◆ HFONTItem

◆ OLEFontImpl

Definition at line 243 of file olefont.c.

◆ PHFONTItem

Function Documentation

◆ _get_STDFONT_CF()

void _get_STDFONT_CF ( LPVOID ppv)

Definition at line 2285 of file olefont.c.

2285 { *ppv = &STDFONT_CF; }
REFIID LPVOID * ppv
Definition: atlbase.h:39
static IClassFactoryImpl STDFONT_CF
Definition: olefont.c:2283

Referenced by DllGetClassObject().

◆ add_hfontitem()

static HRESULT add_hfontitem ( HFONT  hfont)
static

Definition at line 137 of file olefont.c.

138 {
139  HFONTItem *new_item = HeapAlloc(GetProcessHeap(), 0, sizeof(*new_item));
140 
141  if(!new_item) return E_OUTOFMEMORY;
142 
143  new_item->int_refs = 1;
144  new_item->total_refs = 1;
145  new_item->gdiFont = hfont;
149  return S_OK;
150 }
static struct list OLEFontImpl_hFontList
Definition: olefont.c:76
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
LONG total_refs
Definition: olefont.c:69
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
struct list entry
Definition: olefont.c:63
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
LONG int_refs
Definition: olefont.c:66
static HFONT hfont
static CRITICAL_SECTION OLEFontImpl_csHFONTLIST
Definition: olefont.c:84
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define S_OK
Definition: intsafe.h:51
HFONT gdiFont
Definition: olefont.c:72
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

Referenced by realize_font().

◆ dec_ext_ref()

static HRESULT dec_ext_ref ( HFONT  hfont)
static

Definition at line 212 of file olefont.c.

213 {
214  HFONTItem *item;
215  HRESULT hr = S_FALSE;
216 
218 
220  if(item)
221  {
222  if(--item->total_refs >= 0) hr = S_OK;
223  }
225 
226  return hr;
227 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define S_FALSE
Definition: winerror.h:2357
static HFONT hfont
static CRITICAL_SECTION OLEFontImpl_csHFONTLIST
Definition: olefont.c:84
LONG HRESULT
Definition: typedefs.h:79
static HFONTItem * find_hfontitem(HFONT hfont)
Definition: olefont.c:124
#define S_OK
Definition: intsafe.h:51
static ATOM item
Definition: dde.c:856
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

Referenced by OLEFontImpl_ReleaseHfont().

◆ dec_int_ref()

static HRESULT dec_int_ref ( HFONT  hfont)
static

Definition at line 173 of file olefont.c.

174 {
175  HFONTItem *item;
176  HRESULT hr = S_FALSE;
177 
180 
181  if(item)
182  {
183  item->int_refs--;
184  item->total_refs--;
185  if(item->int_refs == 0 && item->total_refs == 0)
187  hr = S_OK;
188  }
190 
191  return hr;
192 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define S_FALSE
Definition: winerror.h:2357
static HFONT hfont
static CRITICAL_SECTION OLEFontImpl_csHFONTLIST
Definition: olefont.c:84
LONG HRESULT
Definition: typedefs.h:79
static HFONTItem * find_hfontitem(HFONT hfont)
Definition: olefont.c:124
#define S_OK
Definition: intsafe.h:51
static ATOM item
Definition: dde.c:856
static void HFONTItem_Delete(PHFONTItem item)
Definition: olefont.c:116
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

Referenced by OLEFontImpl_Load(), OLEFontImpl_Release(), and realize_font().

◆ delete_dc()

static void delete_dc ( void  )
static

Definition at line 105 of file olefont.c.

106 {
108  if(olefont_hdc)
109  {
111  olefont_hdc = NULL;
112  }
114 }
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static CRITICAL_SECTION OLEFontImpl_csHFONTLIST
Definition: olefont.c:84
BOOL WINAPI DeleteDC(_In_ HDC)
static HDC olefont_hdc
Definition: olefont.c:55
#define NULL
Definition: types.h:112
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

Referenced by OLEFontImpl_Release().

◆ find_hfontitem()

static HFONTItem* find_hfontitem ( HFONT  hfont)
static

Definition at line 124 of file olefont.c.

125 {
126  HFONTItem *item;
127 
129  {
130  if (item->gdiFont == hfont)
131  return item;
132  }
133  return NULL;
134 }
static struct list OLEFontImpl_hFontList
Definition: olefont.c:76
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static HFONT hfont
uint32_t entry
Definition: isohybrid.c:63
static ATOM item
Definition: dde.c:856
#define NULL
Definition: types.h:112

Referenced by dec_ext_ref(), dec_int_ref(), inc_ext_ref(), and inc_int_ref().

◆ font_enum_proc()

static int CALLBACK font_enum_proc ( const LOGFONTW elf,
const TEXTMETRICW ntm,
DWORD  type,
LPARAM  lp 
)
static

Definition at line 564 of file olefont.c.

565 {
566  enum_data *data = (enum_data*)lp;
567 
568  if(elf->lfCharSet == data->orig_cs)
569  {
570  data->avail_cs = data->orig_cs;
571  return 0;
572  }
573  if(data->avail_cs == -1) data->avail_cs = elf->lfCharSet;
574  return 1;
575 }
BYTE lfCharSet
Definition: dimm.idl:67
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
short avail_cs
Definition: olefont.c:561

Referenced by realize_font().

◆ get_dc()

static HDC get_dc ( void  )
static

Definition at line 94 of file olefont.c.

95 {
96  HDC hdc;
98  if(!olefont_hdc)
100  hdc = olefont_hdc;
102  return hdc;
103 }
static HDC
Definition: imagelist.c:92
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static CRITICAL_SECTION OLEFontImpl_csHFONTLIST
Definition: olefont.c:84
HDC hdc
Definition: main.c:9
static HDC olefont_hdc
Definition: olefont.c:55
#define NULL
Definition: types.h:112
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

Referenced by OLEFontImpl_Construct(), and realize_font().

◆ HFONTItem_Delete()

static void HFONTItem_Delete ( PHFONTItem  item)
static

Definition at line 116 of file olefont.c.

117 {
118  DeleteObject(item->gdiFont);
119  list_remove(&item->entry);
121 }
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define GetProcessHeap()
Definition: compat.h:595
static ATOM item
Definition: dde.c:856
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by dec_int_ref(), and OLEFontImpl_Release().

◆ impl_from_IClassFactory()

static IClassFactoryImpl* impl_from_IClassFactory ( IClassFactory iface)
inlinestatic

Definition at line 2228 of file olefont.c.

2229 {
2230  return CONTAINING_RECORD(iface, IClassFactoryImpl, IClassFactory_iface);
2231 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by SFCF_AddRef(), SFCF_LockServer(), SFCF_QueryInterface(), and SFCF_Release().

◆ impl_from_IConnectionPointContainer()

static OLEFontImpl* impl_from_IConnectionPointContainer ( IConnectionPointContainer iface)
inlinestatic

Definition at line 304 of file olefont.c.

305 {
306  return CONTAINING_RECORD(iface, OLEFontImpl, IConnectionPointContainer_iface);
307 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by OLEFontImpl_EnumConnectionPoints(), OLEFontImpl_FindConnectionPoint(), OLEFontImpl_IConnectionPointContainer_AddRef(), OLEFontImpl_IConnectionPointContainer_QueryInterface(), and OLEFontImpl_IConnectionPointContainer_Release().

◆ impl_from_IDispatch()

static OLEFontImpl* impl_from_IDispatch ( IDispatch iface)
inlinestatic

Definition at line 294 of file olefont.c.

295 {
296  return CONTAINING_RECORD(iface, OLEFontImpl, IDispatch_iface);
297 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by OLEFontImpl_GetIDsOfNames(), OLEFontImpl_GetTypeInfo(), OLEFontImpl_GetTypeInfoCount(), OLEFontImpl_IDispatch_AddRef(), OLEFontImpl_IDispatch_QueryInterface(), OLEFontImpl_IDispatch_Release(), and OLEFontImpl_Invoke().

◆ impl_from_IFont()

◆ impl_from_IPersistPropertyBag()

static OLEFontImpl* impl_from_IPersistPropertyBag ( IPersistPropertyBag iface)
inlinestatic

Definition at line 309 of file olefont.c.

310 {
311  return CONTAINING_RECORD(iface, OLEFontImpl, IPersistPropertyBag_iface);
312 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by OLEFontImpl_IPersistPropertyBag_AddRef(), OLEFontImpl_IPersistPropertyBag_Load(), OLEFontImpl_IPersistPropertyBag_QueryInterface(), and OLEFontImpl_IPersistPropertyBag_Release().

◆ impl_from_IPersistStream()

static OLEFontImpl* impl_from_IPersistStream ( IPersistStream iface)
inlinestatic

Definition at line 299 of file olefont.c.

300 {
301  return CONTAINING_RECORD(iface, OLEFontImpl, IPersistStream_iface);
302 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by OLEFontImpl_GetSizeMax(), OLEFontImpl_IPersistStream_AddRef(), OLEFontImpl_IPersistStream_QueryInterface(), OLEFontImpl_IPersistStream_Release(), OLEFontImpl_Load(), and OLEFontImpl_Save().

◆ impl_from_IPersistStreamInit()

static OLEFontImpl* impl_from_IPersistStreamInit ( IPersistStreamInit iface)
inlinestatic

Definition at line 314 of file olefont.c.

315 {
316  return CONTAINING_RECORD(iface, OLEFontImpl, IPersistStreamInit_iface);
317 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by OLEFontImpl_IPersistStreamInit_AddRef(), OLEFontImpl_IPersistStreamInit_QueryInterface(), and OLEFontImpl_IPersistStreamInit_Release().

◆ inc_ext_ref()

static HRESULT inc_ext_ref ( HFONT  hfont)
static

Definition at line 194 of file olefont.c.

195 {
196  HFONTItem *item;
197  HRESULT hr = S_FALSE;
198 
200 
202  if(item)
203  {
204  item->total_refs++;
205  hr = S_OK;
206  }
208 
209  return hr;
210 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define S_FALSE
Definition: winerror.h:2357
static HFONT hfont
static CRITICAL_SECTION OLEFontImpl_csHFONTLIST
Definition: olefont.c:84
LONG HRESULT
Definition: typedefs.h:79
static HFONTItem * find_hfontitem(HFONT hfont)
Definition: olefont.c:124
#define S_OK
Definition: intsafe.h:51
static ATOM item
Definition: dde.c:856
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

Referenced by OLEFontImpl_AddRefHfont().

◆ inc_int_ref()

static HRESULT inc_int_ref ( HFONT  hfont)
static

Definition at line 152 of file olefont.c.

153 {
154  HFONTItem *item;
155  HRESULT hr = S_FALSE;
156 
159 
160  if(item)
161  {
162  item->int_refs++;
163  item->total_refs++;
164  hr = S_OK;
165  }
167 
168  return hr;
169 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define S_FALSE
Definition: winerror.h:2357
static HFONT hfont
static CRITICAL_SECTION OLEFontImpl_csHFONTLIST
Definition: olefont.c:84
LONG HRESULT
Definition: typedefs.h:79
static HFONTItem * find_hfontitem(HFONT hfont)
Definition: olefont.c:124
#define S_OK
Definition: intsafe.h:51
static ATOM item
Definition: dde.c:856
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

Referenced by OLEFontImpl_Clone().

◆ OleCreateFontIndirect()

HRESULT WINAPI OleCreateFontIndirect ( LPFONTDESC  lpFontDesc,
REFIID  riid,
LPVOID ppvObj 
)

Definition at line 331 of file olefont.c.

335 {
336  OLEFontImpl* newFont;
337  HRESULT hr;
338  FONTDESC fd;
339 
340  TRACE("(%p, %s, %p)\n", lpFontDesc, debugstr_guid(riid), ppvObj);
341 
342  if (!ppvObj) return E_POINTER;
343 
344  *ppvObj = 0;
345 
346  if (!lpFontDesc) {
347  static WCHAR fname[] = { 'S','y','s','t','e','m',0 };
348 
349  fd.cbSizeofstruct = sizeof(fd);
350  fd.lpstrName = fname;
351  fd.cySize.s.Lo = 80000;
352  fd.cySize.s.Hi = 0;
353  fd.sWeight = 0;
354  fd.sCharset = 0;
355  fd.fItalic = FALSE;
356  fd.fUnderline = FALSE;
357  fd.fStrikethrough = FALSE;
358  lpFontDesc = &fd;
359  }
360 
361  newFont = OLEFontImpl_Construct(lpFontDesc);
362  if (!newFont) return E_OUTOFMEMORY;
363 
364  hr = IFont_QueryInterface(&newFont->IFont_iface, riid, ppvObj);
365  IFont_Release(&newFont->IFont_iface);
366 
367  return hr;
368 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
IFont IFont_iface
Definition: olefont.c:253
static int fd
Definition: io.c:51
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define FALSE
Definition: types.h:117
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
static OLEFontImpl * OLEFontImpl_Construct(const FONTDESC *fontDesc)
Definition: olefont.c:2148
#define E_POINTER
Definition: winerror.h:2365

Referenced by SFCF_CreateInstance().

◆ OLEFont_SendNotify()

static void OLEFont_SendNotify ( OLEFontImpl this,
DISPID  dispID 
)
static

Definition at line 381 of file olefont.c.

382 {
383  static const WCHAR wszName[] = {'N','a','m','e',0};
384  static const WCHAR wszSize[] = {'S','i','z','e',0};
385  static const WCHAR wszBold[] = {'B','o','l','d',0};
386  static const WCHAR wszItalic[] = {'I','t','a','l','i','c',0};
387  static const WCHAR wszUnder[] = {'U','n','d','e','r','l','i','n','e',0};
388  static const WCHAR wszStrike[] = {'S','t','r','i','k','e','t','h','r','o','u','g','h',0};
389  static const WCHAR wszWeight[] = {'W','e','i','g','h','t',0};
390  static const WCHAR wszCharset[] = {'C','h','a','r','s','e','t',0};
391  static const LPCWSTR dispid_mapping[] =
392  {
393  wszName,
394  NULL,
395  wszSize,
396  wszBold,
397  wszItalic,
398  wszUnder,
399  wszStrike,
400  wszWeight,
401  wszCharset
402  };
403 
404  IEnumConnections *pEnum;
405  CONNECTDATA CD;
406  HRESULT hres;
407 
408  this->dirty = TRUE;
409 
410  hres = IConnectionPoint_EnumConnections(this->pPropertyNotifyCP, &pEnum);
411  if (SUCCEEDED(hres))
412  {
413  while(IEnumConnections_Next(pEnum, 1, &CD, NULL) == S_OK) {
415 
416  IUnknown_QueryInterface(CD.pUnk, &IID_IPropertyNotifySink, (void**)&sink);
417  IPropertyNotifySink_OnChanged(sink, dispID);
418  IPropertyNotifySink_Release(sink);
419  IUnknown_Release(CD.pUnk);
420  }
421  IEnumConnections_Release(pEnum);
422  }
423 
424  hres = IConnectionPoint_EnumConnections(this->pFontEventsCP, &pEnum);
425  if (SUCCEEDED(hres))
426  {
427  DISPPARAMS dispparams;
428  VARIANTARG vararg;
429 
430  VariantInit(&vararg);
431  V_VT(&vararg) = VT_BSTR;
432  V_BSTR(&vararg) = SysAllocString(dispid_mapping[dispID]);
433 
434  dispparams.cArgs = 1;
435  dispparams.cNamedArgs = 0;
436  dispparams.rgdispidNamedArgs = NULL;
437  dispparams.rgvarg = &vararg;
438 
439  while(IEnumConnections_Next(pEnum, 1, &CD, NULL) == S_OK) {
440  IFontEventsDisp *disp;
441 
442  IUnknown_QueryInterface(CD.pUnk, &IID_IFontEventsDisp, (void**)&disp);
443  IFontEventsDisp_Invoke(disp, DISPID_FONT_CHANGED, &IID_NULL,
444  LOCALE_NEUTRAL, INVOKE_FUNC, &dispparams, NULL,
445  NULL, NULL);
446 
447  IFontEventsDisp_Release(disp);
448  IUnknown_Release(CD.pUnk);
449  }
450  VariantClear(&vararg);
451  IEnumConnections_Release(pEnum);
452  }
453 }
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define TRUE
Definition: types.h:120
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
GLsizei GLenum GLboolean sink
Definition: glext.h:5672
if SUCCEEDED(hr)
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
#define IID_NULL
Definition: guiddef.h:98
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:51
const GUID IID_IPropertyNotifySink
#define NULL
Definition: types.h:112
#define DISPID_FONT_CHANGED
Definition: olectl.h:435
r dirty
Definition: btrfs.c:2938
struct stdole::DISPPARAMS DISPPARAMS
#define LOCALE_NEUTRAL
const GUID IID_IFontEventsDisp

Referenced by OLEFontImpl_put_Bold(), OLEFontImpl_put_Charset(), OLEFontImpl_put_Italic(), OLEFontImpl_put_Name(), OLEFontImpl_put_Size(), OLEFontImpl_put_Strikethrough(), OLEFontImpl_put_Underline(), and OLEFontImpl_put_Weight().

◆ OLEFontImpl_AddRef()

static ULONG WINAPI OLEFontImpl_AddRef ( IFont iface)
static

Definition at line 513 of file olefont.c.

515 {
516  OLEFontImpl *this = impl_from_IFont(iface);
517  TRACE("(%p)->(ref=%d)\n", this, this->ref);
518  return InterlockedIncrement(&this->ref);
519 }
Definition: send.c:48
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53

◆ OLEFontImpl_AddRefHfont()

static HRESULT WINAPI OLEFontImpl_AddRefHfont ( IFont iface,
HFONT  hfont 
)
static

Definition at line 1123 of file olefont.c.

1126 {
1127  OLEFontImpl *this = impl_from_IFont(iface);
1128 
1129  TRACE("(%p)->(%p)\n", this, hfont);
1130 
1131  if (!hfont) return E_INVALIDARG;
1132 
1133  return inc_ext_ref(hfont);
1134 }
static HRESULT inc_ext_ref(HFONT hfont)
Definition: olefont.c:194
#define E_INVALIDARG
Definition: ddrawi.h:101
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
static HFONT hfont
#define TRACE(s)
Definition: solgame.cpp:4

◆ OLEFontImpl_Clone()

static HRESULT WINAPI OLEFontImpl_Clone ( IFont iface,
IFont **  ppfont 
)
static

Definition at line 987 of file olefont.c.

990 {
991  OLEFontImpl *this = impl_from_IFont(iface);
992  OLEFontImpl* newObject;
993 
994  TRACE("(%p)->(%p)\n", this, ppfont);
995 
996  if (ppfont == NULL)
997  return E_POINTER;
998 
999  *ppfont = NULL;
1000 
1001  newObject = HeapAlloc(GetProcessHeap(), 0, sizeof(OLEFontImpl));
1002  if (newObject==NULL)
1003  return E_OUTOFMEMORY;
1004 
1005  *newObject = *this;
1006  /* allocate separate buffer */
1007  newObject->description.lpstrName = strdupW(this->description.lpstrName);
1008 
1009  /* Increment internal ref in hfont item list */
1010  if(newObject->gdiFont) inc_int_ref(newObject->gdiFont);
1011 
1013 
1014  newObject->pPropertyNotifyCP = NULL;
1015  newObject->pFontEventsCP = NULL;
1017  &newObject->pPropertyNotifyCP);
1019  &newObject->pFontEventsCP);
1020 
1021  if (!newObject->pPropertyNotifyCP || !newObject->pFontEventsCP)
1022  {
1023  OLEFontImpl_Destroy(newObject);
1024  return E_OUTOFMEMORY;
1025  }
1026 
1027  /* The cloned object starts with a reference count of 1 */
1028  newObject->ref = 1;
1029 
1030  *ppfont = &newObject->IFont_iface;
1031 
1032  return S_OK;
1033 }
IFont IFont_iface
Definition: olefont.c:253
HFONT gdiFont
Definition: olefont.c:272
const char * description
Definition: directx.c:2497
static WCHAR * strdupW(const WCHAR *str)
Definition: olefont.c:229
IConnectionPoint * pFontEventsCP
Definition: olefont.c:286
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static LONG ifont_cnt
Definition: olefont.c:79
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
FONTDESC description
Definition: olefont.c:267
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG ref
Definition: olefont.c:262
IConnectionPoint * pPropertyNotifyCP
Definition: olefont.c:285
#define S_OK
Definition: intsafe.h:51
#define InterlockedIncrement
Definition: armddk.h:53
static HRESULT inc_int_ref(HFONT hfont)
Definition: olefont.c:152
LPOLESTR lpstrName
Definition: olectl.h:120
const GUID IID_IPropertyNotifySink
#define NULL
Definition: types.h:112
HRESULT CreateConnectionPoint(IUnknown *pUnk, REFIID riid, IConnectionPoint **pCP)
Definition: connpt.c:572
static void OLEFontImpl_Destroy(OLEFontImpl *fontDesc)
Definition: olefont.c:2204
const GUID IID_IFontEventsDisp
#define E_POINTER
Definition: winerror.h:2365

◆ OLEFontImpl_Construct()

static OLEFontImpl * OLEFontImpl_Construct ( const FONTDESC fontDesc)
static

Definition at line 2148 of file olefont.c.

2149 {
2150  OLEFontImpl* newObject;
2151 
2152  newObject = HeapAlloc(GetProcessHeap(), 0, sizeof(OLEFontImpl));
2153 
2154  if (newObject==0)
2155  return newObject;
2156 
2157  newObject->IFont_iface.lpVtbl = &OLEFontImpl_VTable;
2158  newObject->IDispatch_iface.lpVtbl = &OLEFontImpl_IDispatch_VTable;
2163 
2164  newObject->ref = 1;
2165 
2166  newObject->description.cbSizeofstruct = sizeof(FONTDESC);
2167  newObject->description.lpstrName = strdupW(fontDesc->lpstrName);
2168  newObject->description.cySize = fontDesc->cySize;
2169  newObject->description.sWeight = fontDesc->sWeight;
2170  newObject->description.sCharset = fontDesc->sCharset;
2171  newObject->description.fItalic = fontDesc->fItalic;
2172  newObject->description.fUnderline = fontDesc->fUnderline;
2173  newObject->description.fStrikethrough = fontDesc->fStrikethrough;
2174 
2175  newObject->gdiFont = 0;
2176  newObject->dirty = TRUE;
2177  newObject->cyLogical = GetDeviceCaps(get_dc(), LOGPIXELSY);
2178  newObject->cyHimetric = 2540L;
2179  newObject->pPropertyNotifyCP = NULL;
2180  newObject->pFontEventsCP = NULL;
2181 
2184 
2185  if (!newObject->pPropertyNotifyCP || !newObject->pFontEventsCP)
2186  {
2187  OLEFontImpl_Destroy(newObject);
2188  return NULL;
2189  }
2190 
2192 
2193  TRACE("returning %p\n", newObject);
2194  return newObject;
2195 }
static const IFontVtbl OLEFontImpl_VTable
Definition: olefont.c:1164
#define TRUE
Definition: types.h:120
BOOL fItalic
Definition: olectl.h:124
IPersistPropertyBag IPersistPropertyBag_iface
Definition: olefont.c:257
IFont IFont_iface
Definition: olefont.c:253
HFONT gdiFont
Definition: olefont.c:272
BOOL fStrikethrough
Definition: olectl.h:126
CY cySize
Definition: olectl.h:121
IConnectionPointContainer IConnectionPointContainer_iface
Definition: olefont.c:256
static const IPersistStreamVtbl OLEFontImpl_IPersistStream_VTable
Definition: olefont.c:1782
static WCHAR * strdupW(const WCHAR *str)
Definition: olefont.c:229
static const IConnectionPointContainerVtbl OLEFontImpl_IConnectionPointContainer_VTable
Definition: olefont.c:1866
LONG cyLogical
Definition: olefont.c:277
static HDC get_dc(void)
Definition: olefont.c:94
IConnectionPoint * pFontEventsCP
Definition: olefont.c:286
static LONG ifont_cnt
Definition: olefont.c:79
struct tagFONTDESC FONTDESC
FONTDESC description
Definition: olefont.c:267
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG ref
Definition: olefont.c:262
UINT cbSizeofstruct
Definition: olectl.h:119
static const IPersistPropertyBagVtbl OLEFontImpl_IPersistPropertyBag_VTable
Definition: olefont.c:2047
IConnectionPoint * pPropertyNotifyCP
Definition: olefont.c:285
IDispatch IDispatch_iface
Definition: olefont.c:254
LONG cyHimetric
Definition: olefont.c:278
static const IDispatchVtbl OLEFontImpl_IDispatch_VTable
Definition: olefont.c:1526
static const WCHAR L[]
Definition: oid.c:1250
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
SHORT sWeight
Definition: olectl.h:122
IPersistStreamInit IPersistStreamInit_iface
Definition: olefont.c:258
static const IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable
Definition: olefont.c:2125
#define InterlockedIncrement
Definition: armddk.h:53
BOOL dirty
Definition: olefont.c:273
LPOLESTR lpstrName
Definition: olectl.h:120
const GUID IID_IPropertyNotifySink
#define NULL
Definition: types.h:112
HRESULT CreateConnectionPoint(IUnknown *pUnk, REFIID riid, IConnectionPoint **pCP)
Definition: connpt.c:572
IPersistStream IPersistStream_iface
Definition: olefont.c:255
static void OLEFontImpl_Destroy(OLEFontImpl *fontDesc)
Definition: olefont.c:2204
const GUID IID_IFontEventsDisp
#define LOGPIXELSY
Definition: wingdi.h:718
BOOL fUnderline
Definition: olectl.h:125
SHORT sCharset
Definition: olectl.h:123

Referenced by OleCreateFontIndirect().

◆ OLEFontImpl_Destroy()

static void OLEFontImpl_Destroy ( OLEFontImpl fontDesc)
static

Definition at line 2204 of file olefont.c.

2205 {
2206  TRACE("(%p)\n", fontDesc);
2207 
2208  HeapFree(GetProcessHeap(), 0, fontDesc->description.lpstrName);
2209 
2210  if (fontDesc->pPropertyNotifyCP)
2211  IConnectionPoint_Release(fontDesc->pPropertyNotifyCP);
2212  if (fontDesc->pFontEventsCP)
2213  IConnectionPoint_Release(fontDesc->pFontEventsCP);
2214 
2215  HeapFree(GetProcessHeap(), 0, fontDesc);
2216 }
IConnectionPoint * pFontEventsCP
Definition: olefont.c:286
FONTDESC description
Definition: olefont.c:267
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
IConnectionPoint * pPropertyNotifyCP
Definition: olefont.c:285
LPOLESTR lpstrName
Definition: olectl.h:120
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by OLEFontImpl_Clone(), OLEFontImpl_Construct(), and OLEFontImpl_Release().

◆ OLEFontImpl_EnumConnectionPoints()

static HRESULT WINAPI OLEFontImpl_EnumConnectionPoints ( IConnectionPointContainer iface,
IEnumConnectionPoints **  ppEnum 
)
static

Definition at line 1832 of file olefont.c.

1835 {
1837 
1838  FIXME("(%p)->(%p): stub\n", this, ppEnum);
1839  return E_NOTIMPL;
1840 }
static OLEFontImpl * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: olefont.c:304
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OLEFontImpl_FindConnectionPoint()

static HRESULT WINAPI OLEFontImpl_FindConnectionPoint ( IConnectionPointContainer iface,
REFIID  riid,
IConnectionPoint **  ppCp 
)
static

Definition at line 1845 of file olefont.c.

1849 {
1851  TRACE("(%p)->(%s, %p)\n", this, debugstr_guid(riid), ppCp);
1852 
1854  return IConnectionPoint_QueryInterface(this->pPropertyNotifyCP, &IID_IConnectionPoint,
1855  (void**)ppCp);
1856  } else if(IsEqualIID(riid, &IID_IFontEventsDisp)) {
1857  return IConnectionPoint_QueryInterface(this->pFontEventsCP, &IID_IConnectionPoint,
1858  (void**)ppCp);
1859  } else {
1860  FIXME("no connection point for %s\n", debugstr_guid(riid));
1861  return CONNECT_E_NOCONNECTION;
1862  }
1863 }
static OLEFontImpl * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: olefont.c:304
REFIID riid
Definition: precomp.h:44
#define CONNECT_E_NOCONNECTION
Definition: olectl.h:251
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IConnectionPoint
const GUID IID_IPropertyNotifySink
const GUID IID_IFontEventsDisp
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ OLEFontImpl_get_Bold()

static HRESULT WINAPI OLEFontImpl_get_Bold ( IFont iface,
BOOL pbold 
)
static

Definition at line 754 of file olefont.c.

757 {
758  OLEFontImpl *this = impl_from_IFont(iface);
759  TRACE("(%p)->(%p)\n", this, pbold);
760 
761  if (!pbold) return E_POINTER;
762 
763  realize_font(this);
764 
765  *pbold = this->description.sWeight > 550;
766 
767  return S_OK;
768 }
static void realize_font(OLEFontImpl *This)
Definition: olefont.c:577
const char * description
Definition: directx.c:2497
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define E_POINTER
Definition: winerror.h:2365

◆ OLEFontImpl_get_Charset()

static HRESULT WINAPI OLEFontImpl_get_Charset ( IFont iface,
short pcharset 
)
static

Definition at line 932 of file olefont.c.

935 {
936  OLEFontImpl *this = impl_from_IFont(iface);
937  TRACE("(%p)->(%p)\n", this, pcharset);
938 
939  if (pcharset==0)
940  return E_POINTER;
941 
942  realize_font(this);
943 
944  *pcharset = this->description.sCharset;
945 
946  return S_OK;
947 }
static void realize_font(OLEFontImpl *This)
Definition: olefont.c:577
const char * description
Definition: directx.c:2497
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define E_POINTER
Definition: winerror.h:2365

Referenced by OLEFontImpl_Invoke().

◆ OLEFontImpl_get_hFont()

static HRESULT WINAPI OLEFontImpl_get_hFont ( IFont iface,
HFONT phfont 
)
static

Definition at line 968 of file olefont.c.

971 {
972  OLEFontImpl *this = impl_from_IFont(iface);
973  TRACE("(%p)->(%p)\n", this, phfont);
974  if (phfont==NULL)
975  return E_POINTER;
976 
977  realize_font(this);
978 
979  *phfont = this->gdiFont;
980  TRACE("Returning %p\n", *phfont);
981  return S_OK;
982 }
static void realize_font(OLEFontImpl *This)
Definition: olefont.c:577
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ OLEFontImpl_get_Italic()

static HRESULT WINAPI OLEFontImpl_get_Italic ( IFont iface,
BOOL pitalic 
)
static

Definition at line 788 of file olefont.c.

791 {
792  OLEFontImpl *this = impl_from_IFont(iface);
793  TRACE("(%p)->(%p)\n", this, pitalic);
794 
795  if (pitalic==0)
796  return E_POINTER;
797 
798  realize_font(this);
799 
800  *pitalic = this->description.fItalic;
801 
802  return S_OK;
803 }
static void realize_font(OLEFontImpl *This)
Definition: olefont.c:577
const char * description
Definition: directx.c:2497
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define E_POINTER
Definition: winerror.h:2365

◆ OLEFontImpl_get_Name()

static HRESULT WINAPI OLEFontImpl_get_Name ( IFont iface,
BSTR pname 
)
static

Definition at line 665 of file olefont.c.

668 {
669  OLEFontImpl *this = impl_from_IFont(iface);
670  TRACE("(%p)->(%p)\n", this, pname);
671 
672  if (pname==0)
673  return E_POINTER;
674 
675  realize_font(this);
676 
677  if (this->description.lpstrName!=0)
678  *pname = SysAllocString(this->description.lpstrName);
679  else
680  *pname = 0;
681 
682  return S_OK;
683 }
static void realize_font(OLEFontImpl *This)
Definition: olefont.c:577
const char * description
Definition: directx.c:2497
GLenum pname
Definition: glext.h:5645
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define E_POINTER
Definition: winerror.h:2365

◆ OLEFontImpl_get_Size()

static HRESULT WINAPI OLEFontImpl_get_Size ( IFont iface,
CY psize 
)
static

Definition at line 710 of file olefont.c.

713 {
714  OLEFontImpl *this = impl_from_IFont(iface);
715  TRACE("(%p)->(%p)\n", this, psize);
716 
717  if (!psize) return E_POINTER;
718 
719  realize_font(this);
720 
721  /*
722  * Convert realized font height in pixels to points descaled by current
723  * scaling ratio then scaled up by 10000.
724  */
725  psize->s.Lo = MulDiv(this->nRealHeight,
726  this->cyHimetric * 72 * 10000,
727  this->cyLogical * 2540);
728  psize->s.Hi = 0;
729 
730  return S_OK;
731 }
_Must_inspect_result_ _Out_ LPSIZE psize
Definition: ntgdi.h:1569
static void realize_font(OLEFontImpl *This)
Definition: olefont.c:577
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define E_POINTER
Definition: winerror.h:2365
#define MulDiv(x, y, z)
Definition: gdifloat.h:86

◆ OLEFontImpl_get_Strikethrough()

static HRESULT WINAPI OLEFontImpl_get_Strikethrough ( IFont iface,
BOOL pstrikethrough 
)
static

Definition at line 860 of file olefont.c.

863 {
864  OLEFontImpl *this = impl_from_IFont(iface);
865  TRACE("(%p)->(%p)\n", this, pstrikethrough);
866 
867  if (pstrikethrough==0)
868  return E_POINTER;
869 
870  realize_font(this);
871 
872  *pstrikethrough = this->description.fStrikethrough;
873 
874  return S_OK;
875 }
static void realize_font(OLEFontImpl *This)
Definition: olefont.c:577
const char * description
Definition: directx.c:2497
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define E_POINTER
Definition: winerror.h:2365

◆ OLEFontImpl_get_Underline()

static HRESULT WINAPI OLEFontImpl_get_Underline ( IFont iface,
BOOL punderline 
)
static

Definition at line 824 of file olefont.c.

827 {
828  OLEFontImpl *this = impl_from_IFont(iface);
829  TRACE("(%p)->(%p)\n", this, punderline);
830 
831  if (punderline==0)
832  return E_POINTER;
833 
834  realize_font(this);
835 
836  *punderline = this->description.fUnderline;
837 
838  return S_OK;
839 }
static void realize_font(OLEFontImpl *This)
Definition: olefont.c:577
const char * description
Definition: directx.c:2497
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define E_POINTER
Definition: winerror.h:2365

◆ OLEFontImpl_get_Weight()

static HRESULT WINAPI OLEFontImpl_get_Weight ( IFont iface,
short pweight 
)
static

Definition at line 896 of file olefont.c.

899 {
900  OLEFontImpl *this = impl_from_IFont(iface);
901  TRACE("(%p)->(%p)\n", this, pweight);
902 
903  if (pweight==0)
904  return E_POINTER;
905 
906  realize_font(this);
907 
908  *pweight = this->description.sWeight;
909 
910  return S_OK;
911 }
static void realize_font(OLEFontImpl *This)
Definition: olefont.c:577
const char * description
Definition: directx.c:2497
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define E_POINTER
Definition: winerror.h:2365

◆ OLEFontImpl_GetClassID()

static HRESULT WINAPI OLEFontImpl_GetClassID ( IPersistStream iface,
CLSID pClassID 
)
static

Definition at line 1575 of file olefont.c.

1578 {
1579  TRACE("(%p,%p)\n",iface,pClassID);
1580  if (pClassID==0)
1581  return E_POINTER;
1582 
1583  *pClassID = CLSID_StdFont;
1584 
1585  return S_OK;
1586 }
const GUID CLSID_StdFont
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define E_POINTER
Definition: winerror.h:2365

◆ OLEFontImpl_GetIDsOfNames()

static HRESULT WINAPI OLEFontImpl_GetIDsOfNames ( IDispatch iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 1274 of file olefont.c.

1281 {
1282  ITypeInfo * pTInfo;
1283  HRESULT hres;
1284 
1285  OLEFontImpl *this = impl_from_IDispatch(iface);
1286 
1287  TRACE("(%p,%s,%p,cNames=%d,lcid=%04x,%p)\n", this, debugstr_guid(riid),
1288  rgszNames, cNames, (int)lcid, rgDispId);
1289 
1290  if (cNames == 0) return E_INVALIDARG;
1291 
1292  hres = IDispatch_GetTypeInfo(iface, 0, lcid, &pTInfo);
1293  if (FAILED(hres))
1294  {
1295  ERR("GetTypeInfo failed.\n");
1296  return hres;
1297  }
1298 
1299  /* convert names to DISPIDs */
1300  hres = DispGetIDsOfNames (pTInfo, rgszNames, cNames, rgDispId);
1301  ITypeInfo_Release(pTInfo);
1302 
1303  return hres;
1304 }
REFIID riid
Definition: precomp.h:44
HRESULT WINAPI DispGetIDsOfNames(ITypeInfo *ptinfo, OLECHAR **rgszNames, UINT cNames, DISPID *rgdispid)
Definition: dispatch.c:92
static OLEFontImpl * impl_from_IDispatch(IDispatch *iface)
Definition: olefont.c:294
#define E_INVALIDARG
Definition: ddrawi.h:101
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:79
#define ERR(fmt,...)
Definition: debug.h:110

◆ OLEFontImpl_GetSizeMax()

static HRESULT WINAPI OLEFontImpl_GetSizeMax ( IPersistStream iface,
ULARGE_INTEGER pcbSize 
)
static

Definition at line 1755 of file olefont.c.

1758 {
1759  OLEFontImpl *this = impl_from_IPersistStream(iface);
1760 
1761  if (pcbSize==NULL)
1762  return E_POINTER;
1763 
1764  pcbSize->u.HighPart = 0;
1765  pcbSize->u.LowPart = 0;
1766 
1767  pcbSize->u.LowPart += sizeof(BYTE); /* Version */
1768  pcbSize->u.LowPart += sizeof(WORD); /* Lang code */
1769  pcbSize->u.LowPart += sizeof(BYTE); /* Flags */
1770  pcbSize->u.LowPart += sizeof(WORD); /* Weight */
1771  pcbSize->u.LowPart += sizeof(DWORD); /* Size */
1772  pcbSize->u.LowPart += sizeof(BYTE); /* StrLength */
1773 
1774  if (this->description.lpstrName!=0)
1775  pcbSize->u.LowPart += WideCharToMultiByte( CP_ACP, 0, this->description.lpstrName,
1776  lstrlenW(this->description.lpstrName),
1777  NULL, 0, NULL, NULL );
1778 
1779  return S_OK;
1780 }
#define WideCharToMultiByte
Definition: compat.h:111
#define CP_ACP
Definition: compat.h:109
static OLEFontImpl * impl_from_IPersistStream(IPersistStream *iface)
Definition: olefont.c:299
const char * description
Definition: directx.c:2497
#define lstrlenW
Definition: compat.h:609
#define DWORD
Definition: nt_native.h:44
struct _ULARGE_INTEGER::@3949 u
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned char BYTE
Definition: xxhash.c:193
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ OLEFontImpl_GetTypeInfo()

static HRESULT WINAPI OLEFontImpl_GetTypeInfo ( IDispatch iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 1244 of file olefont.c.

1249 {
1250  static const WCHAR stdole2tlb[] = {'s','t','d','o','l','e','2','.','t','l','b',0};
1251  ITypeLib *tl;
1252  HRESULT hres;
1253 
1254  OLEFontImpl *this = impl_from_IDispatch(iface);
1255  TRACE("(%p, iTInfo=%d, lcid=%04x, %p)\n", this, iTInfo, (int)lcid, ppTInfo);
1256  if (iTInfo != 0)
1257  return E_FAIL;
1258  hres = LoadTypeLib(stdole2tlb, &tl);
1259  if (FAILED(hres)) {
1260  ERR("Could not load the stdole2.tlb?\n");
1261  return hres;
1262  }
1263  hres = ITypeLib_GetTypeInfoOfGuid(tl, &IID_IFontDisp, ppTInfo);
1264  ITypeLib_Release(tl);
1265  if (FAILED(hres)) {
1266  FIXME("Did not IDispatch typeinfo from typelib, hres %x\n",hres);
1267  }
1268  return hres;
1269 }
HRESULT WINAPI LoadTypeLib(const OLECHAR *szFile, ITypeLib **pptLib)
Definition: typelib.c:458
static OLEFontImpl * impl_from_IDispatch(IDispatch *iface)
Definition: olefont.c:294
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:111
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
const GUID IID_IFontDisp
#define ERR(fmt,...)
Definition: debug.h:110

◆ OLEFontImpl_GetTypeInfoCount()

static HRESULT WINAPI OLEFontImpl_GetTypeInfoCount ( IDispatch iface,
unsigned int pctinfo 
)
static

Definition at line 1230 of file olefont.c.

1233 {
1234  OLEFontImpl *this = impl_from_IDispatch(iface);
1235  TRACE("(%p)->(%p)\n", this, pctinfo);
1236  *pctinfo = 1;
1237 
1238  return S_OK;
1239 }
static OLEFontImpl * impl_from_IDispatch(IDispatch *iface)
Definition: olefont.c:294
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51

◆ OLEFontImpl_IConnectionPointContainer_AddRef()

static ULONG WINAPI OLEFontImpl_IConnectionPointContainer_AddRef ( IConnectionPointContainer iface)
static

Definition at line 1821 of file olefont.c.

1823 {
1825 
1826  return IFont_AddRef(&this->IFont_iface);
1827 }
static OLEFontImpl * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: olefont.c:304

◆ OLEFontImpl_IConnectionPointContainer_QueryInterface()

static HRESULT WINAPI OLEFontImpl_IConnectionPointContainer_QueryInterface ( IConnectionPointContainer iface,
REFIID  riid,
VOID **  ppvoid 
)
static

Definition at line 1797 of file olefont.c.

1801 {
1803 
1804  return IFont_QueryInterface(&this->IFont_iface, riid, ppvoid);
1805 }
static OLEFontImpl * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: olefont.c:304
REFIID riid
Definition: precomp.h:44

◆ OLEFontImpl_IConnectionPointContainer_Release()

static ULONG WINAPI OLEFontImpl_IConnectionPointContainer_Release ( IConnectionPointContainer iface)
static

Definition at line 1810 of file olefont.c.

1812 {
1814 
1815  return IFont_Release(&this->IFont_iface);
1816 }
static OLEFontImpl * impl_from_IConnectionPointContainer(IConnectionPointContainer *iface)
Definition: olefont.c:304

◆ OLEFontImpl_IDispatch_AddRef()

static ULONG WINAPI OLEFontImpl_IDispatch_AddRef ( IDispatch iface)
static

Definition at line 1220 of file olefont.c.

1222 {
1223  OLEFontImpl *this = impl_from_IDispatch(iface);
1224  return IFont_AddRef(&this->IFont_iface);
1225 }
static OLEFontImpl * impl_from_IDispatch(IDispatch *iface)
Definition: olefont.c:294

◆ OLEFontImpl_IDispatch_QueryInterface()

static HRESULT WINAPI OLEFontImpl_IDispatch_QueryInterface ( IDispatch iface,
REFIID  riid,
VOID **  ppvoid 
)
static

Definition at line 1198 of file olefont.c.

1202 {
1203  OLEFontImpl *this = impl_from_IDispatch(iface);
1204  return IFont_QueryInterface(&this->IFont_iface, riid, ppvoid);
1205 }
REFIID riid
Definition: precomp.h:44
static OLEFontImpl * impl_from_IDispatch(IDispatch *iface)
Definition: olefont.c:294

◆ OLEFontImpl_IDispatch_Release()

static ULONG WINAPI OLEFontImpl_IDispatch_Release ( IDispatch iface)
static

Definition at line 1210 of file olefont.c.

1212 {
1213  OLEFontImpl *this = impl_from_IDispatch(iface);
1214  return IFont_Release(&this->IFont_iface);
1215 }
static OLEFontImpl * impl_from_IDispatch(IDispatch *iface)
Definition: olefont.c:294

◆ OLEFontImpl_Invoke()

static HRESULT WINAPI OLEFontImpl_Invoke ( IDispatch iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExepInfo,
UINT puArgErr 
)
static

Definition at line 1310 of file olefont.c.

1320 {
1321  OLEFontImpl *this = impl_from_IDispatch(iface);
1322  HRESULT hr;
1323 
1324  TRACE("%p->(%d,%s,0x%x,0x%x,%p,%p,%p,%p)\n", this, dispIdMember,
1325  debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExepInfo,
1326  puArgErr);
1327 
1328  /* validate parameters */
1329 
1330  if (!IsEqualIID(riid, &IID_NULL))
1331  {
1332  ERR("riid was %s instead of IID_NULL\n", debugstr_guid(riid));
1333  return DISP_E_UNKNOWNINTERFACE;
1334  }
1335 
1337  {
1338  if (!pVarResult)
1339  {
1340  ERR("null pVarResult not allowed when DISPATCH_PROPERTYGET specified\n");
1341  return DISP_E_PARAMNOTOPTIONAL;
1342  }
1343  }
1344  else if (wFlags & DISPATCH_PROPERTYPUT)
1345  {
1346  if (!pDispParams)
1347  {
1348  ERR("null pDispParams not allowed when DISPATCH_PROPERTYPUT specified\n");
1349  return DISP_E_PARAMNOTOPTIONAL;
1350  }
1351  if (pDispParams->cArgs != 1)
1352  {
1353  ERR("param count for DISPATCH_PROPERTYPUT was %d instead of 1\n", pDispParams->cArgs);
1354  return DISP_E_BADPARAMCOUNT;
1355  }
1356  }
1357  else
1358  {
1359  ERR("one of DISPATCH_PROPERTYGET or DISPATCH_PROPERTYPUT must be specified\n");
1360  return DISP_E_MEMBERNOTFOUND;
1361  }
1362 
1363  switch (dispIdMember) {
1364  case DISPID_FONT_NAME:
1365  if (wFlags & DISPATCH_PROPERTYGET) {
1366  V_VT(pVarResult) = VT_BSTR;
1367  return IFont_get_Name(&this->IFont_iface, &V_BSTR(pVarResult));
1368  } else {
1369  VARIANTARG vararg;
1370 
1371  VariantInit(&vararg);
1372  hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_BSTR);
1373  if (FAILED(hr))
1374  return hr;
1375 
1376  hr = IFont_put_Name(&this->IFont_iface, V_BSTR(&vararg));
1377 
1378  VariantClear(&vararg);
1379  return hr;
1380  }
1381  break;
1382  case DISPID_FONT_BOLD:
1383  if (wFlags & DISPATCH_PROPERTYGET) {
1384  BOOL value;
1385  hr = IFont_get_Bold(&this->IFont_iface, &value);
1386  V_VT(pVarResult) = VT_BOOL;
1387  V_BOOL(pVarResult) = value ? VARIANT_TRUE : VARIANT_FALSE;
1388  return hr;
1389  } else {
1390  VARIANTARG vararg;
1391 
1392  VariantInit(&vararg);
1393  hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_BOOL);
1394  if (FAILED(hr))
1395  return hr;
1396 
1397  hr = IFont_put_Bold(&this->IFont_iface, V_BOOL(&vararg));
1398 
1399  VariantClear(&vararg);
1400  return hr;
1401  }
1402  break;
1403  case DISPID_FONT_ITALIC:
1404  if (wFlags & DISPATCH_PROPERTYGET) {
1405  BOOL value;
1406  hr = IFont_get_Italic(&this->IFont_iface, &value);
1407  V_VT(pVarResult) = VT_BOOL;
1408  V_BOOL(pVarResult) = value ? VARIANT_TRUE : VARIANT_FALSE;
1409  return hr;
1410  } else {
1411  VARIANTARG vararg;
1412 
1413  VariantInit(&vararg);
1414  hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_BOOL);
1415  if (FAILED(hr))
1416  return hr;
1417 
1418  hr = IFont_put_Italic(&this->IFont_iface, V_BOOL(&vararg));
1419 
1420  VariantClear(&vararg);
1421  return hr;
1422  }
1423  break;
1424  case DISPID_FONT_UNDER:
1425  if (wFlags & DISPATCH_PROPERTYGET) {
1426  BOOL value;
1427  hr = IFont_get_Underline(&this->IFont_iface, &value);
1428  V_VT(pVarResult) = VT_BOOL;
1429  V_BOOL(pVarResult) = value ? VARIANT_TRUE : VARIANT_FALSE;
1430  return hr;
1431  } else {
1432  VARIANTARG vararg;
1433 
1434  VariantInit(&vararg);
1435  hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_BOOL);
1436  if (FAILED(hr))
1437  return hr;
1438 
1439  hr = IFont_put_Underline(&this->IFont_iface, V_BOOL(&vararg));
1440 
1441  VariantClear(&vararg);
1442  return hr;
1443  }
1444  break;
1445  case DISPID_FONT_STRIKE:
1446  if (wFlags & DISPATCH_PROPERTYGET) {
1447  BOOL value;
1448  hr = IFont_get_Strikethrough(&this->IFont_iface, &value);
1449  V_VT(pVarResult) = VT_BOOL;
1450  V_BOOL(pVarResult) = value ? VARIANT_TRUE : VARIANT_FALSE;
1451  return hr;
1452  } else {
1453  VARIANTARG vararg;
1454 
1455  VariantInit(&vararg);
1456  hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_BOOL);
1457  if (FAILED(hr))
1458  return hr;
1459 
1460  hr = IFont_put_Strikethrough(&this->IFont_iface, V_BOOL(&vararg));
1461 
1462  VariantClear(&vararg);
1463  return hr;
1464  }
1465  break;
1466  case DISPID_FONT_SIZE:
1467  if (wFlags & DISPATCH_PROPERTYGET) {
1468  V_VT(pVarResult) = VT_CY;
1469  return IFont_get_Size(&this->IFont_iface, &V_CY(pVarResult));
1470  } else {
1471  VARIANTARG vararg;
1472 
1473  VariantInit(&vararg);
1474  hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_CY);
1475  if (FAILED(hr))
1476  return hr;
1477 
1478  hr = IFont_put_Size(&this->IFont_iface, V_CY(&vararg));
1479 
1480  VariantClear(&vararg);
1481  return hr;
1482  }
1483  break;
1484  case DISPID_FONT_WEIGHT:
1485  if (wFlags & DISPATCH_PROPERTYGET) {
1486  V_VT(pVarResult) = VT_I2;
1487  return IFont_get_Weight(&this->IFont_iface, &V_I2(pVarResult));
1488  } else {
1489  VARIANTARG vararg;
1490 
1491  VariantInit(&vararg);
1492  hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_I2);
1493  if (FAILED(hr))
1494  return hr;
1495 
1496  hr = IFont_put_Weight(&this->IFont_iface, V_I2(&vararg));
1497 
1498  VariantClear(&vararg);
1499  return hr;
1500  }
1501  break;
1502  case DISPID_FONT_CHARSET:
1503  if (wFlags & DISPATCH_PROPERTYGET) {
1504  V_VT(pVarResult) = VT_I2;
1505  return OLEFontImpl_get_Charset(&this->IFont_iface, &V_I2(pVarResult));
1506  } else {
1507  VARIANTARG vararg;
1508 
1509  VariantInit(&vararg);
1510  hr = VariantChangeTypeEx(&vararg, &pDispParams->rgvarg[0], lcid, 0, VT_I2);
1511  if (FAILED(hr))
1512  return hr;
1513 
1514  hr = IFont_put_Charset(&this->IFont_iface, V_I2(&vararg));
1515 
1516  VariantClear(&vararg);
1517  return hr;
1518  }
1519  break;
1520  default:
1521  ERR("member not found for dispid 0x%x\n", dispIdMember);
1522  return DISP_E_MEMBERNOTFOUND;
1523  }
1524 }
#define DISPID_FONT_UNDER
Definition: olectl.h:431
#define DISPATCH_PROPERTYGET
Definition: oleauto.h:1007
HRESULT hr
Definition: shlfolder.c:183
#define DISPID_FONT_WEIGHT
Definition: olectl.h:433
REFIID riid
Definition: precomp.h:44
#define V_I2(A)
Definition: oleauto.h:245
#define DISP_E_MEMBERNOTFOUND
Definition: winerror.h:2512
#define DISPID_FONT_BOLD
Definition: olectl.h:429
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
static OLEFontImpl * impl_from_IDispatch(IDispatch *iface)
Definition: olefont.c:294
#define V_CY(A)
Definition: oleauto.h:229
unsigned int BOOL
Definition: ntddk_ex.h:94
#define DISPID_FONT_SIZE
Definition: olectl.h:428
#define DISPID_FONT_STRIKE
Definition: olectl.h:432
static HRESULT WINAPI OLEFontImpl_get_Charset(IFont *iface, short *pcharset)
Definition: olefont.c:932
#define debugstr_guid
Definition: kernel32.h:35
#define DISPATCH_PROPERTYPUT
Definition: oleauto.h:1008
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
#define V_BOOL(A)
Definition: oleauto.h:224
#define DISP_E_UNKNOWNINTERFACE
Definition: winerror.h:2511
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
#define IID_NULL
Definition: guiddef.h:98
#define DISP_E_PARAMNOTOPTIONAL
Definition: winerror.h:2524
#define V_VT(A)
Definition: oleauto.h:211
#define DISPID_FONT_ITALIC
Definition: olectl.h:430
GLsizei const GLfloat * value
Definition: glext.h:6069
Definition: compat.h:2160
#define V_BSTR(A)
Definition: oleauto.h:226
#define DISPID_FONT_CHARSET
Definition: olectl.h:434
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:534
#define ERR(fmt,...)
Definition: debug.h:110
#define DISPID_FONT_NAME
Definition: olectl.h:427
#define DISP_E_BADPARAMCOUNT
Definition: winerror.h:2523
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
Definition: compat.h:2156
HRESULT WINAPI VariantChangeTypeEx(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, LCID lcid, USHORT wFlags, VARTYPE vt)
Definition: variant.c:988

◆ OLEFontImpl_IPersistPropertyBag_AddRef()

static ULONG WINAPI OLEFontImpl_IPersistPropertyBag_AddRef ( IPersistPropertyBag iface)
static

Definition at line 1885 of file olefont.c.

1887  {
1889  return IFont_AddRef(&this->IFont_iface);
1890 }
static OLEFontImpl * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: olefont.c:309

◆ OLEFontImpl_IPersistPropertyBag_GetClassID()

static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_GetClassID ( IPersistPropertyBag iface,
CLSID classid 
)
static

Definition at line 1899 of file olefont.c.

1901  {
1902  FIXME("(%p,%p), stub!\n", iface, classid);
1903  return E_FAIL;
1904 }
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:111

◆ OLEFontImpl_IPersistPropertyBag_InitNew()

static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_InitNew ( IPersistPropertyBag iface)
static

Definition at line 1906 of file olefont.c.

1908  {
1909  FIXME("(%p), stub!\n", iface);
1910  return S_OK;
1911 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:51

◆ OLEFontImpl_IPersistPropertyBag_Load()

static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_Load ( IPersistPropertyBag iface,
IPropertyBag pPropBag,
IErrorLog pErrorLog 
)
static

Definition at line 1913 of file olefont.c.

1915  {
1916 /* (from Visual Basic 6 property bag)
1917  Name = "MS Sans Serif"
1918  Size = 13.8
1919  Charset = 0
1920  Weight = 400
1921  Underline = 0 'False
1922  Italic = 0 'False
1923  Strikethrough = 0 'False
1924 */
1925  static const WCHAR sAttrName[] = {'N','a','m','e',0};
1926  static const WCHAR sAttrSize[] = {'S','i','z','e',0};
1927  static const WCHAR sAttrCharset[] = {'C','h','a','r','s','e','t',0};
1928  static const WCHAR sAttrWeight[] = {'W','e','i','g','h','t',0};
1929  static const WCHAR sAttrUnderline[] = {'U','n','d','e','r','l','i','n','e',0};
1930  static const WCHAR sAttrItalic[] = {'I','t','a','l','i','c',0};
1931  static const WCHAR sAttrStrikethrough[] = {'S','t','r','i','k','e','t','h','r','o','u','g','h',0};
1933  VARIANT value;
1934  HRESULT iRes;
1935 
1936  VariantInit(&value);
1937 
1938  iRes = IPropertyBag_Read(pPropBag, sAttrName, &value, pErrorLog);
1939  if (iRes == S_OK)
1940  {
1941  iRes = VariantChangeType(&value, &value, 0, VT_BSTR);
1942  if (iRes == S_OK)
1943  iRes = IFont_put_Name(&this->IFont_iface, V_BSTR(&value));
1944  }
1945  else if (iRes == E_INVALIDARG)
1946  iRes = S_OK;
1947 
1948  VariantClear(&value);
1949 
1950  if (iRes == S_OK) {
1951  iRes = IPropertyBag_Read(pPropBag, sAttrSize, &value, pErrorLog);
1952  if (iRes == S_OK)
1953  {
1954  iRes = VariantChangeType(&value, &value, 0, VT_CY);
1955  if (iRes == S_OK)
1956  iRes = IFont_put_Size(&this->IFont_iface, V_CY(&value));
1957  }
1958  else if (iRes == E_INVALIDARG)
1959  iRes = S_OK;
1960 
1961  VariantClear(&value);
1962  }
1963 
1964  if (iRes == S_OK) {
1965  iRes = IPropertyBag_Read(pPropBag, sAttrCharset, &value, pErrorLog);
1966  if (iRes == S_OK)
1967  {
1968  iRes = VariantChangeType(&value, &value, 0, VT_I2);
1969  if (iRes == S_OK)
1970  iRes = IFont_put_Charset(&this->IFont_iface, V_I2(&value));
1971  }
1972  else if (iRes == E_INVALIDARG)
1973  iRes = S_OK;
1974 
1975  VariantClear(&value);
1976  }
1977 
1978  if (iRes == S_OK) {
1979  iRes = IPropertyBag_Read(pPropBag, sAttrWeight, &value, pErrorLog);
1980  if (iRes == S_OK)
1981  {
1982  iRes = VariantChangeType(&value, &value, 0, VT_I2);
1983  if (iRes == S_OK)
1984  iRes = IFont_put_Weight(&this->IFont_iface, V_I2(&value));
1985  }
1986  else if (iRes == E_INVALIDARG)
1987  iRes = S_OK;
1988 
1989  VariantClear(&value);
1990  }
1991 
1992  if (iRes == S_OK) {
1993  iRes = IPropertyBag_Read(pPropBag, sAttrUnderline, &value, pErrorLog);
1994  if (iRes == S_OK)
1995  {
1996  iRes = VariantChangeType(&value, &value, 0, VT_BOOL);
1997  if (iRes == S_OK)
1998  iRes = IFont_put_Underline(&this->IFont_iface, V_BOOL(&value));
1999  }
2000  else if (iRes == E_INVALIDARG)
2001  iRes = S_OK;
2002 
2003  VariantClear(&value);
2004  }
2005 
2006  if (iRes == S_OK) {
2007  iRes = IPropertyBag_Read(pPropBag, sAttrItalic, &value, pErrorLog);
2008  if (iRes == S_OK)
2009  {
2010  iRes = VariantChangeType(&value, &value, 0, VT_BOOL);
2011  if (iRes == S_OK)
2012  iRes = IFont_put_Italic(&this->IFont_iface, V_BOOL(&value));
2013  }
2014  else if (iRes == E_INVALIDARG)
2015  iRes = S_OK;
2016 
2017  VariantClear(&value);
2018  }
2019 
2020  if (iRes == S_OK) {
2021  iRes = IPropertyBag_Read(pPropBag, sAttrStrikethrough, &value, pErrorLog);
2022  if (iRes == S_OK)
2023  {
2024  iRes = VariantChangeType(&value, &value, 0, VT_BOOL);
2025  if (iRes == S_OK)
2026  IFont_put_Strikethrough(&this->IFont_iface, V_BOOL(&value));
2027  }
2028  else if (iRes == E_INVALIDARG)
2029  iRes = S_OK;
2030 
2031  VariantClear(&value);
2032  }
2033 
2034  if (FAILED(iRes))
2035  WARN("-- 0x%08x\n", iRes);
2036  return iRes;
2037 }
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
Definition: variant.c:962
#define WARN(fmt,...)
Definition: debug.h:112
#define V_I2(A)
Definition: oleauto.h:245
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
#define V_CY(A)
Definition: oleauto.h:229
#define E_INVALIDARG
Definition: ddrawi.h:101
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#define V_BOOL(A)
Definition: oleauto.h:224
static OLEFontImpl * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: olefont.c:309
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
GLsizei const GLfloat * value
Definition: glext.h:6069
Definition: compat.h:2160
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:51
Definition: compat.h:2156

◆ OLEFontImpl_IPersistPropertyBag_QueryInterface()

static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_QueryInterface ( IPersistPropertyBag iface,
REFIID  riid,
LPVOID ppvObj 
)
static

Definition at line 1878 of file olefont.c.

1880  {
1882  return IFont_QueryInterface(&this->IFont_iface,riid,ppvObj);
1883 }
REFIID riid
Definition: precomp.h:44
static OLEFontImpl * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: olefont.c:309

◆ OLEFontImpl_IPersistPropertyBag_Release()

static ULONG WINAPI OLEFontImpl_IPersistPropertyBag_Release ( IPersistPropertyBag iface)
static

Definition at line 1892 of file olefont.c.

1894  {
1896  return IFont_Release(&this->IFont_iface);
1897 }
static OLEFontImpl * impl_from_IPersistPropertyBag(IPersistPropertyBag *iface)
Definition: olefont.c:309

◆ OLEFontImpl_IPersistPropertyBag_Save()

static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_Save ( IPersistPropertyBag iface,
IPropertyBag pPropBag,
BOOL  fClearDirty,
BOOL  fSaveAllProperties 
)
static

Definition at line 2039 of file olefont.c.

2042  {
2043  FIXME("(%p,%p,%d,%d), stub!\n", iface, pPropBag, fClearDirty, fSaveAllProperties);
2044  return E_FAIL;
2045 }
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:111

◆ OLEFontImpl_IPersistStream_AddRef()

static ULONG WINAPI OLEFontImpl_IPersistStream_AddRef ( IPersistStream iface)
static

Definition at line 1564 of file olefont.c.

1566 {
1567  OLEFontImpl *this = impl_from_IPersistStream(iface);
1568 
1569  return IFont_AddRef(&this->IFont_iface);
1570 }
static OLEFontImpl * impl_from_IPersistStream(IPersistStream *iface)
Definition: olefont.c:299

◆ OLEFontImpl_IPersistStream_QueryInterface()

static HRESULT WINAPI OLEFontImpl_IPersistStream_QueryInterface ( IPersistStream iface,
REFIID  riid,
VOID **  ppvoid 
)
static

Definition at line 1540 of file olefont.c.

1544 {
1545  OLEFontImpl *this = impl_from_IPersistStream(iface);
1546 
1547  return IFont_QueryInterface(&this->IFont_iface, riid, ppvoid);
1548 }
REFIID riid
Definition: precomp.h:44
static OLEFontImpl * impl_from_IPersistStream(IPersistStream *iface)
Definition: olefont.c:299

◆ OLEFontImpl_IPersistStream_Release()

static ULONG WINAPI OLEFontImpl_IPersistStream_Release ( IPersistStream iface)
static

Definition at line 1553 of file olefont.c.

1555 {
1556  OLEFontImpl *this = impl_from_IPersistStream(iface);
1557 
1558  return IFont_Release(&this->IFont_iface);
1559 }
static OLEFontImpl * impl_from_IPersistStream(IPersistStream *iface)
Definition: olefont.c:299

◆ OLEFontImpl_IPersistStreamInit_AddRef()

static ULONG WINAPI OLEFontImpl_IPersistStreamInit_AddRef ( IPersistStreamInit iface)
static

Definition at line 2069 of file olefont.c.

2071  {
2073  return IFont_AddRef(&this->IFont_iface);
2074 }
static OLEFontImpl * impl_from_IPersistStreamInit(IPersistStreamInit *iface)
Definition: olefont.c:314

◆ OLEFontImpl_IPersistStreamInit_GetClassID()

static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_GetClassID ( IPersistStreamInit iface,
CLSID classid 
)
static

Definition at line 2083 of file olefont.c.

2085  {
2086  FIXME("(%p,%p), stub!\n", iface, classid);
2087  return E_FAIL;
2088 }
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:111

◆ OLEFontImpl_IPersistStreamInit_GetSizeMax()

static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_GetSizeMax ( IPersistStreamInit iface,
ULARGE_INTEGER pcbSize 
)
static

Definition at line 2111 of file olefont.c.

2113  {
2114  FIXME("(%p,%p), stub!\n", iface, pcbSize);
2115  return E_FAIL;
2116 }
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:111

◆ OLEFontImpl_IPersistStreamInit_InitNew()

static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_InitNew ( IPersistStreamInit iface)
static

Definition at line 2118 of file olefont.c.

2120  {
2121  FIXME("(%p), stub!\n", iface);
2122  return S_OK;
2123 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:51

◆ OLEFontImpl_IPersistStreamInit_IsDirty()

static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_IsDirty ( IPersistStreamInit iface)
static

Definition at line 2090 of file olefont.c.

2092  {
2093  FIXME("(%p), stub!\n", iface);
2094  return E_FAIL;
2095 }
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:111

◆ OLEFontImpl_IPersistStreamInit_Load()

static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_Load ( IPersistStreamInit iface,
LPSTREAM  pStm 
)
static

Definition at line 2097 of file olefont.c.

2099  {
2100  FIXME("(%p,%p), stub!\n", iface, pStm);
2101  return E_FAIL;
2102 }
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:111

◆ OLEFontImpl_IPersistStreamInit_QueryInterface()

static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_QueryInterface ( IPersistStreamInit iface,
REFIID  riid,
LPVOID ppvObj 
)
static

Definition at line 2062 of file olefont.c.

2064  {
2066  return IFont_QueryInterface(&this->IFont_iface,riid,ppvObj);
2067 }
REFIID riid
Definition: precomp.h:44
static OLEFontImpl * impl_from_IPersistStreamInit(IPersistStreamInit *iface)
Definition: olefont.c:314

◆ OLEFontImpl_IPersistStreamInit_Release()

static ULONG WINAPI OLEFontImpl_IPersistStreamInit_Release ( IPersistStreamInit iface)
static

Definition at line 2076 of file olefont.c.

2078  {
2080  return IFont_Release(&this->IFont_iface);
2081 }
static OLEFontImpl * impl_from_IPersistStreamInit(IPersistStreamInit *iface)
Definition: olefont.c:314

◆ OLEFontImpl_IPersistStreamInit_Save()

static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_Save ( IPersistStreamInit iface,
LPSTREAM  pStm,
BOOL  fClearDirty 
)
static

Definition at line 2104 of file olefont.c.

2106  {
2107  FIXME("(%p,%p,%d), stub!\n", iface, pStm, fClearDirty);
2108  return E_FAIL;
2109 }
#define E_FAIL
Definition: ddrawi.h:102
#define FIXME(fmt,...)
Definition: debug.h:111

◆ OLEFontImpl_IsDirty()

static HRESULT WINAPI OLEFontImpl_IsDirty ( IPersistStream iface)
static

Definition at line 1593 of file olefont.c.

1595 {
1596  TRACE("(%p)\n",iface);
1597  return S_OK;
1598 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51

◆ OLEFontImpl_IsEqual()

static HRESULT WINAPI OLEFontImpl_IsEqual ( IFont iface,
IFont pFontOther 
)
static

Definition at line 1038 of file olefont.c.

1041 {
1042  OLEFontImpl *left = impl_from_IFont(iface);
1043  OLEFontImpl *right = impl_from_IFont(pFontOther);
1044  INT ret;
1045  INT left_len,right_len;
1046 
1047  if(pFontOther == NULL)
1048  return E_POINTER;
1049  else if (left->description.cySize.s.Lo != right->description.cySize.s.Lo)
1050  return S_FALSE;
1051  else if (left->description.cySize.s.Hi != right->description.cySize.s.Hi)
1052  return S_FALSE;
1053  else if (left->description.sWeight != right->description.sWeight)
1054  return S_FALSE;
1055  else if (left->description.sCharset != right->description.sCharset)
1056  return S_FALSE;
1057  else if (left->description.fItalic != right->description.fItalic)
1058  return S_FALSE;
1059  else if (left->description.fUnderline != right->description.fUnderline)
1060  return S_FALSE;
1061  else if (left->description.fStrikethrough != right->description.fStrikethrough)
1062  return S_FALSE;
1063 
1064  /* Check from string */
1065  left_len = lstrlenW(left->description.lpstrName);
1066  right_len = lstrlenW(right->description.lpstrName);
1067  ret = CompareStringW(0,0,left->description.lpstrName, left_len,
1068  right->description.lpstrName, right_len);
1069  if (ret != CSTR_EQUAL)
1070  return S_FALSE;
1071 
1072  return S_OK;
1073 }
#define lstrlenW
Definition: compat.h:609
int32_t INT
Definition: typedefs.h:58
#define S_FALSE
Definition: winerror.h:2357
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
Definition: lang.c:2275
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
int ret
#define CSTR_EQUAL
Definition: winnls.h:453
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ OLEFontImpl_Load()

static HRESULT WINAPI OLEFontImpl_Load ( IPersistStream iface,
IStream pLoadStream 
)
static

Definition at line 1621 of file olefont.c.

1624 {
1625  OLEFontImpl *this = impl_from_IPersistStream(iface);
1626  BYTE version, attributes, string_size;
1627  char readBuffer[0x100];
1628  ULONG cbRead;
1629  INT len;
1630 
1631  /* Version */
1632  IStream_Read(pLoadStream, &version, sizeof(BYTE), &cbRead);
1633  if ((cbRead != sizeof(BYTE)) || (version != 0x01)) return E_FAIL;
1634 
1635  /* Charset */
1636  IStream_Read(pLoadStream, &this->description.sCharset, sizeof(WORD), &cbRead);
1637  if (cbRead != sizeof(WORD)) return E_FAIL;
1638 
1639  /* Attributes */
1640  IStream_Read(pLoadStream, &attributes, sizeof(BYTE), &cbRead);
1641  if (cbRead != sizeof(BYTE)) return E_FAIL;
1642 
1643  this->description.fItalic = (attributes & FONTPERSIST_ITALIC) != 0;
1644  this->description.fStrikethrough = (attributes & FONTPERSIST_STRIKETHROUGH) != 0;
1645  this->description.fUnderline = (attributes & FONTPERSIST_UNDERLINE) != 0;
1646 
1647  /* Weight */
1648  IStream_Read(pLoadStream, &this->description.sWeight, sizeof(WORD), &cbRead);
1649  if (cbRead != sizeof(WORD)) return E_FAIL;
1650 
1651  /* Size */
1652  IStream_Read(pLoadStream, &this->description.cySize.s.Lo, sizeof(DWORD), &cbRead);
1653  if (cbRead != sizeof(DWORD)) return E_FAIL;
1654 
1655  this->description.cySize.s.Hi = 0;
1656 
1657  /* Name */
1658  IStream_Read(pLoadStream, &string_size, sizeof(BYTE), &cbRead);
1659  if (cbRead != sizeof(BYTE)) return E_FAIL;
1660 
1661  IStream_Read(pLoadStream, readBuffer, string_size, &cbRead);
1662  if (cbRead != string_size) return E_FAIL;
1663 
1664  HeapFree(GetProcessHeap(), 0, this->description.lpstrName);
1665 
1666  len = MultiByteToWideChar( CP_ACP, 0, readBuffer, string_size, NULL, 0 );
1667  this->description.lpstrName = HeapAlloc( GetProcessHeap(), 0, (len+1) * sizeof(WCHAR) );
1668  MultiByteToWideChar( CP_ACP, 0, readBuffer, string_size, this->description.lpstrName, len );
1669  this->description.lpstrName[len] = 0;
1670 
1671  /* Ensure use of this font causes a new one to be created */
1672  dec_int_ref(this->gdiFont);
1673  this->gdiFont = 0;
1674  this->dirty = TRUE;
1675 
1676  return S_OK;
1677 }
#define FONTPERSIST_STRIKETHROUGH
Definition: olefont.c:53
#define TRUE
Definition: types.h:120
#define CP_ACP
Definition: compat.h:109
static OLEFontImpl * impl_from_IPersistStream(IPersistStream *iface)
Definition: olefont.c:299
const char * description
Definition: directx.c:2497
#define E_FAIL
Definition: ddrawi.h:102
int32_t INT
Definition: typedefs.h:58
#define FONTPERSIST_UNDERLINE
Definition: olefont.c:52
static const WCHAR version[]
Definition: asmname.c:66
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
#define FONTPERSIST_ITALIC
Definition: olefont.c:51
unsigned char BYTE
Definition: xxhash.c:193
#define S_OK
Definition: intsafe.h:51
static HRESULT dec_int_ref(HFONT hfont)
Definition: olefont.c:173
#define NULL
Definition: types.h:112
#define MultiByteToWideChar
Definition: compat.h:110
r dirty
Definition: btrfs.c:2938
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ OLEFontImpl_put_Bold()

static HRESULT WINAPI OLEFontImpl_put_Bold ( IFont iface,
BOOL  bold 
)
static

Definition at line 773 of file olefont.c.

776 {
777  OLEFontImpl *this = impl_from_IFont(iface);
778  TRACE("(%p)->(%d)\n", this, bold);
779  this->description.sWeight = bold ? FW_BOLD : FW_NORMAL;
781 
782  return S_OK;
783 }
#define DISPID_FONT_BOLD
Definition: olectl.h:429
const char * description
Definition: directx.c:2497
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
#define FW_BOLD
Definition: wingdi.h:377
#define FW_NORMAL
Definition: wingdi.h:372
static void OLEFont_SendNotify(OLEFontImpl *this, DISPID dispID)
Definition: olefont.c:381

◆ OLEFontImpl_put_Charset()

static HRESULT WINAPI OLEFontImpl_put_Charset ( IFont iface,
short  charset 
)
static

Definition at line 952 of file olefont.c.

955 {
956  OLEFontImpl *this = impl_from_IFont(iface);
957  TRACE("(%p)->(%d)\n", this, charset);
958 
959  this->description.sCharset = charset;
961 
962  return S_OK;
963 }
CFF_Charset charset
Definition: cffcmap.c:138
const char * description
Definition: directx.c:2497
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define DISPID_FONT_CHARSET
Definition: olectl.h:434
#define S_OK
Definition: intsafe.h:51
static void OLEFont_SendNotify(OLEFontImpl *this, DISPID dispID)
Definition: olefont.c:381

◆ OLEFontImpl_put_Italic()

static HRESULT WINAPI OLEFontImpl_put_Italic ( IFont iface,
BOOL  italic 
)
static

Definition at line 808 of file olefont.c.

811 {
812  OLEFontImpl *this = impl_from_IFont(iface);
813  TRACE("(%p)->(%d)\n", this, italic);
814 
815  this->description.fItalic = italic;
816 
818  return S_OK;
819 }
const char * description
Definition: directx.c:2497
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define DISPID_FONT_ITALIC
Definition: olectl.h:430
#define S_OK
Definition: intsafe.h:51
static void OLEFont_SendNotify(OLEFontImpl *this, DISPID dispID)
Definition: olefont.c:381

◆ OLEFontImpl_put_Name()

static HRESULT WINAPI OLEFontImpl_put_Name ( IFont iface,
BSTR  name 
)
static

Definition at line 688 of file olefont.c.

691 {
692  OLEFontImpl *This = impl_from_IFont(iface);
693  TRACE("(%p)->(%p)\n", This, name);
694 
695  if (!name)
697 
698  HeapFree(GetProcessHeap(), 0, This->description.lpstrName);
699  This->description.lpstrName = strdupW(name);
700  if (!This->description.lpstrName) return E_OUTOFMEMORY;
701 
702  TRACE("new name %s\n", debugstr_w(This->description.lpstrName));
704  return S_OK;
705 }
static WCHAR * strdupW(const WCHAR *str)
Definition: olefont.c:229
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define debugstr_w
Definition: kernel32.h:32
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
#define S_OK
Definition: intsafe.h:51
#define DISPID_FONT_NAME
Definition: olectl.h:427
Definition: name.c:38
#define CTL_E_INVALIDPROPERTYVALUE
Definition: olectl.h:292
#define HeapFree(x, y, z)
Definition: compat.h:594
static void OLEFont_SendNotify(OLEFontImpl *this, DISPID dispID)
Definition: olefont.c:381

◆ OLEFontImpl_put_Size()

static HRESULT WINAPI OLEFontImpl_put_Size ( IFont iface,
CY  size 
)
static

Definition at line 736 of file olefont.c.

739 {
740  OLEFontImpl *this = impl_from_IFont(iface);
741  TRACE("(%p)->(%d)\n", this, size.s.Lo);
742  this->description.cySize.s.Hi = 0;
743  this->description.cySize.s.Lo = size.s.Lo;
745 
746  return S_OK;
747 }
const char * description
Definition: directx.c:2497
#define DISPID_FONT_SIZE
Definition: olectl.h:428
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
#define S_OK
Definition: intsafe.h:51
ULONG Lo
Definition: compat.h:2120
static void OLEFont_SendNotify(OLEFontImpl *this, DISPID dispID)
Definition: olefont.c:381

◆ OLEFontImpl_put_Strikethrough()

static HRESULT WINAPI OLEFontImpl_put_Strikethrough ( IFont iface,
BOOL  strikethrough 
)
static

Definition at line 880 of file olefont.c.

883 {
884  OLEFontImpl *this = impl_from_IFont(iface);
885  TRACE("(%p)->(%d)\n", this, strikethrough);
886 
887  this->description.fStrikethrough = strikethrough;
889 
890  return S_OK;
891 }
const char * description
Definition: directx.c:2497
#define DISPID_FONT_STRIKE
Definition: olectl.h:432
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
static void OLEFont_SendNotify(OLEFontImpl *this, DISPID dispID)
Definition: olefont.c:381

◆ OLEFontImpl_put_Underline()

static HRESULT WINAPI OLEFontImpl_put_Underline ( IFont iface,
BOOL  underline 
)
static

Definition at line 844 of file olefont.c.

847 {
848  OLEFontImpl *this = impl_from_IFont(iface);
849  TRACE("(%p)->(%d)\n", this, underline);
850 
851  this->description.fUnderline = underline;
852 
854  return S_OK;
855 }
#define DISPID_FONT_UNDER
Definition: olectl.h:431
const char * description
Definition: directx.c:2497
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
static void OLEFont_SendNotify(OLEFontImpl *this, DISPID dispID)
Definition: olefont.c:381

◆ OLEFontImpl_put_Weight()

static HRESULT WINAPI OLEFontImpl_put_Weight ( IFont iface,
short  weight 
)
static

Definition at line 916 of file olefont.c.

919 {
920  OLEFontImpl *this = impl_from_IFont(iface);
921  TRACE("(%p)->(%d)\n", this, weight);
922 
923  this->description.sWeight = weight;
924 
926  return S_OK;
927 }
#define DISPID_FONT_WEIGHT
Definition: olectl.h:433
const char * description
Definition: directx.c:2497
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
weight
Definition: sortkey.c:156
static void OLEFont_SendNotify(OLEFontImpl *this, DISPID dispID)
Definition: olefont.c:381

◆ OLEFontImpl_QueryInterface()

static HRESULT WINAPI OLEFontImpl_QueryInterface ( IFont iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 460 of file olefont.c.

464 {
465  OLEFontImpl *this = impl_from_IFont(iface);
466 
467  TRACE("(%p)->(%s, %p)\n", this, debugstr_guid(riid), ppvObject);
468 
469  *ppvObject = 0;
470 
471  if (IsEqualGUID(&IID_IUnknown, riid) ||
473  {
474  *ppvObject = this;
475  }
476  else if (IsEqualGUID(&IID_IDispatch, riid) ||
478  {
479  *ppvObject = &this->IDispatch_iface;
480  }
481  else if (IsEqualGUID(&IID_IPersist, riid) ||
483  {
484  *ppvObject = &this->IPersistStream_iface;
485  }
487  {
488  *ppvObject = &this->IConnectionPointContainer_iface;
489  }
491  {
492  *ppvObject = &this->IPersistPropertyBag_iface;
493  }
495  {
496  *ppvObject = &this->IPersistStreamInit_iface;
497  }
498 
499  if (!*ppvObject)
500  {
501  FIXME("() : asking for unsupported interface %s\n", debugstr_guid(riid));
502  return E_NOINTERFACE;
503  }
504 
505  IFont_AddRef(iface);
506 
507  return S_OK;
508 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IPersist
Definition: proxy.cpp:14
const GUID IID_IConnectionPointContainer
const GUID IID_IPersistPropertyBag
Definition: proxy.cpp:11
#define FIXME(fmt,...)
Definition: debug.h:111
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IPersistStream
Definition: proxy.cpp:13
const GUID IID_IDispatch
const GUID IID_IFont
const GUID IID_IPersistStreamInit
REFIID LPVOID * ppvObject
Definition: precomp.h:44
const GUID IID_IFontDisp
#define S_OK
Definition: intsafe.h:51
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ OLEFontImpl_QueryTextMetrics()

static HRESULT WINAPI OLEFontImpl_QueryTextMetrics ( IFont iface,
TEXTMETRICOLE *  ptm 
)
static

Definition at line 1104 of file olefont.c.

1107 {
1108  HDC hdcRef;
1109  HFONT hOldFont, hNewFont;
1110 
1111  hdcRef = GetDC(0);
1112  IFont_get_hFont(iface, &hNewFont);
1113  hOldFont = SelectObject(hdcRef, hNewFont);
1114  GetTextMetricsW(hdcRef, ptm);
1115  SelectObject(hdcRef, hOldFont);
1116  ReleaseDC(0, hdcRef);
1117  return S_OK;
1118 }
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
Definition: text.c:221
HDC WINAPI GetDC(_In_opt_ HWND)
static HDC
Definition: imagelist.c:92
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1499
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define S_OK
Definition: intsafe.h:51
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)

◆ OLEFontImpl_Release()

static ULONG WINAPI OLEFontImpl_Release ( IFont iface)
static

Definition at line 524 of file olefont.c.

525 {
526  OLEFontImpl *this = impl_from_IFont(iface);
527  ULONG ref;
528 
529  TRACE("(%p)->(ref=%d)\n", this, this->ref);
530 
531  ref = InterlockedDecrement(&this->ref);
532 
533  if (ref == 0)
534  {
535  ULONG fontlist_refs = InterlockedDecrement(&ifont_cnt);
536 
537  /* Final IFont object so destroy font cache */
538  if (fontlist_refs == 0)
539  {
540  HFONTItem *item, *cursor2;
541 
546  delete_dc();
547  }
548  else
549  {
550  dec_int_ref(this->gdiFont);
551  }
552  OLEFontImpl_Destroy(this);
553  }
554 
555  return ref;
556 }
static struct list OLEFontImpl_hFontList
Definition: olefont.c:76
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
Definition: send.c:48
static LONG ifont_cnt
Definition: olefont.c:79
GLenum GLint ref
Definition: glext.h:6028
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
static void delete_dc(void)
Definition: olefont.c:105
#define TRACE(s)
Definition: solgame.cpp:4
static CRITICAL_SECTION OLEFontImpl_csHFONTLIST
Definition: olefont.c:84
#define InterlockedDecrement
Definition: armddk.h:52
uint32_t entry
Definition: isohybrid.c:63
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
static ATOM item
Definition: dde.c:856
static HRESULT dec_int_ref(HFONT hfont)
Definition: olefont.c:173
unsigned int ULONG
Definition: retypes.h:1
static void OLEFontImpl_Destroy(OLEFontImpl *fontDesc)
Definition: olefont.c:2204
static void HFONTItem_Delete(PHFONTItem item)
Definition: olefont.c:116
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

◆ OLEFontImpl_ReleaseHfont()

static HRESULT WINAPI OLEFontImpl_ReleaseHfont ( IFont iface,
HFONT  hfont 
)
static

Definition at line 1139 of file olefont.c.

1142 {
1143  OLEFontImpl *this = impl_from_IFont(iface);
1144 
1145  TRACE("(%p)->(%p)\n", this, hfont);
1146 
1147  if (!hfont) return E_INVALIDARG;
1148 
1149  return dec_ext_ref(hfont);
1150 }
#define E_INVALIDARG
Definition: ddrawi.h:101
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
static HRESULT dec_ext_ref(HFONT hfont)
Definition: olefont.c:212
static HFONT hfont
#define TRACE(s)
Definition: solgame.cpp:4

◆ OLEFontImpl_Save()

static HRESULT WINAPI OLEFontImpl_Save ( IPersistStream iface,
IStream pOutStream,
BOOL  fClearDirty 
)
static

Definition at line 1682 of file olefont.c.

1686 {
1687  OLEFontImpl *this = impl_from_IPersistStream(iface);
1688  BYTE attributes, string_size;
1689  const BYTE version = 0x01;
1690  char* writeBuffer = NULL;
1691  ULONG written;
1692 
1693  TRACE("(%p)->(%p %d)\n", this, pOutStream, fClearDirty);
1694 
1695  /* Version */
1696  IStream_Write(pOutStream, &version, sizeof(BYTE), &written);
1697  if (written != sizeof(BYTE)) return E_FAIL;
1698 
1699  /* Charset */
1700  IStream_Write(pOutStream, &this->description.sCharset, sizeof(WORD), &written);
1701  if (written != sizeof(WORD)) return E_FAIL;
1702 
1703  /* Attributes */
1704  attributes = 0;
1705 
1706  if (this->description.fItalic)
1707  attributes |= FONTPERSIST_ITALIC;
1708 
1709  if (this->description.fStrikethrough)
1710  attributes |= FONTPERSIST_STRIKETHROUGH;
1711 
1712  if (this->description.fUnderline)
1713  attributes |= FONTPERSIST_UNDERLINE;
1714 
1715  IStream_Write(pOutStream, &attributes, sizeof(BYTE), &written);
1716  if (written != sizeof(BYTE)) return E_FAIL;
1717 
1718  /* Weight */
1719  IStream_Write(pOutStream, &this->description.sWeight, sizeof(WORD), &written);
1720  if (written != sizeof(WORD)) return E_FAIL;
1721 
1722  /* Size */
1723  IStream_Write(pOutStream, &this->description.cySize.s.Lo, sizeof(DWORD), &written);
1724  if (written != sizeof(DWORD)) return E_FAIL;
1725 
1726  /* FontName */
1727  if (this->description.lpstrName)
1728  string_size = WideCharToMultiByte( CP_ACP, 0, this->description.lpstrName,
1729  lstrlenW(this->description.lpstrName), NULL, 0, NULL, NULL );
1730  else
1731  string_size = 0;
1732 
1733  IStream_Write(pOutStream, &string_size, sizeof(BYTE), &written);
1734  if (written != sizeof(BYTE)) return E_FAIL;
1735 
1736  if (string_size)
1737  {
1738  if (!(writeBuffer = HeapAlloc( GetProcessHeap(), 0, string_size ))) return E_OUTOFMEMORY;
1739  WideCharToMultiByte( CP_ACP, 0, this->description.lpstrName,
1740  lstrlenW(this->description.lpstrName),
1741  writeBuffer, string_size, NULL, NULL );
1742 
1743  IStream_Write(pOutStream, writeBuffer, string_size, &written);
1745 
1746  if (written != string_size) return E_FAIL;
1747  }
1748 
1749  return S_OK;
1750 }
#define FONTPERSIST_STRIKETHROUGH
Definition: olefont.c:53
#define WideCharToMultiByte
Definition: compat.h:111
#define CP_ACP
Definition: compat.h:109
static OLEFontImpl * impl_from_IPersistStream(IPersistStream *iface)
Definition: olefont.c:299
const char * description
Definition: directx.c:2497
#define lstrlenW
Definition: compat.h:609
#define E_FAIL
Definition: ddrawi.h:102
GLuint writeBuffer
Definition: glext.h:11008
#define FONTPERSIST_UNDERLINE
Definition: olefont.c:52
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const WCHAR version[]
Definition: asmname.c:66
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
#define FONTPERSIST_ITALIC
Definition: olefont.c:51
unsigned char BYTE
Definition: xxhash.c:193
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ OLEFontImpl_SetHdc()

static HRESULT WINAPI OLEFontImpl_SetHdc ( IFont iface,
HDC  hdc 
)
static

Definition at line 1155 of file olefont.c.

1158 {
1159  OLEFontImpl *this = impl_from_IFont(iface);
1160  FIXME("(%p)->(%p): Stub\n", this, hdc);
1161  return E_NOTIMPL;
1162 }
#define FIXME(fmt,...)
Definition: debug.h:111
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
HDC hdc
Definition: main.c:9
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OLEFontImpl_SetRatio()

static HRESULT WINAPI OLEFontImpl_SetRatio ( IFont iface,
LONG  cyLogical,
LONG  cyHimetric 
)
static

Definition at line 1078 of file olefont.c.

1082 {
1083  OLEFontImpl *this = impl_from_IFont(iface);
1084  TRACE("(%p)->(%d, %d)\n", this, cyLogical, cyHimetric);
1085 
1086  if(cyLogical == 0 || cyHimetric == 0)
1087  return E_FAIL;
1088 
1089  /* cyLogical and cyHimetric both set to 1 is a special case that
1090  does not change the scaling but also does not fail */
1091  if(cyLogical == 1 && cyHimetric == 1)
1092  return S_OK;
1093 
1094  this->cyLogical = cyLogical;
1095  this->cyHimetric = cyHimetric;
1096  this->dirty = TRUE;
1097 
1098  return S_OK;
1099 }
#define TRUE
Definition: types.h:120
#define E_FAIL
Definition: ddrawi.h:102
static OLEFontImpl * impl_from_IFont(IFont *iface)
Definition: olefont.c:289
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:51
r dirty
Definition: btrfs.c:2938

◆ realize_font()

static void realize_font ( OLEFontImpl This)
static

Definition at line 577 of file olefont.c.

578 {
579  LOGFONTW logFont;
580  INT fontHeight;
581  WCHAR text_face[LF_FACESIZE];
582  HDC hdc = get_dc();
583  HFONT old_font;
584  TEXTMETRICW tm;
585 
586  if (!This->dirty) return;
587 
588  text_face[0] = 0;
589 
590  if(This->gdiFont)
591  {
592  old_font = SelectObject(hdc, This->gdiFont);
593  GetTextFaceW(hdc, ARRAY_SIZE(text_face), text_face);
594  SelectObject(hdc, old_font);
595  dec_int_ref(This->gdiFont);
596  This->gdiFont = 0;
597  }
598 
599  memset(&logFont, 0, sizeof(LOGFONTW));
600 
601  lstrcpynW(logFont.lfFaceName, This->description.lpstrName, LF_FACESIZE);
602  logFont.lfCharSet = This->description.sCharset;
603 
604  /* If the font name has been changed then enumerate all charsets
605  and pick one that'll result in the font specified being selected */
606  if(text_face[0] && lstrcmpiW(text_face, This->description.lpstrName))
607  {
608  enum_data data;
609  data.orig_cs = This->description.sCharset;
610  data.avail_cs = -1;
611  logFont.lfCharSet = DEFAULT_CHARSET;
613  if(data.avail_cs != -1) logFont.lfCharSet = data.avail_cs;
614  }
615 
616  /*
617  * The height of the font returned by the get_Size property is the
618  * height of the font in points multiplied by 10000... Using some
619  * simple conversions and the ratio given by the application, it can
620  * be converted to a height in pixels.
621  *
622  * Standard ratio is 72 / 2540, or 18 / 635 in lowest terms.
623  * Ratio is applied here relative to the standard.
624  */
625 
626  fontHeight = MulDiv( This->description.cySize.s.Lo, This->cyLogical*635, This->cyHimetric*18 );
627 
628  logFont.lfHeight = ((fontHeight%10000L)>5000L) ? (-fontHeight/10000L) - 1 :
629  (-fontHeight/10000L);
630  logFont.lfItalic = This->description.fItalic;
631  logFont.lfUnderline = This->description.fUnderline;
632  logFont.lfStrikeOut = This->description.fStrikethrough;
633  logFont.lfWeight = This->description.sWeight;
636  logFont.lfQuality = DEFAULT_QUALITY;
638 
639  This->gdiFont = CreateFontIndirectW(&logFont);
640  This->dirty = FALSE;
641 
642  add_hfontitem(This->gdiFont);
643 
644  /* Fixup the name and charset properties so that they match the
645  selected font */
646  old_font = SelectObject(get_dc(), This->gdiFont);
647  GetTextFaceW(hdc, ARRAY_SIZE(text_face), text_face);
648  if(lstrcmpiW(text_face, This->description.lpstrName))
649  {
650  HeapFree(GetProcessHeap(), 0, This->description.lpstrName);
651  This->description.lpstrName = strdupW(text_face);
652  }
654  This->description.sCharset = tm.tmCharSet;
655  /* While we have it handy, stash the realized font height for use by get_Size() */
656  This->nRealHeight = tm.tmHeight - tm.tmInternalLeading; /* corresponds to LOGFONT lfHeight */
657  SelectObject(hdc, old_font);
658 }
#define LF_FACESIZE
Definition: dimm.idl:39
BYTE lfPitchAndFamily
Definition: dimm.idl:71
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
Definition: text.c:221
#define DEFAULT_QUALITY
Definition: wingdi.h:435
int WINAPI EnumFontFamiliesExW(_In_ HDC, _In_ PLOGFONTW, _In_ FONTENUMPROCW, _In_ LPARAM, _In_ DWORD)
LONG lfHeight
Definition: dimm.idl:59
BYTE lfCharSet
Definition: dimm.idl:67
BYTE lfClipPrecision
Definition: dimm.idl:69
static HDC
Definition: imagelist.c:92
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1499
#define OUT_CHARACTER_PRECIS
Definition: wingdi.h:416
#define DEFAULT_CHARSET
Definition: wingdi.h:383
int32_t INT
Definition: typedefs.h:58
#define lstrcpynW
Definition: compat.h:597
static WCHAR * strdupW(const WCHAR *str)
Definition: olefont.c:229
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
static HDC get_dc(void)
Definition: olefont.c:94
#define FALSE
Definition: types.h:117
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:425
static HRESULT add_hfontitem(HFONT hfont)
Definition: olefont.c:137
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
LONG_PTR LPARAM
Definition: windef.h:208
BYTE lfOutPrecision
Definition: dimm.idl:68
int WINAPI GetTextFaceW(_In_ HDC hdc, _In_ int c, _Out_writes_to_opt_(c, return) LPWSTR lpName)
int fontHeight
Definition: appswitch.c:47
static int CALLBACK font_enum_proc(const LOGFONTW *elf, const TEXTMETRICW *ntm, DWORD type, LPARAM lp)
Definition: olefont.c:564
#define GetProcessHeap()
Definition: compat.h:595
#define DEFAULT_PITCH
Definition: wingdi.h:442
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
BYTE lfQuality
Definition: dimm.idl:70
static const WCHAR L[]
Definition: oid.c:1250
HDC hdc
Definition: main.c:9
Definition: time.h:76
BYTE lfStrikeOut
Definition: dimm.idl:66
#define ARRAY_SIZE(a)
Definition: main.h:24
static HRESULT dec_int_ref(HFONT hfont)
Definition: olefont.c:173
BYTE lfItalic
Definition: dimm.idl:64
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
LONG lfWeight
Definition: dimm.idl:63
BYTE lfUnderline
Definition: dimm.idl:65
#define memset(x, y, z)
Definition: compat.h:39
#define HeapFree(x, y, z)
Definition: compat.h:594
#define MulDiv(x, y, z)
Definition: gdifloat.h:86

Referenced by OLEFontImpl_get_Bold(), OLEFontImpl_get_Charset(), OLEFontImpl_get_hFont(), OLEFontImpl_get_Italic(), OLEFontImpl_get_Name(), OLEFontImpl_get_Size(), OLEFontImpl_get_Strikethrough(), OLEFontImpl_get_Underline(), and OLEFontImpl_get_Weight().

◆ SFCF_AddRef()

static ULONG WINAPI SFCF_AddRef ( LPCLASSFACTORY  iface)
static

Definition at line 2252 of file olefont.c.

2252  {
2254  return InterlockedIncrement(&This->ref);
2255 }
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
Definition: olefont.c:2228
#define InterlockedIncrement
Definition: armddk.h:53

◆ SFCF_CreateInstance()

static HRESULT WINAPI SFCF_CreateInstance ( LPCLASSFACTORY  iface,
LPUNKNOWN  pOuter,
REFIID  riid,
LPVOID ppobj 
)
static

Definition at line 2263 of file olefont.c.

2265  {
2266  return OleCreateFontIndirect(NULL,riid,ppobj);
2267 
2268 }
REFIID riid
Definition: precomp.h:44
HRESULT WINAPI OleCreateFontIndirect(LPFONTDESC lpFontDesc, REFIID riid, LPVOID *ppvObj)
Definition: olefont.c:331
#define NULL
Definition: types.h:112

◆ SFCF_LockServer()

static HRESULT WINAPI SFCF_LockServer ( LPCLASSFACTORY  iface,
BOOL  dolock 
)
static

Definition at line 2270 of file olefont.c.

2270  {
2272  FIXME("(%p)->(%d),stub!\n",This,dolock);
2273  return S_OK;
2274 }
#define FIXME(fmt,...)
Definition: debug.h:111
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
Definition: olefont.c:2228
#define S_OK
Definition: intsafe.h:51

◆ SFCF_QueryInterface()

static HRESULT WINAPI SFCF_QueryInterface ( IClassFactory iface,
REFIID  riid,
void **  obj 
)
static

Definition at line 2233 of file olefont.c.

2234 {
2236 
2237  TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), obj);
2238 
2239  *obj = NULL;
2240 
2242  {
2243  *obj = iface;
2244  IClassFactory_AddRef(iface);
2245  return S_OK;
2246  }
2247 
2248  return E_NOINTERFACE;
2249 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
Definition: olefont.c:2228
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
const GUID IID_IClassFactory
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ SFCF_Release()

static ULONG WINAPI SFCF_Release ( LPCLASSFACTORY  iface)
static

Definition at line 2257 of file olefont.c.

2257  {
2259  /* static class, won't be freed */
2260  return InterlockedDecrement(&This->ref);
2261 }
static IClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
Definition: olefont.c:2228
#define InterlockedDecrement
Definition: armddk.h:52

◆ strdupW()

static WCHAR* strdupW ( const WCHAR str)
static

Definition at line 229 of file olefont.c.

230 {
231  WCHAR *ret;
232  DWORD size = (lstrlenW(str) + 1) * sizeof(WCHAR);
233 
234  ret = HeapAlloc(GetProcessHeap(), 0, size);
235  if(ret)
236  memcpy(ret, str, size);
237  return ret;
238 }
#define lstrlenW
Definition: compat.h:609
const WCHAR * str
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878

Referenced by OLEFontImpl_Clone(), OLEFontImpl_Construct(), OLEFontImpl_put_Name(), and realize_font().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( ole  )

Variable Documentation

◆ ifont_cnt

LONG ifont_cnt = 0
static

Definition at line 79 of file olefont.c.

Referenced by OLEFontImpl_Clone(), OLEFontImpl_Construct(), and OLEFontImpl_Release().

◆ olefont_hdc

HDC olefont_hdc
static

Definition at line 55 of file olefont.c.

Referenced by delete_dc(), and get_dc().

◆ OLEFontImpl_csHFONTLIST

static CRITICAL_SECTION OLEFontImpl_csHFONTLIST = { &OLEFontImpl_csHFONTLIST_debug, -1, 0, 0, 0, 0 }
static

◆ OLEFontImpl_csHFONTLIST_debug

CRITICAL_SECTION_DEBUG OLEFontImpl_csHFONTLIST_debug
static
Initial value:
=
{
0, 0, { (DWORD_PTR)(__FILE__ ": OLEFontImpl_csHFONTLIST") }
}
#define DWORD_PTR
Definition: treelist.c:76
static CRITICAL_SECTION OLEFontImpl_csHFONTLIST
Definition: olefont.c:84
LIST_ENTRY ProcessLocksList
Definition: winbase.h:861
static CRITICAL_SECTION_DEBUG OLEFontImpl_csHFONTLIST_debug
Definition: olefont.c:85

Definition at line 85 of file olefont.c.

◆ OLEFontImpl_hFontList

struct list OLEFontImpl_hFontList = LIST_INIT(OLEFontImpl_hFontList)
static

Definition at line 76 of file olefont.c.

Referenced by add_hfontitem(), find_hfontitem(), and OLEFontImpl_Release().

◆ OLEFontImpl_IConnectionPointContainer_VTable

const IConnectionPointContainerVtbl OLEFontImpl_IConnectionPointContainer_VTable
static
Initial value:
=
{
}
static ULONG WINAPI OLEFontImpl_IConnectionPointContainer_Release(IConnectionPointContainer *iface)
Definition: olefont.c:1810
static HRESULT WINAPI OLEFontImpl_FindConnectionPoint(IConnectionPointContainer *iface, REFIID riid, IConnectionPoint **ppCp)
Definition: olefont.c:1845
static HRESULT WINAPI OLEFontImpl_IConnectionPointContainer_QueryInterface(IConnectionPointContainer *iface, REFIID riid, VOID **ppvoid)
Definition: olefont.c:1797
static HRESULT WINAPI OLEFontImpl_EnumConnectionPoints(IConnectionPointContainer *iface, IEnumConnectionPoints **ppEnum)
Definition: olefont.c:1832
static ULONG WINAPI OLEFontImpl_IConnectionPointContainer_AddRef(IConnectionPointContainer *iface)
Definition: olefont.c:1821

Definition at line 1866 of file olefont.c.

Referenced by OLEFontImpl_Construct().

◆ OLEFontImpl_IDispatch_VTable

const IDispatchVtbl OLEFontImpl_IDispatch_VTable
static
Initial value:
=
{
}
static ULONG WINAPI OLEFontImpl_IDispatch_Release(IDispatch *iface)
Definition: olefont.c:1210
static ULONG WINAPI OLEFontImpl_IDispatch_AddRef(IDispatch *iface)
Definition: olefont.c:1220
static HRESULT WINAPI OLEFontImpl_GetIDsOfNames(IDispatch *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: olefont.c:1274
static HRESULT WINAPI OLEFontImpl_Invoke(IDispatch *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
Definition: olefont.c:1310
static HRESULT WINAPI OLEFontImpl_GetTypeInfoCount(IDispatch *iface, unsigned int *pctinfo)
Definition: olefont.c:1230
static HRESULT WINAPI OLEFontImpl_GetTypeInfo(IDispatch *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: olefont.c:1244
static HRESULT WINAPI OLEFontImpl_IDispatch_QueryInterface(IDispatch *iface, REFIID riid, VOID **ppvoid)
Definition: olefont.c:1198

Definition at line 1526 of file olefont.c.

Referenced by OLEFontImpl_Construct().

◆ OLEFontImpl_IPersistPropertyBag_VTable

const IPersistPropertyBagVtbl OLEFontImpl_IPersistPropertyBag_VTable
static
Initial value:
=
{
}
static ULONG WINAPI OLEFontImpl_IPersistPropertyBag_Release(IPersistPropertyBag *iface)
Definition: olefont.c:1892
static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_Load(IPersistPropertyBag *iface, IPropertyBag *pPropBag, IErrorLog *pErrorLog)
Definition: olefont.c:1913
static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_InitNew(IPersistPropertyBag *iface)
Definition: olefont.c:1906
static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_GetClassID(IPersistPropertyBag *iface, CLSID *classid)
Definition: olefont.c:1899
static ULONG WINAPI OLEFontImpl_IPersistPropertyBag_AddRef(IPersistPropertyBag *iface)
Definition: olefont.c:1885
static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_QueryInterface(IPersistPropertyBag *iface, REFIID riid, LPVOID *ppvObj)
Definition: olefont.c:1878
static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_Save(IPersistPropertyBag *iface, IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties)
Definition: olefont.c:2039

Definition at line 2047 of file olefont.c.

Referenced by OLEFontImpl_Construct().

◆ OLEFontImpl_IPersistStream_VTable

const IPersistStreamVtbl OLEFontImpl_IPersistStream_VTable
static
Initial value:
=
{
}
static ULONG WINAPI OLEFontImpl_IPersistStream_Release(IPersistStream *iface)
Definition: olefont.c:1553
static HRESULT WINAPI OLEFontImpl_GetSizeMax(IPersistStream *iface, ULARGE_INTEGER *pcbSize)
Definition: olefont.c:1755
static HRESULT WINAPI OLEFontImpl_IsDirty(IPersistStream *iface)
Definition: olefont.c:1593
static ULONG WINAPI OLEFontImpl_IPersistStream_AddRef(IPersistStream *iface)
Definition: olefont.c:1564
static HRESULT WINAPI OLEFontImpl_IPersistStream_QueryInterface(IPersistStream *iface, REFIID riid, VOID **ppvoid)
Definition: olefont.c:1540
static HRESULT WINAPI OLEFontImpl_GetClassID(IPersistStream *iface, CLSID *pClassID)
Definition: olefont.c:1575
static HRESULT WINAPI OLEFontImpl_Load(IPersistStream *iface, IStream *pLoadStream)
Definition: olefont.c:1621
static HRESULT WINAPI OLEFontImpl_Save(IPersistStream *iface, IStream *pOutStream, BOOL fClearDirty)
Definition: olefont.c:1682

Definition at line 1782 of file olefont.c.

Referenced by OLEFontImpl_Construct().

◆ OLEFontImpl_IPersistStreamInit_VTable

const IPersistStreamInitVtbl OLEFontImpl_IPersistStreamInit_VTable
static
Initial value:
=
{
}
static ULONG WINAPI OLEFontImpl_IPersistStreamInit_AddRef(IPersistStreamInit *iface)
Definition: olefont.c:2069
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_InitNew(IPersistStreamInit *iface)
Definition: olefont.c:2118
static ULONG WINAPI OLEFontImpl_IPersistStreamInit_Release(IPersistStreamInit *iface)
Definition: olefont.c:2076
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM pStm)
Definition: olefont.c:2097
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_GetSizeMax(IPersistStreamInit *iface, ULARGE_INTEGER *pcbSize)
Definition: olefont.c:2111
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_Save(IPersistStreamInit *iface, LPSTREAM pStm, BOOL fClearDirty)
Definition: olefont.c:2104
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_GetClassID(IPersistStreamInit *iface, CLSID *classid)
Definition: olefont.c:2083
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_QueryInterface(IPersistStreamInit *iface, REFIID riid, LPVOID *ppvObj)
Definition: olefont.c:2062
static HRESULT WINAPI OLEFontImpl_IPersistStreamInit_IsDirty(IPersistStreamInit *iface)
Definition: olefont.c:2090

Definition at line 2125 of file olefont.c.

Referenced by OLEFontImpl_Construct().

◆ OLEFontImpl_VTable

const IFontVtbl OLEFontImpl_VTable
static
Initial value:
=
{
}
static HRESULT WINAPI OLEFontImpl_get_Strikethrough(IFont *iface, BOOL *pstrikethrough)
Definition: olefont.c:860
static HRESULT WINAPI OLEFontImpl_put_Strikethrough(IFont *iface, BOOL strikethrough)
Definition: olefont.c:880
static HRESULT WINAPI OLEFontImpl_get_Bold(IFont *iface, BOOL *pbold)
Definition: olefont.c:754
static HRESULT WINAPI OLEFontImpl_put_Bold(IFont *iface, BOOL bold)
Definition: olefont.c:773
static HRESULT WINAPI OLEFontImpl_SetHdc(IFont *iface, HDC hdc)
Definition: olefont.c:1155
static HRESULT WINAPI OLEFontImpl_get_Weight(IFont *iface, short *pweight)
Definition: olefont.c:896
static HRESULT WINAPI OLEFontImpl_put_Underline(IFont *iface, BOOL underline)
Definition: olefont.c:844
static HRESULT WINAPI OLEFontImpl_get_hFont(IFont *iface, HFONT *phfont)
Definition: olefont.c:968
static HRESULT WINAPI OLEFontImpl_QueryInterface(IFont *iface, REFIID riid, void **ppvObject)
Definition: olefont.c:460
static HRESULT WINAPI OLEFontImpl_put_Charset(IFont *iface, short charset)
Definition: olefont.c:952
static HRESULT WINAPI OLEFontImpl_put_Weight(IFont *iface, short weight)
Definition: olefont.c:916
static HRESULT WINAPI OLEFontImpl_put_Italic(IFont *iface, BOOL italic)
Definition: olefont.c:808
static ULONG WINAPI OLEFontImpl_AddRef(IFont *iface)
Definition: olefont.c:513
static HRESULT WINAPI OLEFontImpl_ReleaseHfont(IFont *iface, HFONT hfont)
Definition: olefont.c:1139
static HRESULT WINAPI OLEFontImpl_get_Charset(IFont *iface, short *pcharset)
Definition: olefont.c:932
static HRESULT WINAPI OLEFontImpl_SetRatio(IFont *iface, LONG cyLogical, LONG cyHimetric)
Definition: olefont.c:1078
static HRESULT WINAPI OLEFontImpl_Clone(IFont *iface, IFont **ppfont)
Definition: olefont.c:987
static HRESULT WINAPI OLEFontImpl_get_Italic(IFont *iface, BOOL *pitalic)
Definition: olefont.c:788
static HRESULT WINAPI OLEFontImpl_get_Name(IFont *iface, BSTR *pname)
Definition: olefont.c:665
static ULONG WINAPI OLEFontImpl_Release(IFont *iface)
Definition: olefont.c:524
static HRESULT WINAPI OLEFontImpl_get_Underline(IFont *iface, BOOL *punderline)
Definition: olefont.c:824
static HRESULT WINAPI OLEFontImpl_put_Size(IFont *iface, CY size)
Definition: olefont.c:736
static HRESULT WINAPI OLEFontImpl_put_Name(IFont *iface, BSTR name)
Definition: olefont.c:688
static HRESULT WINAPI OLEFontImpl_IsEqual(IFont *iface, IFont *pFontOther)
Definition: olefont.c:1038
static HRESULT WINAPI OLEFontImpl_AddRefHfont(IFont *iface, HFONT hfont)
Definition: olefont.c:1123
static HRESULT WINAPI OLEFontImpl_get_Size(IFont *iface, CY *psize)
Definition: olefont.c:710
static HRESULT WINAPI OLEFontImpl_QueryTextMetrics(IFont *iface, TEXTMETRICOLE *ptm)
Definition: olefont.c:1104

Definition at line 1164 of file olefont.c.

Referenced by OLEFontImpl_Construct().

◆ SFCF_Vtbl

const IClassFactoryVtbl SFCF_Vtbl
static
Initial value:
= {
}
static ULONG WINAPI SFCF_AddRef(LPCLASSFACTORY iface)
Definition: olefont.c:2252
static HRESULT WINAPI SFCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
Definition: olefont.c:2263
static ULONG WINAPI SFCF_Release(LPCLASSFACTORY iface)
Definition: olefont.c:2257
static HRESULT WINAPI SFCF_LockServer(LPCLASSFACTORY iface, BOOL dolock)
Definition: olefont.c:2270
static HRESULT WINAPI SFCF_QueryInterface(IClassFactory *iface, REFIID riid, void **obj)
Definition: olefont.c:2233

Definition at line 2276 of file olefont.c.

◆ STDFONT_CF

IClassFactoryImpl STDFONT_CF = {{&SFCF_Vtbl}, 1 }
static

Definition at line 2283 of file olefont.c.

Referenced by _get_STDFONT_CF().