From: Fridrich S. <str...@us...> - 2008-12-05 00:55:10
|
Update of /cvsroot/libwpd/writerperfect/filter In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21358/filter Modified Files: OdgExporter.cxx OdgExporter.hxx Log Message: WPGBrush::style went, so learn to live without it Index: OdgExporter.cxx =================================================================== RCS file: /cvsroot/libwpd/writerperfect/filter/OdgExporter.cxx,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- OdgExporter.cxx 4 Dec 2008 23:19:26 -0000 1.30 +++ OdgExporter.cxx 5 Dec 2008 00:55:05 -0000 1.31 @@ -242,8 +242,9 @@ mpHandler->endDocument(); } -void OdgExporter::setStyle(const libwpg::WPGPen& pen, const libwpg::WPGBrush& brush, const ::WPXPropertyList & /*propList*/) +void OdgExporter::setStyle(const libwpg::WPGPen& pen, const libwpg::WPGBrush& brush, const ::WPXPropertyList & propList) { + mxStyle = propList; mxPen = pen; mxBrush = brush; } @@ -522,7 +523,7 @@ mGraphicsStrokeDashStyles.push_back(new TagCloseElement("draw:stroke-dash")); } - if(mxBrush.style == "gradient") + if(mxStyle["draw:fill"] && mxStyle["draw:fill"]->getStr() == "gradient") { TagOpenElement *pDrawGradientElement = new TagOpenElement("draw:gradient"); pDrawGradientElement->addAttribute("draw:style", "linear"); @@ -576,16 +577,16 @@ else pStyleGraphicsPropertiesElement->addAttribute("draw:stroke", "none"); - if(mxBrush.style == "none") + if(mxStyle["draw:fill"] && mxStyle["draw:fill"]->getStr() == "none") pStyleGraphicsPropertiesElement->addAttribute("draw:fill", "none"); - if(mxBrush.style == "solid") + if(mxStyle["draw:fill"] && mxStyle["draw:fill"]->getStr() == "solid") { pStyleGraphicsPropertiesElement->addAttribute("draw:fill", "solid"); pStyleGraphicsPropertiesElement->addAttribute("draw:fill-color", mxBrush.foreColor.cstr()); } - if(mxBrush.style == "gradient") + if(mxStyle["draw:fill"] && mxStyle["draw:fill"]->getStr() == "gradient") { pStyleGraphicsPropertiesElement->addAttribute("draw:fill", "gradient"); sValue.sprintf("Gradient_%i", miGradientIndex-1); Index: OdgExporter.hxx =================================================================== RCS file: /cvsroot/libwpd/writerperfect/filter/OdgExporter.hxx,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- OdgExporter.hxx 28 Nov 2008 12:26:16 -0000 1.13 +++ OdgExporter.hxx 5 Dec 2008 00:55:05 -0000 1.14 @@ -71,6 +71,7 @@ DocumentHandler *mpHandler; + ::WPXPropertyList mxStyle; libwpg::WPGPen mxPen; libwpg::WPGBrush mxBrush; int miGradientIndex; |