mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 02:19:47 +00:00
msctf/range: Remove unused argument from range creation helper.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fa4c386e06
commit
c41ccf892c
|
@ -267,7 +267,6 @@ static HRESULT WINAPI Context_GetSelection (ITfContext *iface,
|
||||||
TF_SELECTION *pSelection, ULONG *pcFetched)
|
TF_SELECTION *pSelection, ULONG *pcFetched)
|
||||||
{
|
{
|
||||||
Context *This = impl_from_ITfContext(iface);
|
Context *This = impl_from_ITfContext(iface);
|
||||||
EditCookie *cookie;
|
|
||||||
ULONG count, i;
|
ULONG count, i;
|
||||||
ULONG totalFetched = 0;
|
ULONG totalFetched = 0;
|
||||||
HRESULT hr = S_OK;
|
HRESULT hr = S_OK;
|
||||||
|
@ -289,8 +288,6 @@ static HRESULT WINAPI Context_GetSelection (ITfContext *iface,
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cookie = get_Cookie_data(ec);
|
|
||||||
|
|
||||||
if (ulIndex == TF_DEFAULT_SELECTION)
|
if (ulIndex == TF_DEFAULT_SELECTION)
|
||||||
count = 1;
|
count = 1;
|
||||||
else
|
else
|
||||||
|
@ -310,7 +307,7 @@ static HRESULT WINAPI Context_GetSelection (ITfContext *iface,
|
||||||
{
|
{
|
||||||
pSelection[totalFetched].style.ase = acps.style.ase;
|
pSelection[totalFetched].style.ase = acps.style.ase;
|
||||||
pSelection[totalFetched].style.fInterimChar = acps.style.fInterimChar;
|
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 ++;
|
totalFetched ++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -364,7 +361,7 @@ static HRESULT WINAPI Context_GetStart (ITfContext *iface,
|
||||||
TfEditCookie ec, ITfRange **ppStart)
|
TfEditCookie ec, ITfRange **ppStart)
|
||||||
{
|
{
|
||||||
Context *This = impl_from_ITfContext(iface);
|
Context *This = impl_from_ITfContext(iface);
|
||||||
EditCookie *cookie;
|
|
||||||
TRACE("(%p) %i %p\n",This,ec,ppStart);
|
TRACE("(%p) %i %p\n",This,ec,ppStart);
|
||||||
|
|
||||||
if (!ppStart)
|
if (!ppStart)
|
||||||
|
@ -378,15 +375,13 @@ static HRESULT WINAPI Context_GetStart (ITfContext *iface,
|
||||||
if (get_Cookie_magic(ec)!=COOKIE_MAGIC_EDITCOOKIE)
|
if (get_Cookie_magic(ec)!=COOKIE_MAGIC_EDITCOOKIE)
|
||||||
return TF_E_NOLOCK;
|
return TF_E_NOLOCK;
|
||||||
|
|
||||||
cookie = get_Cookie_data(ec);
|
return Range_Constructor(iface, 0, 0, ppStart);
|
||||||
return Range_Constructor(iface, This->pITextStoreACP, cookie->lockType, 0, 0, ppStart);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI Context_GetEnd (ITfContext *iface,
|
static HRESULT WINAPI Context_GetEnd (ITfContext *iface,
|
||||||
TfEditCookie ec, ITfRange **ppEnd)
|
TfEditCookie ec, ITfRange **ppEnd)
|
||||||
{
|
{
|
||||||
Context *This = impl_from_ITfContext(iface);
|
Context *This = impl_from_ITfContext(iface);
|
||||||
EditCookie *cookie;
|
|
||||||
LONG end;
|
LONG end;
|
||||||
TRACE("(%p) %i %p\n",This,ec,ppEnd);
|
TRACE("(%p) %i %p\n",This,ec,ppEnd);
|
||||||
|
|
||||||
|
@ -407,10 +402,9 @@ static HRESULT WINAPI Context_GetEnd (ITfContext *iface,
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cookie = get_Cookie_data(ec);
|
|
||||||
ITextStoreACP_GetEndACP(This->pITextStoreACP,&end);
|
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,
|
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);
|
hr = ITextStoreACP_InsertTextAtSelection(This->pITextStoreACP, dwFlags, pchText, cch, &acpStart, &acpEnd, &change);
|
||||||
if (SUCCEEDED(hr))
|
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;
|
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 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 InputProcessorProfiles_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN;
|
||||||
extern HRESULT CategoryMgr_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_Constructor(IUnknown *pUnkOuter, REFIID riid, IUnknown **ppOut) DECLSPEC_HIDDEN;
|
||||||
extern HRESULT CompartmentMgr_Destructor(ITfCompartmentMgr *This) DECLSPEC_HIDDEN;
|
extern HRESULT CompartmentMgr_Destructor(ITfCompartmentMgr *This) DECLSPEC_HIDDEN;
|
||||||
extern HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN;
|
extern HRESULT LangBarMgr_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -41,10 +41,8 @@ typedef struct tagRange {
|
||||||
/* const ITfRangeACPVtb *RangeACPVtbl; */
|
/* const ITfRangeACPVtb *RangeACPVtbl; */
|
||||||
LONG refCount;
|
LONG refCount;
|
||||||
|
|
||||||
ITextStoreACP *pITextStoreACP;
|
|
||||||
ITfContext *context;
|
ITfContext *context;
|
||||||
|
|
||||||
DWORD lockType;
|
|
||||||
TfGravity gravityStart, gravityEnd;
|
TfGravity gravityStart, gravityEnd;
|
||||||
DWORD anchorStart, anchorEnd;
|
DWORD anchorStart, anchorEnd;
|
||||||
|
|
||||||
|
@ -328,7 +326,7 @@ static const ITfRangeVtbl Range_RangeVtbl =
|
||||||
Range_GetContext
|
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;
|
Range *This;
|
||||||
|
|
||||||
|
@ -336,14 +334,12 @@ HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD l
|
||||||
if (This == NULL)
|
if (This == NULL)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
TRACE("(%p) %p %p\n",This, context, textstore);
|
TRACE("(%p) %p\n", This, context);
|
||||||
|
|
||||||
This->ITfRange_iface.lpVtbl = &Range_RangeVtbl;
|
This->ITfRange_iface.lpVtbl = &Range_RangeVtbl;
|
||||||
This->refCount = 1;
|
This->refCount = 1;
|
||||||
This->context = context;
|
This->context = context;
|
||||||
ITfContext_AddRef(This->context);
|
ITfContext_AddRef(This->context);
|
||||||
This->pITextStoreACP = textstore;
|
|
||||||
This->lockType = lockType;
|
|
||||||
This->anchorStart = anchorStart;
|
This->anchorStart = anchorStart;
|
||||||
This->anchorEnd = anchorEnd;
|
This->anchorEnd = anchorEnd;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue