Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 16955 → Rev 16956

/trunk/Scribus/scribus/scimgdataloader_ps.cpp
148,7 → 148,7
{
QByteArray tempBuf(9, ' ');
f.read(tempBuf.data(), 8);
if (getDouble(QString(tempBuf.mid(0, 4)), true) == 0xC5D0D3C6)
if (getDouble(tempBuf.mid(0, 4), true) == 0xC5D0D3C6)
{
startPos = getDouble(tempBuf.mid(4, 4), false);
if (doThumbnail)
/trunk/Scribus/scribus/util_math.cpp
31,7 → 31,7
 
 
 
uint getDouble(QString in, bool raw)
uint getDouble(const QByteArray in, bool raw)
{
QByteArray bb(4, ' ');
if (raw)
41,10 → 41,10
bb[2] = static_cast<uchar>(QChar(in.at(1)));
bb[1] = static_cast<uchar>(QChar(in.at(2)));
bb[0] = static_cast<uchar>(QChar(in.at(3)));*/
bb = bb.insert(3, in.at(0));
bb = bb.insert(2, in.at(1));
bb = bb.insert(1, in.at(2));
bb = bb.insert(0, in.at(3));
bb[3] = in.at(0);
bb[2] = in.at(1);
bb[1] = in.at(2);
bb[0] = in.at(3);
}
else
{
53,10 → 53,10
// bb[1] = static_cast<uchar>(QChar(in.at(1)));
// bb[2] = static_cast<uchar>(QChar(in.at(2)));
// bb[3] = static_cast<uchar>(QChar(in.at(3)));
bb = bb.insert(0, in.at(0));
bb = bb.insert(1, in.at(1));
bb = bb.insert(2, in.at(2));
bb = bb.insert(3, in.at(3));
bb[0] = in.at(0);
bb[1] = in.at(1);
bb[2] = in.at(2);
bb[3] = in.at(3);
}
uint ret;
ret = bb[0] & 0xff;
/trunk/Scribus/scribus/util_math.h
13,7 → 13,7
#include <cmath>
#include <vector>
 
#include <QString>
#include <QByteArray>
#include <QPolygon>
#include <QList>
#include <QPainterPath>
36,7 → 36,7
QList<QPainterPath> SCRIBUS_API decomposePath(QPainterPath &path);
QPainterPath SCRIBUS_API RegularPolygonPath(double w, double h, uint c, bool star, double factor, double rota, double factor2 = 0.0, double innerRot = 0.0, double factor3 = 0.0);
QPainterPath SCRIBUS_API SpiralPath(double spiralWidth, double spiralHeight, double spiralStartAngle, double spiralEndAngle, double spiralFactor);
uint SCRIBUS_API getDouble(QString in, bool raw);
uint SCRIBUS_API getDouble(const QByteArray in, bool raw);
inline double SCRIBUS_API sind(double);
inline double SCRIBUS_API cosd(double);
inline double SCRIBUS_API square(double);
/trunk/Scribus/scribus/pslib.cpp
1056,11 → 1056,11
{
PutStream("currentfile 1 (%ENDEPSDATA) /SubFileDecode filter /ReusableStreamDecode filter\n");
PutStream("%%BeginDocument: " + fi.fileName() + "\n");
if (getDouble(QString(tmp.mid(0, 4)), true) == 0xC5D0D3C6)
if (getDouble(tmp.mid(0, 4), true) == 0xC5D0D3C6)
{
char* data = tmp.data();
uint startPos = getDouble(QString(tmp.mid(4, 4)), false);
uint length = getDouble(QString(tmp.mid(8, 4)), false);
uint startPos = getDouble(tmp.mid(4, 4), false);
uint length = getDouble(tmp.mid(8, 4), false);
PutStream(data+startPos, length, false);
}
else
1150,7 → 1150,7
else
{
PutStream("%%BeginDocument: " + fi.fileName() + "\n");
if (getDouble(QString(tmp.mid(0, 4)), true) == 0xC5D0D3C6)
if (getDouble(tmp.mid(0, 4), true) == 0xC5D0D3C6)
{
char* data = tmp.data();
uint startPos = getDouble(tmp.mid(4, 4), false);