void QTextOdfWriter::writeFormats(QXmlStreamWriter &writer, QSet<int> formats) const { writer.writeStartElement(officeNS, QString::fromLatin1("automatic-styles")); QVector<QTextFormat> allStyles = m_document->allFormats(); QSetIterator<int> formatId(formats); while(formatId.hasNext()) { int formatIndex = formatId.next(); QTextFormat textFormat = allStyles.at(formatIndex); switch (textFormat.type()) { case QTextFormat::CharFormat: if (textFormat.isTableCellFormat()) writeTableCellFormat(writer, textFormat.toTableCellFormat(), formatIndex); else writeCharacterFormat(writer, textFormat.toCharFormat(), formatIndex); break; case QTextFormat::BlockFormat: writeBlockFormat(writer, textFormat.toBlockFormat(), formatIndex); break; case QTextFormat::ListFormat: writeListFormat(writer, textFormat.toListFormat(), formatIndex); break; case QTextFormat::FrameFormat: writeFrameFormat(writer, textFormat.toFrameFormat(), formatIndex); break; case QTextFormat::TableFormat: ;break; } } writer.writeEndElement(); // automatic-styles }
void SpirvStream::outputTypeId(Id id) { const int width = 12; std::stringstream idStream; formatId(id, idStream); out << std::setw(width) << std::right << idStream.str() << " "; }
CocaDataObject::CocaDataObject( const coca::INode* node, const coca::IAttribute* attribute ) { wxString formatId( "cocaData" ); formatId << ::wxGetProcessId(); // no interproccess dnd for now SetFormat( formatId.c_str() ); //memset( &_data, 0, sizeof( SData ) ); _data.node = node; _data.attribute = attribute; }
void SpirvStream::outputResultId(Id id) { const int width = 16; std::stringstream idStream; formatId(id, idStream); out << std::setw(width) << std::right << idStream.str(); if (id != 0) out << ":"; else out << " "; if (nestedControl.size() && id == nestedControl.top()) nestedControl.pop(); }