View | Details | Raw Unified | Return to bug 47054
Collapse All | Expand All

(-)src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java (-1 / +2 lines)
Lines 814-821 Link Here
814
    public void cloneStyleFrom(CellStyle source) {
814
    public void cloneStyleFrom(CellStyle source) {
815
		if(source instanceof HSSFCellStyle) {
815
		if(source instanceof HSSFCellStyle) {
816
			this.cloneStyleFrom((HSSFCellStyle)source);
816
			this.cloneStyleFrom((HSSFCellStyle)source);
817
		} else {
818
		    throw new IllegalArgumentException("Can only clone from one HSSFCellStyle to another, not between HSSFCellStyle and XSSFCellStyle");
817
		}
819
		}
818
		throw new IllegalArgumentException("Can only clone from one HSSFCellStyle to another, not between HSSFCellStyle and XSSFCellStyle");
819
	}
820
	}
820
    public void cloneStyleFrom(HSSFCellStyle source) {
821
    public void cloneStyleFrom(HSSFCellStyle source) {
821
    	// First we need to clone the extended format
822
    	// First we need to clone the extended format
(-)src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java (-1 / +2 lines)
Lines 112-119 Link Here
112
    public void cloneStyleFrom(CellStyle source) {
112
    public void cloneStyleFrom(CellStyle source) {
113
        if(source instanceof XSSFCellStyle) {
113
        if(source instanceof XSSFCellStyle) {
114
            this.cloneStyleFrom(source);
114
            this.cloneStyleFrom(source);
115
        } else {
116
            throw new IllegalArgumentException("Can only clone from one XSSFCellStyle to another, not between HSSFCellStyle and XSSFCellStyle");
115
        }
117
        }
116
        throw new IllegalArgumentException("Can only clone from one XSSFCellStyle to another, not between HSSFCellStyle and XSSFCellStyle");
117
    }
118
    }
118
119
119
    /**
120
    /**

Return to bug 47054