r17316 by fschmid - Tables: Implemented proper loading and saving of tables.

scribus-commit scribus-commit at lists.scribus.net
Sun Feb 19 14:29:35 UTC 2012


Author: fschmid
Date: Sun Feb 19 14:29:35 2012
New Revision: 17316

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17316
Log:
Tables: Implemented proper loading and saving of tables.

Modified:
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    trunk/Scribus/scribus/tablecell.h

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17316&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Sun Feb 19 14:29:35 2012
@@ -3059,6 +3059,10 @@
 
 		if (tName == "ITEXT")
 			readItemText(newItem, tAtt, lastStyle);
+		else if (tName == "TableData")
+		{
+			readItemTableData(newItem->asTable(), reader, doc);
+		}
 		else if (tName == "para")
 		{
 			newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::PARSEP);
@@ -4454,6 +4458,297 @@
 	return currItem;
 }
 
+bool Scribus150Format::readItemTableData(PageItem_Table* item, ScXmlStreamReader& reader, ScribusDoc* doc)
+{
+	ScXmlStreamAttributes attrs = reader.scAttributes();
+	QString fColor = attrs.valueAsString("FillColor");
+	if ((fColor != CommonStrings::None) && (!fColor.isEmpty()))
+		item->setFillColor(fColor);
+	item->setFillShade(attrs.valueAsInt("FillShade", 100));
+	QStringRef tagName = reader.name();
+	LastStyles * lastStyle = new LastStyles();
+	while (!reader.atEnd() && !reader.hasError())
+	{
+		reader.readNext();
+		if (reader.isEndElement() && reader.name() == tagName)
+			break;
+		if (reader.isStartElement() && reader.name() == "Cell")
+		{
+			ScXmlStreamAttributes tAtt = reader.scAttributes();
+			int row = tAtt.valueAsInt("Row", -1);
+			int col = tAtt.valueAsInt("Column", -1);
+			if ((row >= 0) && (col >= 0))
+			{
+				QString fColor = tAtt.valueAsString("FillColor");
+				if ((fColor != CommonStrings::None) && (!fColor.isEmpty()))
+					item->cellAt(row, col).setFillColor(fColor);
+				item->cellAt(row, col).setFillShade(tAtt.valueAsInt("FillShade", 100));
+				item->cellAt(row, col).setLeftPadding(tAtt.valueAsDouble("LeftPadding", 0.0));
+				item->cellAt(row, col).setRightPadding(tAtt.valueAsDouble("RightPadding", 0.0));
+				item->cellAt(row, col).setTopPadding(tAtt.valueAsDouble("TopPadding", 0.0));
+				item->cellAt(row, col).setBottomPadding(tAtt.valueAsDouble("BottomPadding", 0.0));
+			}
+			QStringRef tagName = reader.name();
+			while (!reader.atEnd() && !reader.hasError())
+			{
+				reader.readNext();
+				if (reader.isEndElement() && reader.name() == tagName)
+					break;
+				if (reader.name() == "TableBorderLeft")
+				{
+					TableBorder border;
+					QStringRef tagName = reader.name();
+					while (!reader.atEnd() && !reader.hasError())
+					{
+						reader.readNext();
+						if (reader.isEndElement() && reader.name() == tagName)
+							break;
+						if (reader.isStartElement() && reader.name() == "TableBorderLine")
+						{
+							ScXmlStreamAttributes tAttB = reader.scAttributes();
+							double width = tAttB.valueAsDouble("Width", 0.0);
+							QString color = tAttB.valueAsString("Color", CommonStrings::None);
+							double shade = tAttB.valueAsDouble("Shade", 100.0);
+							int style = tAttB.valueAsInt("PenStyle", 1);
+							border.addBorderLine(TableBorderLine(width, static_cast<Qt::PenStyle>(style), color, shade));
+						}
+					}
+					item->cellAt(row, col).setLeftBorder(border);
+				}
+				else if (reader.name() == "TableBorderRight")
+				{
+					TableBorder border;
+					QStringRef tagName = reader.name();
+					while (!reader.atEnd() && !reader.hasError())
+					{
+						reader.readNext();
+						if (reader.isEndElement() && reader.name() == tagName)
+							break;
+						if (reader.isStartElement() && reader.name() == "TableBorderLine")
+						{
+							ScXmlStreamAttributes tAttB = reader.scAttributes();
+							double width = tAttB.valueAsDouble("Width", 0.0);
+							QString color = tAttB.valueAsString("Color", CommonStrings::None);
+							double shade = tAttB.valueAsDouble("Shade", 100.0);
+							int style = tAttB.valueAsInt("PenStyle", 1);
+							border.addBorderLine(TableBorderLine(width, static_cast<Qt::PenStyle>(style), color, shade));
+						}
+					}
+					item->cellAt(row, col).setRightBorder(border);
+				}
+				else if (reader.name() == "TableBorderTop")
+				{
+					TableBorder border;
+					QStringRef tagName = reader.name();
+					while (!reader.atEnd() && !reader.hasError())
+					{
+						reader.readNext();
+						if (reader.isEndElement() && reader.name() == tagName)
+							break;
+						if (reader.isStartElement() && reader.name() == "TableBorderLine")
+						{
+							ScXmlStreamAttributes tAttB = reader.scAttributes();
+							double width = tAttB.valueAsDouble("Width", 0.0);
+							QString color = tAttB.valueAsString("Color", CommonStrings::None);
+							double shade = tAttB.valueAsDouble("Shade", 100.0);
+							int style = tAttB.valueAsInt("PenStyle", 1);
+							border.addBorderLine(TableBorderLine(width, static_cast<Qt::PenStyle>(style), color, shade));
+						}
+					}
+					item->cellAt(row, col).setTopBorder(border);
+				}
+				else if (reader.name() == "TableBorderBottom")
+				{
+					TableBorder border;
+					QStringRef tagName = reader.name();
+					while (!reader.atEnd() && !reader.hasError())
+					{
+						reader.readNext();
+						if (reader.isEndElement() && reader.name() == tagName)
+							break;
+						if (reader.isStartElement() && reader.name() == "TableBorderLine")
+						{
+							ScXmlStreamAttributes tAttB = reader.scAttributes();
+							double width = tAttB.valueAsDouble("Width", 0.0);
+							QString color = tAttB.valueAsString("Color", CommonStrings::None);
+							double shade = tAttB.valueAsDouble("Shade", 100.0);
+							int style = tAttB.valueAsInt("PenStyle", 1);
+							border.addBorderLine(TableBorderLine(width, static_cast<Qt::PenStyle>(style), color, shade));
+						}
+					}
+					item->cellAt(row, col).setBottomBorder(border);
+				}
+				else if (reader.name() == "ITEXT")
+				{
+					ScXmlStreamAttributes tAttT = reader.scAttributes();
+					readItemText(item->cellAt(row, col).textFrame(), tAttT, lastStyle);
+				}
+				else if (reader.name() == "para")
+				{
+					PageItem* newItem = item->cellAt(row, col).textFrame();
+					newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::PARSEP);
+					ParagraphStyle newStyle;
+					readParagraphStyle(doc, reader, newStyle);
+					newItem->itemText.setStyle(newItem->itemText.length()-1, newStyle);
+					newItem->itemText.setCharStyle(newItem->itemText.length()-1, 1, lastStyle->Style);
+				}
+				else if (reader.name() == "trail")
+				{
+					PageItem* newItem = item->cellAt(row, col).textFrame();
+					ParagraphStyle newStyle;
+					readParagraphStyle(doc, reader, newStyle);
+					newItem->itemText.setStyle(newItem->itemText.length(), newStyle);
+				}
+				else if (reader.name() == "tab")
+				{
+					PageItem* newItem = item->cellAt(row, col).textFrame();
+					CharStyle newStyle;
+					newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::TAB);
+					readCharacterStyleAttrs(doc, tAtt, newStyle);
+					newItem->itemText.setCharStyle(newItem->itemText.length()-1, 1, newStyle);
+					lastStyle->StyleStart = newItem->itemText.length()-1;
+					lastStyle->Style = newStyle;
+				}
+				else if (reader.name() == "breakline")
+				{
+					PageItem* newItem = item->cellAt(row, col).textFrame();
+					newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::LINEBREAK);
+				}
+				else if (reader.name() == "breakcol")
+				{
+					PageItem* newItem = item->cellAt(row, col).textFrame();
+					newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::COLBREAK);
+				}
+				else if (reader.name() == "breakframe")
+				{
+					PageItem* newItem = item->cellAt(row, col).textFrame();
+					newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::FRAMEBREAK);
+				}
+				else if (reader.name() == "nbhyphen")
+				{
+					PageItem* newItem = item->cellAt(row, col).textFrame();
+					newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::NBHYPHEN);
+				}
+				else if (reader.name() == "nbspace")
+				{
+					PageItem* newItem = item->cellAt(row, col).textFrame();
+					newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::NBSPACE);
+				}
+				else if (reader.name() == "zwnbspace")
+				{
+					PageItem* newItem = item->cellAt(row, col).textFrame();
+					newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::ZWNBSPACE);
+				}
+				else if (reader.name() == "zwspace")
+				{
+					PageItem* newItem = item->cellAt(row, col).textFrame();
+					newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::ZWSPACE);
+				}
+				else if (reader.name() == "var")
+				{
+					PageItem* newItem = item->cellAt(row, col).textFrame();
+					CharStyle newStyle;
+					if (tAtt.value("name") == "pgno")
+						newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::PAGENUMBER);
+					else
+						newItem->itemText.insertChars(newItem->itemText.length(), SpecialChars::PAGECOUNT);
+					readCharacterStyleAttrs(doc, tAtt, newStyle);
+					newItem->itemText.setCharStyle(newItem->itemText.length()-1, 1, newStyle);
+					lastStyle->StyleStart = newItem->itemText.length()-1;
+					lastStyle->Style = newStyle;
+				}
+			}
+		}
+		else if (reader.isStartElement() && reader.name() == "TableBorderLeft")
+		{
+			TableBorder border;
+			QStringRef tagName = reader.name();
+			while (!reader.atEnd() && !reader.hasError())
+			{
+				reader.readNext();
+				if (reader.isEndElement() && reader.name() == tagName)
+					break;
+				if (reader.isStartElement() && reader.name() == "TableBorderLine")
+				{
+					ScXmlStreamAttributes tAttB = reader.scAttributes();
+					double width = tAttB.valueAsDouble("Width", 0.0);
+					QString color = tAttB.valueAsString("Color", CommonStrings::None);
+					double shade = tAttB.valueAsDouble("Shade", 100.0);
+					int style = tAttB.valueAsInt("PenStyle", 1);
+					border.addBorderLine(TableBorderLine(width, static_cast<Qt::PenStyle>(style), color, shade));
+				}
+			}
+			item->setLeftBorder(border);
+		}
+		else if (reader.isStartElement() && reader.name() == "TableBorderRight")
+		{
+			TableBorder border;
+			QStringRef tagName = reader.name();
+			while (!reader.atEnd() && !reader.hasError())
+			{
+				reader.readNext();
+				if (reader.isEndElement() && reader.name() == tagName)
+					break;
+				if (reader.isStartElement() && reader.name() == "TableBorderLine")
+				{
+					ScXmlStreamAttributes tAttB = reader.scAttributes();
+					double width = tAttB.valueAsDouble("Width", 0.0);
+					QString color = tAttB.valueAsString("Color", CommonStrings::None);
+					double shade = tAttB.valueAsDouble("Shade", 100.0);
+					int style = tAttB.valueAsInt("PenStyle", 1);
+					border.addBorderLine(TableBorderLine(width, static_cast<Qt::PenStyle>(style), color, shade));
+				}
+			}
+			item->setRightBorder(border);
+		}
+		else if (reader.isStartElement() && reader.name() == "TableBorderTop")
+		{
+			TableBorder border;
+			QStringRef tagName = reader.name();
+			while (!reader.atEnd() && !reader.hasError())
+			{
+				reader.readNext();
+				if (reader.isEndElement() && reader.name() == tagName)
+					break;
+				if (reader.isStartElement() && reader.name() == "TableBorderLine")
+				{
+					ScXmlStreamAttributes tAttB = reader.scAttributes();
+					double width = tAttB.valueAsDouble("Width", 0.0);
+					QString color = tAttB.valueAsString("Color", CommonStrings::None);
+					double shade = tAttB.valueAsDouble("Shade", 100.0);
+					int style = tAttB.valueAsInt("PenStyle", 1);
+					border.addBorderLine(TableBorderLine(width, static_cast<Qt::PenStyle>(style), color, shade));
+				}
+			}
+			item->setTopBorder(border);
+		}
+		else if (reader.isStartElement() && reader.name() == "TableBorderBottom")
+		{
+			TableBorder border;
+			QStringRef tagName = reader.name();
+			while (!reader.atEnd() && !reader.hasError())
+			{
+				reader.readNext();
+				if (reader.isEndElement() && reader.name() == tagName)
+					break;
+				if (reader.isStartElement() && reader.name() == "TableBorderLine")
+				{
+					ScXmlStreamAttributes tAttB = reader.scAttributes();
+					double width = tAttB.valueAsDouble("Width", 0.0);
+					QString color = tAttB.valueAsString("Color", CommonStrings::None);
+					double shade = tAttB.valueAsDouble("Shade", 100.0);
+					int style = tAttB.valueAsInt("PenStyle", 1);
+					border.addBorderLine(TableBorderLine(width, static_cast<Qt::PenStyle>(style), color, shade));
+				}
+			}
+			item->setBottomBorder(border);
+		}
+	}
+	item->adjustTableToFrame();
+	item->adjustFrameToTable();
+	return !reader.hasError();
+}
+
 bool Scribus150Format::readLatexInfo(PageItem_LatexFrame* latexitem, ScXmlStreamReader& reader)
 {
 	ScXmlStreamAttributes attrs = reader.scAttributes();

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17316&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.h Sun Feb 19 14:29:35 2012
@@ -109,6 +109,7 @@
 		bool readDocItemAttributes(ScribusDoc *doc, ScXmlStreamReader& reader);
 		bool readHyphen(ScribusDoc *doc, ScXmlStreamReader& reader);
 		bool readItemText(PageItem* item, ScXmlStreamAttributes& attrs, LastStyles* last);
+		bool readItemTableData(PageItem_Table* item, ScXmlStreamReader& reader, ScribusDoc *doc);
 		bool readLatexInfo(PageItem_LatexFrame* item, ScXmlStreamReader& reader);
 		void readLayers(ScLayer& layer, ScXmlStreamAttributes& attrs);
 		bool readMultiline(multiLine& ml, ScXmlStreamReader& reader);

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17316&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Sun Feb 19 14:29:35 2012
@@ -1796,88 +1796,137 @@
 			docu.writeStartElement("TableData");
 			docu.writeAttribute("FillColor", tableItem->fillColor());
 			docu.writeAttribute("FillShade", tableItem->fillShade());
+			docu.writeAttribute("Style", tableItem->style());
+			TableBorder tbLeft = tableItem->leftBorder();
+			docu.writeStartElement("TableBorderLeft");
+			foreach (TableBorderLine tbl, tbLeft.borderLines())
+			{
+				docu.writeStartElement("TableBorderLine");
+				docu.writeAttribute("Width", tbl.width());
+				docu.writeAttribute("PenStyle", tbl.style());
+				docu.writeAttribute("Color", tbl.color());
+				docu.writeAttribute("Shade", tbl.shade());
+				docu.writeEndElement();
+			}
+			docu.writeEndElement();
+			TableBorder tbRight = tableItem->rightBorder();
+			docu.writeStartElement("TableBorderRight");
+			foreach (TableBorderLine tbl, tbRight.borderLines())
+			{
+				docu.writeStartElement("TableBorderLine");
+				docu.writeAttribute("Width", tbl.width());
+				docu.writeAttribute("PenStyle", tbl.style());
+				docu.writeAttribute("Color", tbl.color());
+				docu.writeAttribute("Shade", tbl.shade());
+				docu.writeEndElement();
+			}
+			docu.writeEndElement();
+			TableBorder tbTop = tableItem->topBorder();
+			docu.writeStartElement("TableBorderTop");
+			foreach (TableBorderLine tbl, tbTop.borderLines())
+			{
+				docu.writeStartElement("TableBorderLine");
+				docu.writeAttribute("Width", tbl.width());
+				docu.writeAttribute("PenStyle", tbl.style());
+				docu.writeAttribute("Color", tbl.color());
+				docu.writeAttribute("Shade", tbl.shade());
+				docu.writeEndElement();
+			}
+			docu.writeEndElement();
+			TableBorder tbBottom = tableItem->bottomBorder();
+			docu.writeStartElement("TableBorderBottom");
+			foreach (TableBorderLine tbl, tbBottom.borderLines())
+			{
+				docu.writeStartElement("TableBorderLine");
+				docu.writeAttribute("Width", tbl.width());
+				docu.writeAttribute("PenStyle", tbl.style());
+				docu.writeAttribute("Color", tbl.color());
+				docu.writeAttribute("Shade", tbl.shade());
+				docu.writeEndElement();
+			}
+			docu.writeEndElement();
 			//for each cell, write it to the doc
-			foreach (QList<TableCell> cellRow, tableItem->cellRows())
-			{
-				docu.writeStartElement("Row");
-				foreach(TableCell cell, cellRow)
+			for (int row = 0; row < tableItem->rows(); ++row)
+			{
+				for (int col = 0; col < tableItem->columns(); col ++)
 				{
-					docu.writeStartElement("Cell");
-					docu.writeAttribute("Row", cell.row());
-					docu.writeAttribute("Column",cell.column());
-					docu.writeAttribute("RowSpan", cell.rowSpan());
-					docu.writeAttribute("ColSpan",cell.columnSpan());
-					docu.writeAttribute("Style",cell.style());
-					//TODO
-					//BoundRect?
-					//ContentRect?
-					docu.writeAttribute("FillColor", cell.fillColor());
-					docu.writeAttribute("FillShade", cell.fillShade());
-					docu.writeAttribute("LeftPadding",cell.leftPadding());
-					docu.writeAttribute("RightPadding", cell.rightPadding());
-					docu.writeAttribute("TopPadding",cell.topPadding());
-					docu.writeAttribute("BottomPadding", cell.bottomPadding());
-
-					TableBorder tbLeft=cell.leftBorder();
-					docu.writeStartElement("TableBorderLeft");
-					docu.writeAttribute("Width", tbLeft.width());
-					foreach (TableBorderLine tbl, tbLeft.borderLines())
+					TableCell cell = tableItem->cellAt(row, col);
+					if (cell.row() == row && cell.column() == col)
 					{
-						docu.writeStartElement("TableBorderLine");
-						docu.writeAttribute("Width", tbl.width());
-						docu.writeAttribute("PenStyle", tbl.style());
-						docu.writeAttribute("Color", tbl.color());
-						docu.writeAttribute("Shade", tbl.shade());
+						docu.writeStartElement("Cell");
+						docu.writeAttribute("Row", cell.row());
+						docu.writeAttribute("Column",cell.column());
+						docu.writeAttribute("Style",cell.style());
+						//TODO
+						//BoundRect?
+						//ContentRect?
+						docu.writeAttribute("FillColor", cell.fillColor());
+						docu.writeAttribute("FillShade", cell.fillShade());
+						docu.writeAttribute("LeftPadding",cell.leftPadding());
+						docu.writeAttribute("RightPadding", cell.rightPadding());
+						docu.writeAttribute("TopPadding",cell.topPadding());
+						docu.writeAttribute("BottomPadding", cell.bottomPadding());
+
+						TableBorder tbLeft = cell.leftBorder();
+						docu.writeStartElement("TableBorderLeft");
+						docu.writeAttribute("Width", tbLeft.width());
+						foreach (TableBorderLine tbl, tbLeft.borderLines())
+						{
+							docu.writeStartElement("TableBorderLine");
+							docu.writeAttribute("Width", tbl.width());
+							docu.writeAttribute("PenStyle", tbl.style());
+							docu.writeAttribute("Color", tbl.color());
+							docu.writeAttribute("Shade", tbl.shade());
+							docu.writeEndElement();
+						}
+						docu.writeEndElement();
+
+						TableBorder tbRight = cell.rightBorder();
+						docu.writeStartElement("TableBorderRight");
+						docu.writeAttribute("Width", tbRight.width());
+						foreach (TableBorderLine tbl, tbRight.borderLines())
+						{
+							docu.writeStartElement("TableBorderLine");
+							docu.writeAttribute("Width", tbl.width());
+							docu.writeAttribute("PenStyle", tbl.style());
+							docu.writeAttribute("Color", tbl.color());
+							docu.writeAttribute("Shade", tbl.shade());
+							docu.writeEndElement();
+						}
+						docu.writeEndElement();
+
+						TableBorder tbTop = cell.topBorder();
+						docu.writeStartElement("TableBorderTop");
+						docu.writeAttribute("Width", tbTop.width());
+						foreach (TableBorderLine tbl, tbTop.borderLines())
+						{
+							docu.writeStartElement("TableBorderLine");
+							docu.writeAttribute("Width", tbl.width());
+							docu.writeAttribute("PenStyle", tbl.style());
+							docu.writeAttribute("Color", tbl.color());
+							docu.writeAttribute("Shade", tbl.shade());
+							docu.writeEndElement();
+						}
+						docu.writeEndElement();
+
+						TableBorder tbBottom = cell.bottomBorder();
+						docu.writeStartElement("TableBorderBottom");
+						docu.writeAttribute("Width", tbBottom.width());
+						foreach (TableBorderLine tbl, tbBottom.borderLines())
+						{
+							docu.writeStartElement("TableBorderLine");
+							docu.writeAttribute("Width", tbl.width());
+							docu.writeAttribute("PenStyle", tbl.style());
+							docu.writeAttribute("Color", tbl.color());
+							docu.writeAttribute("Shade", tbl.shade());
+							docu.writeEndElement();
+						}
+						docu.writeEndElement();
+						//End Cell
+						writeITEXTs(doc, docu, cell.textFrame());
 						docu.writeEndElement();
 					}
-					docu.writeEndElement();
-
-					TableBorder tbRight=cell.rightBorder();
-					docu.writeStartElement("TableBorderRight");
-					docu.writeAttribute("Width", tbRight.width());
-					foreach (TableBorderLine tbl, tbRight.borderLines())
-					{
-						docu.writeStartElement("TableBorderLine");
-						docu.writeAttribute("Width", tbl.width());
-						docu.writeAttribute("PenStyle", tbl.style());
-						docu.writeAttribute("Color", tbl.color());
-						docu.writeAttribute("Shade", tbl.shade());
-						docu.writeEndElement();
-					}
-					docu.writeEndElement();
-
-					TableBorder tbTop=cell.topBorder();
-					docu.writeStartElement("TableBorderTop");
-					docu.writeAttribute("Width", tbTop.width());
-					foreach (TableBorderLine tbl, tbTop.borderLines())
-					{
-						docu.writeStartElement("TableBorderLine");
-						docu.writeAttribute("Width", tbl.width());
-						docu.writeAttribute("PenStyle", tbl.style());
-						docu.writeAttribute("Color", tbl.color());
-						docu.writeAttribute("Shade", tbl.shade());
-						docu.writeEndElement();
-					}
-					docu.writeEndElement();
-
-					TableBorder tbBottom=cell.bottomBorder();
-					docu.writeStartElement("TableBorderBottom");
-					docu.writeAttribute("Width", tbBottom.width());
-					foreach (TableBorderLine tbl, tbBottom.borderLines())
-					{
-						docu.writeStartElement("TableBorderLine");
-						docu.writeAttribute("Width", tbl.width());
-						docu.writeAttribute("PenStyle", tbl.style());
-						docu.writeAttribute("Color", tbl.color());
-						docu.writeAttribute("Shade", tbl.shade());
-						docu.writeEndElement();
-					}
-					docu.writeEndElement();
-					//End Cell
-					writeITEXTs(doc, docu, cell.textFrame());
-					docu.writeEndElement();
 				}
-				docu.writeEndElement();
 			}
 			docu.writeEndElement();
 		}

Modified: trunk/Scribus/scribus/tablecell.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17316&path=/trunk/Scribus/scribus/tablecell.h
==============================================================================
--- trunk/Scribus/scribus/tablecell.h (original)
+++ trunk/Scribus/scribus/tablecell.h Sun Feb 19 14:29:35 2012
@@ -142,7 +142,7 @@
 	QString fillColor() const { return d->style.fillColor(); }
 
 	/// Sets the fill color of this cell to @a color.
-	void setFillColor(const double& shade) { d->style.setFillShade(shade); }
+	void setFillShade(const double& shade) { d->style.setFillShade(shade); }
 
 	/// Returns the fill color of this cell.
 	double fillShade() const { return d->style.fillShade(); }




More information about the scribus-commit mailing list