You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by hi...@apache.org on 2001/02/15 17:56:27 UTC
cvs commit: xml-batik/sources/org/apache/batik/css/svg ColorProfileFactory.java
hillion 01/02/15 08:56:26
Modified: sources/org/apache/batik/css/svg ColorProfileFactory.java
Log:
.
Revision Changes Path
1.2 +6 -4 xml-batik/sources/org/apache/batik/css/svg/ColorProfileFactory.java
Index: ColorProfileFactory.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/css/svg/ColorProfileFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ColorProfileFactory.java 2001/02/15 16:41:59 1.1
+++ ColorProfileFactory.java 2001/02/15 16:56:24 1.2
@@ -21,7 +21,7 @@
* This class provides a factory for the color-profile property values.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
- * @version $Id: ColorProfileFactory.java,v 1.1 2001/02/15 16:41:59 hillion Exp $
+ * @version $Id: ColorProfileFactory.java,v 1.2 2001/02/15 16:56:24 hillion Exp $
*/
public class ColorProfileFactory
extends AbstractIdentifierFactory
@@ -32,7 +32,7 @@
*/
protected final static PropertyMap values = new PropertyMap();
static {
- values.put(CSS_AUTO_VALUE, START_VALUE);
+ values.put(CSS_AUTO_VALUE, AUTO_VALUE);
values.put(CSS_SRGB_VALUE, SRGB_VALUE);
}
@@ -55,8 +55,10 @@
*/
public ImmutableValue createValue(LexicalUnit lu) throws DOMException {
if (lu.getLexicalUnitType() == LexicalUnit.SAC_IDENT) {
- if (lu.getStringValue().equalsIgnoreCase(CSS_AUTO_VALUE)) {
- return AUTO_VALUE;
+ String s = lu.getStringValue().toLowerCase();
+ if (!s.equals(CSS_AUTO_VALUE) &&
+ !s.equals(CSS_SRGB_VALUE)) {
+ return new ImmutableString(CSSPrimitiveValue.CSS_IDENT, s);
}
}
return super.createValue(lu);