diff options
Diffstat (limited to 'poi/src/main')
-rw-r--r-- | poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java b/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java index cc5abe81b1..f90d229895 100644 --- a/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java +++ b/poi/src/main/java/org/apache/poi/ss/util/SheetUtil.java @@ -96,13 +96,13 @@ public class SheetUtil { /** * drawing context to measure text */ - private static final FontRenderContext fontRenderContext = new FontRenderContext(null, true, true); + private static FontRenderContext fontRenderContext = new FontRenderContext(null, true, true); /** * A system property which can be enabled to not fail when the * font-system is not available on the current machine */ - private static final boolean ignoreMissingFontSystem = + private static boolean ignoreMissingFontSystem = Boolean.parseBoolean(System.getProperty("org.apache.poi.ss.ignoreMissingFontSystem")); /** @@ -490,4 +490,21 @@ public class SheetUtil { // live within any merged regions return null; } + + // Getters/Setters are available to allow in-depth testing + protected static boolean isIgnoreMissingFontSystem() { + return ignoreMissingFontSystem; + } + + protected static void setIgnoreMissingFontSystem(boolean value) { + ignoreMissingFontSystem = value; + } + + protected static FontRenderContext getFontRenderContext() { + return fontRenderContext; + } + + protected static void setFontRenderContext(FontRenderContext fontRenderContext) { + SheetUtil.fontRenderContext = fontRenderContext; + } } |