import java.awt.Graphics2D;\r
import java.awt.geom.AffineTransform;\r
import java.awt.geom.Rectangle2D;\r
+import java.util.Locale;\r
\r
import org.apache.poi.sl.usermodel.PlaceableShape;\r
import org.apache.poi.sl.usermodel.Shape;\r
// and later on, turn it around again to compare it with its original size ...\r
\r
AffineTransform txs;\r
- if (ps.getClass().getCanonicalName().toLowerCase().contains("hslf")) {\r
+ if (ps.getClass().getCanonicalName().toLowerCase(Locale.ROOT).contains("hslf")) {\r
txs = new AffineTransform(tx);\r
} else {\r
// this handling is only based on try and error ... not sure why xslf is handled differently.\r
\r
package org.apache.poi.sl.usermodel;\r
\r
+import java.util.Locale;\r
+\r
public enum AutoNumberingScheme {\r
/** Lowercase alphabetic character enclosed in parentheses. Example: (a), (b), (c), ... */\r
alphaLcParenBoth(0x0008, 1),\r
}\r
\r
private String formatSeperator(String cased) {\r
- String name = name().toLowerCase();\r
+ String name = name().toLowerCase(Locale.ROOT);\r
if (name.contains("plain")) return cased;\r
if (name.contains("parenright")) return cased+")";\r
if (name.contains("parenboth")) return "("+cased+")";\r
}\r
\r
private String formatCase(String index) {\r
- String name = name().toLowerCase();\r
- if (name.contains("lc")) return index.toLowerCase();\r
- if (name.contains("uc")) return index.toUpperCase();\r
+ String name = name().toLowerCase(Locale.ROOT);\r
+ if (name.contains("lc")) return index.toLowerCase(Locale.ROOT);\r
+ if (name.contains("uc")) return index.toUpperCase(Locale.ROOT);\r
return index;\r
}\r
\r
"\u2776\u2777\u2778\u2779\u277A\u277B\u277C\u277D\u277E";\r
\r
private String formatIndex(int value) {\r
- String name = name().toLowerCase();\r
+ String name = name().toLowerCase(Locale.ROOT);\r
if (name.startsWith("roman")) {\r
return formatRomanIndex(value);\r
} else if (name.startsWith("arabic") && !name.contains("db")) {\r
==================================================================== */\r
package org.apache.poi.util;\r
\r
+import java.util.Locale;\r
+\r
public class JvmBugs {\r
private static final POILogger LOG = POILogFactory.getLogger(JvmBugs.class);\r
\r
*/\r
public static boolean hasLineBreakMeasurerBug() {\r
String version = System.getProperty("java.version");\r
- String os = System.getProperty("os.name").toLowerCase();\r
+ String os = System.getProperty("os.name").toLowerCase(Locale.ROOT);\r
boolean ignore = Boolean.getBoolean("org.apache.poi.JvmBugs.LineBreakMeasurer.ignore");\r
boolean hasBug = (!ignore && (os.contains("win") && ("1.6.0_45".equals(version) || "1.7.0_21".equals(version))));\r
if (hasBug) {\r