From a410b22bdd50e9f212b0b454e5aed798e3476394 Mon Sep 17 00:00:00 2001 From: xuri Date: Fri, 28 Oct 2022 00:31:55 +0800 Subject: Fix the error on getting the range of merged cells on the worksheet which contains one cell merged cell range - Parse workbook default theme for custom theme color support in the feature - Variables name typo fix - Add system foreground and background color as RGB in the IndexedColorMapping list --- merge_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'merge_test.go') diff --git a/merge_test.go b/merge_test.go index 6977c5a..e0b9210 100644 --- a/merge_test.go +++ b/merge_test.go @@ -185,7 +185,7 @@ func TestUnmergeCell(t *testing.T) { ws, ok = f.Sheet.Load("xl/worksheets/sheet1.xml") assert.True(t, ok) ws.(*xlsxWorksheet).MergeCells = &xlsxMergeCells{Cells: []*xlsxMergeCell{{Ref: "A1"}}} - assert.EqualError(t, f.UnmergeCell("Sheet1", "A2", "B3"), ErrParameterInvalid.Error()) + assert.NoError(t, f.UnmergeCell("Sheet1", "A2", "B3")) ws, ok = f.Sheet.Load("xl/worksheets/sheet1.xml") assert.True(t, ok) @@ -194,6 +194,6 @@ func TestUnmergeCell(t *testing.T) { } func TestFlatMergedCells(t *testing.T) { - ws := &xlsxWorksheet{MergeCells: &xlsxMergeCells{Cells: []*xlsxMergeCell{{Ref: "A1"}}}} - assert.EqualError(t, flatMergedCells(ws, [][]*xlsxMergeCell{}), ErrParameterInvalid.Error()) + ws := &xlsxWorksheet{MergeCells: &xlsxMergeCells{Cells: []*xlsxMergeCell{{Ref: ""}}}} + assert.EqualError(t, flatMergedCells(ws, [][]*xlsxMergeCell{}), "cannot convert cell \"\" to coordinates: invalid cell name \"\"") } -- cgit v1.2.1