summaryrefslogtreecommitdiff
path: root/adjust.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-11-15 22:08:37 +0800
committerxuri <xuri.me@gmail.com>2022-11-15 22:08:37 +0800
commit45d168c79d2d3f3d0dd6247e2b527f3007d84793 (patch)
tree70d84647e84a8e04939e797b9ca7ceee008bf4a6 /adjust.go
parentac564afa56a691e378ab9bb04cb14bb283886a16 (diff)
This closes #1391, escape XML characters to avoid with corrupt file
- Update and improve unit test coverage
Diffstat (limited to 'adjust.go')
-rw-r--r--adjust.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/adjust.go b/adjust.go
index bf89927..de634fc 100644
--- a/adjust.go
+++ b/adjust.go
@@ -279,16 +279,14 @@ func (f *File) adjustAutoFilter(ws *xlsxWorksheet, dir adjustDirection, num, off
rowData.Hidden = false
}
}
- return nil
+ return err
}
coordinates = f.adjustAutoFilterHelper(dir, coordinates, num, offset)
x1, y1, x2, y2 = coordinates[0], coordinates[1], coordinates[2], coordinates[3]
- if ws.AutoFilter.Ref, err = f.coordinatesToRangeRef([]int{x1, y1, x2, y2}); err != nil {
- return err
- }
- return nil
+ ws.AutoFilter.Ref, err = f.coordinatesToRangeRef([]int{x1, y1, x2, y2})
+ return err
}
// adjustAutoFilterHelper provides a function for adjusting auto filter to