msctf: Fix some interface casts left from cleanup.

This commit is contained in:
Nikolay Sivov 2013-11-19 16:14:45 +04:00 committed by Alexandre Julliard
parent b6efcef7a7
commit f2b29ecf72
8 changed files with 42 additions and 47 deletions

View File

@ -63,7 +63,7 @@ static HRESULT WINAPI CategoryMgr_QueryInterface(ITfCategoryMgr *iface, REFIID i
if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfCategoryMgr))
{
*ppvOut = This;
*ppvOut = &This->ITfCategoryMgr_iface;
}
if (*ppvOut)
@ -391,12 +391,11 @@ static HRESULT WINAPI CategoryMgr_IsEqualTfGuidAtom ( ITfCategoryMgr *iface,
}
static const ITfCategoryMgrVtbl CategoryMgr_CategoryMgrVtbl =
static const ITfCategoryMgrVtbl CategoryMgrVtbl =
{
CategoryMgr_QueryInterface,
CategoryMgr_AddRef,
CategoryMgr_Release,
CategoryMgr_RegisterCategory,
CategoryMgr_UnregisterCategory,
CategoryMgr_EnumCategoriesInItem,
@ -423,10 +422,10 @@ HRESULT CategoryMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
if (This == NULL)
return E_OUTOFMEMORY;
This->ITfCategoryMgr_iface.lpVtbl = &CategoryMgr_CategoryMgrVtbl;
This->ITfCategoryMgr_iface.lpVtbl = &CategoryMgrVtbl;
This->refCount = 1;
TRACE("returning %p\n", This);
*ppOut = (IUnknown *)This;
*ppOut = (IUnknown *)&This->ITfCategoryMgr_iface;
TRACE("returning %p\n", *ppOut);
return S_OK;
}

View File

@ -141,7 +141,7 @@ static HRESULT WINAPI CompartmentMgr_QueryInterface(ITfCompartmentMgr *iface, RE
if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfCompartmentMgr))
{
*ppvOut = This;
*ppvOut = &This->ITfCompartmentMgr_iface;
}
if (*ppvOut)
@ -285,8 +285,8 @@ HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **
if (pUnkOuter)
{
TRACE("returning %p\n", This);
*ppOut = (IUnknown*)This;
*ppOut = (IUnknown*)&This->ITfCompartmentMgr_iface;
TRACE("returning %p\n", *ppOut);
return S_OK;
}
else
@ -436,8 +436,8 @@ static HRESULT CompartmentEnumGuid_Constructor(struct list *values, IEnumGUID **
This->values = values;
This->cursor = list_head(values);
TRACE("returning %p\n", This);
*ppOut = (IEnumGUID*)This;
*ppOut = &This->IEnumGUID_iface;
TRACE("returning %p\n", *ppOut);
return S_OK;
}
@ -670,7 +670,7 @@ static HRESULT Compartment_Constructor(CompartmentValue *valueData, ITfCompartme
list_init(&This->CompartmentEventSink);
TRACE("returning %p\n", This);
*ppOut = (ITfCompartment*)This;
*ppOut = &This->ITfCompartment_iface;
TRACE("returning %p\n", *ppOut);
return S_OK;
}

View File

@ -722,7 +722,7 @@ static HRESULT WINAPI InsertAtSelection_InsertTextAtSelection(
hr = ITextStoreACP_InsertTextAtSelection(This->pITextStoreACP, dwFlags, pchText, cch, &acpStart, &acpEnd, &change);
if (SUCCEEDED(hr))
Range_Constructor((ITfContext*)This, This->pITextStoreACP, cookie->lockType, change.acpStart, change.acpNewEnd, ppRange);
Range_Constructor(&This->ITfContext_iface, This->pITextStoreACP, cookie->lockType, change.acpStart, change.acpNewEnd, ppRange);
return hr;
}
@ -844,8 +844,8 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr
list_init(&This->pTextEditSink);
list_init(&This->pTextLayoutSink);
*ppOut = (ITfContext*)This;
TRACE("returning %p\n", This);
*ppOut = &This->ITfContext_iface;
TRACE("returning %p\n", *ppOut);
return S_OK;
}
@ -1101,7 +1101,7 @@ static HRESULT TextStoreACPSink_Constructor(ITextStoreACPSink **ppOut, Context *
This->pContext = pContext;
TRACE("returning %p\n", This);
*ppOut = &This->ITextStoreACPSink_iface;
TRACE("returning %p\n", *ppOut);
return S_OK;
}

View File

@ -114,12 +114,11 @@ static HRESULT WINAPI DisplayAttributeMgr_GetDisplayAttributeInfo(ITfDisplayAttr
return E_NOTIMPL;
}
static const ITfDisplayAttributeMgrVtbl DisplayAttributeMgr_DisplayAttributeMgrVtbl =
static const ITfDisplayAttributeMgrVtbl DisplayAttributeMgrVtbl =
{
DisplayAttributeMgr_QueryInterface,
DisplayAttributeMgr_AddRef,
DisplayAttributeMgr_Release,
DisplayAttributeMgr_OnUpdateInfo,
DisplayAttributeMgr_EnumDisplayAttributeInfo,
DisplayAttributeMgr_GetDisplayAttributeInfo
@ -135,10 +134,10 @@ HRESULT DisplayAttributeMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
if (This == NULL)
return E_OUTOFMEMORY;
This->ITfDisplayAttributeMgr_iface.lpVtbl = &DisplayAttributeMgr_DisplayAttributeMgrVtbl;
This->ITfDisplayAttributeMgr_iface.lpVtbl = &DisplayAttributeMgrVtbl;
This->refCount = 1;
TRACE("returning %p\n", This);
*ppOut = (IUnknown *)This;
*ppOut = (IUnknown *)&This->ITfDisplayAttributeMgr_iface;
TRACE("returning %p\n", *ppOut);
return S_OK;
}

View File

@ -262,12 +262,11 @@ static HRESULT WINAPI DocumentMgr_EnumContexts(ITfDocumentMgr *iface, IEnumTfCon
return EnumTfContext_Constructor(This, ppEnum);
}
static const ITfDocumentMgrVtbl DocumentMgr_DocumentMgrVtbl =
static const ITfDocumentMgrVtbl DocumentMgrVtbl =
{
DocumentMgr_QueryInterface,
DocumentMgr_AddRef,
DocumentMgr_Release,
DocumentMgr_CreateContext,
DocumentMgr_Push,
DocumentMgr_Pop,
@ -276,20 +275,19 @@ static const ITfDocumentMgrVtbl DocumentMgr_DocumentMgrVtbl =
DocumentMgr_EnumContexts
};
static HRESULT WINAPI Source_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
static HRESULT WINAPI DocumentMgrSource_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
{
DocumentMgr *This = impl_from_ITfSource(iface);
return ITfDocumentMgr_QueryInterface(&This->ITfDocumentMgr_iface, iid, ppvOut);
}
static ULONG WINAPI Source_AddRef(ITfSource *iface)
static ULONG WINAPI DocumentMgrSource_AddRef(ITfSource *iface)
{
DocumentMgr *This = impl_from_ITfSource(iface);
return ITfDocumentMgr_AddRef(&This->ITfDocumentMgr_iface);
}
static ULONG WINAPI Source_Release(ITfSource *iface)
static ULONG WINAPI DocumentMgrSource_Release(ITfSource *iface)
{
DocumentMgr *This = impl_from_ITfSource(iface);
return ITfDocumentMgr_Release(&This->ITfDocumentMgr_iface);
@ -313,12 +311,11 @@ static HRESULT WINAPI DocumentMgrSource_UnadviseSink(ITfSource *iface, DWORD pdw
return E_NOTIMPL;
}
static const ITfSourceVtbl DocumentMgr_SourceVtbl =
static const ITfSourceVtbl DocumentMgrSourceVtbl =
{
Source_QueryInterface,
Source_AddRef,
Source_Release,
DocumentMgrSource_QueryInterface,
DocumentMgrSource_AddRef,
DocumentMgrSource_Release,
DocumentMgrSource_AdviseSink,
DocumentMgrSource_UnadviseSink,
};
@ -331,15 +328,15 @@ HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink *ThreadMgrSink, ITfDocumen
if (This == NULL)
return E_OUTOFMEMORY;
This->ITfDocumentMgr_iface.lpVtbl = &DocumentMgr_DocumentMgrVtbl;
This->ITfSource_iface.lpVtbl = &DocumentMgr_SourceVtbl;
This->ITfDocumentMgr_iface.lpVtbl = &DocumentMgrVtbl;
This->ITfSource_iface.lpVtbl = &DocumentMgrSourceVtbl;
This->refCount = 1;
This->ThreadMgrSink = ThreadMgrSink;
CompartmentMgr_Constructor((IUnknown*)This, &IID_IUnknown, (IUnknown**)&This->CompartmentMgr);
CompartmentMgr_Constructor((IUnknown*)&This->ITfDocumentMgr_iface, &IID_IUnknown, (IUnknown**)&This->CompartmentMgr);
TRACE("returning %p\n", This);
*ppOut = &This->ITfDocumentMgr_iface;
TRACE("returning %p\n", *ppOut);
return S_OK;
}
@ -477,7 +474,7 @@ static HRESULT EnumTfContext_Constructor(DocumentMgr *mgr, IEnumTfContexts **ppO
This->refCount = 1;
This->docmgr = mgr;
TRACE("returning %p\n", This);
*ppOut = &This->IEnumTfContexts_iface;
TRACE("returning %p\n", *ppOut);
return S_OK;
}

View File

@ -787,8 +787,8 @@ HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut
list_init(&This->LanguageProfileNotifySink);
TRACE("returning %p\n", This);
*ppOut = (IUnknown *)This;
*ppOut = (IUnknown *)&This->ITfInputProcessorProfiles_iface;
TRACE("returning %p\n", *ppOut);
return S_OK;
}
@ -940,8 +940,8 @@ static HRESULT ProfilesEnumGuid_Constructor(IEnumGUID **ppOut)
return E_FAIL;
}
TRACE("returning %p\n", This);
*ppOut = (IEnumGUID*)This;
*ppOut = &This->IEnumGUID_iface;
TRACE("returning %p\n", *ppOut);
return S_OK;
}
@ -1181,7 +1181,7 @@ static HRESULT EnumTfLanguageProfiles_Constructor(LANGID langid, IEnumTfLanguage
return E_FAIL;
}
TRACE("returning %p\n", This);
*ppOut = (IEnumTfLanguageProfiles*)This;
*ppOut = &This->IEnumTfLanguageProfiles_iface;
TRACE("returning %p\n", *ppOut);
return S_OK;
}

View File

@ -192,7 +192,7 @@ HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
This->ITfLangBarMgr_iface.lpVtbl = &LangBarMgr_LangBarMgrVtbl;
This->refCount = 1;
TRACE("returning %p\n", This);
*ppOut = (IUnknown *)This;
*ppOut = (IUnknown *)&This->ITfLangBarMgr_iface;
TRACE("returning %p\n", *ppOut);
return S_OK;
}

View File

@ -345,7 +345,7 @@ HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD l
This->anchorEnd = anchorEnd;
*ppOut = &This->ITfRange_iface;
TRACE("returning %p\n", This);
TRACE("returning %p\n", *ppOut);
return S_OK;
}