/trunk/Scribus/ChangeLogCVS |
---|
1,10 → 1,4 |
Changes since Version 1.1.3 |
01.12.2003 Fixed crash when holding down a key whilst editing a Textframe. |
Improved import of Template Pages, Line Styles and Styles. |
Fixed PDF-Export Issues. |
30.11.2003 Template Pages and Line Styles can now imported too. |
29.11.2003 Added Button for importing Styles for other Documents to the Style Editor. |
You can now switch Blackpoint Compensation on or off in the CMS Preferences. |
/trunk/Scribus/scribus/libabout/about.cpp |
---|
32,7 → 32,7 |
tabLayout1->addWidget( PixmapLabel1 ); |
BuildID = new QLabel( tab, "BB" ); |
BuildID->setAlignment(Qt::AlignCenter); |
QString bu = tr("%1. %2 %3 ").arg(1).arg("December").arg(2003); |
QString bu = tr("%1. %2 %3 ").arg(29).arg("November").arg(2003); |
#ifdef HAVE_CMS |
bu += "C"; |
#else |
/trunk/Scribus/scribus/scribus.cpp |
---|
101,7 → 101,6 |
ScribusApp::ScribusApp(SplashScreen *splash) |
{ |
setCaption( tr("Scribus " VERSION)); |
setKeyCompression(false); |
setIcon(loadIcon("AppIcon.png")); |
initMenuBar(); |
initStatusBar(); |
2213,11 → 2212,11 |
bool ScribusApp::slotDocMerge() |
{ |
bool ret = false; |
MergeDoc *dia = new MergeDoc(this, false); |
MergeDoc *dia = new MergeDoc(this); |
if (dia->exec()) |
{ |
qApp->setOverrideCursor(QCursor(waitCursor), true); |
ret = LadeSeite(dia->Filename->text(), dia->PageNr->value()-1, false); |
ret = LadeSeite(dia->Filename->text(), dia->PageNr->value()-1); |
qApp->setOverrideCursor(QCursor(arrowCursor), true); |
ret = true; |
} |
2225,16 → 2224,15 |
return ret; |
} |
bool ScribusApp::LadeSeite(QString fileName, int Nr, bool Mpa) |
bool ScribusApp::LadeSeite(QString fileName, int Nr) |
{ |
bool ret = false; |
if (!fileName.isEmpty()) |
{ |
if (!Mpa) |
doc->OpenNodes = Tpal->buildReopenVals(); |
doc->loading = true; |
ScriXmlDoc *ss = new ScriXmlDoc(); |
if(!ss->ReadPage(fileName, Prefs.AvailFonts, doc, view, Nr, Mpa)) |
if(!ss->ReadPage(fileName, Prefs.AvailFonts, doc, view, Nr)) |
{ |
delete ss; |
doc->loading = false; |
2259,11 → 2257,8 |
Mpal->updateCList(); |
Mpal->Spal->SetFormats(doc); |
Mpal->SetLineFormats(doc); |
if (!Mpa) |
{ |
Tpal->BuildTree(view); |
Tpal->reopenTree(doc->OpenNodes); |
} |
slotDocCh(); |
doc->loading = false; |
ret = true; |
5749,7 → 5744,6 |
{ |
MusterSeiten *dia = new MusterSeiten(this, doc, view, temp); |
connect(dia, SIGNAL(CreateNew(int)), this, SLOT(slotNewPageT(int))); |
connect(dia, SIGNAL(LoadPage(QString, int, bool)), this, SLOT(LadeSeite(QString, int, bool))); |
connect(dia, SIGNAL(Fertig()), this, SLOT(ManTempEnd())); |
for (uint a=0; a<5; ++a) |
{ |
5808,7 → 5802,7 |
void ScribusApp::ApplyTemp() |
{ |
QString mna; |
ApplyT *dia = new ApplyT(this, view, doc->ActPage->MPageNam); |
ApplyT *dia = new ApplyT(this, view); |
if (dia->exec()) |
{ |
mna = dia->Templ->currentText(); |
/trunk/Scribus/scribus/editformats.cpp |
---|
163,18 → 163,10 |
if (!fileName.isEmpty()) |
{ |
ScriXmlDoc *ss = new ScriXmlDoc(); |
ss->Vorlagen.clear(); |
for (uint x = 5; x < TempVorl.count(); ++x) |
{ |
ss->Vorlagen.append(TempVorl[x]); |
} |
uint old = TempVorl.count()-5; |
if (ss->ReadStyles(fileName, Docu, fon)) |
{ |
if (ss->Vorlagen.count() > old) |
for (uint xx=0; xx<ss->Vorlagen.count(); ++xx) |
{ |
for (uint xx=old; xx<ss->Vorlagen.count(); ++xx) |
{ |
struct StVorL sty; |
sty.Vname = ss->Vorlagen[xx].Vname; |
sty.LineSpa = ss->Vorlagen[xx].LineSpa; |
187,10 → 179,9 |
sty.FontSize = ss->Vorlagen[xx].FontSize; |
TempVorl.append(sty); |
} |
} |
delete ss; |
UpdateFList(); |
} |
delete ss; |
} |
} |
/trunk/Scribus/scribus/scribusXml.h |
---|
21,11 → 21,10 |
ScriXmlDoc() {}; |
~ScriXmlDoc() {}; |
QString ReadDatei(QString fileName); |
bool ReadLStyles(QString fileName, QMap<QString,multiLine> *Sty); |
bool ReadStyles(QString fileName, ScribusDoc* doc, preV *Prefs); |
bool ReadColors(QString fileName); |
bool ReadPageCount(QString fileName, int *num1, int *num2); |
bool ReadPage(QString fileName, SCFonts &avail, ScribusDoc *doc, ScribusView *view, int PageToLoad, bool Mpage); |
int ReadPageCount(QString fileName); |
bool ReadPage(QString fileName, SCFonts &avail, ScribusDoc *doc, ScribusView *view, int PageToLoad); |
QString WriteElem(QPtrList<PageItem> *Selitems, ScribusDoc *doc); |
bool ReadElemHeader(QString file, bool isFile, double *x, double *y, double *w, double *h); |
bool ReadElem(QString fileName, SCFonts &avail, ScribusDoc *doc, int Xp, int Yp, bool Fi, bool loc, QMap<QString,QString> &FontSub, preV *Prefs); |
40,7 → 39,6 |
int StPag; |
}; |
QValueList<Linked> LFrames; |
QStringList MNames; |
signals: |
void NewPage(int); |
/trunk/Scribus/scribus/scribusXml.cpp |
---|
72,60 → 72,6 |
/** end changes */ |
} |
bool ScriXmlDoc::ReadLStyles(QString fileName, QMap<QString,multiLine> *Sty) |
{ |
QDomDocument docu("scridoc"); |
QString f = ""; |
f = ReadDatei(fileName); |
if (f == "") |
return false; |
if(!docu.setContent(f)) |
return false; |
QDomElement elem=docu.documentElement(); |
if ((elem.tagName() != "SCRIBUS") && (elem.tagName() != "SCRIBUSUTF8")) |
return false; |
QDomNode DOC=elem.firstChild(); |
while(!DOC.isNull()) |
{ |
QDomElement dc=DOC.toElement(); |
QDomNode PAGE=DOC.firstChild(); |
while(!PAGE.isNull()) |
{ |
QDomElement pg=PAGE.toElement(); |
if(pg.tagName()=="MultiLine") |
{ |
multiLine ml; |
QDomNode MuLn = PAGE.firstChild(); |
while(!MuLn.isNull()) |
{ |
QDomElement MuL = MuLn.toElement(); |
struct singleLine sl; |
sl.Color = MuL.attribute("Color"); |
sl.Dash = QStoInt(MuL.attribute("Dash")); |
sl.LineEnd = QStoInt(MuL.attribute("LineEnd")); |
sl.LineJoin = QStoInt(MuL.attribute("LineJoin")); |
sl.Shade = QStoInt(MuL.attribute("Shade")); |
sl.Width = QStodouble(MuL.attribute("Width")); |
ml.push_back(sl); |
MuLn = MuLn.nextSibling(); |
} |
QString Nam = pg.attribute("Name"); |
QString Nam2 = Nam; |
int copyC = 1; |
while (Sty->contains(Nam2)) |
{ |
Nam2 = tr("Copy #%1 of ").arg(copyC)+Nam; |
copyC++; |
} |
Sty->insert(Nam2, ml); |
} |
PAGE=PAGE.nextSibling(); |
} |
DOC=DOC.nextSibling(); |
} |
return true; |
} |
bool ScriXmlDoc::ReadStyles(QString fileName, ScribusDoc* doc, preV *Prefs) |
{ |
struct StVorL vg; |
135,6 → 81,7 |
QString tmpf; |
QFont fo; |
bool fou; |
Vorlagen.clear(); |
DoFonts.clear(); |
f = ReadDatei(fileName); |
if (f == "") |
207,29 → 154,7 |
} |
else |
{ |
QString Nam = vg.Vname; |
QString Nam2 = Nam; |
bool fou2 = false; |
int copyC = 1; |
do |
{ |
fou2 = false; |
for (uint vv=0; vv<Vorlagen.count(); ++vv) |
{ |
if (Nam2 == Vorlagen[vv].Vname) |
{ |
fou2 = true; |
break; |
} |
} |
if (fou2) |
Nam2 = tr("Copy #%1 of ").arg(copyC)+Nam; |
else |
break; |
copyC++; |
} |
while (fou2); |
vg.Vname = Nam2; |
vg.Vname = "Copy of "+Vorlagen[xx].Vname; |
fou = false; |
} |
break; |
282,22 → 207,20 |
return true; |
} |
bool ScriXmlDoc::ReadPageCount(QString fileName, int *num1, int *num2) |
int ScriXmlDoc::ReadPageCount(QString fileName) |
{ |
QString PgNam; |
int counter = 0; |
int counter2 = 0; |
MNames.clear(); |
QDomDocument docu("scridoc"); |
QString f = ""; |
f = ReadDatei(fileName); |
if (f == "") |
return false; |
return 0; |
if(!docu.setContent(f)) |
return false; |
return 0; |
QDomElement elem=docu.documentElement(); |
if ((elem.tagName() != "SCRIBUS") && (elem.tagName() != "SCRIBUSUTF8")) |
return false; |
return 0; |
QDomNode DOC=elem.firstChild(); |
while(!DOC.isNull()) |
{ |
310,22 → 233,15 |
PgNam = pg.attribute("NAM", ""); |
if (PgNam == "") |
counter++; |
else |
{ |
counter2++; |
MNames.append(PgNam); |
} |
} |
PAGE=PAGE.nextSibling(); |
} |
DOC=DOC.nextSibling(); |
} |
*num1 = counter; |
*num2 = counter2; |
return true; |
return counter; |
} |
bool ScriXmlDoc::ReadPage(QString fileName, SCFonts &avail, ScribusDoc *doc, ScribusView *view, int PageToLoad, bool Mpage) |
bool ScriXmlDoc::ReadPage(QString fileName, SCFonts &avail, ScribusDoc *doc, ScribusView *view, int PageToLoad) |
{ |
struct CLBuf OB; |
struct StVorL vg; |
446,29 → 362,7 |
} |
else |
{ |
QString Nam = vg.Vname; |
QString Nam2 = Nam; |
bool fou2 = false; |
int copyC = 1; |
do |
{ |
fou2 = false; |
for (uint vv=0; vv<doc->Vorlagen.count(); ++vv) |
{ |
if (Nam2 == doc->Vorlagen[vv].Vname) |
{ |
fou2 = true; |
break; |
} |
} |
if (fou2) |
Nam2 = tr("Copy #%1 of ").arg(copyC)+Nam; |
else |
break; |
copyC++; |
} |
while (fou2); |
vg.Vname = Nam2; |
vg.Vname = "Copy of "+doc->Vorlagen[xx].Vname; |
fou = false; |
} |
break; |
531,32 → 425,14 |
ml.push_back(sl); |
MuLn = MuLn.nextSibling(); |
} |
QString Nam = pg.attribute("Name"); |
QString Nam2 = Nam; |
int copyC = 1; |
while (doc->MLineStyles.contains(Nam2)) |
{ |
Nam2 = tr("Copy #%1 of ").arg(copyC)+Nam; |
copyC++; |
doc->MLineStyles.insert(pg.attribute("Name"), ml); |
} |
doc->MLineStyles.insert(Nam2, ml); |
} |
if ((pg.tagName()=="PAGE") && (QStoInt(pg.attribute("NUM")) == PageToLoad)) |
{ |
a = doc->ActPage->PageNr; |
if ((pg.attribute("NAM", "") == "") && (Mpage)) |
{ |
PAGE=PAGE.nextSibling(); |
continue; |
} |
if (Mpage) |
{ |
view->Pages.at(a)->LeftPg=QStoInt(pg.attribute("LEFT","0")); |
view->Pages.at(a)->PageNam = pg.attribute("NAM",""); |
} |
/* |
* Attribute von PAGE auslesen |
*/ |
a = doc->ActPage->PageNr; |
if ((pg.hasAttribute("NumVGuides")) && (QStoInt(pg.attribute("NumVGuides","0")) != 0)) |
{ |
tmp = pg.attribute("VerticalGuides"); |
855,7 → 731,6 |
// Itr->paintObj(); |
} |
} |
if (!Mpage) |
view->reformPages(); |
return true; |
} |
/trunk/Scribus/scribus/libpdf/pdflib.cpp |
---|
1861,7 → 1861,7 |
else |
tmp2 += "1 0 0 -1 "+FToStr(hl->xp)+" "+FToStr((hl->yp - st) * -1)+" cm\n"; |
painter->setupPolygon(&gly); |
painter->drawUnderline(FPoint(0, tsz-st), FPoint(wid, tsz-st), true, &tmp2); |
painter->drawUnderline(FPoint(0, tsz-st), FPoint(wid, csi-st), true, &tmp2); |
tmp2 += "h f Q\n"; |
painter->end(); |
delete painter; |
2246,7 → 2246,7 |
break; |
} |
PutDoc(" >>\n"); |
cnx = "("+ind2PDFabr[ite->AnFont]+" "+FToStr(ite->ISize / 10.0)+" Tf"; |
cnx = "("+ind2PDFabr[ite->AnFont]+" "+IToStr(ite->ISize)+" Tf"; |
if (Options->UseRGB) |
{ |
if (ite->Pcolor2 != "None") |
2587,7 → 2587,7 |
} |
#endif |
cc += ind2PDFabr[ite->AnFont]; |
cc += " "+FToStr(ite->ISize / 10.0)+" Tf\n"; |
cc += " "+IToStr(ite->ISize)+" Tf\n"; |
cc += "1 0 0 1 0 0 Tm\n0 0 Td\n"+EncString("("+bm+")",ObjCounter-1)+" Tj\nET\nEMC"; |
PDF_Form(cc); |
} |
2620,7 → 2620,7 |
#ifdef HAVE_CMS |
} |
#endif |
cc += "/ZaDb "+FToStr(ite->ISize / 10.0)+" Tf\n"; |
cc += "/ZaDb "+IToStr(ite->ISize)+" Tf\n"; |
cc += "0 0 Td\n("+ct+") Tj\nET\nQ"; |
PDF_Form(cc); |
} |
2666,7 → 2666,7 |
cc += "/Tx BMC\nq\nBT\n"; |
cc += "0 g\n"; |
cc += ind2PDFabr[ite->AnFont]; |
cc += " "+FToStr(ite->ISize / 10.0)+" Tf\n"; |
cc += " "+IToStr(ite->ISize)+" Tf\n"; |
cc += "1 0 0 1 0 0 Tm\n0 0 Td\n"; |
if (bmst.count() > 0) |
cc += EncString("("+bmst[0]+")",ObjCounter-1); |
/trunk/Scribus/scribus/lineformats.cpp |
---|
2,8 → 2,6 |
#include "lineformats.moc" |
#include "multiline.h" |
#include <qmessagebox.h> |
#include "customfdialog.h" |
#include "scribusXml.h" |
extern QPixmap loadIcon(QString nam); |
LineFormate::LineFormate( QWidget* parent, ScribusDoc *doc) |
26,10 → 24,6 |
Layout15->setSpacing( 6 ); |
Layout15->setMargin( 0 ); |
LoadLS = new QPushButton( this, "LoadF" ); |
LoadLS->setText( tr( "Append" ) ); |
Layout15->addWidget( LoadLS ); |
NewB = new QPushButton( this, "NewB" ); |
NewB->setText( tr( "New" ) ); |
Layout15->addWidget( NewB ); |
64,7 → 58,6 |
// signals and slots connections |
connect(CancelB, SIGNAL(clicked()), this, SLOT(reject())); |
connect(SaveB, SIGNAL(clicked()), this, SLOT(accept())); |
connect(LoadLS, SIGNAL(clicked()), this, SLOT(loadLStyles())); |
connect(EditB, SIGNAL(clicked()), this, SLOT(editFormat())); |
connect(NewB, SIGNAL(clicked()), this, SLOT(neuesFormat())); |
connect(DublicateB, SIGNAL(clicked()), this, SLOT(dupFormat())); |
142,27 → 135,6 |
} |
} |
void LineFormate::loadLStyles() |
{ |
QString fileName; |
#ifdef HAVE_LIBZ |
CustomFDialog dia(this, tr("Open"), tr("Documents (*.sla *.sla.gz *.scd *.scd.gz);;All Files (*)")); |
#else |
CustomFDialog dia(this, tr("Open"), tr("Documents (*.sla *.scd);;All Files (*)")); |
#endif |
if (dia.exec() == QDialog::Accepted) |
fileName = dia.selectedFile(); |
else |
return; |
if (!fileName.isEmpty()) |
{ |
ScriXmlDoc *ss = new ScriXmlDoc(); |
if (ss->ReadLStyles(fileName, &TempStyles)) |
UpdateFList(); |
delete ss; |
} |
} |
void LineFormate::UpdateFList() |
{ |
disconnect(ListBox1, SIGNAL(highlighted(QListBoxItem*)), this, SLOT(selFormat(QListBoxItem*))); |
/trunk/Scribus/scribus/muster.cpp |
---|
1,9 → 1,7 |
#include "muster.h" |
#include "muster.moc" |
#include "newtemp.h" |
#include "mergedoc.h" |
#include <qmessagebox.h> |
#include <qcursor.h> |
extern QPixmap loadIcon(QString nam); |
26,10 → 24,6 |
Layout2->setSpacing( 6 ); |
Layout2->setMargin( 0 ); |
LoadM = new QPushButton( this, "LoadF" ); |
LoadM->setText( tr( "Append" ) ); |
Layout2->addWidget( LoadM ); |
NewB = new QPushButton( this, "NewB" ); |
NewB->setText( tr( "New" ) ); |
Layout2->addWidget( NewB ); |
68,7 → 62,6 |
connect(DuplicateB, SIGNAL(clicked()), this, SLOT(DuplTemp())); |
connect(DeleteB, SIGNAL(clicked()), this, SLOT(DelTemp())); |
connect(NewB, SIGNAL(clicked()), this, SLOT(NewTemp())); |
connect(LoadM, SIGNAL(clicked()), this, SLOT(loadMpage())); |
connect(ListBox1, SIGNAL(highlighted(QListBoxItem*)), this, SLOT(selTemplate(QListBoxItem*))); |
} |
207,46 → 200,6 |
delete dia; |
} |
void MusterSeiten::loadMpage() |
{ |
QString nam, nam2; |
int nr; |
bool atf; |
MergeDoc *dia = new MergeDoc(this, true); |
if (dia->exec()) |
{ |
qApp->setOverrideCursor(QCursor(waitCursor), true); |
nr = View->Pages.count(); |
for (uint a=0; a<View->Pages.count(); ++a) |
{ |
View->Pages.at(a)->parentWidget()->hide(); |
} |
Doc->PageC = 0; |
atf = Doc->PageAT; |
Doc->PageAT = false; |
emit CreateNew(nr); |
qApp->processEvents(); |
emit LoadPage(dia->Filename->text(), dia->PageNa->currentItem(), true); |
qApp->processEvents(); |
nam = View->Pages.at(nr)->PageNam; |
nam2 = nam; |
int copyC = 1; |
while (View->MasterNames.contains(nam2)) |
{ |
nam2 = tr("Copy #%1 of ").arg(copyC)+nam; |
copyC++; |
} |
View->MasterNames.insert(nam2, nr); |
View->Pages.at(nr)->PageNam = nam2; |
View->Pages.at(nr)->MPageNam = ""; |
View->DrawNew(); |
updateMList(nam2); |
Doc->PageAT = atf; |
qApp->setOverrideCursor(QCursor(arrowCursor), true); |
} |
delete dia; |
} |
void MusterSeiten::selTemplate(QListBoxItem *c) |
{ |
sMuster = c->text(); |
/trunk/Scribus/scribus/colorm.cpp |
---|
113,9 → 113,9 |
EditColors.insert(it.key(), it.data()); |
} |
} |
delete ss; |
updateCList(); |
} |
delete ss; |
} |
} |
/trunk/Scribus/scribus/story.cpp |
---|
326,7 → 326,7 |
if (TextChanged) |
{ |
int t = QMessageBox::warning(this, tr("Warning"), |
tr("Do you really want to lose all your Changes?"), |
tr("Do you really want to loose all your Changes?"), |
QMessageBox::No, QMessageBox::Yes, QMessageBox::NoButton); |
if (t == QMessageBox::No) |
return; |
/trunk/Scribus/scribus/mergedoc.cpp |
---|
16,12 → 16,12 |
extern QPixmap loadIcon(QString nam); |
MergeDoc::MergeDoc( QWidget* parent, bool Mpages ) : QDialog( parent, "merge", true, 0 ) |
MergeDoc::MergeDoc( QWidget* parent ) : QDialog( parent, "merge", true, 0 ) |
{ |
setCaption( tr( "Import a Page" ) ); |
setIcon(loadIcon("AppIcon.png")); |
Count = 0; |
Mpa = Mpages; |
MergeDocLayout = new QVBoxLayout( this, 11, 6, "MergeDocLayout"); |
textLabel1 = new QLabel( this, "textLabel1" ); |
textLabel1->setText( tr( "Document to load:" ) ); |
44,23 → 44,11 |
textLabel3 = new QLabel( this, "textLabel3" ); |
textLabel3->setText( tr( "Import Page Nr:" ) ); |
layout2->addWidget( textLabel3 ); |
if (Mpa) |
{ |
PageNa = new QComboBox( true, this, "Templ" ); |
PageNa->setMinimumSize( QSize( 120, 22 ) ); |
PageNa->setEditable(false); |
PageNa->setEnabled(false); |
layout2->addWidget( PageNa ); |
} |
else |
{ |
PageNr = new QSpinBox( this, "PageNr" ); |
PageNr->setMinValue( 1 ); |
PageNr->setMaxValue( 2000 ); |
PageNr->setValue( 1 ); |
PageNr->setEnabled(false); |
layout2->addWidget( PageNr ); |
} |
MergeDocLayout->addLayout( layout2 ); |
layout3 = new QHBoxLayout( 0, 0, 2, "layout3"); |
97,9 → 85,6 |
void MergeDoc::ChangeFile() |
{ |
QString fn; |
int dummy; |
bool ret = false; |
Count = 0; |
#ifdef HAVE_LIBZ |
CustomFDialog dia(this, tr("Open"), tr("Documents (*.sla *.sla.gz *.scd *.scd.gz);;All Files (*)")); |
#else |
114,27 → 99,15 |
{ |
qApp->setOverrideCursor(QCursor(waitCursor), true); |
ScriXmlDoc *ss = new ScriXmlDoc(); |
if (Mpa) |
ret = ss->ReadPageCount(fn, &dummy, &Count); |
else |
ret = ss->ReadPageCount(fn, &Count, &dummy); |
Count = ss->ReadPageCount(fn); |
qApp->setOverrideCursor(QCursor(arrowCursor), true); |
if ((ret) && (Count != 0)) |
if (Count != 0) |
{ |
Filename->setText(fn); |
Import->setEnabled(true); |
if (Mpa) |
{ |
PageNa->clear(); |
PageNa->setEnabled(true); |
PageNa->insertStringList(ss->MNames); |
} |
else |
{ |
PageNr->setEnabled(true); |
PageNr->setValue(1); |
PageNr->setMaxValue(Count); |
} |
Inform->setText( tr("Document contains: %1 Page(s)").arg(Count)); |
} |
delete ss; |
145,17 → 118,9 |
Filename->setText(""); |
Count = 0; |
Import->setEnabled(false); |
if (Mpa) |
{ |
PageNa->clear(); |
PageNa->setEnabled(false); |
} |
else |
{ |
PageNr->setEnabled(false); |
PageNr->setValue(1); |
PageNr->setValue(0); |
PageNr->setMaxValue(Count); |
} |
Inform->setText( tr("Document contains: %1 Page(s)").arg(Count)); |
} |
} |
/trunk/Scribus/scribus/applytemplate.cpp |
---|
2,7 → 2,7 |
#include "applytemplate.moc" |
extern QPixmap loadIcon(QString nam); |
ApplyT::ApplyT( QWidget* parent, ScribusView *view, QString Nam) |
ApplyT::ApplyT( QWidget* parent, ScribusView *view) |
: QDialog( parent, "apply", true, 0) |
{ |
setCaption( tr( "Apply Template" ) ); |
15,23 → 15,10 |
Templ = new QComboBox( true, this, "Templ" ); |
Templ->setMinimumSize( QSize( 120, 22 ) ); |
Templ->setEditable(false); |
QString na, in; |
if (Nam == "Normal") |
na = tr("Normal"); |
else |
na = Nam; |
int cc = 0; |
QMap<QString,int>::Iterator it; |
for (it = view->MasterNames.begin(); it != view->MasterNames.end(); ++it) |
{ |
if (it.key() == "Normal") |
in = tr("Normal"); |
else |
in = it.key(); |
Templ->insertItem(in); |
if (in == na) |
Templ->setCurrentItem(cc); |
cc++; |
it.key() == "Normal" ? Templ->insertItem( tr("Normal")) : Templ->insertItem(it.key()); |
} |
layout3->addWidget( Templ ); |
ApplyTLayout->addLayout( layout3 ); |
/trunk/Scribus/scribus/scribus.h |
---|
195,7 → 195,7 |
/** generate a new document in the actual view */ |
bool slotFileNew(); |
bool slotDocMerge(); |
bool LadeSeite(QString fileName, int Nr, bool Mpa); |
bool LadeSeite(QString fileName, int Nr); |
/** open a document */ |
void slotFileOpen(); |
/** open a document */ |
/trunk/Scribus/scribus/hyphenator.cpp |
---|
126,7 → 126,6 |
return; |
if (!Sap->Sprachen.contains(it->Language)) |
return; |
uint maxC = it->Ptext.count() - 1; |
QString found = text; |
if (static_cast<int>(found.length()) > MinWordLen) |
{ |
139,14 → 138,14 |
{ |
uint i = 0; |
buffer[strlen(word)] = '\0'; |
for (i = 1; i < found.length()-1; ++i) |
for (i = 1; i < strlen(word)-1; ++i) |
{ |
it->Ptext.at(QMIN(maxC, i+firstC))->cstyle &= 127; // Delete any old Hyphens |
it->Ptext.at(i+firstC)->cstyle &= 127; // Delete any old Hyphens |
} |
for (i = 1; i < found.length()-1; ++i) |
for (i = 1; i < strlen(word)-1; ++i) |
{ |
if(buffer[i] & 1) |
it->Ptext.at(QMIN(maxC, i+firstC))->cstyle ^= 128; // Set new Hyphens according Buffer |
it->Ptext.at(i+firstC)->cstyle ^= 128; // Set new Hyphens according Buffer |
} |
} |
free(buffer); |
193,7 → 192,6 |
int Ccount = 0; |
QString found = ""; |
QString found2 = ""; |
uint maxC = it->Ptext.count() - 1; |
qApp->setOverrideCursor(QCursor(waitCursor), true); |
while ((firstC+Ccount < static_cast<int>(text.length())) && (firstC != -1) && (lastC < static_cast<int>(text.length()))) |
{ |
217,12 → 215,12 |
{ |
uint i = 0; |
buffer[strlen(word)] = '\0'; |
for (i = 1; i < found.length()-1; ++i) |
for (i = 1; i < strlen(word)-1; ++i) |
{ |
it->Ptext.at(QMIN(maxC, i+firstC))->cstyle &= 127; // Delete any old Hyphens |
it->Ptext.at(i+firstC)->cstyle &= 127; // Delete any old Hyphens |
} |
bool hasHyphen = false; |
for (i = 1; i < found.length()-1; ++i) |
for (i = 1; i < strlen(word)-1; ++i) |
{ |
if(buffer[i] & 1) |
{ |
236,7 → 234,7 |
{ |
QString outs = ""; |
outs += found2[0]; |
for (i = 1; i < found.length()-1; ++i) |
for (i = 1; i < strlen(word)-1; ++i) |
{ |
outs += found2[i]; |
if(buffer[i] & 1) |
254,7 → 252,7 |
{ |
QChar cht = outs[i]; |
if (cht == "-") |
it->Ptext.at(QMIN(maxC, ii+firstC))->cstyle ^= 128; // Set new Hyphens according Buffer |
it->Ptext.at(ii+firstC)->cstyle ^= 128; // Set new Hyphens according Buffer |
else |
ii++; |
} |
270,10 → 268,10 |
} |
else |
{ |
for (i = 1; i < found.length()-1; ++i) |
for (i = 1; i < strlen(word)-1; ++i) |
{ |
if(buffer[i] & 1) |
it->Ptext.at(QMIN(maxC, i+firstC))->cstyle ^= 128; // Set new Hyphens according Buffer |
it->Ptext.at(i+firstC)->cstyle ^= 128; // Set new Hyphens according Buffer |
} |
} |
} |
/trunk/Scribus/scribus/applytemplate.h |
---|
18,7 → 18,7 |
Q_OBJECT |
public: |
ApplyT( QWidget* parent, ScribusView *view, QString Nam); |
ApplyT( QWidget* parent, ScribusView *view); |
~ApplyT() {}; |
QLabel* TextLabel1; |
/trunk/Scribus/scribus/lineformats.h |
---|
17,7 → 17,6 |
~LineFormate() {}; |
QListBox* ListBox1; |
QPushButton* LoadLS; |
QPushButton* NewB; |
QPushButton* EditB; |
QPushButton* DublicateB; |
35,7 → 34,6 |
void neuesFormat(); |
void dupFormat(); |
void deleteFormat(); |
void loadLStyles(); |
protected: |
QHBoxLayout* StilFormateLayout; |
/trunk/Scribus/scribus/muster.h |
---|
29,7 → 29,6 |
private: |
void updateMList(QString nam); |
QListBox* ListBox1; |
QPushButton* LoadM; |
QPushButton* NewB; |
QPushButton* DuplicateB; |
QPushButton* DeleteB; |
43,12 → 42,10 |
void DuplTemp(); |
void DelTemp(); |
void NewTemp(); |
void loadMpage(); |
void selTemplate(QListBoxItem *c); |
signals: |
void CreateNew(int); |
void LoadPage(QString, int, bool); |
void Fertig(); |
protected: |
/trunk/Scribus/scribus/mergedoc.h |
---|
17,7 → 17,6 |
#include <qspinbox.h> |
#include <qlayout.h> |
#include <qtooltip.h> |
#include <qcombobox.h> |
class MergeDoc : public QDialog |
25,7 → 24,7 |
Q_OBJECT |
public: |
MergeDoc( QWidget* parent, bool Mpages); |
MergeDoc( QWidget* parent = 0); |
~MergeDoc(); |
QLabel* textLabel1; |
34,11 → 33,9 |
QLabel* Inform; |
QLabel* textLabel3; |
QSpinBox* PageNr; |
QComboBox* PageNa; |
QPushButton* Import; |
QPushButton* Cancel; |
int Count; |
bool Mpa; |
public slots: |
void ChangeFile(); |