private static UnitValue correctAlign(CC cc, UnitValue rowAlign, boolean isHor, boolean fromEnd)
	{
		UnitValue align = (isHor ? cc.getHorizontal() : cc.getVertical()).getAlign();
		if (align == null)
			align = rowAlign;
		if (align == UnitValue.BASELINE_IDENTITY)
			align = UnitValue.CENTER;

		if (fromEnd) {
			if (align == UnitValue.LEFT)
				align = UnitValue.RIGHT;
			else if (align == UnitValue.RIGHT)
				align = UnitValue.LEFT;
		}
		return align;
	}