Skip to content

Commit

Permalink
version to 3.9.9
Browse files Browse the repository at this point in the history
  • Loading branch information
liaochong committed Nov 7, 2020
1 parent 2d09725 commit b4a7d53
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<dependency>
<groupId>com.github.liaochong</groupId>
<artifactId>myexcel</artifactId>
<version>3.9.8</version>
<version>3.9.9</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>com.github.liaochong</groupId>
<artifactId>myexcel</artifactId>
<version>3.9.8</version>
<version>3.9.9</version>
<packaging>jar</packaging>

<name>myexcel</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@

import org.apache.poi.ss.usermodel.CellStyle;

import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -51,14 +55,14 @@ public static void setBorder(CellStyle cellStyle, Map<String, String> tdStyle) {
if (tdStyle == null) {
return;
}
tdStyle = new HashMap<>(tdStyle);
String borderStyle = tdStyle.get(BORDER_STYLE);
if (borderStyle != null) {
Matcher matcher = BORDER_PATTERN.matcher(borderStyle);
List<String> styles = new ArrayList<>();
while (matcher.find()) {
styles.add(matcher.group());
}
tdStyle = new HashMap<>(tdStyle);
if (styles.size() == 1) {
tdStyle.put(BORDER_TOP_STYLE, styles.get(0));
tdStyle.put(BORDER_RIGHT_STYLE, styles.get(0));
Expand Down

0 comments on commit b4a7d53

Please sign in to comment.