Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 13502 → Rev 13503

/trunk/Scribus/scribus/pageitem.cpp
60,6 → 60,7
#include "scribusdoc.h"
#include "scribusstructs.h"
#include "scribuswin.h"
#include "sctextstream.h"
#include "selection.h"
#include "text/nlsconfig.h"
#include "undomanager.h"
/trunk/Scribus/scribus/scclocale.h
15,7 → 15,6
 
#include <QLocale>
#include <QString>
#include <QTextStream>
 
#include "scribusapi.h"
 
36,34 → 35,6
};
 
/**
This clas fixes a bug in QTextStream up to version Qt 4.4: using locale-aware strtod() for parsing double/float arguments
*/
class SCRIBUS_API ScTextStream
{
private:
QTextStream qts;
 
public:
ScTextStream() : qts() {}
ScTextStream(QIODevice* device) : qts(device) {}
ScTextStream(QString * string, QIODevice::OpenMode openMode = QIODevice::ReadWrite) : qts(string, openMode) {}
ScTextStream(QByteArray * array, QIODevice::OpenMode openMode = QIODevice::ReadWrite ) : qts(array, openMode) {}
 
ScTextStream & operator<< ( const QString & val );
ScTextStream & operator<< ( double val );
 
ScTextStream & operator>> ( QString & val );
ScTextStream & operator>> ( double & val );
ScTextStream & operator>> ( float & val );
ScTextStream & operator>> ( int & val );
 
QString readAll ();
QString readLine ( qint64 maxlen = 0 );
 
bool atEnd () const;
};
 
#endif // SCCLOCALE_H
 
 
/trunk/Scribus/scribus/scimgdataloader_ps.cpp
15,6 → 15,7
#include "scpaths.h"
#include "scribuscore.h"
#include "scimgdataloader_ps.h"
#include "sctextstream.h"
#include "prefsmanager.h"
#include "util.h"
#include "util_formats.h"
/trunk/Scribus/scribus/effectsdialog.cpp
32,6 → 32,7
#include "scclocale.h"
#include "scribusdoc.h"
#include "scrspinbox.h"
#include "sctextstream.h"
#include "shadebutton.h"
#include "util_color.h"
#include "util_icon.h"
/trunk/Scribus/scribus/scclocale.cpp
73,57 → 73,3
return that()->qLocale.toString(d);
}
 
ScTextStream & ScTextStream::operator<< ( const QString & val )
{
qts << val;
return *this;
}
 
ScTextStream & ScTextStream::operator<< ( double val )
{
qts << ScCLocale::toQStringC(val);
return *this;
}
 
ScTextStream & ScTextStream::operator>> ( QString & val )
{
qts >> val;
return *this;
}
 
ScTextStream & ScTextStream::operator>> ( double & val )
{
QString s;
qts >> s;
val = ScCLocale::toDoubleC(s);
return *this;
}
 
ScTextStream & ScTextStream::operator>> ( float & val )
{
QString s;
qts >> s;
val = ScCLocale::toFloatC(s);
return *this;
}
 
ScTextStream & ScTextStream::operator>> ( int & val )
{
qts >> val;
return *this;
}
 
QString ScTextStream::readAll ()
{
return qts.readAll();
}
 
QString ScTextStream::readLine ( qint64 maxlen )
{
return qts.readLine(maxlen);
}
 
bool ScTextStream::atEnd () const
{
return qts.atEnd();
}
/trunk/Scribus/scribus/scimage.cpp
18,6 → 18,7
#include "scimgdataloader_pdf.h"
#include "scimgdataloader_qt.h"
#include "scimgdataloader_tiff.h"
#include "sctextstream.h"
#include <QMessageBox>
#include <QList>
#include <QByteArray>
/trunk/Scribus/scribus/util_color.cpp
29,6 → 29,7
#include "scribusdoc.h"
#include "scpixmapcache.h"
#include "commonstrings.h"
#include "sctextstream.h"
#include "sccolorengine.h"
#include "fileloader.h"
#include "plugins/formatidlist.h"
/trunk/Scribus/scribus/plugins/aiimplugin/importai.cpp
45,6 → 45,7
#include "scribusXml.h"
#include "scribuscore.h"
#include "scribusdoc.h"
#include "sctextstream.h"
#include "selection.h"
#include "text/specialchars.h"
#include "undomanager.h"
/trunk/Scribus/scribus/plugins/xfigimplugin/importxfig.cpp
42,6 → 42,7
#include "scribus.h"
#include "scribusXml.h"
#include "scribuscore.h"
#include "sctextstream.h"
#include "selection.h"
#include "undomanager.h"
#include "util.h"
/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
16,7 → 16,7
#include "scribusdoc.h"
#include "scribusview.h"
#include "scribuscore.h"
 
#include "sctextstream.h"
#include "units.h"
#include "util.h"
#include "util_color.h"
/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
14,6 → 14,7
#include "scconfig.h"
#include "scribusdoc.h"
#include "scribusview.h"
#include "sctextstream.h"
#include "sccolorengine.h"
 
#include "units.h"
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
16,6 → 16,7
#include "scpattern.h"
#include "scribusdoc.h"
#include "scribusview.h"
#include "sctextstream.h"
#include "sccolorengine.h"
#include "hyphenator.h"
#include "pageitem_latexframe.h"
/trunk/Scribus/scribus/plugins/psimport/importps.cpp
38,6 → 38,7
#include "scribus.h"
#include "scribusXml.h"
#include "scribuscore.h"
#include "sctextstream.h"
#include "selection.h"
#include "undomanager.h"
#include "util.h"
/trunk/Scribus/scribus/scpreview.cpp
28,6 → 28,7
#include "scclocale.h"
#include "scribus.h"
#include "scribuscore.h"
#include "sctextstream.h"
#include "splash.h"
#include "util.h"
#include "util_math.h"
/trunk/Scribus/scribus/CMakeLists.txt
551,6 → 551,7
scstreamfilter_rc4.cpp
sctablewidget.cpp
sctextbrowser.cpp
sctextstream.cpp
sctextstruct.cpp
sctoolbar.cpp
sctreewidget.cpp