Changeset 7082 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
- Timestamp:
- 2014-05-09T05:32:37+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
r7081 r7082 9 9 import java.io.IOException; 10 10 import java.io.InputStream; 11 import java.nio.charset.StandardCharsets; 11 12 import java.util.ArrayList; 12 13 import java.util.List; … … 53 54 public final List<MapCSSRule> multipolygonRules = new ArrayList<>(); 54 55 public final List<MapCSSRule> canvasRules = new ArrayList<>(); 55 56 56 57 private Color backgroundColorOverride; 57 58 private String css = null; … … 93 94 MapCSSParser preprocessor = new MapCSSParser(in, "UTF-8", MapCSSParser.LexicalState.PREPROCESSOR); 94 95 String mapcss = preprocessor.pp_root(this); 95 96 96 97 // do the actual mapcss parsing 97 InputStream in2 = new ByteArrayInputStream(mapcss.getBytes( Utils.UTF_8));98 InputStream in2 = new ByteArrayInputStream(mapcss.getBytes(StandardCharsets.UTF_8)); 98 99 MapCSSParser parser = new MapCSSParser(in2, "UTF-8", MapCSSParser.LexicalState.DEFAULT); 99 100 parser.sheet(this); 100 101 101 102 loadMeta(); 102 103 loadCanvas(); … … 155 156 public InputStream getSourceInputStream() throws IOException { 156 157 if (css != null) { 157 return new ByteArrayInputStream(css.getBytes( Utils.UTF_8));158 return new ByteArrayInputStream(css.getBytes(StandardCharsets.UTF_8)); 158 159 } 159 160 MirroredInputStream in = getMirroredInputStream(); … … 250 251 } 251 252 } 252 253 253 254 // the declaration indices are sorted, so it suffices to save the 254 255 // last used index 255 256 int lastDeclUsed = -1; 256 257 257 258 for (MapCSSRule r : matchingRules) { 258 259 env.clearSelectorMatchingInformation();
Note:
See TracChangeset
for help on using the changeset viewer.