diff --git a/Changes b/Changes index 64c2f7b..ce58b81 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for Spreadsheet-ParseXLSX +{{$NEXT}} + 0.27 2016-08-16 - Fix issues parsing sheets whose cell elements do not have location attributes (dgiordano, #61) diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 189f646..0000000 --- a/LICENSE +++ /dev/null @@ -1,32 +0,0 @@ -This software is Copyright (c) 2016 by Jesse Luehrs. - -This is free software, licensed under: - - The MIT (X11) License - -The MIT License - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software -without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to -whom the Software is furnished to do so, subject to the -following conditions: - -The above copyright notice and this permission notice shall -be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT -WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, -INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/Makefile.PL b/Makefile.PL deleted file mode 100644 index b771b14..0000000 --- a/Makefile.PL +++ /dev/null @@ -1,83 +0,0 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.005. -use strict; -use warnings; - -use 5.010; - -use ExtUtils::MakeMaker; - -my %WriteMakefileArgs = ( - "ABSTRACT" => "parse XLSX files", - "AUTHOR" => "Jesse Luehrs ", - "CONFIGURE_REQUIRES" => { - "ExtUtils::MakeMaker" => 0 - }, - "DISTNAME" => "Spreadsheet-ParseXLSX", - "LICENSE" => "mit", - "MIN_PERL_VERSION" => "5.010", - "NAME" => "Spreadsheet::ParseXLSX", - "PREREQ_PM" => { - "Archive::Zip" => 0, - "Crypt::Mode::CBC" => 0, - "Crypt::Mode::ECB" => 0, - "Digest::SHA" => 0, - "Encode" => 0, - "File::Temp" => 0, - "Graphics::ColorUtils" => 0, - "MIME::Base64" => 0, - "OLE::Storage_Lite" => 0, - "Scalar::Util" => 0, - "Spreadsheet::ParseExcel" => "0.61", - "XML::Twig" => 0, - "base" => 0, - "strict" => 0, - "warnings" => 0 - }, - "TEST_REQUIRES" => { - "File::Spec" => 0, - "IO::Handle" => 0, - "IPC::Open3" => 0, - "Test::More" => "0.88", - "blib" => "1.01" - }, - "VERSION" => "0.27", - "test" => { - "TESTS" => "t/*.t" - } -); - - -my %FallbackPrereqs = ( - "Archive::Zip" => 0, - "Crypt::Mode::CBC" => 0, - "Crypt::Mode::ECB" => 0, - "Digest::SHA" => 0, - "Encode" => 0, - "File::Spec" => 0, - "File::Temp" => 0, - "Graphics::ColorUtils" => 0, - "IO::Handle" => 0, - "IPC::Open3" => 0, - "MIME::Base64" => 0, - "OLE::Storage_Lite" => 0, - "Scalar::Util" => 0, - "Spreadsheet::ParseExcel" => "0.61", - "Test::More" => "0.88", - "XML::Twig" => 0, - "base" => 0, - "blib" => "1.01", - "strict" => 0, - "warnings" => 0 -); - - -unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { - delete $WriteMakefileArgs{TEST_REQUIRES}; - delete $WriteMakefileArgs{BUILD_REQUIRES}; - $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; -} - -delete $WriteMakefileArgs{CONFIGURE_REQUIRES} - unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; - -WriteMakefile(%WriteMakefileArgs); diff --git a/README b/README deleted file mode 100644 index 8cb8eef..0000000 --- a/README +++ /dev/null @@ -1,21 +0,0 @@ -The Spreadsheet::ParseXLSX package (doy/spreadsheet-parsexlsx) has been unchanged since 2016 and seems to have been abandonned. - -The purpose of this repo is to integrate community provided PR's in order to release a new version to CPAN. - - ------ - -This archive contains the distribution Spreadsheet-ParseXLSX, -version 0.27: - - parse XLSX files - -This software is Copyright (c) 2016 by Jesse Luehrs. - -This is free software, licensed under: - - The MIT (X11) License - - -This README file was generated by Dist::Zilla::Plugin::Readme v6.005. - diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm index 5cb9688..5df5111 100644 --- a/lib/Spreadsheet/ParseXLSX.pm +++ b/lib/Spreadsheet/ParseXLSX.pm @@ -1,6 +1,4 @@ package Spreadsheet::ParseXLSX; -our $AUTHORITY = 'cpan:DOY'; -$Spreadsheet::ParseXLSX::VERSION = '0.27'; use strict; use warnings; use 5.010; @@ -14,7 +12,37 @@ use XML::Twig; use Spreadsheet::ParseXLSX::Decryptor; +=head1 SYNOPSIS + + use Spreadsheet::ParseXLSX; + + my $parser = Spreadsheet::ParseXLSX->new; + my $workbook = $parser->parse("file.xlsx"); + # see Spreadsheet::ParseExcel for further documentation + +=head1 DESCRIPTION + +This module is an adaptor for L that reads XLSX files. +For documentation about the various data that you can retrieve from these +classes, please see L, +L, L, +and L. + +=cut + +=method new(%opts) + +Returns a new parser instance. Takes a hash of parameters: + +=over 4 +=item Password + +Password to use for decrypting encrypted files. + +=back + +=cut sub new { my $class = shift; @@ -26,6 +54,14 @@ sub new { return $self; } +=method parse($file, $formatter) + +Parses an XLSX file. Parsing errors throw an exception. C<$file> can be either +a filename or an open filehandle. Returns a +L instance containing the parsed data. +The C<$formatter> argument is an optional formatter class as described in L. + +=cut sub parse { my $self = shift; @@ -1099,60 +1135,6 @@ sub _new_twig { ); } - -1; - -__END__ - -=pod - -=encoding UTF-8 - -=head1 NAME - -Spreadsheet::ParseXLSX - parse XLSX files - -=head1 VERSION - -version 0.27 - -=head1 SYNOPSIS - - use Spreadsheet::ParseXLSX; - - my $parser = Spreadsheet::ParseXLSX->new; - my $workbook = $parser->parse("file.xlsx"); - # see Spreadsheet::ParseExcel for further documentation - -=head1 DESCRIPTION - -This module is an adaptor for L that reads XLSX files. -For documentation about the various data that you can retrieve from these -classes, please see L, -L, L, -and L. - -=head1 METHODS - -=head2 new(%opts) - -Returns a new parser instance. Takes a hash of parameters: - -=over 4 - -=item Password - -Password to use for decrypting encrypted files. - -=back - -=head2 parse($file, $formatter) - -Parses an XLSX file. Parsing errors throw an exception. C<$file> can be either -a filename or an open filehandle. Returns a -L instance containing the parsed data. -The C<$formatter> argument is an optional formatter class as described in L. - =head1 INCOMPATIBILITIES This module returns data using classes from L, so for @@ -1265,16 +1247,6 @@ Parts of this code were paid for by =back -=head1 AUTHOR - -Jesse Luehrs - -=head1 COPYRIGHT AND LICENSE - -This software is Copyright (c) 2016 by Jesse Luehrs. - -This is free software, licensed under: - - The MIT (X11) License - =cut + +1; diff --git a/lib/Spreadsheet/ParseXLSX/Decryptor.pm b/lib/Spreadsheet/ParseXLSX/Decryptor.pm index 2903e81..4968a7d 100644 --- a/lib/Spreadsheet/ParseXLSX/Decryptor.pm +++ b/lib/Spreadsheet/ParseXLSX/Decryptor.pm @@ -1,6 +1,4 @@ package Spreadsheet::ParseXLSX::Decryptor; -our $AUTHORITY = 'cpan:DOY'; -$Spreadsheet::ParseXLSX::Decryptor::VERSION = '0.27'; use strict; use warnings; @@ -207,36 +205,13 @@ sub new { return bless $self, $class; } +=begin Pod::Coverage -1; - -__END__ - -=pod - -=encoding UTF-8 - -=head1 NAME - -Spreadsheet::ParseXLSX::Decryptor - -=head1 VERSION - -version 0.27 - -=for Pod::Coverage new + new open -=head1 AUTHOR - -Jesse Luehrs - -=head1 COPYRIGHT AND LICENSE - -This software is Copyright (c) 2016 by Jesse Luehrs. - -This is free software, licensed under: - - The MIT (X11) License +=end Pod::Coverage =cut + +1; diff --git a/lib/Spreadsheet/ParseXLSX/Decryptor/Agile.pm b/lib/Spreadsheet/ParseXLSX/Decryptor/Agile.pm index 31db4e4..0405a68 100644 --- a/lib/Spreadsheet/ParseXLSX/Decryptor/Agile.pm +++ b/lib/Spreadsheet/ParseXLSX/Decryptor/Agile.pm @@ -1,6 +1,4 @@ package Spreadsheet::ParseXLSX::Decryptor::Agile; -our $AUTHORITY = 'cpan:DOY'; -$Spreadsheet::ParseXLSX::Decryptor::Agile::VERSION = '0.27'; use strict; use warnings; @@ -99,37 +97,14 @@ sub verifyPassword { die "Wrong password: $self" unless ($encryptedVerifierHash0 eq $encryptedVerifierHash); } +=begin Pod::Coverage -1; - -__END__ - -=pod - -=encoding UTF-8 - -=head1 NAME - -Spreadsheet::ParseXLSX::Decryptor::Agile - -=head1 VERSION - -version 0.27 - -=for Pod::Coverage decrypt + decrypt decryptFile verifyPassword -=head1 AUTHOR - -Jesse Luehrs - -=head1 COPYRIGHT AND LICENSE - -This software is Copyright (c) 2016 by Jesse Luehrs. - -This is free software, licensed under: - - The MIT (X11) License +=end Pod::Coverage =cut + +1; diff --git a/lib/Spreadsheet/ParseXLSX/Decryptor/Standard.pm b/lib/Spreadsheet/ParseXLSX/Decryptor/Standard.pm index 134c442..b637a0b 100644 --- a/lib/Spreadsheet/ParseXLSX/Decryptor/Standard.pm +++ b/lib/Spreadsheet/ParseXLSX/Decryptor/Standard.pm @@ -1,6 +1,4 @@ package Spreadsheet::ParseXLSX::Decryptor::Standard; -our $AUTHORITY = 'cpan:DOY'; -$Spreadsheet::ParseXLSX::Decryptor::Standard::VERSION = '0.27'; use strict; use warnings; @@ -79,37 +77,14 @@ sub verifyPassword { die "Wrong password: $self" unless ($verifierHash0 eq substr($verifierHash, 0, length($verifierHash0))); } +=begin Pod::Coverage -1; - -__END__ - -=pod - -=encoding UTF-8 - -=head1 NAME - -Spreadsheet::ParseXLSX::Decryptor::Standard - -=head1 VERSION - -version 0.27 - -=for Pod::Coverage decrypt + decrypt decryptFile verifyPassword -=head1 AUTHOR - -Jesse Luehrs - -=head1 COPYRIGHT AND LICENSE - -This software is Copyright (c) 2016 by Jesse Luehrs. - -This is free software, licensed under: - - The MIT (X11) License +=end Pod::Coverage =cut + +1; diff --git a/spreadsheet-parsexlsx.Rproj b/spreadsheet-parsexlsx.Rproj deleted file mode 100644 index 8e3c2eb..0000000 --- a/spreadsheet-parsexlsx.Rproj +++ /dev/null @@ -1,13 +0,0 @@ -Version: 1.0 - -RestoreWorkspace: Default -SaveWorkspace: Default -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: Sweave -LaTeX: pdfLaTeX diff --git a/t/00-compile.t b/t/00-compile.t deleted file mode 100644 index 22ee0a3..0000000 --- a/t/00-compile.t +++ /dev/null @@ -1,57 +0,0 @@ -use 5.006; -use strict; -use warnings; - -# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.054 - -use Test::More; - -plan tests => 4 + ($ENV{AUTHOR_TESTING} ? 1 : 0); - -my @module_files = ( - 'Spreadsheet/ParseXLSX.pm', - 'Spreadsheet/ParseXLSX/Decryptor.pm', - 'Spreadsheet/ParseXLSX/Decryptor/Agile.pm', - 'Spreadsheet/ParseXLSX/Decryptor/Standard.pm' -); - - - -# no fake home requested - -my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; - -use File::Spec; -use IPC::Open3; -use IO::Handle; - -open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; - -my @warnings; -for my $lib (@module_files) -{ - # see L - my $stderr = IO::Handle->new; - - my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); - binmode $stderr, ':crlf' if $^O eq 'MSWin32'; - my @_warnings = <$stderr>; - waitpid($pid, 0); - is($?, 0, "$lib loaded ok"); - - shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ - and not eval { require blib; blib->VERSION('1.01') }; - - if (@_warnings) - { - warn @_warnings; - push @warnings, @_warnings; - } -} - - - -is(scalar(@warnings), 0, 'no warnings found') - or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; - - diff --git a/xt/author/no-tabs.t b/xt/author/no-tabs.t deleted file mode 100644 index 0550dc6..0000000 --- a/xt/author/no-tabs.t +++ /dev/null @@ -1,50 +0,0 @@ -use strict; -use warnings; - -# this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 - -use Test::More 0.88; -use Test::NoTabs; - -my @files = ( - 'lib/Spreadsheet/ParseXLSX.pm', - 'lib/Spreadsheet/ParseXLSX/Decryptor.pm', - 'lib/Spreadsheet/ParseXLSX/Decryptor/Agile.pm', - 'lib/Spreadsheet/ParseXLSX/Decryptor/Standard.pm', - 't/00-compile.t', - 't/basic.t', - 't/bug-10.t', - 't/bug-11.t', - 't/bug-12.t', - 't/bug-13.t', - 't/bug-14.t', - 't/bug-15.t', - 't/bug-16.t', - 't/bug-17.t', - 't/bug-2.t', - 't/bug-29.t', - 't/bug-3.t', - 't/bug-32.t', - 't/bug-38.t', - 't/bug-4.t', - 't/bug-41.t', - 't/bug-5.t', - 't/bug-57.t', - 't/bug-6-2.t', - 't/bug-6.t', - 't/bug-61.t', - 't/bug-7.t', - 't/bug-8.t', - 't/cell-to-row-col.t', - 't/column-formats.t', - 't/encryption.t', - 't/hidden-row-and-column.t', - 't/hidden-sheet.t', - 't/page-Setup.t', - 't/rich.t', - 't/tab-color.t', - 't/target-abspath.t' -); - -notabs_ok($_) foreach @files; -done_testing; diff --git a/xt/author/pod-coverage.t b/xt/author/pod-coverage.t deleted file mode 100644 index 66b3b64..0000000 --- a/xt/author/pod-coverage.t +++ /dev/null @@ -1,7 +0,0 @@ -#!perl -# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. - -use Test::Pod::Coverage 1.08; -use Pod::Coverage::TrustPod; - -all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); diff --git a/xt/author/pod-syntax.t b/xt/author/pod-syntax.t deleted file mode 100644 index e563e5d..0000000 --- a/xt/author/pod-syntax.t +++ /dev/null @@ -1,7 +0,0 @@ -#!perl -# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. -use strict; use warnings; -use Test::More; -use Test::Pod 1.41; - -all_pod_files_ok(); diff --git a/xt/release/eol.t b/xt/release/eol.t deleted file mode 100644 index dd2602b..0000000 --- a/xt/release/eol.t +++ /dev/null @@ -1,50 +0,0 @@ -use strict; -use warnings; - -# this test was generated with Dist::Zilla::Plugin::EOLTests 0.18 - -use Test::More 0.88; -use Test::EOL; - -my @files = ( - 'lib/Spreadsheet/ParseXLSX.pm', - 'lib/Spreadsheet/ParseXLSX/Decryptor.pm', - 'lib/Spreadsheet/ParseXLSX/Decryptor/Agile.pm', - 'lib/Spreadsheet/ParseXLSX/Decryptor/Standard.pm', - 't/00-compile.t', - 't/basic.t', - 't/bug-10.t', - 't/bug-11.t', - 't/bug-12.t', - 't/bug-13.t', - 't/bug-14.t', - 't/bug-15.t', - 't/bug-16.t', - 't/bug-17.t', - 't/bug-2.t', - 't/bug-29.t', - 't/bug-3.t', - 't/bug-32.t', - 't/bug-38.t', - 't/bug-4.t', - 't/bug-41.t', - 't/bug-5.t', - 't/bug-57.t', - 't/bug-6-2.t', - 't/bug-6.t', - 't/bug-61.t', - 't/bug-7.t', - 't/bug-8.t', - 't/cell-to-row-col.t', - 't/column-formats.t', - 't/encryption.t', - 't/hidden-row-and-column.t', - 't/hidden-sheet.t', - 't/page-Setup.t', - 't/rich.t', - 't/tab-color.t', - 't/target-abspath.t' -); - -eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; -done_testing;