Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 10003 → Rev 10004

/trunk/Scribus/scribus/helpbrowser.cpp
67,7 → 67,7
//Added by qt3to4:
#include <Q3HBoxLayout>
#include <Q3VBoxLayout>
 
#include <QTextStream>
#include "scpaths.h"
#include "util.h"
#include "scconfig.h"
423,8 → 423,8
QFile bookFile(bookmarkFile());
if (bookFile.open(QIODevice::WriteOnly))
{
Q3TextStream stream(&bookFile);
stream.setEncoding(Q3TextStream::UnicodeUTF8);
QTextStream stream(&bookFile);
stream.setCodec("UTF-8");
stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
stream << "<bookmarks>\n";
Q3ListViewItemIterator it(bookmarksView);
437,8 → 437,8
QFile histFile(historyFile());
if (histFile.open(QIODevice::WriteOnly))
{
Q3TextStream stream(&histFile);
stream.setEncoding(Q3TextStream::UnicodeUTF8);
QTextStream stream(&histFile);
stream.setCodec("UTF-8");
stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
stream << "<history>\n";
for (QMap<int,histd>::Iterator it = mHistory.begin() ; it != mHistory.end(); ++it)
798,8 → 798,8
QFile f(fname);
if (f.open(QIODevice::ReadOnly))
{
Q3TextStream stream(&f);
QString str = stream.read();
QTextStream stream(&f);
QString str = stream.readAll();
int cnt = str.count(searchingEdit->text(), Qt::CaseInsensitive);
if (cnt > 0)
{
/trunk/Scribus/scribus/serializer.cpp
25,7 → 25,6
#include "scribusdoc.h"
#include "pageitem.h"
#include <qfile.h>
#include <q3textstream.h>
#include <qtextcodec.h>
//Added by qt3to4:
#include <QByteArray>
/trunk/Scribus/scribus/prefsmanager.cpp
704,8 → 704,8
{
PrefsContext *pc = prefsFile->getContext("Fonts");
PrefsTable *fontPrefs = pc->getTable("ExtraFontDirs");
Q3TextStream tsx(&fontPrefsFile12);
QString extraPath = tsx.read();
QTextStream tsx(&fontPrefsFile12);
QString extraPath = tsx.readAll();
fontPrefsFile12.close();
QStringList extraFonts = QStringList::split("\n",extraPath);
for (int i = 0; i < extraFonts.count(); ++i)
1472,8 → 1472,8
}
else
{
Q3TextStream s(&f);
s.setEncoding(Q3TextStream::UnicodeUTF8);
QTextStream s(&f);
s.setCodec("UTF-8");
s<<docu.toString();
//Qt4 if (f.status() == IO_Ok)
if (f.error()==QFile::NoError)
1498,11 → 1498,11
.arg(ho).arg( qApp->translate("QFile",f.errorString()) );
return false;
}
Q3TextStream ts(&f);
ts.setEncoding(Q3TextStream::UnicodeUTF8);
QTextStream ts(&f);
ts.setCodec("UTF-8");
QString errorMsg;
int errorLine = 0, errorColumn = 0;
if( !docu.setContent(ts.read(), &errorMsg, &errorLine, &errorColumn) )
if( !docu.setContent(ts.readAll(), &errorMsg, &errorLine, &errorColumn) )
{
m_lastError = tr("Failed to read prefs XML from \"%1\": %2 at line %3, col %4")
.arg(ho).arg(errorMsg).arg(errorLine).arg(errorColumn);
/trunk/Scribus/scribus/prefsfile.h
28,7 → 28,7
#define PREFSFILE_H
 
#include <qmap.h>
#include <q3textstream.h>
#include <QTextStream>
 
#include "scribusapi.h"
#include "prefscontext.h"
44,7 → 44,7
bool ioEnabled;
void load();
QString replaceIllegalChars(const QString& text);
void writeContexts(ContextMap* contextMap, Q3TextStream& stream);
void writeContexts(ContextMap* contextMap, QTextStream& stream);
void canWrite();
public:
PrefsFile();
/trunk/Scribus/scribus/scribusview.cpp
10582,7 → 10582,7
}
if (!Buffer->itemText.isEmpty())
{
Q3TextStream t(&Buffer->itemText, QIODevice::ReadOnly);
QTextStream t(&Buffer->itemText, QIODevice::ReadOnly);
QString cc;
while (!t.atEnd())
{
/trunk/Scribus/scribus/scribus.cpp
27,7 → 27,6
#include <qcolordialog.h>
#include <qcolor.h>
#include <qicon.h>
#include <q3textstream.h>
#include <qstylefactory.h>
#include <qregexp.h>
#include <qtextcodec.h>
/trunk/Scribus/scribus/cmykfw.cpp
703,12 → 703,12
if (cus)
{
CoE >> Kval;
Cname = CoE.read().stripWhiteSpace();
Cname = CoE.readAll().stripWhiteSpace();
tmp.setColor(Rval, Gval, Bval, Kval);
}
else
{
Cname = CoE.read().stripWhiteSpace();
Cname = CoE.readAll().stripWhiteSpace();
tmp.setColorRGB(Rval, Gval, Bval);
}
/trunk/Scribus/scribus/printerutil.cpp
15,7 → 15,7
#endif
 
#include <qstringlist.h>
//Added by qt3to4:
#include <QDataStream>
#include <QByteArray>
#include "util.h"
#include "scribus.h"
56,10 → 56,10
QStringList wt;
if (loadText("/etc/printcap", &Pcap))
{
Q3TextStream ts(&Pcap, QIODevice::ReadOnly);
QDataStream ts(&Pcap, QIODevice::ReadOnly);
while(!ts.atEnd())
{
tmp = ts.readLine();
tmp = readLinefromDataStream(ts);
if (tmp.isEmpty())
continue;
if ((tmp[0] != '#') && (tmp[0] != ' ') && (tmp[0] != '\n') && (tmp[0] != '\t'))
/trunk/Scribus/scribus/colorm.cpp
363,12 → 363,12
if (cus)
{
CoE >> Kval;
Cname = CoE.read().stripWhiteSpace();
Cname = CoE.readAll().stripWhiteSpace();
tmp.setColor(Rval, Gval, Bval, Kval);
}
else
{
Cname = CoE.read().stripWhiteSpace();
Cname = CoE.readAll().stripWhiteSpace();
tmp.setColorRGB(Rval, Gval, Bval);
}
}
455,7 → 455,7
tmp = tmp.remove(0,19);
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> c >> m >> y >> k;
FarNam = ts2.read();
FarNam = ts2.readAll();
FarNam = FarNam.stripWhiteSpace();
FarNam = FarNam.remove(0,1);
FarNam = FarNam.remove(FarNam.length()-1,1);
476,7 → 476,7
tmp = tmp.remove(0,3);
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> c >> m >> y >> k;
FarNam = ts2.read();
FarNam = ts2.readAll();
FarNam = FarNam.trimmed();
FarNam = FarNam.remove(0,1);
FarNam = FarNam.remove(FarNam.length()-1,1);
/trunk/Scribus/scribus/scimgdataloader_ps.cpp
291,7 → 291,7
tmp = tmp.remove(0,18);
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> c >> m >> y >> k;
FarNam = ts2.read();
FarNam = ts2.readAll();
FarNam = FarNam.stripWhiteSpace();
FarNam = FarNam.remove(0,1);
FarNam = FarNam.remove(FarNam.length()-1,1);
310,7 → 310,7
tmp = tmp.remove(0,3);
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> c >> m >> y >> k;
FarNam = ts2.read();
FarNam = ts2.readAll();
FarNam = FarNam.stripWhiteSpace();
FarNam = FarNam.remove(0,1);
FarNam = FarNam.remove(FarNam.length()-1,1);
/trunk/Scribus/scribus/pdflib.cpp
33,7 → 33,7
#include <qregexp.h>
#include <qdatetime.h>
#include <qfileinfo.h>
#include <q3textstream.h>
#include <QDataStream>
#include <qdir.h>
//Added by qt3to4:
#include <Q3PtrList>
6084,17 → 6084,10
QFile f(fn);
if (f.open(QIODevice::ReadOnly))
{
Q3TextStream ts(&f);
QDataStream ts(&f);
while (!ts.atEnd())
{
tc = ' ';
tmp = "";
while ((tc != '\n') && (tc != '\r'))
{
ts >> tc;
if ((tc != '\n') && (tc != '\r'))
tmp += QChar(tc);
}
tmp = readLinefromDataStream(ts);
if (tmp.startsWith("%%BoundingBox:"))
{
found = true;
/trunk/Scribus/scribus/scfonts.cpp
22,7 → 22,6
#include <qglobal.h>
#include <q3strlist.h>
#include <qstring.h>
#include <q3textstream.h>
#include <qfont.h>
#include <q3dict.h>
#include <qmap.h>
691,8 → 690,8
if (fs.open(QIODevice::ReadOnly))
{
QString fsconfig,paths,tmp;
Q3TextStream tsx(&fs);
fsconfig = tsx.read();
QTextStream tsx(&fs);
fsconfig = tsx.readAll();
fs.close();
 
int pos = fsconfig.find("catalogue");
751,11 → 750,11
if(!f.open(QIODevice::ReadOnly))
return;
ScCore->setSplashStatus( QObject::tr("Reading Font Cache") );
Q3TextStream ts(&f);
ts.setEncoding(Q3TextStream::UnicodeUTF8);
QTextStream ts(&f);
ts.setCodec("UTF-8");
QString errorMsg;
int errorLine = 0, errorColumn = 0;
if( !docu.setContent(ts.read(), &errorMsg, &errorLine, &errorColumn) )
if( !docu.setContent(ts.readAll(), &errorMsg, &errorLine, &errorColumn) )
{
f.close();
return;
801,8 → 800,8
QFile f(pf + "/checkfonts.xml");
if(f.open(QIODevice::WriteOnly))
{
Q3TextStream s(&f);
s.setEncoding(Q3TextStream::UnicodeUTF8);
QTextStream s(&f);
s.setCodec("UTF-8");
s<<docu.toString();
f.close();
}
/trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
13,8 → 13,6
#include <qmessagebox.h>
#include <qtextcodec.h>
#include <qdom.h>
#include <q3textstream.h>
//Added by qt3to4:
#include <QByteArray>
#include <QPixmap>
#include <cstdlib>
503,8 → 501,8
QFile input(fname);
if(!input.open(QIODevice::ReadOnly))
return;
Q3TextStream intputstream(&input);
QString content = intputstream.read();
QTextStream intputstream(&input);
QString content = intputstream.readAll();
QString docstring = content.section("\"\"\"", 1, 1);
if (!docstring.isEmpty())
{
/trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
63,7 → 63,6
#include <qtextcodec.h>
#include <qdom.h>
#include <qregexp.h>
#include <q3textstream.h>
#include <qpixmap.h>
#include <qwidget.h>
#include <qstring.h>
/trunk/Scribus/scribus/plugins/newfromtemplateplugin/nfttemplate.cpp
27,7 → 27,7
QString tmp;
bool collect = false;
tmplXml->open(QIODevice::ReadOnly);
Q3TextStream stream(tmplXml);
QTextStream stream(tmplXml);
QString line = stream.readLine();
while (!line.isNull())
{
70,8 → 70,8
}
tmplXml->close();
tmplXml->open(QIODevice::WriteOnly);
Q3TextStream instream(tmplXml);
instream.setEncoding(Q3TextStream::UnicodeUTF8);
QTextStream instream(tmplXml);
instream.setCodec("UTF-8");
instream << newTmplXml;
tmplXml->close();
}
/trunk/Scribus/scribus/plugins/newfromtemplateplugin/nfttemplate.h
12,7 → 12,7
 
#include <qstring.h>
#include <qfile.h>
#include <q3textstream.h>
#include <QTextStream>
 
class nfttemplate {
public:
/trunk/Scribus/scribus/plugins/newfromtemplateplugin/nftsettings.h
15,7 → 15,6
#include <qstring.h>
#include <qdir.h>
#include <qfile.h>
#include <q3textstream.h>
#include "nfttemplate.h"
#include "nftrcreader.h"
/trunk/Scribus/scribus/plugins/short-words/swprefsgui.cpp
22,7 → 22,7
#include <Q3GridLayout>
#include <Q3HBoxLayout>
#include <Q3VBoxLayout>
#include <Q3TextStream>
#include <QTextStream>
 
#include "scmessagebox.h"
 
121,8 → 121,8
"<qt>" + tr("Cannot write file %1.").arg(RC_PATH_USR) + "</qt>",
CommonStrings::tr_OK);
}
Q3TextStream stream(&f);
stream.setCodec(QTextCodec::codecForName("utf8"));
QTextStream stream(&f);
stream.setCodec("UTF-8");
stream << cfgEdit->text();
f.close();
titleLabel->setText( tr("User settings saved"));
154,8 → 154,8
return false;
}
cfgEdit->clear();
Q3TextStream stream(&f);
stream.setCodec(QTextCodec::codecForName("utf8"));
QTextStream stream(&f);
stream.setCodec("UTF-8");
while (!stream.atEnd())
cfgEdit->append(stream.readLine());
f.close();
/trunk/Scribus/scribus/plugins/short-words/configuration.cpp
66,8 → 66,8
}
if (f.open(QIODevice::ReadOnly))
{
Q3TextStream t(&f);
while (!t.eof())
QTextStream t(&f);
while (!t.atEnd())
{
aRow = t.readLine();
if (aRow.left(2) == lang)
105,8 → 105,8
QFile f(filename);
if (f.open(QIODevice::ReadOnly))
{
Q3TextStream t(&f);
while (!t.eof())
QTextStream t(&f);
while (!t.atEnd())
{
aRow = t.readLine();
if (aRow.left(1) != "#" && aRow.length() != 0 && aRow.left(1) != " " && !langs.contains(aRow.left(2)))
/trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
197,8 → 197,7
if ( tmplXml.open( QIODevice::WriteOnly ) )
{
QTextStream stream(&tmplXml);
// stream.setEncoding(Q3TextStream::UnicodeUTF8);
stream.setCodec(QTextCodec::codecForName("UTF-8"));
stream.setCodec("UTF-8");
stream << xml;
tmplXml.close();
}
247,8 → 246,7
if ( tmplXml.open( QIODevice::WriteOnly ) )
{
QTextStream stream2(&tmplXml);
// stream2.setEncoding(Q3TextStream::UnicodeUTF8);
stream2.setCodec(QTextCodec::codecForName("UTF-8"));
stream2.setCodec("UTF-8");
stream2 << file;
tmplXml.close();
}
/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
26,7 → 26,7
//Added by qt3to4:
#include <QByteArray>
#include <Q3PtrList>
#include <Q3TextStream>
#include <QTextStream>
#include <QApplication>
 
 
371,69 → 371,6
{
vg.erase();
GetStyle(&pg, &vg, NULL, m_Doc, true);
#if 0
vg.setName(pg.attribute("NAME"));
vg.setLineSpacingMode(static_cast<ParagraphStyle::LineSpacingMode>(pg.attribute("LINESPMode", "0").toInt()));
vg.setLineSpacing(pg.attribute("LINESP").toDouble());
vg.setLeftMargin(pg.attribute("INDENT", "0").toDouble());
vg.setFirstIndent(pg.attribute("FIRST", "0").toDouble());
vg.setAlignment(static_cast<ParagraphStyle::AlignmentType>(pg.attribute("ALIGN").toInt()));
vg.setGapBefore(pg.attribute("VOR", "0").toDouble());
vg.setGapAfter(pg.attribute("NACH", "0").toDouble());
tmpf = pg.attribute("FONT", m_Doc->toolSettings.defFont);
m_AvailableFonts->findFont(tmpf, m_Doc));
vg.charStyle().setFont((*m_AvailableFonts)[tmpf]);
vg.charStyle().setFontSize(qRound(pg.attribute("FONTSIZE", "12").toDouble() * 10.0));
vg.setHasDropCap(static_cast<bool>(pg.attribute("DROP", "0").toInt()));
vg.setDropCapLines(pg.attribute("DROPLIN", "2").toInt());
vg.setDropCapOffset(pg.attribute("DROPDIST", "0").toDouble());
vg.charStyle().setFeatures(static_cast<StyleFlag>(pg.attribute("EFFECT", "0").toInt()).featureList());
QString fColor = pg.attribute("FCOLOR", m_Doc->toolSettings.dBrush);
int fShade = pg.attribute("FSHADE", "100").toInt();
handleOldColorShade(m_Doc, fColor, fShade);
QString sColor = pg.attribute("SCOLOR", m_Doc->toolSettings.dPen);
int sShade = pg.attribute("SSHADE", "100").toInt();
handleOldColorShade(m_Doc, sColor, sShade);
vg.charStyle().setFillColor(fColor);
vg.charStyle().setFillShade(fShade);
vg.charStyle().setStrokeColor(sColor);
vg.charStyle().setStrokeShade(sShade);
if (static_cast<bool>(pg.attribute("BASE", "0").toInt()))
vg.setLineSpacingMode(ParagraphStyle::BaselineGridLineSpacing);
vg.charStyle().setShadowXOffset(50);
vg.charStyle().setShadowYOffset(-50);
vg.charStyle().setOutlineWidth(10);
vg.charStyle().setUnderlineOffset(m_Doc->typographicSettings.valueUnderlinePos);
vg.charStyle().setUnderlineWidth(m_Doc->typographicSettings.valueUnderlineWidth);
vg.charStyle().setStrikethruOffset(m_Doc->typographicSettings.valueStrikeThruPos);
vg.charStyle().setStrikethruWidth(m_Doc->typographicSettings.valueStrikeThruPos);
vg.charStyle().setScaleH(1000);
vg.charStyle().setScaleV(1000);
vg.charStyle().setBaselineOffset(0);
vg.charStyle().setTracking(0);
if ((pg.hasAttribute("NUMTAB")) && (pg.attribute("NUMTAB", "0").toInt() != 0))
{
tmp = pg.attribute("TABS");
Q3TextStream tgv(&tmp, QIODevice::ReadOnly);
// vg.tabValues().clear();
QList<ParagraphStyle::TabRecord> tbs;
ParagraphStyle::TabRecord tb;
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.tabFillChar = QChar();
tbs.append(tb);
}
vg.setTabValues(tbs);
tmp = "";
}
// else
// vg.tabValues().clear();
#endif
StyleSet<ParagraphStyle> temp;
temp.create(vg);
m_Doc->redefineStyles(temp, false);
587,7 → 524,7
if ((obj.hasAttribute("GROUPS")) && (obj.attribute("NUMGROUP", "0").toInt() != 0))
{
tmp = obj.attribute("GROUPS");
Q3TextStream fg(&tmp, QIODevice::ReadOnly);
QTextStream fg(&tmp, QIODevice::ReadOnly);
OB.Groups.clear();
for (int cx = 0; cx < obj.attribute("NUMGROUP", "0").toInt(); ++cx)
{
1200,7 → 1137,7
if ((obj.hasAttribute("GROUPS")) && (obj.attribute("NUMGROUP", "0").toInt() != 0))
{
tmp = obj.attribute("GROUPS");
Q3TextStream fg(&tmp, QIODevice::ReadOnly);
QTextStream fg(&tmp, QIODevice::ReadOnly);
OB.Groups.clear();
for (int cx = 0; cx < obj.attribute("NUMGROUP", "0").toInt(); ++cx)
{
1391,7 → 1328,7
QList<ParagraphStyle::TabRecord> tbs;
ParagraphStyle::TabRecord tb;
QString tmp = pg->attribute("TABS");
Q3TextStream tgv(&tmp, QIODevice::ReadOnly);
QTextStream 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
26,7 → 26,8
//Added by qt3to4:
#include <QByteArray>
#include <Q3PtrList>
#include <Q3TextStream>
#include <QDataStream>
#include <QTextStream>
#include <QApplication>
 
 
587,7 → 588,7
arrow.userArrow = true;
double xa, ya;
QString tmp = pg.attribute("Points");
Q3TextStream fp(&tmp, QIODevice::ReadOnly);
QTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx = 0; cx < pg.attribute("NumPoints").toUInt(); ++cx)
{
fp >> xa;
1686,8 → 1687,8
QFile f(fileName);
if(!f.open(QIODevice::WriteOnly))
return false;
Q3TextStream s(&f);
s.writeRawBytes(cs, cs.length());
QDataStream s(&f);
s.writeRawData(cs, cs.length());
f.close();
}
return true;
1936,7 → 1937,7
QList<ParagraphStyle::TabRecord> tbs;
ParagraphStyle::TabRecord tb;
QString tmp = pg.attribute("TABS");
Q3TextStream tgv(&tmp, QIODevice::ReadOnly);
QTextStream tgv(&tmp, QIODevice::ReadOnly);
double xf, xf2;
for (int cxv = 0; cxv < pg.attribute("NUMTAB", "0").toInt(); cxv += 2)
{
2217,7 → 2218,7
{
ParagraphStyle::TabRecord tb;
tmp = obj->attribute("TABS");
Q3TextStream tgv(&tmp, QIODevice::ReadOnly);
QTextStream tgv(&tmp, QIODevice::ReadOnly);
for (int cxv = 0; cxv < obj->attribute("NUMTAB", "0").toInt(); cxv += 2)
{
tgv >> xf;
2363,7 → 2364,7
if ((obj->hasAttribute("GROUPS")) && (obj->attribute("NUMGROUP", "0").toInt() != 0))
{
tmp = obj->attribute("GROUPS");
Q3TextStream fg(&tmp, QIODevice::ReadOnly);
QTextStream fg(&tmp, QIODevice::ReadOnly);
currItem->Groups.clear();
for (int cx = 0; cx < obj->attribute("NUMGROUP", "0").toInt(); ++cx)
{
2377,7 → 2378,7
if ((obj->hasAttribute("NUMDASH")) && (obj->attribute("NUMDASH", "0").toInt() != 0))
{
tmp = obj->attribute("DASHS");
Q3TextStream dgv(&tmp, QIODevice::ReadOnly);
QTextStream dgv(&tmp, QIODevice::ReadOnly);
currItem->DashValues.clear();
for (int cxv = 0; cxv < obj->attribute("NUMDASH", "0").toInt(); ++cxv)
{
2393,7 → 2394,7
{
currItem->PoLine.resize(obj->attribute("NUMPO").toUInt());
tmp = obj->attribute("POCOOR");
Q3TextStream fp(&tmp, QIODevice::ReadOnly);
QTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx=0; cx<obj->attribute("NUMPO").toUInt(); ++cx)
{
fp >> xf;
2408,7 → 2409,7
{
currItem->ContourLine.resize(obj->attribute("NUMCO").toUInt());
tmp = obj->attribute("COCOOR");
Q3TextStream fp(&tmp, QIODevice::ReadOnly);
QTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx=0; cx<obj->attribute("NUMCO").toUInt(); ++cx)
{
fp >> xf;
2680,7 → 2681,7
arrow.userArrow = true;
double xa, ya;
QString tmp = pg.attribute("Points");
Q3TextStream fp(&tmp, QIODevice::ReadOnly);
QTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx = 0; cx < pg.attribute("NumPoints").toUInt(); ++cx)
{
fp >> xa;
/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
22,8 → 22,8
***************************************************************************/
 
#include <qfile.h>
#include <q3textstream.h>
//Added by qt3to4:
#include <QTextStream>
#include <QDataStream>
#include <QList>
#include <QByteArray>
#include <Q3PtrList>
220,11 → 220,11
QFile f(fName);
if(!f.open(QIODevice::WriteOnly))
return false;
Q3TextStream s(&f);
QDataStream s(&f);
QString wr = vo;
wr += docu.toString();
QByteArray utf8wr = wr.toUtf8();
s.writeRawBytes(utf8wr.data(), utf8wr.length());
s.writeRawData(utf8wr.data(), utf8wr.length());
f.close();
}
#endif
/trunk/Scribus/scribus/plugins/psimport/importps.cpp
121,7 → 121,7
tmp = tmp.remove(0,18);
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> c >> m >> y >> k;
FarNam = ts2.read();
FarNam = ts2.readAll();
FarNam = FarNam.stripWhiteSpace();
FarNam = FarNam.remove(0,1);
FarNam = FarNam.remove(FarNam.length()-1,1);
143,7 → 143,7
tmp = tmp.remove(0,3);
QTextStream ts2(&tmp, QIODevice::ReadOnly);
ts2 >> c >> m >> y >> k;
FarNam = ts2.read();
FarNam = ts2.readAll();
FarNam = FarNam.stripWhiteSpace();
FarNam = FarNam.remove(0,1);
FarNam = FarNam.remove(FarNam.length()-1,1);
871,7 → 871,7
Code >> horpix;
Code >> verpix;
Code >> device;
filename = Code.read().stripWhiteSpace();
filename = Code.readAll().stripWhiteSpace();
if (device.startsWith("psd")) {
filename = filename.mid(0, filename.length()-3) + "psd";
}
/trunk/Scribus/scribus/scribusapp.cpp
32,6 → 32,7
#include <qfile.h>
#include <qdir.h>
#include <qtextcodec.h>
#include <QTextStream>
 
#include "scribusapp.h"
//#include "scribusapp.moc"
370,7 → 371,7
 
/*! \brief Format an arguments line for printing
Helper procedure */
static void printArgLine(Q3TextStream & ts, const char * smallArg,
static void printArgLine(QTextStream & ts, const char * smallArg,
const char* fullArg, const QString desc)
{
const char* lineformat = " %1, %2 %3";
388,7 → 389,7
{
QFile f;
f.open(QIODevice::WriteOnly, stderr);
Q3TextStream ts(&f);
QTextStream ts(&f);
ts << tr("Usage: scribus [option ... ] [file]") ; endl(ts);
ts << tr("Options:") ; endl(ts);
printArgLine(ts, ARG_FONTINFO_SHORT, ARG_FONTINFO, tr("Show information on the console when fonts are being loaded") );
419,7 → 420,7
{
QFile f;
f.open(QIODevice::WriteOnly, stderr);
Q3TextStream ts(&f);
QTextStream ts(&f);
ts << tr("Installed interface languages for Scribus are as follows:"); endl(ts);
endl(ts);
 
441,7 → 442,7
{
QFile f;
f.open(QIODevice::WriteOnly, stderr);
Q3TextStream ts(&f);
QTextStream ts(&f);
endl(ts);
QString heading( tr("Scribus, Open Source Desktop Publishing") );
// Build a separator of ----s the same width as the heading
/trunk/Scribus/scribus/prefsfile.cpp
82,8 → 82,8
QFile* prefsXML = new QFile(prefsFilePath);
if (prefsXML->open(QIODevice::WriteOnly))
{
Q3TextStream stream(prefsXML);
stream.setEncoding(Q3TextStream::UnicodeUTF8);
QTextStream stream(prefsXML);
stream.setCodec("UTF-8");
stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
stream << "<preferences>\n";
if (contexts.size() > 0)
105,7 → 105,7
delete prefsXML;
}
 
void PrefsFile::writeContexts(ContextMap* contextMap, Q3TextStream& stream)
void PrefsFile::writeContexts(ContextMap* contextMap, QTextStream& stream)
{
ContextMap::Iterator it;
for (it = contextMap->begin(); it != contextMap->end(); ++it)