aboutsummaryrefslogtreecommitdiffstats
path: root/poi/src
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2025-05-12 22:54:46 +0000
committerPJ Fanning <fanningpj@apache.org>2025-05-12 22:54:46 +0000
commitcbf657717222e53e0bd3c5f60ca026dd6edbc728 (patch)
treeb88da328d1f4eaa57df5a4de864ba0c96a7359f5 /poi/src
parent2f55495ba93bec7480e09f5dfcd410885febc60f (diff)
downloadpoi-trunk.tar.gz
poi-trunk.zip
try best effort clone of styles if types don't matchHEADtrunk
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1925525 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi/src')
-rw-r--r--poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java
index d1fe755fc3..c3c38e7a20 100644
--- a/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java
+++ b/poi/src/main/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java
@@ -858,10 +858,11 @@ public final class HSSFCellStyle implements CellStyle, Duplicatable {
public void cloneStyleFrom(CellStyle source) {
if(source instanceof HSSFCellStyle) {
this.cloneStyleFrom((HSSFCellStyle)source);
- } else if (_hssfWorkbook != null) {
+ } else {
CellUtil.cloneStyle(source, this, _hssfWorkbook);
}
}
+
public void cloneStyleFrom(HSSFCellStyle source) {
// First we need to clone the extended format
// record