MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / DataObject_QueryGetData

Function DataObject_QueryGetData

scintilla/win32/ScintillaWin.cxx:2091–2115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2089}
2090
2091STDMETHODIMP DataObject_QueryGetData ( DataObject *pd, FORMATETC *pFE )
2092{
2093 if ( pd->sci->DragIsRectangularOK ( pFE->cfFormat ) &&
2094 pFE->ptd == 0 &&
2095 ( pFE->dwAspect & DVASPECT_CONTENT ) != 0 &&
2096 pFE->lindex == -1 &&
2097 ( pFE->tymed & TYMED_HGLOBAL ) != 0
2098 ) {
2099 return S_OK;
2100 }
2101 bool formatOK = ( pFE->cfFormat == CF_TEXT ) ||
2102 ( ( pFE->cfFormat == CF_UNICODETEXT ) && pd->sci->IsUnicodeMode() );
2103 if ( !formatOK ||
2104 pFE->ptd != 0 ||
2105 ( pFE->dwAspect & DVASPECT_CONTENT ) == 0 ||
2106 pFE->lindex != -1 ||
2107 ( pFE->tymed & TYMED_HGLOBAL ) == 0
2108 ) {
2109 //Platform::DebugPrintf("DOB QueryGetData No %x\n",pFE->cfFormat);
2110 //return DATA_E_FORMATETC;
2111 return S_FALSE;
2112 }
2113 //Platform::DebugPrintf("DOB QueryGetData OK %x\n",pFE->cfFormat);
2114 return S_OK;
2115}
2116
2117STDMETHODIMP DataObject_GetCanonicalFormatEtc ( DataObject *pd, FORMATETC *, FORMATETC *pFEOut )
2118{

Callers

nothing calls this directly

Calls 2

DragIsRectangularOKMethod · 0.80
IsUnicodeModeMethod · 0.80

Tested by

no test coverage detected