Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 20632 → Rev 20633

/trunk/Scribus/scribus/pageitem_table.cpp
857,8 → 857,13
emit changed();
}
 
QString PageItem_Table::style() const
const TableStyle& PageItem_Table::style() const
{
return m_style;
}
 
QString PageItem_Table::styleName() const
{
return m_style.parent();
}
 
/trunk/Scribus/scribus/pageitem_table.h
58,7 → 58,7
Q_PROPERTY(TableBorder rightBorder READ rightBorder WRITE setRightBorder RESET unsetRightBorder NOTIFY changed)
Q_PROPERTY(TableBorder topBorder READ topBorder WRITE setTopBorder RESET unsetTopBorder NOTIFY changed)
Q_PROPERTY(TableBorder bottomBorder READ bottomBorder WRITE setBottomBorder RESET unsetBottomBorder NOTIFY changed)
Q_PROPERTY(QString style READ style WRITE setStyle RESET unsetStyle NOTIFY changed)
Q_PROPERTY(QString style READ styleName WRITE setStyle RESET unsetStyle NOTIFY changed)
 
public:
/**
443,8 → 443,11
void unsetDirectFormatting();
 
/// Returns the style of this table.
QString style() const;
const TableStyle& style() const;
 
/// Returns the style name of this table.
QString styleName() const;
 
/// Updates the position and size of all cell text frames for this table.
void updateCells() { updateCells(0, 0, rows() - 1, columns() - 1); }
 
/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
2207,11 → 2207,11
//PTYPE == PageItem::Table or 16 (pageitem.h)
PageItem_Table* tableItem = item->asTable();
docu.writeStartElement("TableData");
QString tstyle = tableItem->style();
docu.writeAttribute("Style", tableItem->style());
QString tstyle = tableItem->styleName();
docu.writeAttribute("Style", tableItem->styleName());
TableStyle ts;
if (!tstyle.isEmpty())
ts = m_Doc->tableStyle(tstyle);
ts = tableItem->style();
 
if ((tstyle.isEmpty()) || ((!tstyle.isEmpty()) && (!ts.isInhFillColor())))
docu.writeAttribute("FillColor", tableItem->fillColor());
2288,8 → 2288,8
PageItem* textFrame = cell.textFrame();
docu.writeStartElement("Cell");
docu.writeAttribute("Row", cell.row());
docu.writeAttribute("Column",cell.column());
docu.writeAttribute("Style",cell.style());
docu.writeAttribute("Column", cell.column());
docu.writeAttribute("Style", cell.styleName());
docu.writeAttribute("TextColumns", textFrame->columns());
docu.writeAttribute("TextColGap", textFrame->columnGap());
docu.writeAttribute("TextDistLeft", textFrame->textToFrameDistLeft());
2299,10 → 2299,10
docu.writeAttribute("TextVertAlign", textFrame->verticalAlignment());
docu.writeAttribute("Flop", textFrame->firstLineOffset());
 
QString cstyle = cell.style();
QString cstyle = cell.styleName();
CellStyle cs;
if (!cell.style().isEmpty())
cs = m_Doc->cellStyle(cell.style());
if (!cstyle.isEmpty())
cs = cell.style();
if ((cstyle.isEmpty()) || ((!cstyle.isEmpty()) && ( !cs.isInhFillColor())))
docu.writeAttribute("FillColor", cell.fillColor());
if ((cstyle.isEmpty()) || ((!cstyle.isEmpty()) && ( !cs.isInhFillShade())))
2709,7 → 2709,7
docu.writeAttribute("CellAreas", outputData.simplified());
outputData.clear();
 
docu.writeAttribute("TableStyle",tableItem->style());
docu.writeAttribute("TableStyle",tableItem->styleName());
}
 
if (item->isGroup())
/trunk/Scribus/scribus/plugins/scriptplugin/cmdcell.cpp
61,7 → 61,7
PyErr_SetString(PyExc_ValueError, QObject::tr("The cell %1,%2 does not exist in table", "python error").arg(row).arg(column).toLocal8Bit().constData());
return NULL;
}
return PyString_FromString(table->cellAt(row, column).style().toUtf8());
return PyString_FromString(table->cellAt(row, column).styleName().toUtf8());
}
 
PyObject *scribus_setcellstyle(PyObject* /* self */, PyObject* args)
/trunk/Scribus/scribus/plugins/scriptplugin/cmdtable.cpp
338,7 → 338,7
PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot get table style on a non-table item.","python error").toLocal8Bit().constData());
return NULL;
}
return PyString_FromString(table->style().toUtf8());
return PyString_FromString(table->styleName().toUtf8());
}
 
PyObject *scribus_settablestyle(PyObject* /* self */, PyObject* args)
/trunk/Scribus/scribus/tablecell.h
201,8 → 201,11
void unsetDirectFormatting();
 
/// Returns the named cell style for this cell.
QString style() const { return d->style.parent(); }
const CellStyle& style() const { return d->style; }
 
/// Returns the cell style name for this cell.
QString styleName() const { return d->style.parent(); }
 
/// Sets the text for this cell to @a text.
void setText(const QString& text);