From 674cb492ebc96e712c6a92919caa8691eabc4a0a Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Tue, 9 Jul 2024 06:09:32 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=BD=EB=A1=9C=EC=97=86=EC=9D=84=20?= =?UTF-8?q?=EA=B2=BD=EC=9A=B0=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EB=A9=94?= =?UTF-8?q?=EB=AA=A8=20=EC=B2=98=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cokr/xit/base/docs/xls/CellDef.java | 5 +++++ src/main/java/cokr/xit/base/docs/xls/Comment.java | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/main/java/cokr/xit/base/docs/xls/CellDef.java b/src/main/java/cokr/xit/base/docs/xls/CellDef.java index 31c502f..34a6947 100644 --- a/src/main/java/cokr/xit/base/docs/xls/CellDef.java +++ b/src/main/java/cokr/xit/base/docs/xls/CellDef.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.function.Supplier; +import java.util.stream.IntStream; import com.fasterxml.jackson.core.type.TypeReference; @@ -21,6 +22,10 @@ public class CellDef { /** 빈 셀 정보 */ public static CellDef EMPTY = new CellDef().setLabel("").setField(""); + public static int[] intArray(int endExclusive) { + return IntStream.range(0, endExclusive).toArray(); + } + /**CellDef 목록에서 셀헤더 이름과 스타일을 반환한다. * @param defs CellDef 목록 * @param factory 헤더 스타일을 제공하는 function diff --git a/src/main/java/cokr/xit/base/docs/xls/Comment.java b/src/main/java/cokr/xit/base/docs/xls/Comment.java index 9ca2116..34c0c9f 100644 --- a/src/main/java/cokr/xit/base/docs/xls/Comment.java +++ b/src/main/java/cokr/xit/base/docs/xls/Comment.java @@ -15,6 +15,8 @@ import com.microsoft.schemas.vml.CTFill; import com.microsoft.schemas.vml.CTShape; import com.microsoft.schemas.vml.STFillType; +import cokr.xit.foundation.Assert; + /**메모(주석) 지원 클래스 * @author mjkhan */ @@ -82,6 +84,8 @@ public class Comment { * @param path 이미지 파일 경로 */ public void setImageComment(String path) { + if (Assert.isEmpty(path)) return; + create(""); setBackgroundImage("", path); }