Ejemplo n.º 1
0
/**
 * @brief Write boolean item using keywords (Yes|No)
 */
void CConfigLog::WriteItemWhitespace(int indent, LPCTSTR key, int *pvalue)
{
	static NameMap namemap[] = {
		{ WHITESPACE_COMPARE_ALL, _T("Compare all") }
		, { WHITESPACE_IGNORE_CHANGE, _T("Ignore change") }
		, { WHITESPACE_IGNORE_ALL, _T("Ignore all") }
	};

	if (m_writing)
	{
		CString text = _T("Unknown");
		for (int i=0; i<sizeof(namemap)/sizeof(namemap[0]); ++i)
		{
			if (*pvalue == namemap[i].ival)
				text = namemap[i].sval;
		}
		WriteItem(indent, key, text);
	}
	else
	{
		*pvalue = namemap[0].ival;
		CString svalue = GetValueFromConfig(key);
		for (int i=0; i<sizeof(namemap)/sizeof(namemap[0]); ++i)
		{
			if (svalue == namemap[i].sval)
				*pvalue = namemap[i].ival;
		}
	}
}
Ejemplo n.º 2
0
/** Sets TMeasureTextInputData::iWordJustExcess */
void CT_DataMeasureTextInput::DoCmdSetWordJustExcess(const TDesC& aSection)
	{
	INFO_PRINTF1(_L("Sets TMeasureTextInputData::iWordJustExcess"));

	// get value from parameters
	TInt	value;
	if (GetValueFromConfig(aSection, value))
		{
		iMeasureTextInput->iWordJustExcess = value;
		}
	}
Ejemplo n.º 3
0
/** Sets TMeasureTextInputData::iMaxAdvance */
void CT_DataMeasureTextInput::DoCmdSetMaxAdvance(const TDesC& aSection)
	{
	INFO_PRINTF1(_L("Sets TMeasureTextInputData::iMaxAdvance"));

	// get value from parameters
	TInt	value;
	if (GetValueFromConfig(aSection, value))
		{
		iMeasureTextInput->iMaxAdvance = value;
		}
	}
Ejemplo n.º 4
0
/** Sets TMeasureTextInputData::iCharJustNum */
void CT_DataMeasureTextInput::DoCmdSetCharJustNum(const TDesC& aSection)
	{
	INFO_PRINTF1(_L("Sets TMeasureTextInputData::iCharJustNum"));

	// get value from parameters
	TInt	value;
	if (GetValueFromConfig(aSection, value))
		{
		iMeasureTextInput->iCharJustNum = value;
		}
	}
Ejemplo n.º 5
0
/** Sets TMeasureTextInputData::iEndInputChar */
void CT_DataMeasureTextInput::DoCmdSetEndInputChar(const TDesC& aSection)
	{
	INFO_PRINTF2(_L("Sets TMeasureTextInputData::iEndInputChar %S"), &aSection);

	// get value from parameters
	TInt	value;
	if (GetValueFromConfig(aSection, value))
		{
		iMeasureTextInput->iEndInputChar = value;
		}
	}