def get_line_weight(value)   # :nodoc:
    value = value.downcase if value.respond_to?(:to_str)
    default = 0

    weights = {
      1          => -1,
      2          => 0,
      3          => 1,
      4          => 2,
      'hairline' => -1,
      'narrow'   => 0,
      'medium'   => 1,
      'wide'     => 2,
    }

    if weights.has_key?(value)
      weights[value]
    else
      default
    end
  end
def get_line_weight(value)   # :nodoc:
    value = value.downcase if value.respond_to?(:to_str)
    default = 0

    weights = {
      1          => -1,
      2          => 0,
      3          => 1,
      4          => 2,
      'hairline' => -1,
      'narrow'   => 0,
      'medium'   => 1,
      'wide'     => 2,
    }

    if weights.has_key?(value)
      weights[value]
    else
      default
    end
  end
Get the Excel chart index for line weight that corresponds to the user
 defined value.