From: Fridrich S. <str...@us...> - 2008-12-05 00:55:55
|
Update of /cvsroot/libwpg/perfectspot/src/odg In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21411/src/odg Modified Files: OdgExporter.cxx OdgExporter.hxx Log Message: WPGBrush::style went, so learn to live without it Index: OdgExporter.cxx =================================================================== RCS file: /cvsroot/libwpg/perfectspot/src/odg/OdgExporter.cxx,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- OdgExporter.cxx 5 Dec 2008 00:14:35 -0000 1.9 +++ OdgExporter.cxx 5 Dec 2008 00:55:48 -0000 1.10 @@ -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/libwpg/perfectspot/src/odg/OdgExporter.hxx,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- OdgExporter.hxx 28 Nov 2008 15:09:15 -0000 1.5 +++ OdgExporter.hxx 5 Dec 2008 00:55:48 -0000 1.6 @@ -71,6 +71,7 @@ FileOutputHandler *mpHandler; + ::WPXPropertyList mxStyle; libwpg::WPGPen mxPen; libwpg::WPGBrush mxBrush; int miGradientIndex; |