"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Gscan2pdf/Document.pm" between
gscan2pdf-2.13.1.tar.xz and gscan2pdf-2.13.2.tar.xz

About: gscan2pdf is a GUI to produce PDFs from scanned documents (using Perl).

Document.pm  (gscan2pdf-2.13.1.tar.xz):Document.pm  (gscan2pdf-2.13.2.tar.xz)
skipping to change at line 23 skipping to change at line 23
use Gscan2pdf::Page; use Gscan2pdf::Page;
use Gscan2pdf::Tesseract; use Gscan2pdf::Tesseract;
use Gscan2pdf::Cuneiform; use Gscan2pdf::Cuneiform;
use Gscan2pdf::NetPBM; use Gscan2pdf::NetPBM;
use Gscan2pdf::Translation '__'; # easier to extract strings with xgettext use Gscan2pdf::Translation '__'; # easier to extract strings with xgettext
use Glib 1.210 qw(TRUE FALSE) use Glib 1.210 qw(TRUE FALSE)
; # To get TRUE and FALSE. 1.210 necessary for Glib::SOURCE_REMOVE and Glib::S OURCE_CONTINUE ; # To get TRUE and FALSE. 1.210 necessary for Glib::SOURCE_REMOVE and Glib::S OURCE_CONTINUE
use Socket; use Socket;
use FileHandle; use FileHandle;
use Image::Magick; use Image::Magick;
use File::Temp; # To create temporary files use File::Temp; # To create temporary files
use File::Basename; # Split filename into dir, file, ext use File::Basename; # Split filename into dir, file, ext
use File::Copy; use File::Copy;
use Storable qw(store retrieve); use Storable qw(store retrieve);
use Archive::Tar; # For session files use Archive::Tar; # For session files
use Proc::Killfam; use Proc::Killfam;
use IPC::Open3 'open3'; use IPC::Open3 'open3';
use Symbol; # for gensym use Symbol; # for gensym
use Try::Tiny; use Try::Tiny;
use Set::IntSpan 1.10; # For size method for page numbering issues use Set::IntSpan 1.10; # For size method for page numbering issues
use PDF::Builder; use PDF::Builder;
use English qw( -no_match_vars ); # for $PROCESS_ID, $INPUT_RECORD_SEPARATOR use English qw( -no_match_vars ); # for $PROCESS_ID, $INPUT_RECORD_SEPARATOR
# $CHILD_ERROR # $CHILD_ERROR
use POSIX qw(:sys_wait_h strftime); use POSIX qw(:sys_wait_h strftime);
use Data::UUID; use Data::UUID;
use Date::Calc qw(Add_Delta_DHMS Date_to_Time Today_and_Now Timezone); use Date::Calc qw(Add_Delta_DHMS Date_to_Time Timezone);
use Time::Piece; use Time::Piece;
use Carp qw(longmess); use Carp qw(longmess);
# to deal with utf8 in filenames # to deal with utf8 in filenames
use Encode qw(_utf8_off _utf8_on decode encode); use Encode qw(_utf8_off _utf8_on decode encode);
use version; use version;
use Readonly; use Readonly;
Readonly our $POINTS_PER_INCH => 72; Readonly our $POINTS_PER_INCH => 72;
Readonly my $STRING_FORMAT => 8; Readonly my $STRING_FORMAT => 8;
Readonly my $_POLL_INTERVAL => 100; # ms Readonly my $_POLL_INTERVAL => 100; # ms
skipping to change at line 83 skipping to change at line 83
Readonly my $HEX_FF => hex 'ff'; Readonly my $HEX_FF => hex 'ff';
Readonly my $LEFT => 0; Readonly my $LEFT => 0;
Readonly my $TOP => 1; Readonly my $TOP => 1;
Readonly my $RIGHT => 2; Readonly my $RIGHT => 2;
Readonly my $BOTTOM => 3; Readonly my $BOTTOM => 3;
BEGIN { BEGIN {
use Exporter (); use Exporter ();
our ( $VERSION, @EXPORT_OK, %EXPORT_TAGS ); our ( $VERSION, @EXPORT_OK, %EXPORT_TAGS );
$VERSION = '2.13.1'; $VERSION = '2.13.2';
use base qw(Exporter Gtk3::SimpleList); use base qw(Exporter Gtk3::SimpleList);
%EXPORT_TAGS = (); # eg: TAG => [ qw!name1 name2! ], %EXPORT_TAGS = (); # eg: TAG => [ qw!name1 name2! ],
# your exported package globals go here, # your exported package globals go here,
# as well as any optionally exported functions # as well as any optionally exported functions
@EXPORT_OK = qw(); @EXPORT_OK = qw();
# define hidden string column for page data # define hidden string column for page data
Gtk3::SimpleList->add_column_type( Gtk3::SimpleList->add_column_type(
skipping to change at line 2235 skipping to change at line 2235
sub text_to_datetime { sub text_to_datetime {
my ( $text, $thisyear, $thismonth, $thisday ) = @_; my ( $text, $thisyear, $thismonth, $thisday ) = @_;
my ( $year, $month, $day, $hour, $minute, $sec ); my ( $year, $month, $day, $hour, $minute, $sec );
if ( defined $text if ( defined $text
and $text =~ and $text =~
/^(\d+)?-?(\d+)?-?(\d+)?(?:\s(\d+)?:?(\d+)?:?(\d+)?)?$/smx ) /^(\d+)?-?(\d+)?-?(\d+)?(?:\s(\d+)?:?(\d+)?:?(\d+)?)?$/smx )
{ {
( $year, $month, $day, $hour, $minute, $sec ) = ( $year, $month, $day, $hour, $minute, $sec ) =
( $1, $2, $3, $4, $5, $6 ); ( $1, $2, $3, $4, $5, $6 );
} }
if ( not defined $year ) { $year = $thisyear } if ( not defined $year or $year == 0 ) { $year = $thisyear }
if ( not defined $month or $month < 1 or $month > $MONTHS_PER_YEAR ) { if ( not defined $month or $month < 1 or $month > $MONTHS_PER_YEAR ) {
$month = $thismonth; $month = $thismonth;
} }
if ( not defined $day or $day < 1 or $day > $DAYS_PER_MONTH ) { if ( not defined $day or $day < 1 or $day > $DAYS_PER_MONTH ) {
$day = $thisday; $day = $thisday;
} }
if ( not defined $hour or $hour > $HOURS_PER_DAY - 1 ) { if ( not defined $hour or $hour > $HOURS_PER_DAY - 1 ) {
$hour = 0; $hour = 0;
} }
if ( not defined $minute or $minute > $MINUTES_PER_HOUR - 1 ) { if ( not defined $minute or $minute > $MINUTES_PER_HOUR - 1 ) {
skipping to change at line 3625 skipping to change at line 3625
if ( not defined $options{options}{set_timestamp} if ( not defined $options{options}{set_timestamp}
or not $options{options}{set_timestamp} or not $options{options}{set_timestamp}
or defined $options{options}{ps} ) or defined $options{options}{ps} )
{ {
return; return;
} }
my @datetime = @{ $options{metadata}{datetime} }; my @datetime = @{ $options{metadata}{datetime} };
if ( defined $options{metadata}{tz} ) { if ( defined $options{metadata}{tz} ) {
my @tz = @{ $options{metadata}{tz} }; my @tz = @{ $options{metadata}{tz} };
splice @tz, 0, 2; splice @tz, 0, 2;
splice @tz, $LAST_ELEMENT, 1; splice @tz, $LAST_ELEMENT, 1;
for (@tz) { for (@tz) {
if ( not defined ) { if ( not defined ) {
$_ = 0; $_ = 0;
} }
else { else {
$_ = -$_; $_ = -$_;
} }
} }
@datetime = Add_Delta_DHMS( @datetime, @tz ); @datetime = Add_Delta_DHMS( @datetime, @tz );
 End of changes. 9 change blocks. 
12 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)