code: public int getLength(TermLengthOrPercent value, boolean auto, int defval, int autoval, int whole)
      {
          if (auto)
              return autoval;
          else if (value == null)
              return defval;
          else
              return (int) context.pxLength(value, whole);
      }
docs: Returns the length in pixels from a CSS definition
  @param value The length or percentage value to be converted
  @param auto True, if the property is set to <code>auto</code>
  @param defval The length value to be used when the first one is null
  @param autoval The value to be used when "auto" is specified
  @param whole the length to be returned as 100% (in case of percentage values)