From 1489d5f7873f95c363142cb2f4631c9dc4a2e2fb Mon Sep 17 00:00:00 2001 From: tetragon Date: Tue, 25 Sep 2007 00:45:17 +0000 Subject: Bugfix for unbolding git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1659 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Template/ODS.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/Template/ODS.pm b/LedgerSMB/Template/ODS.pm index cd85e526..e550e0f1 100644 --- a/LedgerSMB/Template/ODS.pm +++ b/LedgerSMB/Template/ODS.pm @@ -107,6 +107,12 @@ sub _format_handler { my @width = ('none', '0.018cm solid', '0.035cm solid', '0.018cm dashed', '0.018cm dotted', '0.141cm solid', '0.039cm double', '0.002cm solid'); + + # SC: There are multiple types of properties that can be associated + # with a style. However, the OO::OOD style creation code appears + # to only allow for a single type to be added to the style at a + # time. As a result, %properties is split into property groupings + # to allow for each group to get the correct type. my %properties; if (@basestyle) { %properties = %{$basestyle[0][1]}; @@ -134,7 +140,7 @@ sub _format_handler { } } elsif ($attr eq 'bold') { if ($properties{text}{'fo:font-weight'} and !$val) { - delete $properties{'fo:font-weight'}; + delete $properties{text}{'fo:font-weight'}; } elsif ($val) { $properties{text}{'fo:font-weight'} = 'bold'; } -- cgit v1.2.3