Example #1
0
bool CGraphPlugIn::GetCellTime(cell c, time_t *t)
{
	CContainer *cnt = fParent->GetContainer();
	
	try
	{
		BAutolock lock(cnt);
		Value v;
		if (cnt->GetValue(c, v) && v.fType == eTimeData)
		{
			*t = v.fTime;
			return true;
		}
	}
	catch (...) { }

	return false;
} /* GetCellTime */
Example #2
0
bool CGraphPlugIn::GetCellText(cell c, char *s)
{
	CContainer *cnt = fParent->GetContainer();
	
	try
	{
		BAutolock lock(cnt);
		Value v;
		if (cnt->GetValue(c, v) && v.fType == eTextData)
		{
			strcpy(s, v.fText);
			return true;
		}
	}
	catch (...) { }

	return false;
} /* GetCellText */
Example #3
0
bool CGraphPlugIn::GetCellDouble(cell c, double *d)
{
	CContainer *cnt = fParent->GetContainer();
	
	try
	{
		BAutolock lock(cnt);
		Value v;
		if (cnt->GetValue(c, v) && v.fType == eNumData)
		{
			*d = v.fDouble;
			return true;
		}
	}
	catch (...) { }

	return false;
} /* GetCellDouble */
Example #4
0
bool CGraphPlugIn::GetCellBool(cell c, bool *b)
{
	CContainer *cnt = fParent->GetContainer();
	
	try
	{
		BAutolock lock(cnt);

		Value v;
		if (cnt->GetValue(c, v) && v.fType == eBoolData)
		{
			*b = v.fBool;
			return true;
		}
	}
	catch (...) { }

	return false;
} /* GetCellBool */