Exemple #1
0
void KoXmlWriter::prepareForTextNode()
{
    Tag& parent = m_tags.top();
    if ( !parent.hasChildren ) {
        closeStartElement( parent );
        parent.hasChildren = true;
        parent.lastChildIsText = true;
    }
}
void KoXmlWriter::prepareForTextNode()
{
    if (d->tags.isEmpty())
        return;
    Tag& parent = d->tags.top();
    if (!parent.hasChildren) {
        closeStartElement(parent);
        parent.hasChildren = true;
        parent.lastChildIsText = true;
    }
}
Exemple #3
0
// returns the value of indentInside of the parent
bool KoXmlWriter::prepareForChild()
{
    if ( !m_tags.isEmpty() ) {
        Tag& parent = m_tags.top();
        if ( !parent.hasChildren ) {
            closeStartElement( parent );
            parent.hasChildren = true;
            parent.lastChildIsText = false;
        }
        if ( parent.indentInside ) {
            writeIndent();
        }
        return parent.indentInside;
    }
    return true;
}