From 9567810993977aa8dced1da8c650102352a4d49b Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 23 May 2016 01:41:25 -0400 Subject: ensure row and column hidden state is coerced to a boolean --- Changes | 2 ++ lib/Spreadsheet/ParseXLSX.pm | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index d05090b..314368d 100644 --- a/Changes +++ b/Changes @@ -10,6 +10,8 @@ Revision history for Spreadsheet-ParseXLSX - Support reading files where the case is specified incorrectly (this is likely actually a bug in the program generating these files, but I don't think this fix is likely to break any real files) (Tux, #57) + - Ensure we coerce hidden state for rows and columns to booleans + (Jeffery Hammock) 0.20 2015-12-05 - Fix the test suite on perls compiled with -Duselongdouble (Slaven diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm index 2aa6a29..6a301e7 100644 --- a/lib/Spreadsheet/ParseXLSX.pm +++ b/lib/Spreadsheet/ParseXLSX.pm @@ -307,7 +307,7 @@ sub _parse_sheet { for my $colnum ($col->att('min')..$col->att('max')) { $column_widths[$colnum - 1] = $col->att('width'); $column_formats[$colnum - 1] = $col->att('style'); - $columns_hidden[$colnum - 1] = $col->att('hidden'); + $columns_hidden[$colnum - 1] = $self->_xml_boolean($col->att('hidden')); } $twig->purge; @@ -317,7 +317,7 @@ sub _parse_sheet { my ( $twig, $row ) = @_; $row_heights[ $row->att('r') - 1 ] = $row->att('ht'); - $rows_hidden[ $row->att('r') - 1 ] = $row->att('hidden'); + $rows_hidden[ $row->att('r') - 1 ] = $self->_xml_boolean($row->att('hidden')); $twig->purge; }, -- cgit v1.2.3