Commit 397c3826 authored by Martin Pfeiffer's avatar Martin Pfeiffer
Browse files

q3valuestack ported to qstack

svn path=/trunk/koffice/; revision=546286
parent 11e84a0d
......@@ -22,7 +22,6 @@
#include <kglobal.h> // kMin
#include <kdebug.h>
#include <QIODevice>
//Added by qt3to4:
#include <QByteArray>
#include <float.h>
......@@ -376,14 +375,14 @@ void KoXmlWriter::addTextSpan( const QString& text )
void KoXmlWriter::addTextSpan( const QString& text, const QMap<int, int>& tabCache )
{
uint len = text.length();
int len = text.length();
int nrSpaces = 0; // number of consecutive spaces
QString str;
str.reserve( len );
// Accumulate chars either in str or in nrSpaces (for spaces).
// Flush str when writing a subelement (for spaces or for another reason)
// Flush nrSpaces when encountering two or more consecutive spaces
for ( uint i = 0; i < len ; ++i ) {
for ( int i = 0; i < len ; ++i ) {
QChar ch = text[i];
if ( ch != ' ' ) {
if ( nrSpaces > 0 ) {
......
......@@ -21,11 +21,11 @@
#define XMLWRITER_H
#include <QString>
#include <q3valuestack.h>
#include <QStack>
#include <QMap>
#include <QIODevice>
#include <koffice_export.h>
class QIODevice;
/**
* A class for writing out XML (to any QIODevice), with a special attention on performance.
......@@ -255,7 +255,7 @@ private:
void init();
QIODevice* m_dev;
Q3ValueStack<Tag> m_tags;
QStack<Tag> m_tags;
int m_baseIndentLevel;
class Private;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment