Skip Menu |

This queue is for tickets about the XML-Handler-AxPoint CPAN distribution.

Report information
The Basics
Id: 1942
Status: new
Priority: 0/
Queue: XML-Handler-AxPoint

People
Owner: Nobody in particular
Requestors: az+rt [...] bond.edu.au
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.30
Fixed in: (no value)



Subject: wishlist+patch <point> with an option to switch off the bullet char
It would be very useful to be able to switch off the bullet char alltogether (while retaining the indentation). interpret level x<0 as "indent at level |x|, but no bullet output". i've made a simple patch that accomplishes this which is attached. regards az
--- AxPoint.pm.orig Tue Jun 11 17:39:24 2002 +++ AxPoint.pm Tue Jan 14 14:47:39 2003 @@ -513,7 +513,13 @@ my $pdf = $self->{pdf}; - my ($char, $size); + my ($char, $size, $nobullet); + if ($level<0) + { + $nobullet=1; + $level=-$level; + } + if ($level == 1) { $char = "l"; $size = 18; @@ -522,7 +528,7 @@ $char = "u"; $size = 16; } - elsif ($level == 3) { + elsif ($level >= 3) { $char = "p"; $size = 14; } @@ -540,10 +546,18 @@ unshift @{$self->{xindent}}, {level => $level, x => $x}; } + if (!$nobullet) + { $pdf->set_font(face => "ZapfDingbats", size => $size - 4, encoding => "builtin"); $pdf->print($char); $pdf->set_font(face => $self->{normal_font}, size => $size); $pdf->print(" "); + } + else + { + $pdf->set_font(face => $self->{normal_font}, size => $size); + } + return $size; }
From: az+rt [...] bond.edu.au
[guest - Mon Jan 13 23:51:13 2003]: Show quoted text
> i've made a simple patch that accomplishes this which is attached.
...but which works only in special situations. i've fixed this, but the fix became more elaborate than hoped. net result: one new possible attribute for <point>: bullet. if not set at all or value != 0 -> bulleting on. otherwise no bullets. a patch (better tested this time, i swear!) is attached. regards az
--- AxPoint.pm.orig Tue Jun 11 17:39:24 2002 +++ AxPoint.pm Wed Feb 5 18:05:58 2003 @@ -122,7 +122,9 @@ my $transition = $trans || $self->get_transition || 'replace'; $transition = 'replace' if $transition eq 'none'; +# warn "axpoint new page transition : $transition"; $transition = 'replace' if $self->{PrintMode}; +# warn "axpoint new page after PrintMode transition : $transition"; $self->{pdf}->set_parameter(transition => lc($transition)); @@ -509,11 +511,11 @@ } sub bullet { - my ($self, $level) = @_; + my ($self, $level, $bulleton) = @_; my $pdf = $self->{pdf}; - my ($char, $size); + if ($level == 1) { $char = "l"; $size = 18; @@ -522,7 +524,7 @@ $char = "u"; $size = 16; } - elsif ($level == 3) { + elsif ($level >= 3) { $char = "p"; $size = 14; } @@ -541,9 +543,10 @@ } $pdf->set_font(face => "ZapfDingbats", size => $size - 4, encoding => "builtin"); - $pdf->print($char); + $pdf->print(($bulleton?$char:" ")); $pdf->set_font(face => $self->{normal_font}, size => $size); $pdf->print(" "); + return $size; } @@ -769,6 +772,7 @@ # warn("slide_start_ $name\n"); # transitions... +# warn "axpoint: Am I in PrintMode? ".$self->{PrintMode}; if ( (!$self->{PrintMode}) && $name =~ /^(point|image|source[_-]code|table|col|row|circle|ellipse|rect|text|line|path)$/) { if (exists($el->{Attributes}{"{}transition"}) @@ -779,6 +783,7 @@ if ( (!$trans) && ($name ne 'table') && ($name ne 'row') && ($name ne 'col') ) { $trans = { Value => $self->{default_transition}[0] }; } + warn "axpoint: trans = $trans"; if ($trans && ($trans->{Value} ne 'none') ) { my @cache = @{$self->{cache_trash}}; local $self->{cache} = \@cache; @@ -808,6 +813,7 @@ $self->{colour_stack} = [[0,0,0]]; # if we do bullet/image transitions, make sure new pages don't use a transition $el->{Attributes}{"{}transition"}{Value} = "replace"; +# warn "axpoint setting it to replace"; $self->{extents} = [{ x => 0, w => 612 }]; } elsif ($name eq 'title') { @@ -890,6 +896,7 @@ elsif ($name eq 'point') { $self->{chars_ok} = 1; my $level = $el->{Attributes}{"{}level"}{Value} || 1; + my $bulleton=(exists($el->{Attributes}{"{}bullet"})?$el->{Attributes}{"{}bullet"}{Value}:1); my ($x, $y) = $self->{pdf}->get_text_pos; if (@{$self->{xindent}} && $level <= $self->{xindent}[0]{level}) { @@ -908,7 +915,7 @@ $self->{pdf}->set_text_pos($self->{extents}[0]{x} + $indent, $y); } - my $size = $self->bullet($level); + my $size = $self->bullet($level,$bulleton); ($x, $y) = $self->{pdf}->get_text_pos; # warn(sprintf("creating new bb: %s => %d, %s => %d, %s => %d, %s => %d",
Date: Thu, 6 Feb 2003 07:26:25 +0000
Subject: Re: [cpan #1942] wishlist+patch <point> with an option to switch off the bullet char
From: Matt Sergeant <matt [...] sergeant.org>
To: bug-XML-Handler-AxPoint [...] rt.cpan.org
RT-Send-Cc:
Doesn't that break backwards compatibility? I'd rather have a no-bullet attribute.