From 978eeb1faaecf4630bd0c8fb8b037a2775f6e619 Mon Sep 17 00:00:00 2001 From: Sergey Vladimirov Date: Mon, 18 Jul 2011 19:51:08 +0000 Subject: [PATCH] fix compilation error git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1148024 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/hssf/converter/ExcelToHtmlUtils.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlUtils.java b/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlUtils.java index 4d64e5fcfe..4be80b97f6 100644 --- a/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlUtils.java +++ b/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlUtils.java @@ -32,6 +32,33 @@ public class ExcelToHtmlUtils private static final short EXCEL_COLUMN_WIDTH_FACTOR = 256; private static final int UNIT_OFFSET_LENGTH = 7; + public static void appendAlign( StringBuilder style, short alignment ) + { + switch ( alignment ) + { + case HSSFCellStyle.ALIGN_CENTER: + style.append( "text-align: center; " ); + break; + case HSSFCellStyle.ALIGN_CENTER_SELECTION: + style.append( "text-align: center; " ); + break; + case HSSFCellStyle.ALIGN_FILL: + // XXX: shall we support fill? + break; + case HSSFCellStyle.ALIGN_GENERAL: + break; + case HSSFCellStyle.ALIGN_JUSTIFY: + style.append( "text-align: justify; " ); + break; + case HSSFCellStyle.ALIGN_LEFT: + style.append( "text-align: left; " ); + break; + case HSSFCellStyle.ALIGN_RIGHT: + style.append( "text-align: right; " ); + break; + } + } + public static String getBorderStyle( short xlsBorder ) { final String borderStyle; -- 2.39.5