Commit f2b29ecf authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msctf: Fix some interface casts left from cleanup.

parent b6efcef7
...@@ -63,7 +63,7 @@ static HRESULT WINAPI CategoryMgr_QueryInterface(ITfCategoryMgr *iface, REFIID i ...@@ -63,7 +63,7 @@ static HRESULT WINAPI CategoryMgr_QueryInterface(ITfCategoryMgr *iface, REFIID i
if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfCategoryMgr)) if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfCategoryMgr))
{ {
*ppvOut = This; *ppvOut = &This->ITfCategoryMgr_iface;
} }
if (*ppvOut) if (*ppvOut)
...@@ -391,12 +391,11 @@ static HRESULT WINAPI CategoryMgr_IsEqualTfGuidAtom ( ITfCategoryMgr *iface, ...@@ -391,12 +391,11 @@ static HRESULT WINAPI CategoryMgr_IsEqualTfGuidAtom ( ITfCategoryMgr *iface,
} }
static const ITfCategoryMgrVtbl CategoryMgr_CategoryMgrVtbl = static const ITfCategoryMgrVtbl CategoryMgrVtbl =
{ {
CategoryMgr_QueryInterface, CategoryMgr_QueryInterface,
CategoryMgr_AddRef, CategoryMgr_AddRef,
CategoryMgr_Release, CategoryMgr_Release,
CategoryMgr_RegisterCategory, CategoryMgr_RegisterCategory,
CategoryMgr_UnregisterCategory, CategoryMgr_UnregisterCategory,
CategoryMgr_EnumCategoriesInItem, CategoryMgr_EnumCategoriesInItem,
...@@ -423,10 +422,10 @@ HRESULT CategoryMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) ...@@ -423,10 +422,10 @@ HRESULT CategoryMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
if (This == NULL) if (This == NULL)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
This->ITfCategoryMgr_iface.lpVtbl = &CategoryMgr_CategoryMgrVtbl; This->ITfCategoryMgr_iface.lpVtbl = &CategoryMgrVtbl;
This->refCount = 1; This->refCount = 1;
TRACE("returning %p\n", This); *ppOut = (IUnknown *)&This->ITfCategoryMgr_iface;
*ppOut = (IUnknown *)This; TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
...@@ -141,7 +141,7 @@ static HRESULT WINAPI CompartmentMgr_QueryInterface(ITfCompartmentMgr *iface, RE ...@@ -141,7 +141,7 @@ static HRESULT WINAPI CompartmentMgr_QueryInterface(ITfCompartmentMgr *iface, RE
if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfCompartmentMgr)) if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_ITfCompartmentMgr))
{ {
*ppvOut = This; *ppvOut = &This->ITfCompartmentMgr_iface;
} }
if (*ppvOut) if (*ppvOut)
...@@ -285,8 +285,8 @@ HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown ** ...@@ -285,8 +285,8 @@ HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **
if (pUnkOuter) if (pUnkOuter)
{ {
TRACE("returning %p\n", This); *ppOut = (IUnknown*)&This->ITfCompartmentMgr_iface;
*ppOut = (IUnknown*)This; TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
else else
...@@ -436,8 +436,8 @@ static HRESULT CompartmentEnumGuid_Constructor(struct list *values, IEnumGUID ** ...@@ -436,8 +436,8 @@ static HRESULT CompartmentEnumGuid_Constructor(struct list *values, IEnumGUID **
This->values = values; This->values = values;
This->cursor = list_head(values); This->cursor = list_head(values);
TRACE("returning %p\n", This); *ppOut = &This->IEnumGUID_iface;
*ppOut = (IEnumGUID*)This; TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
...@@ -670,7 +670,7 @@ static HRESULT Compartment_Constructor(CompartmentValue *valueData, ITfCompartme ...@@ -670,7 +670,7 @@ static HRESULT Compartment_Constructor(CompartmentValue *valueData, ITfCompartme
list_init(&This->CompartmentEventSink); list_init(&This->CompartmentEventSink);
TRACE("returning %p\n", This); *ppOut = &This->ITfCompartment_iface;
*ppOut = (ITfCompartment*)This; TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
...@@ -722,7 +722,7 @@ static HRESULT WINAPI InsertAtSelection_InsertTextAtSelection( ...@@ -722,7 +722,7 @@ static HRESULT WINAPI InsertAtSelection_InsertTextAtSelection(
hr = ITextStoreACP_InsertTextAtSelection(This->pITextStoreACP, dwFlags, pchText, cch, &acpStart, &acpEnd, &change); hr = ITextStoreACP_InsertTextAtSelection(This->pITextStoreACP, dwFlags, pchText, cch, &acpStart, &acpEnd, &change);
if (SUCCEEDED(hr)) 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; return hr;
} }
...@@ -844,8 +844,8 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr ...@@ -844,8 +844,8 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr
list_init(&This->pTextEditSink); list_init(&This->pTextEditSink);
list_init(&This->pTextLayoutSink); list_init(&This->pTextLayoutSink);
*ppOut = (ITfContext*)This; *ppOut = &This->ITfContext_iface;
TRACE("returning %p\n", This); TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
...@@ -1101,7 +1101,7 @@ static HRESULT TextStoreACPSink_Constructor(ITextStoreACPSink **ppOut, Context * ...@@ -1101,7 +1101,7 @@ static HRESULT TextStoreACPSink_Constructor(ITextStoreACPSink **ppOut, Context *
This->pContext = pContext; This->pContext = pContext;
TRACE("returning %p\n", This);
*ppOut = &This->ITextStoreACPSink_iface; *ppOut = &This->ITextStoreACPSink_iface;
TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
...@@ -114,12 +114,11 @@ static HRESULT WINAPI DisplayAttributeMgr_GetDisplayAttributeInfo(ITfDisplayAttr ...@@ -114,12 +114,11 @@ static HRESULT WINAPI DisplayAttributeMgr_GetDisplayAttributeInfo(ITfDisplayAttr
return E_NOTIMPL; return E_NOTIMPL;
} }
static const ITfDisplayAttributeMgrVtbl DisplayAttributeMgr_DisplayAttributeMgrVtbl = static const ITfDisplayAttributeMgrVtbl DisplayAttributeMgrVtbl =
{ {
DisplayAttributeMgr_QueryInterface, DisplayAttributeMgr_QueryInterface,
DisplayAttributeMgr_AddRef, DisplayAttributeMgr_AddRef,
DisplayAttributeMgr_Release, DisplayAttributeMgr_Release,
DisplayAttributeMgr_OnUpdateInfo, DisplayAttributeMgr_OnUpdateInfo,
DisplayAttributeMgr_EnumDisplayAttributeInfo, DisplayAttributeMgr_EnumDisplayAttributeInfo,
DisplayAttributeMgr_GetDisplayAttributeInfo DisplayAttributeMgr_GetDisplayAttributeInfo
...@@ -135,10 +134,10 @@ HRESULT DisplayAttributeMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) ...@@ -135,10 +134,10 @@ HRESULT DisplayAttributeMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
if (This == NULL) if (This == NULL)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
This->ITfDisplayAttributeMgr_iface.lpVtbl = &DisplayAttributeMgr_DisplayAttributeMgrVtbl; This->ITfDisplayAttributeMgr_iface.lpVtbl = &DisplayAttributeMgrVtbl;
This->refCount = 1; This->refCount = 1;
TRACE("returning %p\n", This); *ppOut = (IUnknown *)&This->ITfDisplayAttributeMgr_iface;
*ppOut = (IUnknown *)This; TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
...@@ -262,12 +262,11 @@ static HRESULT WINAPI DocumentMgr_EnumContexts(ITfDocumentMgr *iface, IEnumTfCon ...@@ -262,12 +262,11 @@ static HRESULT WINAPI DocumentMgr_EnumContexts(ITfDocumentMgr *iface, IEnumTfCon
return EnumTfContext_Constructor(This, ppEnum); return EnumTfContext_Constructor(This, ppEnum);
} }
static const ITfDocumentMgrVtbl DocumentMgr_DocumentMgrVtbl = static const ITfDocumentMgrVtbl DocumentMgrVtbl =
{ {
DocumentMgr_QueryInterface, DocumentMgr_QueryInterface,
DocumentMgr_AddRef, DocumentMgr_AddRef,
DocumentMgr_Release, DocumentMgr_Release,
DocumentMgr_CreateContext, DocumentMgr_CreateContext,
DocumentMgr_Push, DocumentMgr_Push,
DocumentMgr_Pop, DocumentMgr_Pop,
...@@ -276,20 +275,19 @@ static const ITfDocumentMgrVtbl DocumentMgr_DocumentMgrVtbl = ...@@ -276,20 +275,19 @@ static const ITfDocumentMgrVtbl DocumentMgr_DocumentMgrVtbl =
DocumentMgr_EnumContexts DocumentMgr_EnumContexts
}; };
static HRESULT WINAPI DocumentMgrSource_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
static HRESULT WINAPI Source_QueryInterface(ITfSource *iface, REFIID iid, LPVOID *ppvOut)
{ {
DocumentMgr *This = impl_from_ITfSource(iface); DocumentMgr *This = impl_from_ITfSource(iface);
return ITfDocumentMgr_QueryInterface(&This->ITfDocumentMgr_iface, iid, ppvOut); 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); DocumentMgr *This = impl_from_ITfSource(iface);
return ITfDocumentMgr_AddRef(&This->ITfDocumentMgr_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); DocumentMgr *This = impl_from_ITfSource(iface);
return ITfDocumentMgr_Release(&This->ITfDocumentMgr_iface); return ITfDocumentMgr_Release(&This->ITfDocumentMgr_iface);
...@@ -313,12 +311,11 @@ static HRESULT WINAPI DocumentMgrSource_UnadviseSink(ITfSource *iface, DWORD pdw ...@@ -313,12 +311,11 @@ static HRESULT WINAPI DocumentMgrSource_UnadviseSink(ITfSource *iface, DWORD pdw
return E_NOTIMPL; return E_NOTIMPL;
} }
static const ITfSourceVtbl DocumentMgr_SourceVtbl = static const ITfSourceVtbl DocumentMgrSourceVtbl =
{ {
Source_QueryInterface, DocumentMgrSource_QueryInterface,
Source_AddRef, DocumentMgrSource_AddRef,
Source_Release, DocumentMgrSource_Release,
DocumentMgrSource_AdviseSink, DocumentMgrSource_AdviseSink,
DocumentMgrSource_UnadviseSink, DocumentMgrSource_UnadviseSink,
}; };
...@@ -331,15 +328,15 @@ HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink *ThreadMgrSink, ITfDocumen ...@@ -331,15 +328,15 @@ HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink *ThreadMgrSink, ITfDocumen
if (This == NULL) if (This == NULL)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
This->ITfDocumentMgr_iface.lpVtbl = &DocumentMgr_DocumentMgrVtbl; This->ITfDocumentMgr_iface.lpVtbl = &DocumentMgrVtbl;
This->ITfSource_iface.lpVtbl = &DocumentMgr_SourceVtbl; This->ITfSource_iface.lpVtbl = &DocumentMgrSourceVtbl;
This->refCount = 1; This->refCount = 1;
This->ThreadMgrSink = ThreadMgrSink; 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; *ppOut = &This->ITfDocumentMgr_iface;
TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
...@@ -477,7 +474,7 @@ static HRESULT EnumTfContext_Constructor(DocumentMgr *mgr, IEnumTfContexts **ppO ...@@ -477,7 +474,7 @@ static HRESULT EnumTfContext_Constructor(DocumentMgr *mgr, IEnumTfContexts **ppO
This->refCount = 1; This->refCount = 1;
This->docmgr = mgr; This->docmgr = mgr;
TRACE("returning %p\n", This);
*ppOut = &This->IEnumTfContexts_iface; *ppOut = &This->IEnumTfContexts_iface;
TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
...@@ -787,8 +787,8 @@ HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut ...@@ -787,8 +787,8 @@ HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut
list_init(&This->LanguageProfileNotifySink); list_init(&This->LanguageProfileNotifySink);
TRACE("returning %p\n", This); *ppOut = (IUnknown *)&This->ITfInputProcessorProfiles_iface;
*ppOut = (IUnknown *)This; TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
...@@ -940,8 +940,8 @@ static HRESULT ProfilesEnumGuid_Constructor(IEnumGUID **ppOut) ...@@ -940,8 +940,8 @@ static HRESULT ProfilesEnumGuid_Constructor(IEnumGUID **ppOut)
return E_FAIL; return E_FAIL;
} }
TRACE("returning %p\n", This); *ppOut = &This->IEnumGUID_iface;
*ppOut = (IEnumGUID*)This; TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
...@@ -1181,7 +1181,7 @@ static HRESULT EnumTfLanguageProfiles_Constructor(LANGID langid, IEnumTfLanguage ...@@ -1181,7 +1181,7 @@ static HRESULT EnumTfLanguageProfiles_Constructor(LANGID langid, IEnumTfLanguage
return E_FAIL; return E_FAIL;
} }
TRACE("returning %p\n", This); *ppOut = &This->IEnumTfLanguageProfiles_iface;
*ppOut = (IEnumTfLanguageProfiles*)This; TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
...@@ -192,7 +192,7 @@ HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) ...@@ -192,7 +192,7 @@ HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
This->ITfLangBarMgr_iface.lpVtbl = &LangBarMgr_LangBarMgrVtbl; This->ITfLangBarMgr_iface.lpVtbl = &LangBarMgr_LangBarMgrVtbl;
This->refCount = 1; This->refCount = 1;
TRACE("returning %p\n", This); *ppOut = (IUnknown *)&This->ITfLangBarMgr_iface;
*ppOut = (IUnknown *)This; TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
...@@ -345,7 +345,7 @@ HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD l ...@@ -345,7 +345,7 @@ HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD l
This->anchorEnd = anchorEnd; This->anchorEnd = anchorEnd;
*ppOut = &This->ITfRange_iface; *ppOut = &This->ITfRange_iface;
TRACE("returning %p\n", This); TRACE("returning %p\n", *ppOut);
return S_OK; return S_OK;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment