prepareCellStyle provides a function to prepare style index of cell in worksheet by given column index and style index.
(col, row, style int)
| 1603 | // prepareCellStyle provides a function to prepare style index of cell in |
| 1604 | // worksheet by given column index and style index. |
| 1605 | func (ws *xlsxWorksheet) prepareCellStyle(col, row, style int) int { |
| 1606 | if style != 0 { |
| 1607 | return style |
| 1608 | } |
| 1609 | if row <= len(ws.SheetData.Row) { |
| 1610 | if styleID := ws.SheetData.Row[row-1].S; styleID != 0 { |
| 1611 | return styleID |
| 1612 | } |
| 1613 | } |
| 1614 | if ws.Cols != nil { |
| 1615 | for _, c := range ws.Cols.Col { |
| 1616 | if c.Min <= col && col <= c.Max && c.Style != 0 { |
| 1617 | return c.Style |
| 1618 | } |
| 1619 | } |
| 1620 | } |
| 1621 | return style |
| 1622 | } |
| 1623 | |
| 1624 | // mergeCellsParser provides a function to check merged cells in worksheet by |
| 1625 | // given cell reference. |
no outgoing calls
no test coverage detected