diff options
-rw-r--r-- | filter/source/svg/parserfragments.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/filter/source/svg/parserfragments.cxx b/filter/source/svg/parserfragments.cxx index 3de3d4b2d7ca..de290659e8e8 100644 --- a/filter/source/svg/parserfragments.cxx +++ b/filter/source/svg/parserfragments.cxx @@ -42,6 +42,7 @@ #include "units.hxx" #include "tokenmap.hxx" +#include "sal/log.hxx" using namespace ::com::sun::star; @@ -74,6 +75,12 @@ void setIntColor( double& rChannel, sal_uInt8 nVal ) rChannel = nVal/255.0; } +void setPercentColor( double& rChannel, double nVal ) +{ + rChannel = nVal/100.0; + SAL_INFO("svg", "setPercentColor " << nVal << " " << rChannel); +} + void calcRotation(std::vector<geometry::AffineMatrix2D>& rTransforms, geometry::AffineMatrix2D& rCurrTransform, double fRotationAngle) @@ -176,6 +183,14 @@ namespace (real_p[assign_a(self.m_rColor.r)] >> ',' >> real_p[assign_a(self.m_rColor.g)] >> ',' >> real_p[assign_a(self.m_rColor.b)]) + | + // rgb(percent,percent,percent) + (real_p[boost::bind(&setPercentColor, + boost::ref(self.m_rColor.r),_1)] >> "%," >> + real_p[boost::bind(&setPercentColor, + boost::ref(self.m_rColor.g),_1)] >> "%," >> + real_p[boost::bind(&setPercentColor, + boost::ref(self.m_rColor.b),_1)] >> "%") ) >> ')') ); |