@Override
	public Object getValue()
	{
		Object o = null;
		;
		Formula f = (Formula) getParentRec();
		if( f.isSharedFormula() )
		{
			o = FormulaCalculator.calculateFormula( f.shared.instantiate( f ) );
//			throw new UnsupportedOperationException (
//					"Shared formulas must be instantiated for calculation");
		}
		else
		{
			Object r = null;
			if( f.getInternalRecords().size() > 0 )
			{
				r = f.getInternalRecords().get( 0 );
			}
			else
			{    // it's part of an array formula but not the parent
				r = getParentRec().getSheet().getArrayFormula( getReferent() );
			}
			if( r instanceof Array )
			{
				Array arr = (Array) r;
				o = arr.getValue( this );
			}
			else if( r instanceof StringRec )
			{
				o = ((StringRec) r).getStringVal();
			}
		}
		return o;
	}