[libmsoffice-word-html-writer-perl] 01/07: Imported Upstream version 1.02
gregor herrmann
gregoa at debian.org
Wed Dec 25 18:40:42 UTC 2013
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libmsoffice-word-html-writer-perl.
commit bf0da8133a5616d87738d7e81f628115a45c900f
Author: gregor herrmann <gregoa at debian.org>
Date: Wed Dec 25 19:35:57 2013 +0100
Imported Upstream version 1.02
---
Changes | 8 ++++++++
MANIFEST | 1 -
META.json | 22 ++++++++++-----------
META.yml | 8 ++++----
Makefile.PL | 2 +-
lib/MsOffice/Word/HTML/Writer.pm | 41 +++++++++++++++++++++++++---------------
t/pod-coverage.t | 6 ------
7 files changed, 50 insertions(+), 38 deletions(-)
diff --git a/Changes b/Changes
index 9590c93..04efe03 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,13 @@
Revision history for MsOffice-Word-HTML-Writer
+1.02 23.11.2013
+ - #90737 : new 'page_numbers' arg for create_section(new_page=>)
+ - avoid warnings when the MIME type is unknown
+
+1.01 29.09.2011
+ - new 'left'/'right' args for page_break() and create_section(new_page=>)
+
+
1.01 29.09.2011
- new 'left'/'right' args for page_break() and create_section(new_page=>)
diff --git a/MANIFEST b/MANIFEST
index cb63e0d..01d3f25 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -6,7 +6,6 @@ META.yml
README
t/00-load.t
t/01_word_document.t
-t/pod-coverage.t
t/pod.t
Makefile.PL
META.json
diff --git a/META.json b/META.json
index e4464af..4875b90 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
"Laurent Dami <laurent.dami AT etat.ge.ch>"
],
"dynamic_config" : 1,
- "generated_by" : "Module::Build version 0.38, CPAN::Meta::Converter version 2.110930",
+ "generated_by" : "Module::Build version 0.4004, CPAN::Meta::Converter version 2.120921",
"license" : [
"perl_5"
],
@@ -16,25 +16,25 @@
"prereqs" : {
"configure" : {
"requires" : {
- "Module::Build" : "0.38"
+ "Module::Build" : "0.40"
}
},
"runtime" : {
"requires" : {
- "Carp" : 0,
- "MIME::Base64" : 0,
- "MIME::QuotedPrint" : 0,
- "MIME::Types" : 0,
- "Module::Build" : 0,
- "Params::Validate" : 0,
- "Test::More" : 0
+ "Carp" : "0",
+ "MIME::Base64" : "0",
+ "MIME::QuotedPrint" : "0",
+ "MIME::Types" : "0",
+ "Module::Build" : "0",
+ "Params::Validate" : "0",
+ "Test::More" : "0"
}
}
},
"provides" : {
"MsOffice::Word::HTML::Writer" : {
"file" : "lib/MsOffice/Word/HTML/Writer.pm",
- "version" : "1.01"
+ "version" : "1.02"
}
},
"release_status" : "stable",
@@ -43,5 +43,5 @@
"http://dev.perl.org/licenses/"
]
},
- "version" : "1.01"
+ "version" : "1.02"
}
diff --git a/META.yml b/META.yml
index 614375d..43f8969 100644
--- a/META.yml
+++ b/META.yml
@@ -4,9 +4,9 @@ author:
- 'Laurent Dami <laurent.dami AT etat.ge.ch>'
build_requires: {}
configure_requires:
- Module::Build: 0.38
+ Module::Build: 0.40
dynamic_config: 1
-generated_by: 'Module::Build version 0.38, CPAN::Meta::Converter version 2.110930'
+generated_by: 'Module::Build version 0.4004, CPAN::Meta::Converter version 2.120921'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -15,7 +15,7 @@ name: MsOffice-Word-HTML-Writer
provides:
MsOffice::Word::HTML::Writer:
file: lib/MsOffice/Word/HTML/Writer.pm
- version: 1.01
+ version: 1.02
requires:
Carp: 0
MIME::Base64: 0
@@ -26,4 +26,4 @@ requires:
Test::More: 0
resources:
license: http://dev.perl.org/licenses/
-version: 1.01
+version: 1.02
diff --git a/Makefile.PL b/Makefile.PL
index f326f4e..de45394 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.3800
+# Note: this file was auto-generated by Module::Build::Compat version 0.4004
use ExtUtils::MakeMaker;
WriteMakefile
(
diff --git a/lib/MsOffice/Word/HTML/Writer.pm b/lib/MsOffice/Word/HTML/Writer.pm
index 661ecb0..8ffea02 100644
--- a/lib/MsOffice/Word/HTML/Writer.pm
+++ b/lib/MsOffice/Word/HTML/Writer.pm
@@ -6,11 +6,9 @@ use MIME::QuotedPrint qw/encode_qp/;
use MIME::Base64 qw/encode_base64/;
use MIME::Types;
use Carp;
-use Params::Validate qw/validate SCALAR HASHREF/;
-
-
-our $VERSION = '1.01';
+use Params::Validate qw/validate SCALAR HASHREF/;
+our $VERSION = '1.02';
sub new {
my $class = shift;
@@ -178,7 +176,7 @@ sub content {
my $filelist = $self->_filelist(@parts);
for my $pair ($self->_main, @parts, $filelist) {
my ($filename, $content) = @$pair;
- my $mime_type = MIME::Types->new->mimeTypeOf($filename);
+ my $mime_type = MIME::Types->new->mimeTypeOf($filename) || '';
my ($encoding, $encoded);
if ($mime_type =~ /^text|xml$/) {
$encoding = 'quoted-printable';
@@ -307,7 +305,8 @@ sub _section_styles {
# headers and footers
my $has_first_page;
- foreach my $prop (qw/header_margin footer_margin/) {
+ foreach my $prop (qw/header_margin footer_margin
+ page_numbers paper_source/) {
my $val = $section->{page}{$prop} or next;
(my $property = $prop) =~ s/_/-/g;
$properties .= qq{ mso-$property:$val;\n};
@@ -424,8 +423,10 @@ MsOffice::Word::HTML::Writer - Writing documents for MsWord in HTML format
"<p>hello from another page</p>");
$doc->create_section(
- page => {size => "21.0cm 29.7cm",
- margin => "1.2cm 2.4cm 2.3cm 2.4cm"},
+ page => {size => "21.0cm 29.7cm",
+ margin => "1.2cm 2.4cm 2.3cm 2.4cm",
+ page_numbers => 50, # initial page number within this section
+ },
header => sprintf("Section 2, page %s of %s",
$doc->field('PAGE'),
$doc->field('NUMPAGES')),
@@ -674,6 +675,17 @@ Margin for header
Margin for footer
+=item page_numbers
+
+Initial value for page numbers within this section
+
+=item paper_source
+
+Parameters for paper source within this section
+(values for these parameters must be reverse engineered from MsWord HTML
+output)
+
+
=back
@@ -866,7 +878,7 @@ the various parts :
Now let's look at a different architecture: the client code
calls the Template toolkit, which in turn calls
-C<MsOffice::Word::HTML::Writer>.
+C<MsOffice::Word::HTML::Writer>.
The most common way to call modules from TT is to use
a I<TT plugin>; but since there is currently
@@ -966,15 +978,15 @@ This is quite similar to an object-oriented class : assignments
within the view are like object attributes (i.e. the C<title>
variable), and blocks within the view are like methods.
-After the end of the view, we call the C<main> method, but
+After the end of the view, we call the C<main> method, but
only if that view was called directly from client code.
-If the view is inherited, as displayed below, then the
+If the view is inherited, as displayed below, then the
call to C<main> will be from the subview.
Now we can define a specific letter template that inherits
from the generic letter and overrides the C<letter_body> block :
- [% PROCESS generic_letter.tt2; # loads the parent view
+ [% PROCESS generic_letter.tt2; # loads the parent view
VIEW advertisement;
@@ -996,11 +1008,10 @@ from the generic letter and overrides the C<letter_body> block :
Many features could be added; for example:
- - odd/even pages
- link same header/footers across several sections
- multiple columns
- - watermarks (I tried hard to reverse engineer MsWord behaviour,
- but it still doesn't work ... couldn't figure out all details
+ - watermarks (I tried hard to reverse engineer MsWord behaviour,
+ but it still doesn't work ... couldn't figure out all details
of VML markup)
Contributions welcome!
diff --git a/t/pod-coverage.t b/t/pod-coverage.t
deleted file mode 100644
index 96d1c52..0000000
--- a/t/pod-coverage.t
+++ /dev/null
@@ -1,6 +0,0 @@
-#!perl -T
-
-use Test::More;
-eval "use Test::Pod::Coverage 1.04";
-plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
-all_pod_coverage_ok();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmsoffice-word-html-writer-perl.git
More information about the Pkg-perl-cvs-commits
mailing list