Commit 1ffa3515 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

msctf: Add ITfComponentMgr to documentmgr.

parent 819518c4
......@@ -45,6 +45,9 @@ typedef struct tagDocumentMgr {
const ITfSourceVtbl *SourceVtbl;
LONG refCount;
/* Aggregation */
ITfCompartmentMgr *CompartmentMgr;
ITfContext* contextStack[2]; /* limit of 2 contexts */
ITfThreadMgrEventSink* ThreadMgrSink;
} DocumentMgr;
......@@ -61,6 +64,7 @@ static void DocumentMgr_Destructor(DocumentMgr *This)
ITfContext_Release(This->contextStack[0]);
if (This->contextStack[1])
ITfContext_Release(This->contextStack[1]);
CompartmentMgr_Destructor(This->CompartmentMgr);
HeapFree(GetProcessHeap(),0,This);
}
......@@ -77,6 +81,10 @@ static HRESULT WINAPI DocumentMgr_QueryInterface(ITfDocumentMgr *iface, REFIID i
{
*ppvOut = &This->SourceVtbl;
}
else if (IsEqualIID(iid, &IID_ITfCompartmentMgr))
{
*ppvOut = This->CompartmentMgr;
}
if (*ppvOut)
{
......@@ -303,6 +311,8 @@ HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink *ThreadMgrSink, ITfDocumen
This->refCount = 1;
This->ThreadMgrSink = ThreadMgrSink;
CompartmentMgr_Constructor((IUnknown*)This, &IID_IUnknown, (IUnknown**)&This->CompartmentMgr);
TRACE("returning %p\n", This);
*ppOut = (ITfDocumentMgr*)This;
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