msctf: Implement ITfContext::GetDocumentMgr.
This commit is contained in:
parent
413934cac5
commit
dee4e5d5d9
|
@ -74,6 +74,7 @@ typedef struct tagContext {
|
|||
TfClientId tidOwner;
|
||||
TfEditCookie defaultCookie;
|
||||
TS_STATUS documentStatus;
|
||||
ITfDocumentMgr *manager;
|
||||
|
||||
ITextStoreACP *pITextStoreACP;
|
||||
ITfContextOwnerCompositionSink *pITfContextOwnerCompositionSink;
|
||||
|
@ -506,8 +507,15 @@ static HRESULT WINAPI Context_GetDocumentMgr (ITfContext *iface,
|
|||
ITfDocumentMgr **ppDm)
|
||||
{
|
||||
Context *This = (Context *)iface;
|
||||
FIXME("STUB:(%p)\n",This);
|
||||
return E_NOTIMPL;
|
||||
TRACE("(%p) %p\n",This,ppDm);
|
||||
|
||||
if (!ppDm)
|
||||
return E_INVALIDARG;
|
||||
|
||||
*ppDm = This->manager;
|
||||
if (!This->manager)
|
||||
return S_FALSE;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI Context_CreateRangeBackup (ITfContext *iface,
|
||||
|
@ -758,7 +766,7 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT Context_Initialize(ITfContext *iface)
|
||||
HRESULT Context_Initialize(ITfContext *iface, ITfDocumentMgr *manager)
|
||||
{
|
||||
Context *This = (Context *)iface;
|
||||
|
||||
|
@ -769,6 +777,7 @@ HRESULT Context_Initialize(ITfContext *iface)
|
|||
(IUnknown*)This->pITextStoreACPSink, TS_AS_ALL_SINKS);
|
||||
}
|
||||
This->connected = TRUE;
|
||||
This->manager = manager;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -783,6 +792,7 @@ HRESULT Context_Uninitialize(ITfContext *iface)
|
|||
This->pITextStoreACPSink = NULL;
|
||||
}
|
||||
This->connected = FALSE;
|
||||
This->manager = NULL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ static HRESULT WINAPI DocumentMgr_Push(ITfDocumentMgr *iface, ITfContext *pic)
|
|||
This->contextStack[0] = check;
|
||||
|
||||
ITfThreadMgrEventSink_OnPushContext(This->ThreadMgrSink,check);
|
||||
Context_Initialize(check);
|
||||
Context_Initialize(check, iface);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ extern HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore,
|
|||
extern HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **ppOut);
|
||||
extern HRESULT CompartmentMgr_Destructor(ITfCompartmentMgr *This);
|
||||
|
||||
extern HRESULT Context_Initialize(ITfContext *cxt);
|
||||
extern HRESULT Context_Initialize(ITfContext *cxt, ITfDocumentMgr *manager);
|
||||
extern HRESULT Context_Uninitialize(ITfContext *cxt);
|
||||
extern HRESULT TF_SELECTION_to_TS_SELECTION_ACP(const TF_SELECTION *tf, TS_SELECTION_ACP *tsAcp);
|
||||
|
||||
|
|
Loading…
Reference in New Issue