MCPcopy Create free account
hub / github.com/WinMerge/winmerge / FormatPropertyValue

Method FormatPropertyValue

Src/PropertySystem.cpp:272–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272String PropertySystem::FormatPropertyValue(const PropertyValues& values, unsigned index)
273{
274 if (index >= values.m_values.size())
275 return _T("");
276 String value;
277 if (values.m_values[index].vt == (VT_VECTOR | VT_UI1))
278 {
279 const CAUB& buf = values.m_values[index].caub;
280 for (unsigned i = 0; i < buf.cElems; ++i)
281 {
282 BYTE c = buf.pElems[i];
283 value += "0123456789abcdef"[c >> 4];
284 value += "0123456789abcdef"[c & 0xf];
285 }
286 return value;
287 }
288 PWSTR pszDisplayValue = NULL;
289 HRESULT hr = PSFormatForDisplayAlloc(m_keys[index], values.m_values[index], PDFF_DEFAULT, &pszDisplayValue);
290 if (SUCCEEDED(hr))
291 {
292 value = pszDisplayValue;
293 CoTaskMemFree(pszDisplayValue);
294 }
295 return value;
296}
297
298bool PropertySystem::GetDisplayNames(std::vector<String>& names)
299{

Callers 3

ColPropertyGetFunction · 0.80
ColAllPropertyGetFunction · 0.80
TEST_FFunction · 0.80

Calls 2

SUCCEEDEDFunction · 0.85
sizeMethod · 0.45

Tested by 1

TEST_FFunction · 0.64