~ubuntu-branches/ubuntu/trusty/scribus/trusty

« back to all changes in this revision

Viewing changes to scribus/plugins/import/svg/svgplugin.cpp

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2013-05-16 20:34:07 UTC
  • mfrom: (1.1.13) (32.1.2 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130516203407-ztj7ebsivoo41dih
Tags: 1.4.2.dfsg+r18267-1ubuntu2
Avoid qreal/double type clashes on ARM.

Show diffs side-by-side

added added

removed removed

Lines of Context:
298
298
                        m_Doc->PageOri = 0;
299
299
                m_Doc->m_pageSize = "Custom";
300
300
        }
301
 
        FPoint minSize = m_Doc->minCanvasCoordinate;
302
 
        FPoint maxSize = m_Doc->maxCanvasCoordinate;
303
 
        FPoint cOrigin = m_Doc->view()->canvasOrigin();
304
301
        m_Doc->view()->Deselect();
305
302
        m_Doc->setLoading(true);
306
303
        m_Doc->DoDrawing = false;
858
855
                        clip.addQuadPoint(width+x, height+y, width+x, height+y, x, height+y, x, height+y);
859
856
                        clip.addQuadPoint(x, height+y, x, height+y, x, y, x, y);
860
857
                }
 
858
                if (b2.hasAttribute("transform"))
 
859
                {
 
860
                        QMatrix transform = parseTransform(b2.attribute("transform"));
 
861
                        clip.map(transform);
 
862
                }
861
863
                if (clip.size() >= 2)
862
864
                        m_clipPaths.insert(id, clip);
863
865
        }
1672
1674
                font.setOverline(overline);
1673
1675
                font.setStrikeOut(strikeOut);
1674
1676
        }
1675
 
        font.setPointSize(style.FontSize / 10);
 
1677
        font.setPointSizeF(style.FontSize);
1676
1678
        return font;
1677
1679
}
1678
1680
 
1755
1757
{
1756
1758
        bool noUnit = false;
1757
1759
        QString unitval=unit;
1758
 
        if( unit.right( 2 ) == "pt" )
 
1760
        if (unit.right( 2 ) == "pt")
1759
1761
                unitval.replace( "pt", "" );
1760
 
        else if( unit.right( 2 ) == "cm" )
 
1762
        else if (unit.right( 2 ) == "cm")
1761
1763
                unitval.replace( "cm", "" );
1762
 
        else if( unit.right( 2 ) == "mm" )
 
1764
        else if (unit.right( 2 ) == "mm")
1763
1765
                unitval.replace( "mm" , "" );
1764
 
        else if( unit.right( 2 ) == "in" )
 
1766
        else if (unit.right( 2 ) == "in")
1765
1767
                unitval.replace( "in", "" );
1766
 
        else if( unit.right( 2 ) == "px" )
 
1768
        else if (unit.right( 2 ) == "px")
1767
1769
                unitval.replace( "px", "" );
1768
1770
        if (unitval == unit)
1769
1771
                noUnit = true;
1770
1772
        double value = ScCLocale::toDoubleC(unitval);
1771
 
        if( unit.right( 2 ) == "pt" )
 
1773
        if (unit.right( 2 ) == "pt")
1772
1774
                value = value;
1773
 
        else if( unit.right( 2 ) == "cm" )
 
1775
        else if (unit.right( 2 ) == "cm")
1774
1776
                value = ( value / 2.54 ) * 72;
1775
 
        else if( unit.right( 2 ) == "mm" )
 
1777
        else if (unit.right( 2 ) == "mm")
1776
1778
                value = ( value / 25.4 ) * 72;
1777
 
        else if( unit.right( 2 ) == "in" )
 
1779
        else if (unit.right( 2 ) == "in")
1778
1780
                value = value * 72;
1779
 
        else if( unit.right( 2 ) == "px" )
 
1781
        else if (unit.right( 2 ) == "px")
1780
1782
                value = value * 0.8;
1781
 
        else if(noUnit)
 
1783
        else if (noUnit)
1782
1784
                value = value;
1783
1785
        return value;
1784
1786
}
2276
2278
        else if( command == "font-stretch" )
2277
2279
                obj->FontStretch = params;
2278
2280
        else if( command == "font-size" )
2279
 
                obj->FontSize = static_cast<int>(parseFontSize(params) * 10.0);
 
2281
                obj->FontSize = parseFontSize(params);
2280
2282
        else if( command == "text-anchor" )
2281
2283
                obj->textAnchor = params;
2282
2284
        else if( command == "text-decoration" )