本文整理汇总了C++中KoGenStyle::writeStyle方法的典型用法代码示例。如果您正苦于以下问题:C++ KoGenStyle::writeStyle方法的具体用法?C++ KoGenStyle::writeStyle怎么用?C++ KoGenStyle::writeStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KoGenStyle
的用法示例。
在下文中一共展示了KoGenStyle::writeStyle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: it
void KoGenStyles::Private::saveOdfDocumentStyles(KoXmlWriter* xmlWriter) const
{
xmlWriter->startElement("office:styles");
for (uint i = 0; i < numStyleData; ++i) {
const QMap<int, KoGenStyle>::const_iterator it(defaultStyles.constFind(styleData[i].m_type));
if (it != defaultStyles.constEnd()) {
it.value().writeStyle(xmlWriter, *q, "style:default-style", "",
styleData[i].m_propertiesElementName, true, styleData[i].m_drawElement);
}
}
for (uint i = 0; i < numStyleData; ++i) {
QList<KoGenStyles::NamedStyle> stylesList(styles(false, styleData[i].m_type));
QList<KoGenStyles::NamedStyle>::const_iterator it = stylesList.constBegin();
for (; it != stylesList.constEnd() ; ++it) {
if (relations.contains(it->name)) {
KoGenStyles::Private::RelationTarget relation = relations.value(it->name);
KoGenStyle styleCopy = *(*it).style;
styleCopy.addAttribute(relation.attribute, relation.target);
styleCopy.writeStyle(xmlWriter, *q, styleData[i].m_elementName, (*it).name,
styleData[i].m_propertiesElementName, true, styleData[i].m_drawElement);
} else {
(*it).style->writeStyle(xmlWriter, *q, styleData[i].m_elementName, (*it).name,
styleData[i].m_propertiesElementName, true, styleData[i].m_drawElement);
}
}
}
if (!rawOdfDocumentStyles.isEmpty()) {
xmlWriter->addCompleteElement(rawOdfDocumentStyles.constData());
}
xmlWriter->endElement(); // office:styles
}