diff --git a/designer-base/src/main/java/com/fr/design/gui/syntax/print/RPrintUtilities.java b/designer-base/src/main/java/com/fr/design/gui/syntax/print/RPrintUtilities.java index 500d1312a6..749bf45408 100644 --- a/designer-base/src/main/java/com/fr/design/gui/syntax/print/RPrintUtilities.java +++ b/designer-base/src/main/java/com/fr/design/gui/syntax/print/RPrintUtilities.java @@ -522,9 +522,8 @@ public abstract class RPrintUtilities { return x; int tabSizeInPixels = tabSizeInSpaces * fm.charWidth(' '); int ntabs = (((int) x) - xOffset) / tabSizeInPixels; - int reFloat = xOffset + ((ntabs + 1) * tabSizeInPixels); - float ans = reFloat; - return ans; + double reFloat = (double) xOffset + (double) ((ntabs + 1) * tabSizeInPixels); + return (float) reFloat; } }