summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2016-05-23 01:41:25 -0400
committerJesse Luehrs <doy@tozt.net>2016-05-23 01:41:25 -0400
commit9567810993977aa8dced1da8c650102352a4d49b (patch)
treeec80a3ca39ba8d9047584026e0f9ee1be6e59dbb
parentb5424a91981191000ba2dc7a2419a3be243b6097 (diff)
downloadspreadsheet-parsexlsx-9567810993977aa8dced1da8c650102352a4d49b.tar.gz
spreadsheet-parsexlsx-9567810993977aa8dced1da8c650102352a4d49b.zip
ensure row and column hidden state is coerced to a boolean
-rw-r--r--Changes2
-rw-r--r--lib/Spreadsheet/ParseXLSX.pm4
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;
},