View Issue Details

IDProjectCategoryView StatusLast Update
0011839ScribusScripterpublic2013-11-16 23:07
Reportergpittman Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version1.4.3 
Summary0011839: constant "p" for pts to picas conversion is wrong
DescriptionThis was originally pointed out by José Antonio Rocha on the mail list.
Steps To ReproduceOpen Scripter console.
Write a command 'print p'
Run
result: 1.0 -- should be 0.0833333 ...
Additional InformationIn the file units.cpp, there are these lines, starting at line 37:

    // PT, MM, IN, P, CM, C, °, %
    double ratio[] = { 1.0, 25.4/72.0, 1.0/72.0, 1.0, 2.54/72.0, 25.4/72.0/4.512, 1.0, 1.0 };
// double ratio[] = { 1.0, 25.4/72.0, 1.0/72.0, 1.0/12.0, 2.54/72.0, 25.4/72.0/4.512, 1.0, 1.0 };
    return ratio[index];

For some reason, the line with the correct ration (1.0/12.0) has been commented out.
Fixing this fixes the answer in the console, but I don't know if it might have other bad effects. I don't know why this was commented out in the first place.
TagsNo tags attached.
Patch

Activities

gpittman

2013-11-16 14:39

developer   ~0030842

This is also true in 1.5.0svn

jghali

2013-11-16 14:39

administrator   ~0030843

>> Fixing this fixes the answer in the console, but I don't know if it might have other bad effects.

It breaks unit conversion in spinboxes :S

gpittman

2013-11-16 15:09

developer   ~0030844

shouldn't that be fixed?

cbradney

2013-11-16 23:07

administrator   ~0030845

Its commit 10373:
0000130: Allow base 12 type display of pica. Uses points to store the value and displays as XpY.Z

That is.. pica are just points shown in a different format, not really a different unit. Not sure how to fix this properly for scripter though.

Issue History

Date Modified Username Field Change
2013-11-16 14:34 gpittman New Issue
2013-11-16 14:39 gpittman Note Added: 0030842
2013-11-16 14:39 jghali Note Added: 0030843
2013-11-16 15:09 gpittman Note Added: 0030844
2013-11-16 23:07 cbradney Note Added: 0030845