From: Fridrich S. <str...@us...> - 2008-12-03 23:10:09
|
Update of /cvsroot/libwpd/writerperfect/filter In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6597/filter Modified Files: OdgExporter.cxx Log Message: don't use the WPGColor data members directly (the corresponding header will soon be removed from the public api) Index: OdgExporter.cxx =================================================================== RCS file: /cvsroot/libwpd/writerperfect/filter/OdgExporter.cxx,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- OdgExporter.cxx 3 Dec 2008 13:00:31 -0000 1.28 +++ OdgExporter.cxx 3 Dec 2008 23:10:04 -0000 1.29 @@ -540,12 +540,8 @@ sValue.sprintf("%i", (unsigned)(angle*10)); pDrawGradientElement->addAttribute("draw:angle", sValue); - libwpg::WPGColor startColor = mxBrush.gradient.stopColor(0); - libwpg::WPGColor stopColor = mxBrush.gradient.stopColor(1); - sValue.sprintf("#%.2x%.2x%.2x", (startColor.red & 0xff), (startColor.green & 0xff), (startColor.blue & 0xff)); - pDrawGradientElement->addAttribute("draw:start-color", sValue); - sValue.sprintf("#%.2x%.2x%.2x", (stopColor.red & 0xff), (stopColor.green & 0xff), (stopColor.blue & 0xff)); - pDrawGradientElement->addAttribute("draw:end-color", sValue); + pDrawGradientElement->addAttribute("draw:start-color", mxBrush.gradient.stopColor(0).cstr()); + pDrawGradientElement->addAttribute("draw:end-color", mxBrush.gradient.stopColor(1).cstr()); pDrawGradientElement->addAttribute("draw:start-intensity", "100%"); pDrawGradientElement->addAttribute("draw:end-intensity", "100%"); pDrawGradientElement->addAttribute("draw:border", "0%"); @@ -568,9 +564,7 @@ sValue = doubleToString(mxPen.width); sValue.append("in"); pStyleGraphicsPropertiesElement->addAttribute("svg:stroke-width", sValue); - sValue.sprintf("#%.2x%.2x%.2x", (mxPen.foreColor.red & 0xff), - (mxPen.foreColor.green & 0xff), (mxPen.foreColor.blue & 0xff)); - pStyleGraphicsPropertiesElement->addAttribute("svg:stroke-color", sValue); + pStyleGraphicsPropertiesElement->addAttribute("svg:stroke-color", mxPen.foreColor.getColorString().cstr()); if(!mxPen.solid) { @@ -588,9 +582,7 @@ if(mxBrush.style == libwpg::WPGBrush::Solid) { pStyleGraphicsPropertiesElement->addAttribute("draw:fill", "solid"); - sValue.sprintf("#%.2x%.2x%.2x", (mxBrush.foreColor.red & 0xff), - (mxBrush.foreColor.green & 0xff), (mxBrush.foreColor.blue & 0xff)); - pStyleGraphicsPropertiesElement->addAttribute("draw:fill-color", sValue); + pStyleGraphicsPropertiesElement->addAttribute("draw:fill-color", mxBrush.foreColor.getColorString().cstr()); } if(mxBrush.style == libwpg::WPGBrush::Gradient) |