diff options
author | three <three3q@qq.com> | 2021-08-13 01:32:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-13 01:32:44 +0800 |
commit | f6f14f507ee1adf4883cb1b12f27932a63afb286 (patch) | |
tree | 36128e53dc1b54f555bdd944829b1a4eb270f053 /lib.go | |
parent | 61d0ed1ff26fbe47b4bfdc6adbc6db09743beb3a (diff) |
Speed up merge cells
Diffstat (limited to 'lib.go')
-rw-r--r-- | lib.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -221,12 +221,11 @@ func CoordinatesToCellName(col, row int, abs ...bool) (string, error) { // areaRefToCoordinates provides a function to convert area reference to a // pair of coordinates. -func (f *File) areaRefToCoordinates(ref string) ([]int, error) { +func areaRefToCoordinates(ref string) ([]int, error) { rng := strings.Split(strings.Replace(ref, "$", "", -1), ":") if len(rng) < 2 { return nil, ErrParameterInvalid } - return areaRangeToCoordinates(rng[0], rng[1]) } @@ -290,7 +289,7 @@ func (f *File) flatSqref(sqref string) (cells map[int][][]int, err error) { } cells[col] = append(cells[col], []int{col, row}) case 2: - if coordinates, err = f.areaRefToCoordinates(ref); err != nil { + if coordinates, err = areaRefToCoordinates(ref); err != nil { return } _ = sortCoordinates(coordinates) |