Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 4222 → Rev 4223

/branches/Version13x/Scribus/scribus/pdflib.cpp
60,63 → 60,53
#include <tiffio.h>
#endif
 
PDFlib::PDFlib(ScribusDoc *docu)
PDFlib::PDFlib(ScribusDoc * docu)
: QObject(docu),
doc(docu),
ActPageP(0),
Options(0),
Bvie(0),
Dokument(0),
ObjCounter(7),
ResNam("RE"),
ResCount(0),
NDnam("LI"),
NDnum(0),
KeyGen(32),
OwnerKey(32),
UserKey(32),
FileID(16),
EncryKey(5),
Encrypt(0),
KeyLen(5),
colorsToUse(),
spotNam("Spot"),
spotCount(0),
abortExport(false),
usingGUI(ScQApp->usingGUI())
{
doc = docu;
abortExport=false;
OwnerKey = QByteArray(32);
UserKey = QByteArray(32);
FileID = QByteArray(16);
EncryKey = QByteArray(5);
Encrypt = 0;
KeyLen = 5;
Dokument = 0;
Catalog.Outlines = 2;
Catalog.PageTree = 3;
Catalog.Dest = 4;
PageTree.Count = 0;
PageTree.Kids.clear();
Outlines.First = 0;
Outlines.Last = 0;
Outlines.Count = 0;
XRef.clear();
NamedDest.clear();
NDnam = "LI";
NDnum = 0;
ObjCounter = 7;
Seite.ObjNum = 0;
Seite.Thumb = 0;
Seite.XObjects.clear();
Seite.ImgObjects.clear();
Seite.FObjects.clear();
Seite.AObjects.clear();
Seite.FormObjects.clear();
CalcFields.clear();
Shadings.clear();
Transpar.clear();
ICCProfiles.clear();
SharedImages.clear();
ResNam = "RE";
ResCount = 0;
colorsToUse.clear();
spotMap.clear();
spotNam = "Spot";
spotCount = 0;
#ifdef HAVE_LIBZ
CompAvail = true;
#else
CompAvail = false;
#endif
KeyGen = QByteArray(32);
int kg_array[] = {0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa,
0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80, 0x2f, 0x0c, 0xa9, 0xfe,
0x64, 0x53, 0x69, 0x7a};
for (int a = 0; a < 32; ++a)
KeyGen[a] = kg_array[a];
usingGUI=ScQApp->usingGUI();
if (usingGUI)
{
progressDialog=new MultiProgressDialog(tr("Saving PDF"), CommonStrings::tr_Cancel, ScMW, "pdfexportprogress");
progressDialog = new MultiProgressDialog(tr("Saving PDF"), CommonStrings::tr_Cancel, ScMW, "pdfexportprogress");
if (progressDialog==0)
usingGUI=false;
else
/branches/Version13x/Scribus/scribus/pdflib.h
48,6 → 48,17
PDFlib(ScribusDoc *docu);
~PDFlib() {};
bool doExport(const QString& fn, const QString& nam, int Components, std::vector<int> &pageNs, QMap<int,QPixmap> thumbs);
 
// used by ScFonts
struct GlNamInd
{
uint Code;
QString Name;
};
 
private:
typedef QMap<uint, GlNamInd> GListeInd;
 
bool PDF_Begin_Doc(const QString& fn, PDFOptions *opts, SCFonts &AllFonts, QMap<QString,int> DocFonts, BookMView* vi);
void PDF_Begin_Page(Page* pag, QPixmap pm = 0);
void PDF_End_Page();
55,15 → 66,7
void PDF_ProcessPage(Page* pag, uint PNr, bool clip = false);
void PDF_End_Doc(const QString& PrintPr = "", const QString& Name = "", int Components = 0);
void closeAndCleanup();
struct GlNamInd
{
uint Code;
QString Name;
};
typedef QMap<uint, GlNamInd> GListeInd;
QMap<QString, GListeInd> GlyphsIdxOfFont;
 
private:
QString EncStream(QString *in, int ObjNum);
QString EncString(QString in, int ObjNum);
void CalcOwnerKey(QString Owner, QString User);
94,8 → 97,10
void PDF_Form(QString& im);
void PDF_xForm(double w, double h, QString im);
QString PDF_Image(PageItem* c, const QString& fn, double sx, double sy, double x, double y, bool fromAN = false, const QString& Profil = "", bool Embedded = false, int Intent = 1);
 
QMap<QString, GListeInd> GlyphsIdxOfFont;
QString Inhalt;
ScribusDoc* doc;
ScribusDoc * const doc;
Page* ActPageP;
PDFOptions* Options;
BookMView* Bvie;
209,8 → 214,8
QTextStream t;
QMap<QString, QString> StdFonts;
MultiProgressDialog* progressDialog;
bool abortExport;
bool usingGUI;
bool abortExport;
protected slots:
void cancelRequested();