Sfoglia il codice sorgente

Fix for issue #248 (merged cell produce empty style attrib)

Robert Nieren 9 anni fa
parent
commit
9ad8fb4c43
1 ha cambiato i file con 6 aggiunte e 4 eliminazioni
  1. 6 4
      sheet.go

+ 6 - 4
sheet.go

@@ -142,10 +142,10 @@ func (s *Sheet) handleMerged() {
 
 		// When merging cells, the upper left cell does not maintain
 		// the original borders
-		mainstyle.Border.Top = ""
-		mainstyle.Border.Left = ""
-		mainstyle.Border.Right = ""
-		mainstyle.Border.Bottom = ""
+		mainstyle.Border.Top = "none"
+		mainstyle.Border.Left = "none"
+		mainstyle.Border.Right = "none"
+		mainstyle.Border.Bottom = "none"
 
 		maincol, mainrow, _ := getCoordsFromCellIDString(key)
 		for rownum := 0; rownum <= cell.VMerge; rownum++ {
@@ -167,7 +167,9 @@ func (s *Sheet) handleMerged() {
 				}
 
 				if colnum == (cell.HMerge) {
+					fmt.Println("style pre", style.Border.Right)
 					style.Border.Right = right
+					fmt.Println("style post", style.Border.Right)
 				}
 			}
 		}