Skip to content

Commit

Permalink
Merge pull request #855 from autukill/master
Browse files Browse the repository at this point in the history
Fix defaultRowHeight not working
  • Loading branch information
guyonroche authored Jun 13, 2019
2 parents 59f1cc5 + 05da937 commit 839c7f5
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions lib/xlsx/xform/sheet/sheet-format-properties-xform.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class SheetFormatPropertiesXform extends BaseXform {
outlineLevelRow: model.outlineLevelRow,
outlineLevelCol: model.outlineLevelCol,
'x14ac:dyDescent': model.dyDescent,
customHeight: model.defaultRowHeight === 0 ? '0' : '1',
};
if (_.some(attributes, value => value !== undefined)) {
xmlStream.leafNode('sheetFormatPr', attributes);
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/xlsx/xform/sheet/data/sheet.1.2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<sheetViews>
<sheetView workbookViewId="0"/>
</sheetViews>
<sheetFormatPr defaultRowHeight="15" x14ac:dyDescent="0.25"/>
<sheetFormatPr defaultRowHeight="15" customHeight="1" x14ac:dyDescent="0.25"/>
<sheetPr>
<tabColor rgb="FF00FF00"/>
<pageSetUpPr fitToPage="1"/>
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/xlsx/xform/sheet/data/sheet.2.2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<sheetViews>
<sheetView workbookViewId="0"/>
</sheetViews>
<sheetFormatPr defaultRowHeight="14.4" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
<sheetFormatPr defaultRowHeight="14.4" customHeight="1" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
<sheetData>
<row r="1" spans="1:3" x14ac:dyDescent="0.25">
<c r="A1" t="s">
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/xlsx/xform/sheet/data/sheet.3.2.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
<dimension ref="A1:A1"/>
<sheetFormatPr defaultRowHeight="14.4" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
<sheetFormatPr defaultRowHeight="14.4" customHeight="1" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
<sheetData/>
</worksheet>
2 changes: 1 addition & 1 deletion spec/unit/xlsx/xform/sheet/data/sheet.5.2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
<dimension ref="A1:B1"/>
<sheetFormatPr defaultRowHeight="14.4" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
<sheetFormatPr defaultRowHeight="14.4" customHeight="1" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
<sheetData>
<row r="1" spans="1:3" x14ac:dyDescent="0.25">
<c r="A1">
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/xlsx/xform/sheet/data/sheet.6.2.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
<dimension ref="A1:B1"/>
<sheetFormatPr defaultRowHeight="14.4" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
<sheetFormatPr defaultRowHeight="14.4" customHeight="1" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
<sheetData>
<row r="1" spans="1:2" x14ac:dyDescent="0.25">
<c r="A1">
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/xlsx/xform/sheet/data/sheet.7.2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<sheetViews>
<sheetView workbookViewId="0"/>
</sheetViews>
<sheetFormatPr defaultRowHeight="14.4" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
<sheetFormatPr defaultRowHeight="14.4" customHeight="1" x14ac:dyDescent="0.55" outlineLevelRow="2"/>
<sheetData>
<row r="1" spans="1:3" x14ac:dyDescent="0.25">
<c r="A1" t="s">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const expectations = [
outlineLevelCol: 2,
},
xml:
'<sheetFormatPr defaultRowHeight="14.4" outlineLevelRow="5" outlineLevelCol="2" x14ac:dyDescent="0.55"/>',
'<sheetFormatPr defaultRowHeight="14.4" customHeight="1" outlineLevelRow="5" outlineLevelCol="2" x14ac:dyDescent="0.55"/>',
parsedModel: {
defaultRowHeight: 14.4,
dyDescent: 0.55,
Expand All @@ -30,8 +30,8 @@ const expectations = [
create() {
return new SheetFormatPropertiesXform();
},
preparedModel: { defaultRowHeight: 14.4, dyDescent: 0.55 },
xml: '<sheetFormatPr defaultRowHeight="14.4" x14ac:dyDescent="0.55"/>',
preparedModel: {defaultRowHeight: 14.4, dyDescent: 0.55},
xml: '<sheetFormatPr defaultRowHeight="14.4" customHeight="1" x14ac:dyDescent="0.55"/>',
parsedModel: {
defaultRowHeight: 14.4,
dyDescent: 0.55,
Expand Down

0 comments on commit 839c7f5

Please sign in to comment.