@@ -110,10 +110,6 @@ public abstract class AbstractExcelFactory implements ExcelFactory {
110110 * 是否为hssf
111111 */
112112 protected boolean isHssf ;
113- /**
114- * 每行的单元格最大高度map
115- */
116- private Map <Integer , Short > maxTdHeightMap = new HashMap <>();
117113 /**
118114 * 是否使用默认样式
119115 */
@@ -254,14 +250,6 @@ protected void createRow(Tr tr, Sheet sheet) {
254250 }
255251 if (tr .height > 0 ) {
256252 row .setHeightInPoints (tr .height );
257- } else {
258- // 设置行高,最小12
259- if (maxTdHeightMap .get (row .getRowNum ()) == null ) {
260- row .setHeightInPoints (row .getHeightInPoints () + 5 );
261- } else {
262- row .setHeightInPoints ((short ) (maxTdHeightMap .get (row .getRowNum ()) + 5 ));
263- maxTdHeightMap .remove (row .getRowNum ());
264- }
265253 }
266254 stagingTds .stream ().filter (blankTd -> Objects .equals (blankTd .row , tr .index )).forEach (td -> {
267255 if (tr .tdList == Collections .EMPTY_LIST ) {
@@ -631,13 +619,6 @@ private void setCellStyle(Row row, Cell cell, Td td) {
631619 if (td .style .isEmpty () && !applyDefaultStyle ) {
632620 return ;
633621 }
634- String fs = td .style .get ("font-size" );
635- if (fs != null ) {
636- short fontSize = (short ) TdUtil .getValue (fs );
637- if (fontSize > maxTdHeightMap .getOrDefault (row .getRowNum (), FontStyle .DEFAULT_FONT_SIZE )) {
638- maxTdHeightMap .put (row .getRowNum (), fontSize );
639- }
640- }
641622 if (applyDefaultStyle ) {
642623 if (td .th ) {
643624 DEFAULT_TH_STYLE .forEach ((k , v ) -> td .style .putIfAbsent (k , v ));
@@ -806,7 +787,6 @@ protected void setColWidth(Map<Integer, Integer> colMaxWidthMap, Sheet sheet, in
806787 protected void clearCache () {
807788 cellStyleMap = new HashMap <>();
808789 fontMap = new HashMap <>();
809- maxTdHeightMap = new HashMap <>();
810790 format = null ;
811791 createHelper = null ;
812792 imageMapping = null ;
0 commit comments