[CICERO][MSCTF] ITfContext: Follow-up of #8224 (#8231)

Follow-up of #8224.
JIRA issue: CORE-19361
- Add cicIsNullPtr function in Cicero <cicbase.h>.
- Reordering of CMakeLists.txt items.
- Minor refactoring.
This commit is contained in:
Katayama Hirofumi MZ 2025-07-05 21:05:15 +09:00 committed by GitHub
parent 93181db68b
commit 6ba2363bdb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 19 deletions

View file

@ -26,18 +26,17 @@
#include <wine/debug.h>
WINE_DEFAULT_DEBUG_CHANNEL(msctf);
static inline bool cicIsNullPtr(LPCVOID ptr)
{
return !ptr;
}
////////////////////////////////////////////////////////////////////////////
class CContext
: public ITfContext
, public ITfSource
// , public ITfContextComposition
, public ITfContextOwnerCompositionServices
// , public ITfContextOwnerServices
, public ITfInsertAtSelection
// , public ITfMouseTracker
// , public ITfQueryEmbedded
, public ITfSourceSingle
, public ITextStoreACPSink
, public ITextStoreACPServices
@ -412,15 +411,13 @@ STDMETHODIMP CContext::GetSelection(
hr = m_pITextStoreACP->GetSelection(ulIndex + i, 1, &acps, &fetched);
if (hr == TS_E_NOLOCK)
return TF_E_NOLOCK;
else if (SUCCEEDED(hr))
{
pSelection[totalFetched].style.ase = (TfActiveSelEnd)acps.style.ase;
pSelection[totalFetched].style.fInterimChar = acps.style.fInterimChar;
Range_Constructor(this, m_pITextStoreACP, cookie->lockType, acps.acpStart, acps.acpEnd, &pSelection[totalFetched].range);
totalFetched++;
}
else
else if (FAILED(hr))
break;
pSelection[totalFetched].style.ase = (TfActiveSelEnd)acps.style.ase;
pSelection[totalFetched].style.fInterimChar = acps.style.fInterimChar;
Range_Constructor(this, m_pITextStoreACP, cookie->lockType, acps.acpStart, acps.acpEnd, &pSelection[totalFetched].range);
totalFetched++;
}
*pcFetched = totalFetched;