Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 13496 → Rev 13497

/trunk/Scribus/scribus/fileloader.cpp
406,13 → 406,13
ParagraphStyle::TabRecord tb;
QString tmp = pg.attribute("TABS");
QTextStream tgv(&tmp, QIODevice::ReadOnly);
double xf, xf2;
QString xf, xf2;
for (int cxv = 0; cxv < pg.attribute("NUMTAB", "0").toInt(); cxv += 2)
{
tgv >> xf;
tgv >> xf2;
tb.tabPosition = xf2;
tb.tabType = static_cast<int>(xf);
tb.tabPosition = ScCLocale::toDoubleC(xf2);
tb.tabType = static_cast<int>(ScCLocale::toDoubleC(xf));
tb.tabFillChar = QChar();
tbs.append(tb);
}
518,6 → 518,7
ResourceCollection repl;
repl.availableFonts = currDoc->AllFonts;
repl.mapFonts(ReplacedFonts);
repl.setUpdateSubstitutedFonts(true);
currDoc->replaceNamedResources(repl);
return true;
}
/trunk/Scribus/scribus/pageitem.cpp
48,6 → 48,7
#include "prefsmanager.h"
#include "propertiespalette.h"
#include "resourcecollection.h"
#include "scclocale.h"
#include "sccolorengine.h"
#include "scconfig.h"
#include "scpainter.h"
3794,7 → 3795,7
{
QString tmpstr = effectsInUse.at(a).effectParameters;
QString tmpstr2 = "";
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
switch (effectsInUse.at(a).effectCode)
{
case ScImage::EF_QUADTONE:
3957,7 → 3958,7
for (int a = 0; a < effectsInUse.count(); ++a)
{
QString tmpstr = effectsInUse.at(a).effectParameters;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
switch (effectsInUse.at(a).effectCode)
{
case ScImage::EF_QUADTONE:
5554,3 → 5555,4
 
 
 
 
/trunk/Scribus/scribus/curvewidget.cpp
26,6 → 26,7
#include "customfdialog.h"
#include "prefsfile.h"
#include "prefsmanager.h"
#include "scclocale.h"
#include "util.h"
#include "util_color.h"
#include "util_icon.h"
430,8 → 431,11
fp >> numVals;
for (int nv = 0; nv < numVals; nv++)
{
fp >> xval;
fp >> yval;
QString s;
fp >> s;
xval = ScCLocale::toDoubleC(s);
fp >> s;
yval = ScCLocale::toDoubleC(s);
curve.addPoint(xval, yval);
}
cDisplay->setCurve(curve);
513,3 → 517,4
saveButton->setToolTip( tr( "Saves this curve" ) );
}
 
 
/trunk/Scribus/scribus/scclocale.h
15,11 → 15,15
 
#include <QLocale>
#include <QString>
#include <QTextStream>
 
#include "scribusapi.h"
 
class SCRIBUS_API ScCLocale : public QLocale
class SCRIBUS_API ScCLocale
{
ScCLocale();
QLocale qLocale;
 
static ScCLocale * m_instance;
static ScCLocale * that();
32,5 → 36,34
};
 
/**
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
10,8 → 10,8
#include <QFile>
#include <QFileInfo>
#include <QRegExp>
#include <QTextStream>
 
#include "scclocale.h"
#include "scpaths.h"
#include "scribuscore.h"
#include "scimgdataloader_ps.h"
115,7 → 115,7
if (tmp.startsWith("%%BeginFont:"))
{
tmp = tmp.remove("%%BeginFont:");
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ScTextStream ts2(&tmp, QIODevice::ReadOnly);
QString tmp2;
ts2 >> tmp2;
FontListe.removeAll(tmp2);
252,7 → 252,7
int endNam = tmp.indexOf(")");
QString plateNam = tmp.left(endNam);
tmp = tmp.remove(plateNam+")");
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ScTextStream ts2(&tmp, QIODevice::ReadOnly);
QString posStr, dummy, lenStr;
ts2 >> dummy >> posStr >> lenStr;
if (dummy == "EPS")
285,7 → 285,7
if (tmp.startsWith("%%DocumentFonts:"))
{
tmp = tmp.remove("%%DocumentFonts:");
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ScTextStream ts2(&tmp, QIODevice::ReadOnly);
QString tmp2;
ts2 >> tmp2;
if (!tmp2.contains("(atend)"))
302,7 → 302,7
break;
}
tmp = tmp.remove(0,3);
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ScTextStream ts2(&tmp, QIODevice::ReadOnly);
QString tmp2;
ts2 >> tmp2;
if (!tmp2.isEmpty())
315,7 → 315,7
if (tmp.startsWith("%%CMYKCustomColor"))
{
tmp = tmp.remove(0,18);
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ScTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> c >> m >> y >> k;
FarNam = ts2.readAll();
FarNam = FarNam.trimmed();
334,7 → 334,7
break;
}
tmp = tmp.remove(0,3);
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ScTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> c >> m >> y >> k;
FarNam = ts2.readAll();
FarNam = FarNam.trimmed();
359,7 → 359,7
{
hasPhotoshopImageData = true;
tmp.remove("%ImageData: ");
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ScTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> psXSize >> psYSize >> psDepth >> psMode >> psChannel >> psBlock >> psDataType >> psCommand;
psCommand = psCommand.remove(0,1);
psCommand = psCommand.remove(psCommand.length()-1,1);
375,7 → 375,7
QDataStream strPhot( &psdata, QIODevice::ReadOnly);
strPhot.setByteOrder( QDataStream::BigEndian );
PSDHeader fakeHeader;
QTextStream ts2(&BBox, QIODevice::ReadOnly);
ScTextStream ts2(&BBox, QIODevice::ReadOnly);
ts2 >> x >> y >> b >> h;
fakeHeader.width = qRound(b);
fakeHeader.height = qRound(h);
506,7 → 506,7
}
if ((thumbnail) && (m_imageInfoRecord.exifDataValid) && (!m_imageInfoRecord.exifInfo.thumbnail.isNull()))
{
QTextStream ts2(&BBox, QIODevice::ReadOnly);
ScTextStream ts2(&BBox, QIODevice::ReadOnly);
ts2 >> x >> y >> b >> h;
m_imageInfoRecord.exifInfo.width = qRound(b);
m_imageInfoRecord.exifInfo.height = qRound(h);
553,7 → 553,7
loadPhotoshop(fn, gsRes);
else if ((!m_imageInfoRecord.isEmbedded) || ((m_imageInfoRecord.isEmbedded) && (m_profileComponents == 3)))
{
QTextStream ts2(&BBox, QIODevice::ReadOnly);
ScTextStream ts2(&BBox, QIODevice::ReadOnly);
ts2 >> x >> y >> b >> h;
QStringList args;
xres = gsRes;
624,7 → 624,7
}
else
{
QTextStream ts2(&BBox, QIODevice::ReadOnly);
ScTextStream ts2(&BBox, QIODevice::ReadOnly);
ts2 >> x >> y >> b >> h;
h = h * gsRes / 72.0;
QStringList args;
717,7 → 717,7
int GsMajor;
int GsMinor;
getNumericGSVersion(GsMajor, GsMinor);
QTextStream ts2(&BBox, QIODevice::ReadOnly);
ScTextStream ts2(&BBox, QIODevice::ReadOnly);
ts2 >> x >> y >> b >> h;
h = h * gsRes / 72.0;
if (extensionIndicatesEPS(ext))
1121,7 → 1121,7
void ScImgDataLoader_PS::loadPhotoshopBinary(QString fn)
{
double x, y, b, h;
QTextStream ts2(&BBox, QIODevice::ReadOnly);
ScTextStream ts2(&BBox, QIODevice::ReadOnly);
ts2 >> x >> y >> b >> h;
QFileInfo fi = QFileInfo(fn);
QString ext = fi.suffix().toLower();
1251,7 → 1251,7
void ScImgDataLoader_PS::loadPhotoshopBinary(QString fn, QImage &tmpImg)
{
double x, y, b, h;
QTextStream ts2(&BBox, QIODevice::ReadOnly);
ScTextStream ts2(&BBox, QIODevice::ReadOnly);
ts2 >> x >> y >> b >> h;
QFileInfo fi = QFileInfo(fn);
QString ext = fi.suffix().toLower();
1381,7 → 1381,7
QString picFile = QDir::convertSeparators(fn);
float xres = gsRes;
float yres = gsRes;
QTextStream ts2(&BBox, QIODevice::ReadOnly);
ScTextStream ts2(&BBox, QIODevice::ReadOnly);
ts2 >> x >> y >> b >> h;
xres = gsRes;
yres = gsRes;
1494,7 → 1494,7
QString picFile;
float xres = gsRes;
float yres = gsRes;
QTextStream ts2(&BBox, QIODevice::ReadOnly);
ScTextStream ts2(&BBox, QIODevice::ReadOnly);
ts2 >> x >> y >> b >> h;
xres = gsRes;
yres = gsRes;
1631,7 → 1631,7
found = parseData(fn);
if (found)
{
QTextStream ts2(&BBox, QIODevice::ReadOnly);
ScTextStream ts2(&BBox, QIODevice::ReadOnly);
ts2 >> x >> y >> b >> h;
h = h * gsRes / 72.0;
QStringList args;
/trunk/Scribus/scribus/effectsdialog.cpp
23,7 → 23,6
#include <QWidgetAction>
#include <QTime>
#include <QStackedWidget>
#include <QTextStream>
 
#include "cmsettings.h"
#include "colorcombo.h"
30,6 → 29,7
#include "curvewidget.h"
#include "page.h"
#include "sccombobox.h"
#include "scclocale.h"
#include "scribusdoc.h"
#include "scrspinbox.h"
#include "shadebutton.h"
540,9 → 540,10
{
usedEffects->addItem( tr("Blur"));
QString tmpstr = effectsList.at(a).effectParameters;
double radius;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> radius;
double radius = ScCLocale::toDoubleC(tmpstr);
// surely we dont need to do it this way, do we? - av
//ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
//fp >> radius;
blRadius->setValue(radius / imageScale);
effectValMap.insert(usedEffects->item(usedEffects->count()-1), QString("%1 1.0").arg(radius / imageScale));
}
964,6 → 965,7
 
void EffectsDialog::selectEffect(QListWidgetItem* c)
{
QString s;
toEffects->setEnabled(false);
selectEffectHelper();
if (c)
989,7 → 991,7
QString tmpstr = effectValMap[c];
QString col;
int shading;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
// fp >> col;
col = fp.readLine();
fp >> shading;
1010,7 → 1012,7
QString tmpstr = effectValMap[c];
QString col1, col2;
int shading1, shading2;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
col1 = fp.readLine();
col2 = fp.readLine();
fp >> shading1;
1026,8 → 1028,10
fp >> numVals;
for (int nv = 0; nv < numVals; nv++)
{
fp >> xval;
fp >> yval;
fp >> s;
xval = ScCLocale::toDoubleC(s);
fp >> s;
yval = ScCLocale::toDoubleC(s);
curve.addPoint(xval, yval);
}
CurveD1->cDisplay->setCurve(curve);
1038,8 → 1042,10
fp >> numVals;
for (int nv = 0; nv < numVals; nv++)
{
fp >> xval;
fp >> yval;
fp >> s;
xval = ScCLocale::toDoubleC(s);
fp >> s;
yval = ScCLocale::toDoubleC(s);
curve.addPoint(xval, yval);
}
CurveD2->cDisplay->setCurve(curve);
1067,7 → 1073,7
QString tmpstr = effectValMap[c];
QString col1, col2, col3;
int shading1, shading2, shading3;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
col1 = fp.readLine();
col2 = fp.readLine();
col3 = fp.readLine();
1087,8 → 1093,10
fp >> numVals;
for (int nv = 0; nv < numVals; nv++)
{
fp >> xval;
fp >> yval;
fp >> s;
xval = ScCLocale::toDoubleC(s);
fp >> s;
yval = ScCLocale::toDoubleC(s);
curve.addPoint(xval, yval);
}
CurveT1->cDisplay->setCurve(curve);
1099,8 → 1107,10
fp >> numVals;
for (int nv = 0; nv < numVals; nv++)
{
fp >> xval;
fp >> yval;
fp >> s;
xval = ScCLocale::toDoubleC(s);
fp >> s;
yval = ScCLocale::toDoubleC(s);
curve.addPoint(xval, yval);
}
CurveT2->cDisplay->setCurve(curve);
1110,8 → 1120,10
fp >> numVals;
for (int nv = 0; nv < numVals; nv++)
{
fp >> xval;
fp >> yval;
fp >> s;
xval = ScCLocale::toDoubleC(s);
fp >> s;
yval = ScCLocale::toDoubleC(s);
curve.addPoint(xval, yval);
}
CurveT3->cDisplay->setCurve(curve);
1145,7 → 1157,7
QString tmpstr = effectValMap[c];
QString col1, col2, col3, col4;
int shading1, shading2, shading3, shading4;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
col1 = fp.readLine();
col2 = fp.readLine();
col3 = fp.readLine();
1169,8 → 1181,10
fp >> numVals;
for (int nv = 0; nv < numVals; nv++)
{
fp >> xval;
fp >> yval;
fp >> s;
xval = ScCLocale::toDoubleC(s);
fp >> s;
yval = ScCLocale::toDoubleC(s);
curve.addPoint(xval, yval);
}
CurveQ1->cDisplay->setCurve(curve);
1181,8 → 1195,10
fp >> numVals;
for (int nv = 0; nv < numVals; nv++)
{
fp >> xval;
fp >> yval;
fp >> s;
xval = ScCLocale::toDoubleC(s);
fp >> s;
yval = ScCLocale::toDoubleC(s);
curve.addPoint(xval, yval);
}
CurveQ2->cDisplay->setCurve(curve);
1192,8 → 1208,10
fp >> numVals;
for (int nv = 0; nv < numVals; nv++)
{
fp >> xval;
fp >> yval;
fp >> s;
xval = ScCLocale::toDoubleC(s);
fp >> s;
yval = ScCLocale::toDoubleC(s);
curve.addPoint(xval, yval);
}
CurveQc3->cDisplay->setCurve(curve);
1203,8 → 1221,10
fp >> numVals;
for (int nv = 0; nv < numVals; nv++)
{
fp >> xval;
fp >> yval;
fp >> s;
xval = ScCLocale::toDoubleC(s);
fp >> s;
yval = ScCLocale::toDoubleC(s);
curve.addPoint(xval, yval);
}
CurveQ4->cDisplay->setCurve(curve);
1230,7 → 1250,7
disconnect( brightnessSlider, SIGNAL(sliderReleased()), this, SLOT(createPreview()));
QString tmpstr = effectValMap[c];
int brightness;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> brightness;
brightnessSlider->setValue(brightness);
QString tmp;
1246,7 → 1266,7
disconnect( contrastSlider, SIGNAL(sliderReleased()), this, SLOT(createPreview()));
QString tmpstr = effectValMap[c];
int contrast;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> contrast;
contrastSlider->setValue(contrast);
QString tmp;
1262,9 → 1282,11
disconnect( shValue, SIGNAL(valueChanged(double)), this, SLOT(createPreview()));
QString tmpstr = effectValMap[c];
double radius, sigma;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> radius;
fp >> sigma;
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> s;
radius = ScCLocale::toDoubleC(s);
fp >> s;
sigma = ScCLocale::toDoubleC(s);
shRadius->setValue(radius);
shValue->setValue(sigma);
optionStack->setCurrentIndex(4);
1276,8 → 1298,9
disconnect( blRadius, SIGNAL(valueChanged(double)), this, SLOT(createPreview()));
QString tmpstr = effectValMap[c];
double radius;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> radius;
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> s;
radius = ScCLocale::toDoubleC(s);
blRadius->setValue(radius);
optionStack->setCurrentIndex(5);
connect( blRadius, SIGNAL(valueChanged(double)), this, SLOT(createPreview()));
1288,7 → 1311,7
disconnect( solarizeSlider, SIGNAL(sliderReleased()), this, SLOT(createPreview()));
QString tmpstr = effectValMap[c];
int solarize;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> solarize;
solarizeSlider->setValue(solarize);
QString tmp;
1302,7 → 1325,7
{
disconnect( Kdisplay->cDisplay, SIGNAL(modified()), this, SLOT(createPreview()));
QString tmpstr = effectValMap[c];
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
int numVals;
double xval, yval;
FPointArray curve;
1310,8 → 1333,10
fp >> numVals;
for (int nv = 0; nv < numVals; nv++)
{
fp >> xval;
fp >> yval;
fp >> s;
xval = ScCLocale::toDoubleC(s);
fp >> s;
yval = ScCLocale::toDoubleC(s);
curve.addPoint(xval, yval);
}
Kdisplay->cDisplay->setCurve(curve);
/trunk/Scribus/scribus/scclocale.cpp
15,9 → 15,9
 
ScCLocale * ScCLocale::m_instance = 0;
ScCLocale::ScCLocale()
:QLocale(QLocale::C)
:qLocale(QLocale::C)
{
setNumberOptions(QLocale::OmitGroupSeparator);
qLocale.setNumberOptions(QLocale::OmitGroupSeparator);
}
 
ScCLocale * ScCLocale::that()
32,7 → 32,7
 
double ScCLocale::toDoubleC(const QString & str, bool * ok)
{
double ret( that()->toDouble(str, ok) );
double ret( that()->qLocale.toDouble(str, ok) );
return ret;
}
 
51,7 → 51,7
 
float ScCLocale::toFloatC(const QString & str, bool * ok)
{
double ret( that()->toFloat(str, ok) );
double ret( that()->qLocale.toFloat(str, ok) );
return ret;
}
 
70,5 → 70,60
 
QString ScCLocale::toQStringC(double d)
{
return that()->toString(d);
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
6,6 → 6,7
*/
 
#include "cmsettings.h"
#include "scclocale.h"
#include "scimage.h"
#include "scribus.h"
#include "scpaths.h"
18,7 → 19,6
#include "scimgdataloader_qt.h"
#include "scimgdataloader_tiff.h"
#include <QMessageBox>
#include <QTextStream>
#include <QList>
#include <QByteArray>
#include <cassert>
152,7 → 152,7
QString tmpstr = effectsList.at(a).effectParameters;
QString col = CommonStrings::None;
int shading = 100;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
// fp >> col;
col = fp.readLine();
fp >> shading;
162,7 → 162,7
{
QString tmpstr = effectsList.at(a).effectParameters;
int brightnessValue = 0;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> brightnessValue;
brightness(brightnessValue, cmyk);
}
170,7 → 170,7
{
QString tmpstr = effectsList.at(a).effectParameters;
int contrastValue = 0;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> contrastValue;
contrast(contrastValue, cmyk);
}
178,7 → 178,7
{
QString tmpstr = effectsList.at(a).effectParameters;
double radius, sigma;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> radius;
fp >> sigma;
sharpen(radius, sigma);
187,7 → 187,7
{
QString tmpstr = effectsList.at(a).effectParameters;
double radius, sigma;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> radius;
fp >> sigma;
blur(static_cast<int>(radius));
196,7 → 196,7
{
QString tmpstr = effectsList.at(a).effectParameters;
double sigma;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> sigma;
solarize(sigma, cmyk);
}
207,7 → 207,7
int shading1 = 100;
QString col2 = CommonStrings::None;
int shading2 = 100;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
col1 = fp.readLine();
col2 = fp.readLine();
fp >> shading1;
247,7 → 247,7
int shading1 = 100;
int shading2 = 100;
int shading3 = 100;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
col1 = fp.readLine();
col2 = fp.readLine();
col3 = fp.readLine();
302,7 → 302,7
int shading2 = 100;
int shading3 = 100;
int shading4 = 100;
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
col1 = fp.readLine();
col2 = fp.readLine();
col3 = fp.readLine();
366,7 → 366,7
double xval, yval;
FPointArray curve;
curve.resize(0);
QTextStream fp(&tmpstr, QIODevice::ReadOnly);
ScTextStream fp(&tmpstr, QIODevice::ReadOnly);
fp >> numVals;
for (int nv = 0; nv < numVals; nv++)
{
/trunk/Scribus/scribus/util_color.cpp
25,6 → 25,7
#include <QPainter>
#include "util_color.h"
#include "scconfig.h"
#include "scclocale.h"
#include "scribusdoc.h"
#include "scpixmapcache.h"
#include "commonstrings.h"
610,7 → 611,7
tmp = tmp.remove(0,18);
else if (tmp.startsWith("%%CMYKProcessColor"))
tmp = tmp.remove(0,19);
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ScTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> c >> m >> y >> k;
FarNam = ts2.readAll();
FarNam = FarNam.trimmed();
631,7 → 632,7
break;
}
tmp = tmp.remove(0,3);
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ScTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> c >> m >> y >> k;
FarNam = ts2.readAll();
FarNam = FarNam.trimmed();
652,7 → 653,7
else
{
tmp = tmp.remove(0,17);
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ScTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> c >> m >> y;
FarNam = ts2.readAll();
FarNam = FarNam.trimmed();
672,7 → 673,7
break;
}
tmp = tmp.remove(0,3);
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ScTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> c >> m >> y;
FarNam = ts2.readAll();
FarNam = FarNam.trimmed();
695,7 → 696,7
tmp = readLinefromDataStream(ts);
if ((tmp.endsWith("Xa") || tmp.endsWith(" k") || tmp.endsWith(" x")) && (tmp.length() > 4))
{
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ScTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> c >> m >> y >> k;
if (tmp.endsWith(" x"))
{
755,7 → 756,7
{
QString ColorEn, Cname;
int Rval, Gval, Bval, Kval;
QTextStream tsC(&fiC);
ScTextStream tsC(&fiC);
ColorEn = tsC.readLine();
bool cus = false;
if (ColorEn.contains("OpenOffice"))
811,7 → 812,7
if (ColorEn.startsWith("GIMP Palette"))
{
ColorEn = tsC.readLine();
QTextStream CoE(&ColorEn, QIODevice::ReadOnly);
ScTextStream CoE(&ColorEn, QIODevice::ReadOnly);
CoE >> dummy >> paletteName;
}
while (!tsC.atEnd())
820,7 → 821,7
ColorEn = tsC.readLine();
if (ColorEn.length()>0 && ColorEn[0]==QChar('#'))
continue;
QTextStream CoE(&ColorEn, QIODevice::ReadOnly);
ScTextStream CoE(&ColorEn, QIODevice::ReadOnly);
CoE >> Rval;
CoE >> Gval;
CoE >> Bval;
/trunk/Scribus/scribus/plugins/aiimplugin/importai.cpp
14,7 → 14,6
#include <QRegExp>
#include <QStack>
#include <QStack>
#include <QTextStream>
#include <QTemporaryFile>
#include <QDebug>
 
598,8 → 597,10
QStringList bb = BBox.split(" ", QString::SkipEmptyParts);
if (bb.count() == 4)
{
QTextStream ts2(&BBox, QIODevice::ReadOnly);
ts2 >> x >> y >> b >> h;
x = ScCLocale::toDoubleC(bb[0]);
y = ScCLocale::toDoubleC(bb[1]);
b = ScCLocale::toDoubleC(bb[2]);
h = ScCLocale::toDoubleC(bb[3]);
}
}
importColorsFromFile(fName, CustColors);
628,7 → 629,7
double c, m, y, k;
ScColor tmp;
ColorList::Iterator it;
QTextStream Code(&data, QIODevice::ReadOnly);
ScTextStream Code(&data, QIODevice::ReadOnly);
bool found = false;
Code >> c;
Code >> m;
673,7 → 674,7
double k;
ScColor tmp;
ColorList::Iterator it;
QTextStream Code(&data, QIODevice::ReadOnly);
ScTextStream Code(&data, QIODevice::ReadOnly);
bool found = false;
Code >> k;
int Kc = 255 - qRound(k * 255);
712,7 → 713,7
double r, g, b;
ScColor tmp;
ColorList::Iterator it;
QTextStream Code(&data, QIODevice::ReadOnly);
ScTextStream Code(&data, QIODevice::ReadOnly);
bool found = false;
Code >> r;
Code >> g;
755,7 → 756,7
double c, m, y, k, sh;
ScColor tmp;
ColorList::Iterator it;
QTextStream Code(&data, QIODevice::ReadOnly);
ScTextStream Code(&data, QIODevice::ReadOnly);
bool found = false;
Code >> c;
Code >> m;
767,7 → 768,7
QString FarNam = data.mid(an+1, en-an-1);
FarNam.remove("\\");
QString FarSha = data.mid(en+1, data.size() - en);
QTextStream Val(&FarSha, QIODevice::ReadOnly);
ScTextStream Val(&FarSha, QIODevice::ReadOnly);
Val >> sh;
shade = (1.0 - sh) * 100.0;
int Cc = qRound(c * 255);
808,7 → 809,7
double c, m, y, k, sh, r, g, b;
ScColor tmp;
ColorList::Iterator it;
QTextStream Code(&data, QIODevice::ReadOnly);
ScTextStream Code(&data, QIODevice::ReadOnly);
bool found = false;
if (type == "1")
{
866,7 → 867,7
QString FarNam = data.mid(an+1, en-an-1);
FarNam.remove("\\");
QString FarSha = data.mid(en+1, data.size() - en);
QTextStream Val(&FarSha, QIODevice::ReadOnly);
ScTextStream Val(&FarSha, QIODevice::ReadOnly);
Val >> sh;
shade = (1.0 - sh) * 100.0;
if (!found)
1036,7 → 1037,7
/* Start Path construction commands */
if (command == "m")
{
QTextStream ts2(&Cdata, QIODevice::ReadOnly);
ScTextStream ts2(&Cdata, QIODevice::ReadOnly);
ts2 >> x >> y;
Coords.svgMoveTo(x - docX, docHeight - (y - docY));
currentPoint = FPoint(x - docX, docHeight - (y - docY));
1043,7 → 1044,7
}
else if ((command == "L") || (command == "l"))
{
QTextStream ts2(&Cdata, QIODevice::ReadOnly);
ScTextStream ts2(&Cdata, QIODevice::ReadOnly);
ts2 >> x >> y;
Coords.svgLineTo(x - docX, docHeight - (y - docY));
currentPoint = FPoint(x - docX, docHeight - (y - docY));
1050,7 → 1051,7
}
else if ((command == "C") || (command == "c"))
{
QTextStream ts2(&Cdata, QIODevice::ReadOnly);
ScTextStream ts2(&Cdata, QIODevice::ReadOnly);
ts2 >> x >> y >> x1 >> y1 >> x2 >> y2;
Coords.svgCurveToCubic(x - docX, docHeight - (y - docY),
x1 - docX, docHeight - (y1 - docY),
1059,7 → 1060,7
}
else if ((command == "Y") || (command == "y"))
{
QTextStream ts2(&Cdata, QIODevice::ReadOnly);
ScTextStream ts2(&Cdata, QIODevice::ReadOnly);
ts2 >> x1 >> y1 >> x2 >> y2;
Coords.svgCurveToCubic(currentPoint.x(), currentPoint.y(),
x1 - docX, docHeight - (y1 - docY),
1068,7 → 1069,7
}
else if ((command == "V") || (command == "v"))
{
QTextStream ts2(&Cdata, QIODevice::ReadOnly);
ScTextStream ts2(&Cdata, QIODevice::ReadOnly);
ts2 >> x >> y >> x2 >> y2;
Coords.svgCurveToCubic(x - docX, docHeight - (y - docY),
currentPoint.x(), currentPoint.y(),
1221,7 → 1222,7
/* Start Graphics state commands */
else if (command == "A")
{
QTextStream ts2(&Cdata, QIODevice::ReadOnly);
ScTextStream ts2(&Cdata, QIODevice::ReadOnly);
ts2 >> tmpInt;
if (tmpInt == 1)
itemLocked = true;
1230,12 → 1231,12
}
else if (command == "w")
{
QTextStream ts2(&Cdata, QIODevice::ReadOnly);
ScTextStream ts2(&Cdata, QIODevice::ReadOnly);
ts2 >> LineW;
}
else if (command == "j")
{
QTextStream ts2(&Cdata, QIODevice::ReadOnly);
ScTextStream ts2(&Cdata, QIODevice::ReadOnly);
ts2 >> tmpInt;
if (tmpInt == 0)
JoinStyle = Qt::MiterJoin;
1246,7 → 1247,7
}
else if (command == "J")
{
QTextStream ts2(&Cdata, QIODevice::ReadOnly);
ScTextStream ts2(&Cdata, QIODevice::ReadOnly);
ts2 >> tmpInt;
if (tmpInt == 0)
CapStyle = Qt::FlatCap;
1262,12 → 1263,12
*/
else if (command == "Xy")
{
QTextStream ts2(&Cdata, QIODevice::ReadOnly);
ScTextStream ts2(&Cdata, QIODevice::ReadOnly);
ts2 >> blendMode >> Opacity;
}
else if (command == "XR")
{
QTextStream ts2(&Cdata, QIODevice::ReadOnly);
ScTextStream ts2(&Cdata, QIODevice::ReadOnly);
ts2 >> tmpInt;
if (tmpInt == 1)
fillRule = true;
1284,7 → 1285,7
}
else if (command == "Xm")
{
QTextStream gVals(&Cdata, QIODevice::ReadOnly);
ScTextStream gVals(&Cdata, QIODevice::ReadOnly);
double m1, m2, m3, m4, m5, m6;
gVals >> m1 >> m2 >> m3 >> m4 >> m5 >> m6;
startMatrix.translate(m5, -m6);
1295,7 → 1296,7
{
if (m_gradients[currentGradientName].type() == 1)
{
QTextStream gVals(&Cdata, QIODevice::ReadOnly);
ScTextStream gVals(&Cdata, QIODevice::ReadOnly);
double m1, m2, m3, m4, m5, m6;
gVals >> m1 >> m2 >> m3 >> m4 >> m5 >> m6;
startMatrix.translate(m5, -m6);
1353,7 → 1354,7
currentGradientName = Cdata.mid(an+1, en-an-1);
currentGradientName.remove("\\");
QString tmpS = Cdata.mid(en+1, Cdata.size() - en);
QTextStream gVals(&tmpS, QIODevice::ReadOnly);
ScTextStream gVals(&tmpS, QIODevice::ReadOnly);
double xOrig, yOrig, m1, m2, m3, m4, m5, m6;
gVals >> xOrig >> yOrig >> currentGradientAngle >> currentGradientLenght >> m1 >> m2 >> m3 >> m4 >> m5 >> m6;
currentGradientOrigin = QPointF(xOrig - docX, docHeight - (yOrig - docY));
1405,7 → 1406,7
currentPatternName.remove("\\");
currentPatternName = currentPatternName.trimmed().simplified().replace(" ", "_");
QString tmpS = Cdata.mid(en+1, Cdata.size() - en);
QTextStream gVals(&tmpS, QIODevice::ReadOnly);
ScTextStream gVals(&tmpS, QIODevice::ReadOnly);
gVals >> currentPatternX >> currentPatternY >> currentPatternXScale >> currentPatternYScale >> currentPatternRotation;
}
else if (command == "X!")
1468,7 → 1469,7
QString cmdLine = Cdata.remove(0, an+1);
an = cmdLine.lastIndexOf("/");
QString tmpS = cmdLine.mid(an+1, Cdata.size());
QTextStream mVals(&tmpS, QIODevice::ReadOnly);
ScTextStream mVals(&tmpS, QIODevice::ReadOnly);
QString mKey;
mVals >> mKey;
if (mKey == "Size")
1476,7 → 1477,7
int ans = cmdLine.indexOf("[");
int ens = cmdLine.lastIndexOf("]");
QString sizeVals = cmdLine.mid(ans+1, ens-ans-1);
QTextStream mVals2(&sizeVals, QIODevice::ReadOnly);
ScTextStream mVals2(&sizeVals, QIODevice::ReadOnly);
mVals2 >> meshXSize >> meshYSize;
}
if (mKey == "P")
1484,7 → 1485,7
int ans = cmdLine.indexOf("[");
int ens = cmdLine.lastIndexOf("]");
QString posVals = cmdLine.mid(ans+1, ens-ans-1);
QTextStream mVals3(&posVals, QIODevice::ReadOnly);
ScTextStream mVals3(&posVals, QIODevice::ReadOnly);
mVals3 >> currentMeshXPos >> currentMeshYPos;
accumColorC = 0.0;
accumColorM = 0.0;
1596,7 → 1597,7
int ans = cmdLine.indexOf("[");
int ens = cmdLine.lastIndexOf("]");
QString nodeVals = cmdLine.mid(ans+1, ens-ans-1);
QTextStream mVals4(&nodeVals, QIODevice::ReadOnly);
ScTextStream mVals4(&nodeVals, QIODevice::ReadOnly);
kVal = 0.0;
if (meshColorMode == 0)
mVals4 >> cVal >> mVal >> yVal >> kVal >> coorX1 >> coorY1 >> coorX2 >> coorY2 >> dummy >> coorX3 >> coorY3;
1651,7 → 1652,7
if (importerFlags & LoadSavePlugin::lfCreateDoc)
{
int visible, preview, enabled, printing, dummy, rc, gc, bc;
QTextStream ts2(&Cdata, QIODevice::ReadOnly);
ScTextStream ts2(&Cdata, QIODevice::ReadOnly);
ts2 >> visible >> preview >> enabled >> printing >> dummy >> dummy >> dummy >> rc >> gc >> bc;
if (!firstLayer)
currentLayer = m_Doc->addLayer("Layer", true);
1685,7 → 1686,7
/* Start Text commands */
else if (command == "To")
{
QTextStream ts2(&Cdata, QIODevice::ReadOnly);
ScTextStream ts2(&Cdata, QIODevice::ReadOnly);
ts2 >> textMode;
textData.clear();
textMatrix = QMatrix();
1700,7 → 1701,7
}
else if (command == "Tp")
{
QTextStream gVals(&Cdata, QIODevice::ReadOnly);
ScTextStream gVals(&Cdata, QIODevice::ReadOnly);
double m1, m2, m3, m4, m5, m6;
gVals >> m1 >> m2 >> m3 >> m4 >> m5 >> m6;
textMatrix = QMatrix(m1, m2, m3, m4, m5, m6);
1755,7 → 1756,7
{
int flag;
double val;
QTextStream gVals(&Cdata, QIODevice::ReadOnly);
ScTextStream gVals(&Cdata, QIODevice::ReadOnly);
gVals >> flag >> val;
if (flag == 1)
val = 0;
1766,13 → 1767,13
}
else if (command == "Tc")
{
QTextStream gVals(&Cdata, QIODevice::ReadOnly);
ScTextStream gVals(&Cdata, QIODevice::ReadOnly);
gVals >> textKern;
textKern *= 100.0;
}
else if (command == "Tz")
{
QTextStream gVals(&Cdata, QIODevice::ReadOnly);
ScTextStream gVals(&Cdata, QIODevice::ReadOnly);
gVals >> textScaleH >> textScaleV;
textScaleH *= 10.0;
textScaleV *= 10.0;
1807,7 → 1808,7
}
else if (command == "Tf")
{
QTextStream gVals(&Cdata, QIODevice::ReadOnly);
ScTextStream gVals(&Cdata, QIODevice::ReadOnly);
gVals >> textFont >> textSize;
textFont.remove(0, 2);
QString family = textFont;
1921,7 → 1922,7
currentPatternDefName.remove("\\");
currentPatternDefName = currentPatternDefName.trimmed().simplified().replace(" ", "_");
QString tmpS = Cdata.mid(en+1, Cdata.size() - en);
QTextStream gVals(&tmpS, QIODevice::ReadOnly);
ScTextStream gVals(&tmpS, QIODevice::ReadOnly);
gVals >> patternX1 >> patternY1 >> patternX2 >> patternY2;
}
}
2119,7 → 2120,7
QStringList da;
getCommands(cumulated, da);
Cdata = da[da.count()-1];
QTextStream gVals(&Cdata, QIODevice::ReadOnly);
ScTextStream gVals(&Cdata, QIODevice::ReadOnly);
gVals >> m1 >> m2 >> m3 >> m4 >> m5 >> m6 >> x1 >> y1 >> x2 >> y2 >> w >> h >> bits >> type >> alpha >> dummy >> bin;
// qDebug() << QString("Matrix: %1 %2 %3 %4 %5 %6").arg(m1).arg(m2).arg(m3).arg(m4).arg(m5).arg(m6);
// qDebug() << QString("Bounds: %1 %2 %3 %4").arg(x1).arg(y1).arg(x2).arg(y2);
2136,7 → 2137,7
if (tmp.startsWith("%%BeginData"))
{
QString dummyS;
QTextStream gVals2(&tmp, QIODevice::ReadOnly);
ScTextStream gVals2(&tmp, QIODevice::ReadOnly);
tmp = readLinefromDataStream(ts);
}
QByteArray psdata;
/trunk/Scribus/scribus/plugins/xfigimplugin/importxfig.cpp
13,7 → 13,6
#include <QMimeData>
#include <QRegExp>
#include <QStack>
#include <QTextStream>
#include <QDebug>
 
#include <cmath>
33,6 → 32,7
#include "prefstable.h"
#include "propertiespalette.h"
#include "rawimage.h"
#include "scclocale.h"
#include "sccolorengine.h"
#include "scconfig.h"
#include "scmimedata.h"
419,7 → 419,7
int colorNum, dummy;
QString colorValues;
ScColor tmp;
QTextStream Code(&data, QIODevice::ReadOnly);
ScTextStream Code(&data, QIODevice::ReadOnly);
Code >> dummy >> colorNum >> colorValues;
tmp.setNamedColor(colorValues);
tmp.setSpotColor(false);
577,7 → 577,7
if (forward_arrow == 1)
{
arrow.resize(0);
QTextStream CodeAF(&fArrowData, QIODevice::ReadOnly);
ScTextStream CodeAF(&fArrowData, QIODevice::ReadOnly);
CodeAF >> arrow_typeAF >> arrow_styleAF >> arrow_thicknessAF >> arrow_widthAF >> arrow_heightAF;
arrow_widthAF = fig2Pts(arrow_widthAF);
arrow_heightAF = fig2Pts(arrow_heightAF);
636,7 → 636,7
if (backward_arrow == 1)
{
arrow.resize(0);
QTextStream CodeAB(&bArrowData, QIODevice::ReadOnly);
ScTextStream CodeAB(&bArrowData, QIODevice::ReadOnly);
CodeAB >> arrow_typeAB >> arrow_styleAB >> arrow_thicknessAB >> arrow_widthAB >> arrow_heightAB;
arrow_widthAB = fig2Pts(arrow_widthAB);
arrow_heightAB = fig2Pts(arrow_heightAB);
723,7 → 723,7
Coords.resize(0);
Coords.svgInit();
bool first = true;
QTextStream Code(&tmp, QIODevice::ReadOnly);
ScTextStream Code(&tmp, QIODevice::ReadOnly);
Code >> command >> subtype >> line_style >> thickness >> pen_color >> fill_color >> depth >> pen_style;
Code >> area_fill >> style_val >> join_style >> cap_style >> radius >> forward_arrow >> backward_arrow >> npoints;
if (forward_arrow == 1)
733,13 → 733,13
if (subtype == 5)
{
tmp = readLinefromDataStream(ts);
QTextStream imf(&tmp, QIODevice::ReadOnly);
ScTextStream imf(&tmp, QIODevice::ReadOnly);
imf >> imgFlipped >> imgFile;
}
while (!ts.atEnd())
{
tmp = readLinefromDataStream(ts);
QTextStream pts(&tmp, QIODevice::ReadOnly);
ScTextStream pts(&tmp, QIODevice::ReadOnly);
while (!pts.atEnd())
{
pts >> x >> y;
861,7 → 861,7
Coords.resize(0);
Coords.svgInit();
bool first = true;
QTextStream Code(&tmp, QIODevice::ReadOnly);
ScTextStream Code(&tmp, QIODevice::ReadOnly);
Code >> command >> subtype >> line_style >> thickness >> pen_color >> fill_color >> depth >> pen_style;
Code >> area_fill >> style_val >> cap_style >> forward_arrow >> backward_arrow >> npoints;
if (forward_arrow == 1)
871,7 → 871,7
while (!ts.atEnd())
{
tmp = readLinefromDataStream(ts);
QTextStream pts(&tmp, QIODevice::ReadOnly);
ScTextStream pts(&tmp, QIODevice::ReadOnly);
while (!pts.atEnd())
{
pts >> x >> y;
897,7 → 897,7
while (!ts.atEnd())
{
tmp = readLinefromDataStream(ts);
QTextStream pts(&tmp, QIODevice::ReadOnly);
ScTextStream pts(&tmp, QIODevice::ReadOnly);
while (!pts.atEnd())
{
pts >> x;
973,7 → 973,7
int x1, y1; // (Fig units, the 1st point the user entered)
int x2, y2; // (Fig units, the 2nd point)
int x3, y3; // (Fig units, the last point)
QTextStream Code(&tmp, QIODevice::ReadOnly);
ScTextStream Code(&tmp, QIODevice::ReadOnly);
Code >> command >> subtype >> line_style >> thickness >> pen_color >> fill_color >> depth >> pen_style;
Code >> area_fill >> style_val >> cap_style >> direction >> forward_arrow >> backward_arrow;
Code >> center_x >> center_y >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
1095,7 → 1095,7
int start_x, start_y; // (Fig units; the 1st point entered)
int end_x, end_y; // (Fig units; the last point entered)
double x, y, w, h;
QTextStream Code(&tmp, QIODevice::ReadOnly);
ScTextStream Code(&tmp, QIODevice::ReadOnly);
Code >> command >> subtype >> line_style >> thickness >> pen_color >> fill_color >> depth >> pen_style;
Code >> area_fill >> style_val >> direction >> angle >> center_x >> center_y >> radius_x >> radius_y;
Code >> start_x >> start_y >> end_x >> end_y;
1204,7 → 1204,7
// right corner of the string.)
QString text;
double x, y, w, h;
QTextStream Code(&tmp, QIODevice::ReadOnly);
ScTextStream Code(&tmp, QIODevice::ReadOnly);
Code >> command >> subtype >> color >> depth >> pen_style >> font >> font_size >> angle;
Code >> font_flags >> height >> length >> xT >> yT;
text = Code.readAll();
1452,7 → 1452,7
{
QString tmp = data;
int command, subtype;
QTextStream Code(&tmp, QIODevice::ReadOnly);
ScTextStream Code(&tmp, QIODevice::ReadOnly);
Code >> command >> subtype;
switch (command)
{
/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
25,7 → 25,6
#include <QFileInfo>
#include <QList>
#include <QByteArray>
#include <QTextStream>
#include <QApplication>
#include <QMessageBox>
 
500,7 → 499,7
if ((obj.hasAttribute("GROUPS")) && (obj.attribute("NUMGROUP", "0").toInt() != 0))
{
tmp = obj.attribute("GROUPS");
QTextStream fg(&tmp, QIODevice::ReadOnly);
ScTextStream fg(&tmp, QIODevice::ReadOnly);
OB.Groups.clear();
for (int cx = 0; cx < obj.attribute("NUMGROUP", "0").toInt(); ++cx)
{
954,7 → 953,7
{
OB->Clip.resize(obj->attribute("NUMCLIP").toUInt());
tmp = obj->attribute("CLIPCOOR");
QTextStream fc(&tmp, QIODevice::ReadOnly);
ScTextStream fc(&tmp, QIODevice::ReadOnly);
for (uint c=0; c<obj->attribute("NUMCLIP").toUInt(); ++c)
{
fc >> x;
969,7 → 968,7
{
OB->PoLine.resize(obj->attribute("NUMPO").toUInt());
tmp = obj->attribute("POCOOR");
QTextStream fp(&tmp, QIODevice::ReadOnly);
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx=0; cx<obj->attribute("NUMPO").toUInt(); ++cx)
{
fp >> xf;
984,7 → 983,7
{
OB->ContourLine.resize(obj->attribute("NUMCO").toUInt());
tmp = obj->attribute("COCOOR");
QTextStream fp(&tmp, QIODevice::ReadOnly);
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx=0; cx<obj->attribute("NUMCO").toUInt(); ++cx)
{
fp >> xf;
999,7 → 998,7
{
ParagraphStyle::TabRecord tb;
tmp = obj->attribute("TABS");
QTextStream tgv(&tmp, QIODevice::ReadOnly);
ScTextStream tgv(&tmp, QIODevice::ReadOnly);
OB->TabValues.clear();
for (int cxv = 0; cxv < obj->attribute("NUMTAB", "0").toInt(); cxv += 2)
{
1017,7 → 1016,7
if ((obj->hasAttribute("NUMDASH")) && (obj->attribute("NUMDASH", "0").toInt() != 0))
{
tmp = obj->attribute("DASHS");
QTextStream dgv(&tmp, QIODevice::ReadOnly);
ScTextStream dgv(&tmp, QIODevice::ReadOnly);
OB->DashValues.clear();
for (int cxv = 0; cxv < obj->attribute("NUMDASH", "0").toInt(); ++cxv)
{
1339,7 → 1338,7
if ((obj.hasAttribute("GROUPS")) && (obj.attribute("NUMGROUP", "0").toInt() != 0))
{
tmp = obj.attribute("GROUPS");
QTextStream fg(&tmp, QIODevice::ReadOnly);
ScTextStream fg(&tmp, QIODevice::ReadOnly);
OB.Groups.clear();
for (int cx = 0; cx < obj.attribute("NUMGROUP", "0").toInt(); ++cx)
{
1530,7 → 1529,7
QList<ParagraphStyle::TabRecord> tbs;
ParagraphStyle::TabRecord tb;
QString tmp = pg->attribute("TABS");
QTextStream tgv(&tmp, QIODevice::ReadOnly);
ScTextStream tgv(&tmp, QIODevice::ReadOnly);
for (int cxv = 0; cxv < pg->attribute("NUMTAB", "0").toInt(); cxv += 2)
{
tgv >> xf;
/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
29,7 → 29,6
#include <QFileInfo>
#include <QByteArray>
#include <QDataStream>
#include <QTextStream>
#include <QApplication>
#include <QMessageBox>
 
575,7 → 574,7
arrow.userArrow = true;
double xa, ya;
QString tmp = pg.attribute("Points");
QTextStream fp(&tmp, QIODevice::ReadOnly);
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx = 0; cx < pg.attribute("NumPoints").toUInt(); ++cx)
{
fp >> xa;
1931,7 → 1930,7
QList<ParagraphStyle::TabRecord> tbs;
ParagraphStyle::TabRecord tb;
QString tmp = pg.attribute("TABS");
QTextStream tgv(&tmp, QIODevice::ReadOnly);
ScTextStream tgv(&tmp, QIODevice::ReadOnly);
double xf, xf2;
for (int cxv = 0; cxv < pg.attribute("NUMTAB", "0").toInt(); cxv += 2)
{
2238,7 → 2237,7
{
ParagraphStyle::TabRecord tb;
tmp = obj->attribute("TABS");
QTextStream tgv(&tmp, QIODevice::ReadOnly);
ScTextStream tgv(&tmp, QIODevice::ReadOnly);
for (int cxv = 0; cxv < obj->attribute("NUMTAB", "0").toInt(); cxv += 2)
{
tgv >> xf;
2384,7 → 2383,7
if ((obj->hasAttribute("GROUPS")) && (obj->attribute("NUMGROUP", "0").toInt() != 0))
{
tmp = obj->attribute("GROUPS");
QTextStream fg(&tmp, QIODevice::ReadOnly);
ScTextStream fg(&tmp, QIODevice::ReadOnly);
currItem->Groups.clear();
for (int cx = 0; cx < obj->attribute("NUMGROUP", "0").toInt(); ++cx)
{
2398,7 → 2397,7
if ((obj->hasAttribute("NUMDASH")) && (obj->attribute("NUMDASH", "0").toInt() != 0))
{
tmp = obj->attribute("DASHS");
QTextStream dgv(&tmp, QIODevice::ReadOnly);
ScTextStream dgv(&tmp, QIODevice::ReadOnly);
currItem->DashValues.clear();
for (int cxv = 0; cxv < obj->attribute("NUMDASH", "0").toInt(); ++cxv)
{
2414,7 → 2413,7
{
currItem->PoLine.resize(obj->attribute("NUMPO").toUInt());
tmp = obj->attribute("POCOOR");
QTextStream fp(&tmp, QIODevice::ReadOnly);
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx=0; cx<obj->attribute("NUMPO").toUInt(); ++cx)
{
fp >> xf;
2429,7 → 2428,7
{
currItem->ContourLine.resize(obj->attribute("NUMCO").toUInt());
tmp = obj->attribute("COCOOR");
QTextStream fp(&tmp, QIODevice::ReadOnly);
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx=0; cx<obj->attribute("NUMCO").toUInt(); ++cx)
{
fp >> xf;
2666,7 → 2665,7
arrow.userArrow = true;
double xa, ya;
QString tmp = pg.attribute("Points");
QTextStream fp(&tmp, QIODevice::ReadOnly);
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx = 0; cx < pg.attribute("NumPoints").toUInt(); ++cx)
{
fp >> xa;
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
31,7 → 31,6
#include <QFileInfo>
#include <QList>
#include <QByteArray>
#include <QTextStream>
#include <QApplication>
 
 
591,7 → 590,7
arrow.userArrow = true;
double xa, ya;
QString tmp = pg.attribute("Points");
QTextStream fp(&tmp, QIODevice::ReadOnly);
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx = 0; cx < pg.attribute("NumPoints").toUInt(); ++cx)
{
fp >> xa;
1928,7 → 1927,7
QList<ParagraphStyle::TabRecord> tbs;
ParagraphStyle::TabRecord tb;
QString tmp = pg.attribute("TABS");
QTextStream tgv(&tmp, QIODevice::ReadOnly);
ScTextStream tgv(&tmp, QIODevice::ReadOnly);
double xf, xf2;
for (int cxv = 0; cxv < pg.attribute("NUMTAB", "0").toInt(); cxv += 2)
{
2452,7 → 2451,7
if ((obj->hasAttribute("GROUPS")) && (obj->attribute("NUMGROUP", "0").toInt() != 0))
{
tmp = obj->attribute("GROUPS");
QTextStream fg(&tmp, QIODevice::ReadOnly);
ScTextStream fg(&tmp, QIODevice::ReadOnly);
currItem->Groups.clear();
for (int cx = 0; cx < obj->attribute("NUMGROUP", "0").toInt(); ++cx)
{
2470,7 → 2469,7
{
ParagraphStyle::TabRecord tb;
tmp = obj->attribute("TABS");
QTextStream tgv(&tmp, QIODevice::ReadOnly);
ScTextStream tgv(&tmp, QIODevice::ReadOnly);
for (int cxv = 0; cxv < obj->attribute("NUMTAB", "0").toInt(); cxv += 2)
{
tgv >> xf;
2513,7 → 2512,7
if ((obj->hasAttribute("NUMDASH")) && (obj->attribute("NUMDASH", "0").toInt() != 0))
{
tmp = obj->attribute("DASHS");
QTextStream dgv(&tmp, QIODevice::ReadOnly);
ScTextStream dgv(&tmp, QIODevice::ReadOnly);
currItem->DashValues.clear();
for (int cxv = 0; cxv < obj->attribute("NUMDASH", "0").toInt(); ++cxv)
{
2529,7 → 2528,7
{
currItem->PoLine.resize(obj->attribute("NUMPO").toUInt());
tmp = obj->attribute("POCOOR");
QTextStream fp(&tmp, QIODevice::ReadOnly);
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx=0; cx<obj->attribute("NUMPO").toUInt(); ++cx)
{
fp >> xf;
2544,7 → 2543,7
{
currItem->ContourLine.resize(obj->attribute("NUMCO").toUInt());
tmp = obj->attribute("COCOOR");
QTextStream fp(&tmp, QIODevice::ReadOnly);
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx=0; cx<obj->attribute("NUMCO").toUInt(); ++cx)
{
fp >> xf;
2797,7 → 2796,7
arrow.userArrow = true;
double xa, ya;
QString tmp = pg.attribute("Points");
QTextStream fp(&tmp, QIODevice::ReadOnly);
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx = 0; cx < pg.attribute("NumPoints").toUInt(); ++cx)
{
fp >> xa;
3581,3 → 3580,4
 
 
 
 
/trunk/Scribus/scribus/plugins/psimport/importps.cpp
15,7 → 15,6
#include <QRegExp>
#include <QStack>
#include <QStack>
#include <QTextStream>
 
#include <cmath>
#include <cstdlib>
136,8 → 135,10
QStringList bb = BBox.split(" ", QString::SkipEmptyParts);
if (bb.count() == 4)
{
QTextStream ts2(&BBox, QIODevice::ReadOnly);
ts2 >> x >> y >> b >> h;
x = ScCLocale::toDoubleC(bb[0]);
y = ScCLocale::toDoubleC(bb[1]);
b = ScCLocale::toDoubleC(bb[2]);
h = ScCLocale::toDoubleC(bb[3]);
}
}
}
525,7 → 526,7
JoinStyle = Qt::MiterJoin;
CapStyle = Qt::FlatCap;
DashPattern.clear();
QTextStream ts(&f);
ScTextStream ts(&f);
int line_cnt = 0;
while (!ts.atEnd() && !cancel)
{
783,13 → 784,13
}
else if (token == "w")
{
QTextStream Lw(&params, QIODevice::ReadOnly);
ScTextStream Lw(&params, QIODevice::ReadOnly);
Lw >> LineW;
// currPath += params;
}
else if (token == "ld")
{
QTextStream Lw(&params, QIODevice::ReadOnly);
ScTextStream Lw(&params, QIODevice::ReadOnly);
Lw >> dc;
Lw >> DashOffset;
DashPattern.clear();
805,7 → 806,7
}
else if (token == "lc")
{
QTextStream Lw(&params, QIODevice::ReadOnly);
ScTextStream Lw(&params, QIODevice::ReadOnly);
Lw >> lcap;
switch (lcap)
{
826,7 → 827,7
}
else if (token == "lj")
{
QTextStream Lw(&params, QIODevice::ReadOnly);
ScTextStream Lw(&params, QIODevice::ReadOnly);
Lw >> ljoin;
switch (ljoin)
{
883,7 → 884,7
double x, y, w, h, angle;
int horpix, verpix;
QString filename, device;
QTextStream Code(&vals, QIODevice::ReadOnly);
ScTextStream Code(&vals, QIODevice::ReadOnly);
Code >> x;
Code >> y;
Code >> w;
1027,7 → 1028,7
double c, m, y, k, r, g, b;
ScColor tmp;
ColorList::Iterator it;
QTextStream Code(&vals, QIODevice::ReadOnly);
ScTextStream Code(&vals, QIODevice::ReadOnly);
bool found = false;
if (model == colorModelRGB)
{
/trunk/Scribus/scribus/scpreview.cpp
17,7 → 17,6
#include <QDir>
#include <QList>
#include <QPolygon>
#include <QTextStream>
#include <QPixmap>
#include <QTemporaryFile>
#include <cmath>
110,7 → 109,7
double xa, ya;
arrow.name = pg.attribute("Name");
QString tmp = pg.attribute("Points");
QTextStream fp(&tmp, QIODevice::ReadOnly);
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx = 0; cx < pg.attribute("NumPoints").toUInt(); ++cx)
{
fp >> xa;
313,7 → 312,7
{
OB.Clip.resize(pg.attribute("NUMCLIP").toUInt());
tmpx = pg.attribute("CLIPCOOR");
QTextStream f(&tmpx, QIODevice::ReadOnly);
ScTextStream f(&tmpx, QIODevice::ReadOnly);
for (uint c=0; c<pg.attribute("NUMCLIP").toUInt(); ++c)
{
f >> x;
327,7 → 326,7
{
OB.PoLine.resize(pg.attribute("NUMPO").toUInt());
tmpx = pg.attribute("POCOOR");
QTextStream fp(&tmpx, QIODevice::ReadOnly);
ScTextStream fp(&tmpx, QIODevice::ReadOnly);
for (uint cx=0; cx<pg.attribute("NUMPO").toUInt(); ++cx)
{
fp >> xf;
394,7 → 393,7
OB.itemText = tmpx;
if (!OB.itemText.isEmpty())
{
QTextStream t(&OB.itemText, QIODevice::ReadOnly);
ScTextStream t(&OB.itemText, QIODevice::ReadOnly);
QString cc;
#ifndef NLS_PROTO
while (!t.atEnd())
452,7 → 451,7
#endif
}
tmpx = GetAttr(&pg, "TEXTCOOR","0 0");
QTextStream ft(&tmpx, QIODevice::ReadOnly);
ScTextStream ft(&tmpx, QIODevice::ReadOnly);
for (uint ct=0; ct<GetAttr(&pg, "NUMTEXT","0").toUInt(); ct++)
{
#ifndef NLS_PROTO