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

msctf/range: Remove unused argument from range creation helper.

parent fa4c386e
......@@ -267,7 +267,6 @@ static HRESULT WINAPI Context_GetSelection (ITfContext *iface,
TF_SELECTION *pSelection, ULONG *pcFetched)
{
Context *This = impl_from_ITfContext(iface);
EditCookie *cookie;
ULONG count, i;
ULONG totalFetched = 0;
HRESULT hr = S_OK;
......@@ -289,8 +288,6 @@ static HRESULT WINAPI Context_GetSelection (ITfContext *iface,
return E_NOTIMPL;
}
cookie = get_Cookie_data(ec);
if (ulIndex == TF_DEFAULT_SELECTION)
count = 1;
else
......@@ -310,7 +307,7 @@ static HRESULT WINAPI Context_GetSelection (ITfContext *iface,
{
pSelection[totalFetched].style.ase = acps.style.ase;
pSelection[totalFetched].style.fInterimChar = acps.style.fInterimChar;
Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, acps.acpStart, acps.acpEnd, &pSelection[totalFetched].range);
Range_Constructor(iface, acps.acpStart, acps.acpEnd, &pSelection[totalFetched].range);
totalFetched ++;
}
else
......@@ -364,7 +361,7 @@ static HRESULT WINAPI Context_GetStart (ITfContext *iface,
TfEditCookie ec, ITfRange **ppStart)
{
Context *This = impl_from_ITfContext(iface);
EditCookie *cookie;
TRACE("(%p) %i %p\n",This,ec,ppStart);
if (!ppStart)
......@@ -378,15 +375,13 @@ static HRESULT WINAPI Context_GetStart (ITfContext *iface,
if (get_Cookie_magic(ec)!=COOKIE_MAGIC_EDITCOOKIE)
return TF_E_NOLOCK;
cookie = get_Cookie_data(ec);
return Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, 0, 0, ppStart);
return Range_Constructor(iface, 0, 0, ppStart);
}
static HRESULT WINAPI Context_GetEnd (ITfContext *iface,
TfEditCookie ec, ITfRange **ppEnd)
{
Context *This = impl_from_ITfContext(iface);
EditCookie *cookie;
LONG end;
TRACE("(%p) %i %p\n",This,ec,ppEnd);
......@@ -407,10 +402,9 @@ static HRESULT WINAPI Context_GetEnd (ITfContext *iface,
return E_NOTIMPL;
}
cookie = get_Cookie_data(ec);
ITextStoreACP_GetEndACP(This->pITextStoreACP,&end);
return Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, end, end, ppEnd);
return Range_Constructor(iface, end, end, ppEnd);
}
static HRESULT WINAPI Context_GetActiveView (ITfContext *iface,
......@@ -720,7 +714,7 @@ static HRESULT WINAPI InsertAtSelection_InsertTextAtSelection(
hr = ITextStoreACP_InsertTextAtSelection(This->pITextStoreACP, dwFlags, pchText, cch, &acpStart, &acpEnd, &change);
if (SUCCEEDED(hr))
Range_Constructor(&This->ITfContext_iface, This->pITextStoreACP, cookie->lockType, change.acpStart, change.acpNewEnd, ppRange);
Range_Constructor(&This->ITfContext_iface, change.acpStart, change.acpNewEnd, ppRange);
return hr;
}
......
......@@ -45,7 +45,7 @@ extern HRESULT DocumentMgr_Constructor(ITfThreadMgrEventSink*, ITfDocumentMgr **
extern HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfDocumentMgr *mgr, ITfContext **ppOut, TfEditCookie *pecTextStore) DECLSPEC_HIDDEN;
extern HRESULT InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN;
extern HRESULT CategoryMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN;
extern HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD lockType, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut) DECLSPEC_HIDDEN;
extern HRESULT Range_Constructor(ITfContext *context, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut) DECLSPEC_HIDDEN;
extern HRESULT CompartmentMgr_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **ppOut) DECLSPEC_HIDDEN;
extern HRESULT CompartmentMgr_Destructor(ITfCompartmentMgr *This) DECLSPEC_HIDDEN;
extern HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN;
......
......@@ -41,10 +41,8 @@ typedef struct tagRange {
/* const ITfRangeACPVtb *RangeACPVtbl; */
LONG refCount;
ITextStoreACP *pITextStoreACP;
ITfContext *context;
DWORD lockType;
TfGravity gravityStart, gravityEnd;
DWORD anchorStart, anchorEnd;
......@@ -328,7 +326,7 @@ static const ITfRangeVtbl Range_RangeVtbl =
Range_GetContext
};
HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD lockType, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut)
HRESULT Range_Constructor(ITfContext *context, DWORD anchorStart, DWORD anchorEnd, ITfRange **ppOut)
{
Range *This;
......@@ -336,14 +334,12 @@ HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD l
if (This == NULL)
return E_OUTOFMEMORY;
TRACE("(%p) %p %p\n",This, context, textstore);
TRACE("(%p) %p\n", This, context);
This->ITfRange_iface.lpVtbl = &Range_RangeVtbl;
This->refCount = 1;
This->context = context;
ITfContext_AddRef(This->context);
This->pITextStoreACP = textstore;
This->lockType = lockType;
This->anchorStart = anchorStart;
This->anchorEnd = anchorEnd;
......
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