Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 470 → Rev 469

/trunk/Scribus/scribus/libpdf/pdflib.cpp
76,7 → 76,7
for (uint ap = 0; ap < plug->view->MasterPages.count(); ++ap)
{
if (plug->view->MasterPages.at(ap)->Items.count() != 0)
dia->PDF_TemplatePage(plug->view->MasterPages.at(ap), plug->Prefs.ClipMargin);
dia->PDF_TemplatePage(plug->view->MasterPages.at(ap));
progresscount++;
dia2->setProgress(progresscount);
}
85,7 → 85,7
if (plug->doc->PDF_Optionen.Thumbnails)
pm = thumbs[pageNs[a]];
dia->PDF_Begin_Page(plug->view->Pages.at(pageNs[a]-1), pm);
dia->PDF_ProcessPage(plug->view->Pages.at(pageNs[a]-1), pageNs[a]-1, plug->Prefs.ClipMargin);
dia->PDF_ProcessPage(plug->view->Pages.at(pageNs[a]-1), pageNs[a]-1);
dia->PDF_End_Page();
progresscount++;
dia2->setProgress(progresscount);
875,13 → 875,13
return true;
}
 
void PDFlib::PDF_TemplatePage(Page* pag, bool clip)
void PDFlib::PDF_TemplatePage(Page* pag)
{
QString tmp;
ActPageP = pag;
Inhalt = "";
Seite.AObjects.clear();
PDF_ProcessPage(pag, pag->PageNr, clip);
PDF_ProcessPage(pag, pag->PageNr);
StartObj(ObjCounter);
ObjCounter++;
PutDoc("<<\n/Type /XObject\n/Subtype /Form\n/FormType 1\n");
1062,7 → 1062,7
ObjCounter++;
}
 
void PDFlib::PDF_ProcessPage(Page* pag, uint PNr, bool clip)
void PDFlib::PDF_ProcessPage(Page* pag, uint PNr)
{
QString tmp;
ActPageP = pag;
1076,17 → 1076,6
QString name = "/"+pag->MPageNam.simplifyWhiteSpace().replace( QRegExp("\\s"), "" );
if ( (Options->MirrorH) && (pag->MPageNam != "") )
PutPage("-1 0 0 1 "+FToStr(doc->PageB)+" 0 cm\n");
if ( (Options->MirrorV) && (pag->MPageNam != "") )
PutPage("1 0 0 -1 0 "+FToStr(doc->PageH)+" cm\n");
if (clip)
{
PutPage(FToStr(pag->Margins.Left) + " " + FToStr(pag->Margins.Bottom) + " m\n");
PutPage(FToStr(doc->PageB - pag->Margins.Right) + " " + FToStr(pag->Margins.Bottom) + " l\n");
PutPage(FToStr(doc->PageB - pag->Margins.Right) + " " + FToStr(doc->PageH - pag->Margins.Top) + " l\n");
PutPage(FToStr(pag->Margins.Left) + " " + FToStr(doc->PageH - pag->Margins.Top) + " l h W n\n");
}
else
PutPage("0 0 "+FToStr(doc->PageB)+" "+FToStr(doc->PageH)+" re W n\n");
if (pag->MPageNam != "")
{
Page* mPage = view->MasterPages.at(view->MasterNames[view->Pages.at(PNr)->MPageNam]);
/trunk/Scribus/scribus/scribusdoc.cpp
138,7 → 138,6
PDF_Optionen.Binding = 0;
PDF_Optionen.EmbedList.clear();
PDF_Optionen.MirrorH = false;
PDF_Optionen.MirrorV = false;
PDF_Optionen.RotateDeg = 0;
PDF_Optionen.PresentMode = false;
PDF_Optionen.Datei = "";
/trunk/Scribus/scribus/libabout/about.cpp
56,7 → 56,7
tabLayout1->addWidget( PixmapLabel1 );
BuildID = new QLabel( tab, "BB" );
BuildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1. %2 %3 ").arg("18").arg("October").arg("2004");
QString bu = tr("%1. %2 %3 ").arg("16").arg("October").arg("2004");
#ifdef HAVE_CMS
bu += "C";
#else
/trunk/Scribus/scribus/scribus.cpp
7170,9 → 7170,8
doc->PDF_Optionen.PicRes = dia->ValC->value();
doc->PDF_Optionen.Bookmarks = dia->CheckBM->isChecked();
doc->PDF_Optionen.Binding = dia->ComboBind->currentItem();
doc->PDF_Optionen.MirrorH = dia->MirrorH->isOn();
doc->PDF_Optionen.MirrorV = dia->MirrorV->isOn();
doc->PDF_Optionen.RotateDeg = dia->RotateDeg->currentItem() * 90;
doc->PDF_Optionen.MirrorH = dia->MirrorH->isChecked();
doc->PDF_Optionen.RotateDeg = dia->RotateDeg->value();
doc->PDF_Optionen.PresentMode = dia->CheckBox10->isChecked();
doc->PDF_Optionen.PresentVals = dia->EffVal;
doc->PDF_Optionen.Articles = dia->Article->isChecked();
7242,7 → 7241,6
doc->PDF_Optionen.BleedBottom = dia->BleedBottom->value()/UmReFaktor;
doc->PDF_Optionen.Encrypt = false;
doc->PDF_Optionen.MirrorH = false;
doc->PDF_Optionen.MirrorV = false;
doc->PDF_Optionen.RotateDeg = 0;
doc->PDF_Optionen.PresentMode = false;
doc->PDF_Optionen.Encrypt = false;
/trunk/Scribus/scribus/scribusdoc.h
315,7 → 315,6
int Binding;
QValueList<QString> EmbedList;
bool MirrorH;
bool MirrorV;
int RotateDeg;
bool PresentMode;
QValueList<PreSet> PresentVals;
/trunk/Scribus/scribus/pdfopts.cpp
83,32 → 83,6
PageNr->setEnabled(false);
Layout11->addWidget( PageNr, 1, 0 );
RangeGroupLayout->addLayout( Layout11 );
 
TextLabel3 = new QLabel( tr( "&Rotation:" ), RangeGroup, "TextLabel3" );
RangeGroupLayout->addWidget( TextLabel3 );
RotateDeg = new QComboBox( true, RangeGroup, "RotateDeg" );
RotateDeg->insertItem(QString::fromUtf8("0 °"));
RotateDeg->insertItem(QString::fromUtf8("90 °"));
RotateDeg->insertItem(QString::fromUtf8("180 °"));
RotateDeg->insertItem(QString::fromUtf8("270 °"));
RotateDeg->setEditable(false);
TextLabel3->setBuddy(RotateDeg);
RotateDeg->setCurrentItem(Optionen->RotateDeg / 90);
RangeGroupLayout->addWidget( RotateDeg );
Layout11a = new QGridLayout( 0, 1, 1, 0, 5, "Layout11a");
MirrorH = new QToolButton( RangeGroup, "MirrorH" );
MirrorH->setPixmap(loadIcon("FlipH.xpm"));
MirrorH->setToggleButton( true );
MirrorH->setOn(Optionen->MirrorH);
Layout11a->addWidget( MirrorH, 0, 0 );
MirrorV = new QToolButton( RangeGroup, "MirrorH" );
MirrorV->setPixmap(loadIcon("FlipV.xpm"));
MirrorV->setToggleButton( true );
MirrorV->setOn(Optionen->MirrorV);
Layout11a->addWidget( MirrorV, 0, 1 );
RangeGroupLayout->addLayout( Layout11a );
Layout13->addWidget( RangeGroup );
 
GroupBox1 = new QGroupBox( tr( "File Options" ), tabGeneral, "GroupBox1" );
713,6 → 687,7
BleedLeft->setMaxValue(view->Doc->PageB*UmReFaktor);
BleedLeft->setValue(Optionen->BleedLeft*UmReFaktor);
#ifdef HAVE_CMS
 
if ((!CMSuse) || (!CMSavail))
Options->setTabEnabled(tabPDFX, false);
if ((CMSuse) && (CMSavail) && (Optionen->Version == 12) && (!PDFXProfiles->isEmpty()))
720,8 → 695,31
else
Options->setTabEnabled(tabPDFX, false);
#else
 
Options->setTabEnabled(tabPDFX, false);
#endif
 
tabOptions = new QWidget( Options, "taboptions" );
tabOptionsLayout = new QVBoxLayout( tabOptions, 11, 5, "tabOptionsLayout");
MirrorH = new QCheckBox( tr( "Mirror Page(s) &Horizontally" ), tabOptions, "MirrorH" );
MirrorH->setChecked(Optionen->MirrorH);
tabOptionsLayout->addWidget( MirrorH );
RotateDeg = new QSpinBox(0, 270, 90, tabOptions, "RotateDeg");
RotateDeg->setValue(Optionen->RotateDeg);
 
TextLabel3 = new QLabel( RotateDeg, tr( "&Rotation:" ), tabOptions, "TextLabel3" );
TextLabel3->setAlignment( static_cast<int>( QLabel::AlignTop | QLabel::AlignLeft ) );
tabOptionsRotateHBox = new QHBoxLayout( tabOptionsLayout, -1, "tabOptionsRotateHBox" );
tabOptionsRotateHBox->addWidget( TextLabel3 );
tabOptionsRotateHBox->addWidget( RotateDeg );
tabOptionsRotateHBox->addStretch();
tabOptionsLayout->addStretch();
Options->insertTab( tabOptions, tr( "&Options" ) );
 
 
 
BleedChanged();
PgSel = 0;
Pages->setCurrentItem(0);
826,8 → 824,6
QToolTip::add( BleedBottom, tr( "Distance for bleed from the bottom of the physical page" ) );
QToolTip::add( BleedLeft, tr( "Distance for bleed from the left of the physical page" ) );
QToolTip::add( BleedRight, tr( "Distance for bleed from the right of the physical page" ) );
QToolTip::add( MirrorH, tr( "Mirror Page(s) horizontal" ) );
QToolTip::add( MirrorV, tr( "Mirror Page(s) vertical" ) );
 
// signals and slots connections
connect( FileC, SIGNAL( clicked() ), this, SLOT( ChangeFile() ) );
844,9 → 840,8
connect(EffectType, SIGNAL(activated(int)), this, SLOT(SetEffOpts(int)));
connect(EDirection_2_2, SIGNAL(activated(int)), this, SLOT(ValidDI(int)));
connect(CheckBox10, SIGNAL(clicked()), this, SLOT(DoEffects()));
connect(MirrorH, SIGNAL(clicked()), this, SLOT(PDFMirror()));
connect(MirrorV, SIGNAL(clicked()), this, SLOT(PDFMirror()));
connect(RotateDeg, SIGNAL(activated(int)), this, SLOT(Rotation(int)));
connect(MirrorH, SIGNAL(clicked()), this, SLOT(PDFMirrorH()));
connect(RotateDeg, SIGNAL(valueChanged(int)), this, SLOT(Rotation(int)));
connect(EonAllPg, SIGNAL(clicked()), this, SLOT(EffectOnAll()));
connect(AllPages, SIGNAL(toggled(bool)), this, SLOT(SelRange(bool)));
connect(OutCombo, SIGNAL(activated(int)), this, SLOT(EnablePr(int)));
1062,15 → 1057,14
}
}
 
void PDF_Opts::PDFMirror()
void PDF_Opts::PDFMirrorH()
{
Opts->MirrorH = MirrorH->isOn();
Opts->MirrorV = MirrorV->isOn();
Opts->MirrorH = MirrorH->isChecked() ? true : false;
}
 
void PDF_Opts::Rotation( int value )
{
Opts->RotateDeg = value * 90;
Opts->RotateDeg = value / 90 * 90; RotateDeg->setValue(value / 90 * 90);
}
 
void PDF_Opts::DoEffects()
/trunk/Scribus/scribus/pdfopts.h
45,6 → 45,7
QWidget* tabSecurity;
QWidget* tabColor;
QWidget* tabPDFX;
QWidget* tabOptions;
 
QLabel* Name;
QLabel* TextLabel1;
70,9 → 71,8
QLabel* TextLabel1x;
QComboBox* ComboBind;
QCheckBox* CheckBox1;
QToolButton* MirrorH;
QToolButton* MirrorV;
QComboBox* RotateDeg;
QCheckBox* MirrorH;
QSpinBox* RotateDeg;
QLabel* TextLabel3;
QCheckBox* CheckBox10;
QPushButton* EonAllPg;
177,7 → 177,7
void SetPgEff(int nr);
void SetEffOpts(int nr);
void ValidDI(int nr);
void PDFMirror();
void PDFMirrorH();
void Rotation(int value);
void DoEffects();
void EffectOnAll();
193,6 → 193,8
protected:
QGridLayout* CBoxLayout;
QVBoxLayout* PDFOptsLayout;
QVBoxLayout* tabOptionsLayout;
QHBoxLayout* tabOptionsRotateHBox;
QHBoxLayout* Layout5;
QVBoxLayout* tabLayout;
QVBoxLayout* Layout3;
212,7 → 214,6
QHBoxLayout* Layout13;
QVBoxLayout* RangeGroupLayout;
QGridLayout* Layout11;
QGridLayout* Layout11a;
QVBoxLayout* tabColorLayout;
QHBoxLayout* ColorGroupLayout;
QGridLayout* ProfsGroupLayout;
/branches/Version13x/Scribus/scribus/libpdf/pdflib.h
41,8 → 41,8
bool PDF_Begin_Doc(QString fn, ScribusDoc *docu, ScribusView *vie, PDFOpt *opts, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, BookMView* vi);
void PDF_Begin_Page(Page* pag, QPixmap pm = 0);
void PDF_End_Page();
void PDF_TemplatePage(Page* pag, bool clip = false);
void PDF_ProcessPage(Page* pag, uint PNr, bool clip = false);
void PDF_TemplatePage(Page* pag);
void PDF_ProcessPage(Page* pag, uint PNr);
void PDF_End_Doc(QString PrintPr = "", QString Name = "", int Components = 0);
struct GlNamInd
{