本文整理汇总了C++中KoXmlWriter::tagHierarchy方法的典型用法代码示例。如果您正苦于以下问题:C++ KoXmlWriter::tagHierarchy方法的具体用法?C++ KoXmlWriter::tagHierarchy怎么用?C++ KoXmlWriter::tagHierarchy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KoXmlWriter
的用法示例。
在下文中一共展示了KoXmlWriter::tagHierarchy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tableCellEnd
void WordsTableHandler::tableCellEnd()
{
kDebug(30513);
if (!m_cellOpen) {
kDebug(30513) << "BUG: !m_cellOpen";
return;
}
// Text lists aren't closed explicitly so we have to close them
// when something happens like a new paragraph or, in this case,
// the table cell ends.
if (document()->textHandler()->listIsOpen()) {
document()->textHandler()->closeList();
}
KoXmlWriter* writer = currentWriter();
QList<const char*> openTags = writer->tagHierarchy();
for (int i = 0; i < openTags.size(); ++i) {
kDebug(30513) << openTags[i];
}
writer->endElement();//table:table-cell
m_cellOpen = false;
// If this cell covers other cells (i.e. is merged), then create as many
// table:covered-table-cell tags as there are covered columns.
for (int i = 1; i < m_colSpan; i++) {
writer->startElement("table:covered-table-cell");
writer->endElement();
}
m_colSpan = 1;
//Leaving out the table:style-name attribute and creation of the
//corresponding style for covered table cells in the tableCellStart f.
if (!m_tap || m_cellStyleName.isEmpty()) {
return;
}
//process shading information
const wvWare::Word97::SHD& shd = m_tap->rgshd[ m_column ];
QString color = Conversion::shdToColorStr(shd,
document()->textHandler()->paragraphBgColor(),
document()->textHandler()->paragraphBaseFontColorBkp());
if (!color.isNull()) {
KoGenStyle* cellStyle = m_mainStyles->styleForModification(m_cellStyleName, "table-cell");
Q_ASSERT(cellStyle);
if (cellStyle) {
cellStyle->addProperty("fo:background-color", color, KoGenStyle::TableCellType);
}
m_cellStyleName.clear();
//add the current background-color to stack
// document()->pushBgColor(color);
}
}