ooxml

Check-in [d330abd2a3]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:formatcell.test rowheight and merge; patch preset styles after idx change
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tcltest
Files: files | file ages | folders
SHA3-256: d330abd2a3d850649bbe285ced87525774f58dcefd16f42bb0c71c7f82928ccc
User & Date: alex 2019-11-28 09:03:27
Context
2019-11-28
14:20
xl_read read formula patch; formatcell.test added cell data check check-in: 1c847e5dfb user: alex tags: tcltest
09:03
formatcell.test rowheight and merge; patch preset styles after idx change check-in: d330abd2a3 user: alex tags: tcltest
08:16
formatcell.test borders check-in: 4ef4f97de4 user: alex tags: tcltest
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ooxml.tcl.

2438
2439
2440
2441
2442
2443
2444
2445

2446
2447
2448
2449
2450
2451
2452
	  }
	  set obj($item) [dict get $a(s,@) $item]
	}
      }
    }

    foreach sheet $a(sheets) {
      for {set idx 0} {$idx < $a($sheet,cols)} {incr idx} {

	if {[info exists a($sheet,col,$idx)]} {
	  set cols([expr {$sheet + 1}],$idx) $a($sheet,col,$idx)
	}
      }
      set obj([expr {$sheet + 1}],cols) [llength [array names cols]]
    }








|
>







2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
	  }
	  set obj($item) [dict get $a(s,@) $item]
	}
      }
    }

    foreach sheet $a(sheets) {
      foreach item [array names a $sheet,col,*] {
	set idx [lindex [split $item ,] end]
	if {[info exists a($sheet,col,$idx)]} {
	  set cols([expr {$sheet + 1}],$idx) $a($sheet,col,$idx)
	}
      }
      set obj([expr {$sheet + 1}],cols) [llength [array names cols]]
    }

Changes to tests/formatcell.test.

967
968
969
970
971
972
973



























974
975
976
977
978
979
980
981
982
983
984
985
test FormatCellCheckFreeze-10.3 {Check Worksheet Freeze} {
  set rc 1
  if {![info exists workbook(0,freeze)] || $workbook(0,freeze) ne $w_obj(freeze,1)} {
    set rc 0
  }
  return $rc
} 1





























#catch {vfs::zip::Mount formatcell.xlsx xlsx} mnt
#vfs::zip::Unmount $mnt xlsx

file delete -force formatcell.xlsx


# cleanup
::tcltest::cleanupTests
return








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>












967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
test FormatCellCheckFreeze-10.3 {Check Worksheet Freeze} {
  set rc 1
  if {![info exists workbook(0,freeze)] || $workbook(0,freeze) ne $w_obj(freeze,1)} {
    set rc 0
  }
  return $rc
} 1

test FormatCellCheckMerge-10.4 {Check Worksheet Merge} {
  set rc 1
  if {![info exists workbook(0,merge)]} {
    set rc 0
  } else {
    foreach item $workbook(0,merge) {
      if {$item ni $w_obj(merge,1)} {
	set rc 0
      }
    }
  }
  return $rc
} 1

test FormatCellCheckRowHeight-10.5 {Check Worksheet RowHeight} {
  set rc 1
  array set w $w_obj(rowHeight,1)
  array set r $workbook(0,rowHeight)
  foreach {n v} [array get w] {
    if {![info exists r($n)] || $r($n) ne $v} {
      set rc 0
    }
  }
  unset -nocomplain w r
  return $rc
} 1


#catch {vfs::zip::Mount formatcell.xlsx xlsx} mnt
#vfs::zip::Unmount $mnt xlsx

file delete -force formatcell.xlsx


# cleanup
::tcltest::cleanupTests
return