Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 1064 → Rev 1065

/branches/Version13x/Scribus/AUTHORS
4,10 → 4,11
Paul F. Johnson paul@all-the-johnsons.co.uk
Craig Bradney cbradney@zip.com.au
Petr Vaněk petr@yarpen.cz
Riku Leino tsoots@welho.com
Riku Leino riku.leino@gmail.com
 
Contributions from:
 
Craig Ringer craig@postnewspapers.com.au
Alessandro Rimoldi http://ideale.ch/contact
Jean-Jacques Sarton jj.sarton@t-online.de
Christian Töpp mr-ct@gmx.de
14,18 → 15,30
Alastair Robinson blackfive@fakenhamweb.co.uk
 
 
Documentation:
 
Peter Linnell scribusdocs@atlantictechsolutions.com
Official Documentation:
 
Peter Linnell mrdocs@gmail.com
Craig Bradney cbradney@zip.com.au
 
Doc Translators:
 
(DE)Johannes Rüscheljo.rueschel@gmx.de
(FR)Frédéric Dubuy effediwhy@gmail.com
 
 
Other documentation:
 
Yves Ceccone yves@yeccoe.org
Holger Reibold http://www.bomots.de/scribus/
Thomas Zastrow webmaster@thomas-zastrow.de
 
 
Webmasters:
 
Peter Linnell scribusdocs@atlantictechsolutions.com
Peter Linnell mrdocs@gmail.com
Craig Bradney cbradney@zip.com.au
 
Scribus Font Sampler Script
Steve Callcott
Steve Callcott stotte@ntlworld.com
/branches/Version13x/Scribus/README
1,31 → 1,42
This is Scribus Version 1.3.0
The Scribus 1.3 version features a complete rewrite of the rendering Engine.
All rendering is now done via libart and freetype2.
This is Scribus Version 1.2.1
 
The Scribus 1.2.x versions feature a complete rewrite of the rendering engine.
All rendering is done via libart and freetype2.
This requires that libart_lgpl and freetype2 are installed.
 
Scribus 1.2.1 also has a new OpenOffice.org Writer and Draw importer. This
requires libxml2, preferably version 2.6.x+. The OpenOffice.org Writer importer
will import styles from the OpenOffice.org doc and will create similar styles
within your Scribus document.
 
 
Additionally Scribus uses now a different way to find fonts, sadly this gives
some changes in the font names Scribus uses. To convert old documents follow the
procedure below:
some changes in the font names Scribus uses. To convert old documents follow
the procedure below:
 
1) Create a document with the old Version of Scribus containing all your Fonts.
2) Open the new Scribus and go to the Font Substitution List.
3) Clear out all current Substitutions.
4) Open the Document created in 1) and substitute all the fonts with the correct new Fonts.
3) Clear out all current substitutions.
4) Open the Document created in 1) and substitute all the fonts with the
correct new fonts.
 
When you open now old Documents Scribus will convert all Font Names
When you now open old documents Scribus will convert all Font Names
automatically.
 
For Changes please see the ChangeLog.
 
To use Scribus in your native language be sure that the environment
variable LANG is set correctly.
To use Scribus in your native language be sure that the environment variable
LC_ALL, LC_MESSAGES, LANG, Qt locale, OR the command line option
of -l/--lang <lang> is set correctly.
 
The new EPS/PS import feature in 1.3 uses advanced features of Ghostscript. We recommend
ALL users update to the newest version of Ghostscript avialable for your distro.
The new EPS/PS import feature in 1.2.x uses advanced features of Ghostscript.
We recommend ALL users update to the newest version of Ghostscript available
for your distro. There are detailed hints on docs.scribus.net for installing
GS 8.x in parallel to the GS installed by your distro.
 
Special note for SuSE 8.1 users, you need the devel packages, at least
xdevel.rpm, qtdevel.rpm and tiffdevel.rpm. In the Standard-Install they
were not installed.
Activating Color Management *requires* installation of CMYK and RGB ICC
profiles. Please see the included help files and http://docs.scribus.net for
details.
 
Other notes/known issues at the time of release:
 
44,20 → 55,30
They are in the "Recommends" and will be installed by all sensible apt
front-ends.
 
For SuSE 9.0/9.1 Users.
For SuSE 9.x Users:
 
The littlecms libs 1.10, which shipped with 9.0 does not offer complete support
for all the the latest CMS features in Scribus 1.2. There are updated
SuSE 9.x RPM's available on the scribus.net site. We also recommend using the
latest version of lcms.
- The littlecms libs 1.10, which shipped with 9.0 does not offer complete
support for all the the latest CMS features in Scribus 1.2. There are updated
SuSE 9.x RPM's available on the Scribus.net site. We also recommend using the
latest version of lcms.
 
If you are using Qt 3.3.x, please ensure you are using the latest Qt 3.3.2-2+ rpms.
The -2+ versions have an important fix for drag and drop in Scribus.
- If you are using Qt 3.3.x, please ensure you are using the latest Qt 3.3.2-2+
rpms. The -2+ versions have an important fix for drag and drop in Scribus.
 
Many other hints and info are on the www.scribus.net site. Full compile, install and FAQ's
are available there.
- To enable direct CUPS support which recommend, make sure both cups-devel and
openssl-devel are installed. Suse enables ssl support in CUPS.
 
For Fedora/RH using Qt 3.3.2-6+ has the same fixes.
 
Many other hints and info are on the www.scribus.net and docs.scribus.net
sites. Full compile, install and FAQ's are available there.
 
There is a lively on-line community, both on IRC @ #scribus on irc.freenode.net
and the mailing list. Mailing list info can be found at:
http://nashi.altmuehlnet.de/mailman/listinfo/scribus
 
For the Scribus Team,
 
Franz Schmid
in August 2004
Peter Linnell
in January 2005
/branches/Version13x/Scribus/scribus.lsm
1,6 → 1,6
Begin4
Title: Scribus
Version: 1.3.0cvs
Version: 1.2.1
Entered-date: 2003-10-01
Description: Scribus is a Desktop Publishing Program for Linux published under the GNU GPL.
Keywords: desktop publishing, PDF, text processing, graphics, postscript, SVG, EPS
7,7 → 7,7
Author: franz.schmid@altmuehlnet.de Franz Schmid
Maintained-by: franz.schmid@altmuehlnet.de Franz Schmid
Primary-site: http://www.scribus.net
Alternate-site: http://web2.altmuehlnet.de/fschmid
Alternate-site: http://www.scribus.org.uk/
Original-site: http://web2.altmuehlnet.de/fschmid
Platforms: Linux and other Unices, MacOSX, Requires: Python >= 2.2, Qt >= 3.0.5+, libart_lgpl >= 2.3.11, freetype2 >=2.1.3
Copying-policy: GNU Public License
/branches/Version13x/Scribus/TODO
1,5 → 1,0
Plans for the next Release:
 
- Integrate a Spellchecker
- Provide an alternative Fontselector
- enhanche the Display
Plans for the next Release can be seen on www.scribus.net website on the roadmap document.
/branches/Version13x/Scribus/scribus/fileloader.cpp
23,7 → 23,7
#include <zlib.h>
#endif
extern bool loadText(QString nam, QString *Buffer);
extern void GetItemProps(bool newVersion, QDomElement *obj, struct CLBuf *OB);
extern void GetItemProps(bool newVersion, QDomElement *obj, struct CopyPasteBuffer *OB);
extern double QStodouble(QString in);
extern int QStoInt(QString in);
extern QColor SetColor(ScribusDoc *currentDoc, QString color, int shad);
204,8 → 204,8
 
bool FileLoader::ReadDoc(ScribusApp* app, QString fileName, SCFonts &avail, ScribusDoc *doc, ScribusView *view, QProgressBar *dia2)
{
struct CLBuf OB;
struct StVorL vg;
struct CopyPasteBuffer OB;
struct ParagraphStyle vg;
struct Layer la;
struct ScribusDoc::BookMa bok;
int counter, Pgc;
254,7 → 254,7
doc->PageAT=QStoInt(dc.attribute("AUTOTEXT"));
doc->PageSp=QStoInt(dc.attribute("AUTOSPALTEN"));
doc->PageSpa=QStodouble(dc.attribute("ABSTSPALTEN"));
doc->Einheit = QStoInt(dc.attribute("UNITS","0"));
doc->docUnitIndex = QStoInt(dc.attribute("UNITS","0"));
DoFonts.clear();
doc->Dsize=qRound(QStodouble(dc.attribute("DSIZE")) * 10);
Defont=dc.attribute("DFONT");
385,7 → 385,7
doc->guidesSettings.guideColor = QColor(dc.attribute("GuideC"));
if (dc.hasAttribute("BaseC"))
doc->guidesSettings.baseColor = QColor(dc.attribute("BaseC"));
doc->RandFarbig = static_cast<bool>(QStoInt(dc.attribute("RANDF","0")));
doc->marginColored = static_cast<bool>(QStoInt(dc.attribute("RANDF","0")));
doc->Before = static_cast<bool>(QStoInt(dc.attribute("BACKG","1")));
doc->guidesSettings.guideRad = QStoInt(dc.attribute("GuideRad","10"));
doc->guidesSettings.grabRad = QStoInt(dc.attribute("GRAB","4"));
412,9 → 412,9
vg.LineSpa = QStodouble(pg.attribute("LINESP"));
vg.Indent = QStodouble(pg.attribute("INDENT","0"));
vg.First = QStodouble(pg.attribute("FIRST","0"));
vg.Ausri = QStoInt(pg.attribute("ALIGN"));
vg.Avor = QStodouble(pg.attribute("VOR","0"));
vg.Anach = QStodouble(pg.attribute("NACH","0"));
vg.textAlignment = QStoInt(pg.attribute("ALIGN"));
vg.gapBefore = QStodouble(pg.attribute("VOR","0"));
vg.gapAfter = QStodouble(pg.attribute("NACH","0"));
tmpf = pg.attribute("FONT", doc->Dfont);
if (tmpf == "")
tmpf = doc->Dfont;
447,7 → 447,7
}
else
vg.TabValues.clear();
doc->Vorlagen.append(vg);
doc->docParagraphStyles.append(vg);
}
if(pg.tagName()=="JAVA")
doc->JavaScripts[pg.attribute("NAME")] = pg.attribute("SCRIPT");
456,8 → 456,8
la.LNr = QStoInt(pg.attribute("NUMMER"));
la.Level = QStoInt(pg.attribute("LEVEL"));
la.Name = pg.attribute("NAME");
la.Sichtbar = QStoInt(pg.attribute("SICHTBAR"));
la.Drucken = QStoInt(pg.attribute("DRUCKEN"));
la.isViewable = QStoInt(pg.attribute("SICHTBAR"));
la.isPrintable = QStoInt(pg.attribute("DRUCKEN"));
doc->Layers.append(la);
}
if(pg.tagName()=="Bookmark")
482,7 → 482,7
while(!MuLn.isNull())
{
QDomElement MuL = MuLn.toElement();
struct singleLine sl;
struct SingleLine sl;
sl.Color = MuL.attribute("Color");
sl.Dash = QStoInt(MuL.attribute("Dash"));
sl.LineEnd = QStoInt(MuL.attribute("LineEnd"));
496,7 → 496,7
}
if(pg.tagName()=="Arrows")
{
struct arrowDesc arrow;
struct ArrowDesc arrow;
arrow.name = pg.attribute("Name");
arrow.userArrow = true;
double xa, ya;
611,7 → 611,7
doc->MasterP = true;
}
if (pg.attribute("OnMasterPage") != "")
doc->ActPage = doc->MasterPages.at(doc->MasterNames[pg.attribute("OnMasterPage")]);
doc->currentPage = doc->MasterPages.at(doc->MasterNames[pg.attribute("OnMasterPage")]);
if ((QStoInt(pg.attribute("NEXTITEM")) != -1) || (static_cast<bool>(QStoInt(pg.attribute("AUTOTEXT")))))
{
if (QStoInt(pg.attribute("BACKITEM")) == -1)
627,7 → 627,7
if ((OB.isBookmark) && (doc->BookMarks.count() == 0))
doc->OldBM = true;
OB.BMnr = QStoInt(pg.attribute("BookNr","0"));
OB.Ausrich = QStoInt(pg.attribute("ALIGN","0"));
OB.textAlignment = QStoInt(pg.attribute("ALIGN","0"));
tmpf = pg.attribute("IFONT", doc->Dfont);
if (tmpf == "")
tmpf = doc->Dfont;
670,7 → 670,7
tmp += GetItemText(&it, doc, view->Prefs, false, false);
IT=IT.nextSibling();
}
OB.Ptext = tmp;
OB.itemText = tmp;
int docGc = doc->GroupCounter;
doc->GroupCounter = 0;
if ((OB.PType == 5) && (OB.Height != 0))
765,7 → 765,7
QDomElement pdfF = PFO.toElement();
if(pdfF.tagName() == "LPI")
{
struct LPIset lpo;
struct LPIData lpo;
lpo.Angle = QStoInt(pdfF.attribute("Angle"));
lpo.Frequency = QStoInt(pdfF.attribute("Frequency"));
lpo.SpotFunc = QStoInt(pdfF.attribute("SpotFunction"));
783,10 → 783,10
}
if(pdfF.tagName() == "Effekte")
{
struct PreSet ef;
ef.EffektLen = QStoInt(pdfF.attribute("EffektLen"));
ef.AnzeigeLen = QStoInt(pdfF.attribute("AnzeigeLen"));
ef.Effekt = QStoInt(pdfF.attribute("Effekt"));
struct PDFPresentationData ef;
ef.pageEffectDuration = QStoInt(pdfF.attribute("pageEffectDuration"));
ef.pageViewDuration = QStoInt(pdfF.attribute("pageViewDuration"));
ef.effectType = QStoInt(pdfF.attribute("effectType"));
ef.Dm = QStoInt(pdfF.attribute("Dm"));
ef.M = QStoInt(pdfF.attribute("M"));
ef.Di = QStoInt(pdfF.attribute("Di"));
832,8 → 832,8
la.LNr = 0;
la.Level = 0;
la.Name = QObject::tr("Background");
la.Sichtbar = true;
la.Drucken = true;
la.isViewable = true;
la.isPrintable = true;
doc->Layers.append(la);
}
if (LFrames.count() != 0)
859,7 → 859,7
Its->NextBox = 0;
}
}
switch (doc->Einheit)
switch (doc->docUnitIndex)
{
case 0:
view->UN->setText( QObject::tr("pt"));
878,7 → 878,7
return true;
}
 
QString FileLoader::GetItemText(QDomElement *it, ScribusDoc *doc, preV *Prefs, bool VorLFound, bool impo)
QString FileLoader::GetItemText(QDomElement *it, ScribusDoc *doc, ApplicationPrefs *Prefs, bool VorLFound, bool impo)
{
QString tmp2, tmf, tmpf, tmp3, tmp;
tmp = "";
922,7 → 922,7
return tmp;
}
 
QString FileLoader::AskForFont(SCFonts &avail, QString fStr, preV *Prefs, ScribusDoc *doc)
QString FileLoader::AskForFont(SCFonts &avail, QString fStr, ApplicationPrefs *Prefs, ScribusDoc *doc)
{
QFont fo;
QString tmpf = fStr;
/branches/Version13x/Scribus/scribus/pdfopts.cpp
33,7 → 33,7
extern bool CMSavail;
extern PrefsFile* prefsFile;
 
PDF_Opts::PDF_Opts( QWidget* parent, QString Fname, QMap<QString,QFont> DocFonts, ScribusView *vie, PDFOpt *Optionen, QValueList<PreSet> Eff, ProfilesL *PDFXProfiles, SCFonts &AllFonts)
PDF_Opts::PDF_Opts( QWidget* parent, QString Fname, QMap<QString,QFont> DocFonts, ScribusView *vie, PDFOptions *Optionen, QValueList<PDFPresentationData> Eff, ProfilesL *PDFXProfiles, SCFonts &AllFonts)
: QDialog( parent, "pdf", true, 0 )
{
setCaption( tr( "Create PDF File" ) );
42,7 → 42,7
view = vie;
EffVal = Eff;
Opts = Optionen;
Einheit = view->Doc->Einheit;
docUnitIndex = view->Doc->docUnitIndex;
PDFOptsLayout = new QVBoxLayout( this );
PDFOptsLayout->setSpacing( 5 );
PDFOptsLayout->setMargin( 11 );
343,7 → 343,7
Pages = new QListBox( tabPresentation, "Pages" );
Pages->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, Pages->sizePolicy().hasHeightForWidth() ) );
QString tmp;
struct PreSet ef;
struct PDFPresentationData ef;
if (EffVal.count() != 0)
{
for (uint pg2 = 0; pg2 < view->Doc->Pages.count(); ++pg2)
351,9 → 351,9
Pages->insertItem( tr("Page")+" "+tmp.setNum(pg2+1));
if (EffVal.count()-1 < pg2)
{
ef.EffektLen = 1;
ef.AnzeigeLen = 1;
ef.Effekt = 0;
ef.pageEffectDuration = 1;
ef.pageViewDuration = 1;
ef.effectType = 0;
ef.Dm = 0;
ef.M = 0;
ef.Di = 0;
366,9 → 366,9
for (uint pg = 0; pg < view->Doc->Pages.count(); ++pg)
{
Pages->insertItem( tr("Page")+" "+tmp.setNum(pg+1));
ef.EffektLen = 1;
ef.AnzeigeLen = 1;
ef.Effekt = 0;
ef.pageEffectDuration = 1;
ef.pageViewDuration = 1;
ef.effectType = 0;
ef.Dm = 0;
ef.M = 0;
ef.Di = 0;
403,7 → 403,7
PageTime->setSuffix( tr( " sec" ) );
PageTime->setMaxValue( 3600 );
PageTime->setMinValue( 1 );
PageTime->setValue(EffVal[0].AnzeigeLen);
PageTime->setValue(EffVal[0].pageViewDuration);
TextLabel1e->setBuddy(PageTime);
EffectsLayout->addWidget( PageTime, 0, 1 );
EffectTime = new QSpinBox( Effects, "EffectTime" );
410,7 → 410,7
EffectTime->setSuffix( tr( " sec" ) );
EffectTime->setMaxValue( 3600 );
EffectTime->setMinValue( 1 );
EffectTime->setValue(EffVal[0].EffektLen);
EffectTime->setValue(EffVal[0].pageEffectDuration);
TextLabel2e->setBuddy(EffectTime);
EffectsLayout->addWidget( EffectTime, 1, 1 );
EffectType = new QComboBox( true, Effects, "EffectType" );
534,7 → 534,7
LPIgroupLayout->setAlignment( Qt::AlignTop );
LPIcolor = new QComboBox( true, LPIgroup, "LPIcolor" );
LPIcolor->setEditable(false);
QMap<QString,LPIset>::Iterator itlp;
QMap<QString,LPIData>::Iterator itlp;
for (itlp = Optionen->LPISettings.begin(); itlp != Optionen->LPISettings.end(); ++itlp)
{
LPIcolor->insertItem( itlp.key() );
743,7 → 743,7
BleedGroupLayout->addItem( spacerPX2, 1, 4 );
tabPDFXLayout->addWidget( BleedGroup );
Options->insertTab( tabPDFX, tr( "PDF/X-&3" ) );
QString EinTxt = unitGetSuffixFromIndex(Einheit);
QString EinTxt = unitGetSuffixFromIndex(docUnitIndex);
 
BleedTop->setSuffix( EinTxt );
BleedTop->setMinValue(0);
782,9 → 782,9
DoEffects();
if (CheckBox10->isChecked())
{
PageTime->setValue(EffVal[0].AnzeigeLen);
EffectTime->setValue(EffVal[0].EffektLen);
EffectType->setCurrentItem(EffVal[0].Effekt);
PageTime->setValue(EffVal[0].pageViewDuration);
EffectTime->setValue(EffVal[0].pageEffectDuration);
EffectType->setCurrentItem(EffVal[0].effectType);
EDirection->setCurrentItem(EffVal[0].Dm);
EDirection_2->setCurrentItem(EffVal[0].M);
EDirection_2_2->setCurrentItem(EffVal[0].Di);
931,9 → 931,9
QString fn = Datei->text();
if (overwrite(this, fn))
{
EffVal[PgSel].AnzeigeLen = PageTime->value();
EffVal[PgSel].EffektLen = EffectTime->value();
EffVal[PgSel].Effekt = EffectType->currentItem();
EffVal[PgSel].pageViewDuration = PageTime->value();
EffVal[PgSel].pageEffectDuration = EffectTime->value();
EffVal[PgSel].effectType = EffectType->currentItem();
EffVal[PgSel].Dm = EDirection->currentItem();
EffVal[PgSel].M = EDirection_2->currentItem();
EffVal[PgSel].Di = EDirection_2_2->currentItem();
1118,9 → 1118,9
{
for (uint pg = 0; pg < view->Doc->Pages.count(); ++pg)
{
EffVal[pg].AnzeigeLen = PageTime->value();
EffVal[pg].EffektLen = EffectTime->value();
EffVal[pg].Effekt = EffectType->currentItem();
EffVal[pg].pageViewDuration = PageTime->value();
EffVal[pg].pageEffectDuration = EffectTime->value();
EffVal[pg].effectType = EffectType->currentItem();
EffVal[pg].Dm = EDirection->currentItem();
EffVal[pg].M = EDirection_2->currentItem();
EffVal[pg].Di = EDirection_2_2->currentItem();
1156,16 → 1156,16
{
if (nr < 0)
return;
EffVal[PgSel].AnzeigeLen = PageTime->value();
EffVal[PgSel].EffektLen = EffectTime->value();
EffVal[PgSel].Effekt = EffectType->currentItem();
EffVal[PgSel].pageViewDuration = PageTime->value();
EffVal[PgSel].pageEffectDuration = EffectTime->value();
EffVal[PgSel].effectType = EffectType->currentItem();
EffVal[PgSel].Dm = EDirection->currentItem();
EffVal[PgSel].M = EDirection_2->currentItem();
EffVal[PgSel].Di = EDirection_2_2->currentItem();
SetEffOpts(EffVal[nr].Effekt);
PageTime->setValue(EffVal[nr].AnzeigeLen);
EffectTime->setValue(EffVal[nr].EffektLen);
EffectType->setCurrentItem(EffVal[nr].Effekt);
SetEffOpts(EffVal[nr].effectType);
PageTime->setValue(EffVal[nr].pageViewDuration);
EffectTime->setValue(EffVal[nr].pageEffectDuration);
EffectType->setCurrentItem(EffVal[nr].effectType);
EDirection->setCurrentItem(EffVal[nr].Dm);
EDirection_2->setCurrentItem(EffVal[nr].M);
EDirection_2_2->setCurrentItem(EffVal[nr].Di);
/branches/Version13x/Scribus/scribus/mpalette.h
81,7 → 81,7
Q_OBJECT
 
public:
Mpalette(QWidget* parent, preV *Prefs);
Mpalette(QWidget* parent, ApplicationPrefs *Prefs);
~Mpalette() {};
void keyPressEvent(QKeyEvent *k);
void closeEvent(QCloseEvent *ce);
/branches/Version13x/Scribus/scribus/hyphenator.cpp
176,7 → 176,7
const int BORDER = 2;
QCString te;
 
uint maxC = it->Ptext.count() - 1;
uint maxC = it->itemText.count() - 1;
QString found = text;
if (static_cast<int>(found.length()) > MinWordLen)
{
190,11 → 190,11
uint i = 0;
buffer[strlen(word)] = '\0';
for (i = 1; i < found.length()-1; ++i)
it->Ptext.at(QMIN(maxC, i+firstC))->cstyle &= 127; // Delete any old Hyphens
it->itemText.at(QMIN(maxC, i+firstC))->cstyle &= 127; // Delete any old Hyphens
for (i = 1; i < found.length()-1; ++i)
{
if(buffer[i] & 1)
it->Ptext.at(QMIN(maxC, i+firstC))->cstyle |= 128; // Set new Hyphens according Buffer
it->itemText.at(QMIN(maxC, i+firstC))->cstyle |= 128; // Set new Hyphens according Buffer
}
}
free(buffer);
223,14 → 223,14
nb1 = nb;
while (nb != 0)
{
uint a = nb->Ptext.count();
uint a = nb->itemText.count();
for (uint s = 0; s < a; ++s)
nb1->Ptext.append(nb->Ptext.take(0));
nb1->itemText.append(nb->itemText.take(0));
nb->MaxChars = 0;
nb->CPos = 0;
nb = nb->NextBox;
}
if ((!useAble) || (nb1->PType != 4) || (nb1 ->Ptext.count() == 0))
if ((!useAble) || (nb1->PType != 4) || (nb1 ->itemText.count() == 0))
return;
doc->DoDrawing = false;
const char *word;
239,22 → 239,22
QString text = "";
QString buf;
QCString te;
for (uint a = 0; a < nb1->Ptext.count(); ++a)
for (uint a = 0; a < nb1->itemText.count(); ++a)
{
if (nb1->HasSel)
{
if (nb1->Ptext.at(a)->cselect)
text += nb1->Ptext.at(a)->ch;
if (nb1->itemText.at(a)->cselect)
text += nb1->itemText.at(a)->ch;
}
else
text += nb1->Ptext.at(a)->ch;
text += nb1->itemText.at(a)->ch;
}
int firstC = 0;
if (nb1->HasSel)
{
for (uint a = 0; a < nb1->Ptext.count(); ++a)
for (uint a = 0; a < nb1->itemText.count(); ++a)
{
if (nb1->Ptext.at(a)->cselect)
if (nb1->itemText.at(a)->cselect)
{
firstC = static_cast<int>(a);
break;
265,7 → 265,7
int Ccount = 0;
QString found = "";
QString found2 = "";
uint maxC = nb1->Ptext.count() - 1;
uint maxC = nb1->itemText.count() - 1;
qApp->setOverrideCursor(QCursor(waitCursor), true);
while ((firstC+Ccount < static_cast<int>(text.length())) && (firstC != -1) &&
(lastC < static_cast<int>(text.length())))
291,7 → 291,7
uint i = 0;
buffer[strlen(word)] = '\0';
for (i = 1; i < found.length()-1; ++i)
nb1->Ptext.at(QMIN(maxC, i+firstC))->cstyle &= 127; // Delete any old Hyphens
nb1->itemText.at(QMIN(maxC, i+firstC))->cstyle &= 127; // Delete any old Hyphens
bool hasHyphen = false;
for (i = 1; i < found.length()-1; ++i)
{
325,7 → 325,7
{
QChar cht = outs[i];
if (cht == "-")
nb1->Ptext.at(QMIN(maxC, ii+firstC))->cstyle |= 128;
nb1->itemText.at(QMIN(maxC, ii+firstC))->cstyle |= 128;
else
ii++;
}
344,7 → 344,7
for (i = 1; i < found.length()-1; ++i)
{
if(buffer[i] & 1)
nb1->Ptext.at(QMIN(maxC, i+firstC))->cstyle |= 128;
nb1->itemText.at(QMIN(maxC, i+firstC))->cstyle |= 128;
}
}
}
/branches/Version13x/Scribus/scribus/lineformats.cpp
119,7 → 119,7
 
void LineFormate::neuesFormat()
{
struct singleLine sl;
struct SingleLine sl;
sl.Color = "Black";
sl.Shade = 100;
sl.Dash = SolidLine;
/branches/Version13x/Scribus/scribus/edit1format.h
26,7 → 26,7
Q_OBJECT
 
public:
EditStyle( QWidget* parent, struct StVorL *vor, QValueList<StVorL> v, bool neu, preV *Prefs,
EditStyle( QWidget* parent, struct ParagraphStyle *vor, QValueList<ParagraphStyle> v, bool neu, ApplicationPrefs *Prefs,
double au, int dEin, ScribusDoc *doc);
~EditStyle() {};
 
62,8 → 62,8
QSpinBox* DropLines;
QPushButton* Cancel;
QPushButton* OkButton;
struct StVorL *werte;
QValueList<StVorL> allV;
struct ParagraphStyle *werte;
QValueList<ParagraphStyle> allV;
QString OldName;
bool IsNew;
double AutoVal;
/branches/Version13x/Scribus/scribus/dcolor.h
20,7 → 20,7
Q_OBJECT
 
public:
DelColor(QWidget* parent, CListe colorList, QString colorName, bool haveDoc );
DelColor(QWidget* parent, ColorList colorList, QString colorName, bool haveDoc );
~DelColor() {};
const QString getReplacementColor();
 
/branches/Version13x/Scribus/scribus/gtaction.cpp
62,7 → 62,7
 
void gtAction::clearFrame()
{
textFrame->Ptext.clear();
textFrame->itemText.clear();
textFrame->CPos = 0;
}
 
77,12 → 77,12
PageItem *nb = it->NextBox;
while (nb != 0)
{
nb->Ptext.clear();
nb->itemText.clear();
nb->CPos = 0;
nb = nb->NextBox;
}
}
it->Ptext.clear();
it->itemText.clear();
it->CPos = 0;
}
}
105,33 → 105,33
 
 
if (paragraphStyle == -1)
paragraphStyle = ScApp->doc->CurrentABStil;
paragraphStyle = ScApp->doc->currentParaStyle;
 
gtFont* font = style->getFont();
QString fontName = validateFont(font);
gtFont* font2 = new gtFont(*font);
font2->setName(ScApp->doc->Vorlagen[paragraphStyle].Font);
font2->setName(ScApp->doc->docParagraphStyles[paragraphStyle].Font);
QString fontName2 = validateFont(font2);
for (uint a = 0; a < text.length(); ++a)
{
if ((text.at(a) == QChar(0)) || (text.at(a) == QChar(13)))
continue;
struct Pti *hg = new Pti;
struct ScText *hg = new ScText;
hg->ch = text.at(a);
if ((hg->ch == QChar(10)) || (hg->ch == QChar(5)))
hg->ch = QChar(13);
if ((inPara) && (!overridePStyleFont))
{
if (ScApp->doc->Vorlagen[paragraphStyle].Font == "")
if (ScApp->doc->docParagraphStyles[paragraphStyle].Font == "")
hg->cfont = fontName2;
else
hg->cfont = ScApp->doc->Vorlagen[paragraphStyle].Font;
hg->csize = ScApp->doc->Vorlagen[paragraphStyle].FontSize;
hg->ccolor = ScApp->doc->Vorlagen[paragraphStyle].FColor;
hg->cshade = ScApp->doc->Vorlagen[paragraphStyle].FShade;
hg->cstroke = ScApp->doc->Vorlagen[paragraphStyle].SColor;
hg->cshade2 = ScApp->doc->Vorlagen[paragraphStyle].SShade;
hg->cstyle = ScApp->doc->Vorlagen[paragraphStyle].FontEffect;
hg->cfont = ScApp->doc->docParagraphStyles[paragraphStyle].Font;
hg->csize = ScApp->doc->docParagraphStyles[paragraphStyle].FontSize;
hg->ccolor = ScApp->doc->docParagraphStyles[paragraphStyle].FColor;
hg->cshade = ScApp->doc->docParagraphStyles[paragraphStyle].FShade;
hg->cstroke = ScApp->doc->docParagraphStyles[paragraphStyle].SColor;
hg->cshade2 = ScApp->doc->docParagraphStyles[paragraphStyle].SShade;
hg->cstyle = ScApp->doc->docParagraphStyles[paragraphStyle].FontEffect;
}
else
{
151,7 → 151,7
hg->yp = 0;
hg->PtransX = 0;
hg->PtransY = 0;
it->Ptext.append(hg);
it->itemText.append(hg);
}
lastCharWasLineChange = text.right(1) == "\n";
inPara = style->target() == "paragraph";
168,9 → 168,9
int gtAction::findParagraphStyle(const QString& name)
{
int pstyleIndex = -1;
for (uint i = 0; i < ScApp->doc->Vorlagen.size(); ++i)
for (uint i = 0; i < ScApp->doc->docParagraphStyles.size(); ++i)
{
if (ScApp->doc->Vorlagen[i].Vname == name)
if (ScApp->doc->docParagraphStyles[i].Vname == name)
{
pstyleIndex = i;
break;
185,7 → 185,7
if (pstyleIndex == -1)
{
createParagraphStyle(pstyle);
pstyleIndex = ScApp->doc->Vorlagen.size() - 1;
pstyleIndex = ScApp->doc->docParagraphStyles.size() - 1;
}
else if (updateParagraphStyles)
{
206,7 → 206,7
// int pstyleIndex = findParagraphStyle(pstyle);
// if (pstyleIndex == -1)
// pstyleIndex = 0;
// textFrame->Doc->CurrentABStil = pstyleIndex;
// textFrame->Doc->currentParaStyle = pstyleIndex;
 
double linesp;
if (fstyle->getAutoLineSpacing())
246,14 → 246,14
fstyle->setBgColor(textFrame->Pcolor);
fstyle->setBgShade(textFrame->Shade);
struct StVorL vg = textFrame->Doc->Vorlagen[textFrame->Doc->CurrentABStil];
struct ParagraphStyle vg = textFrame->Doc->docParagraphStyles[textFrame->Doc->currentParaStyle];
fstyle->setName(vg.Vname);
fstyle->setLineSpacing(vg.LineSpa);
fstyle->setAlignment(vg.Ausri);
fstyle->setAlignment(vg.textAlignment);
fstyle->setIndent(vg.Indent);
fstyle->setFirstLineIndent(vg.First);
fstyle->setSpaceAbove(vg.Avor);
fstyle->setSpaceBelow(vg.Anach);
fstyle->setSpaceAbove(vg.gapBefore);
fstyle->setSpaceBelow(vg.gapAfter);
fstyle->setDropCap(vg.Drop);
fstyle->setDropCapHeight(vg.DropLin);
fstyle->setAdjToBaseline(vg.BaseAdj);
266,16 → 266,16
 
void gtAction::createParagraphStyle(gtParagraphStyle* pstyle)
{
if (textFrame->Doc->Vorlagen.size() > 5)
if (textFrame->Doc->docParagraphStyles.size() > 5)
{
for (uint i = 5; i < textFrame->Doc->Vorlagen.size(); ++i)
for (uint i = 5; i < textFrame->Doc->docParagraphStyles.size(); ++i)
{
if (textFrame->Doc->Vorlagen[i].Vname == pstyle->getName())
if (textFrame->Doc->docParagraphStyles[i].Vname == pstyle->getName())
return;
}
}
gtFont* font = pstyle->getFont();
struct StVorL vg;
struct ParagraphStyle vg;
vg.Vname = pstyle->getName();
double linesp;
if (pstyle->getAutoLineSpacing())
283,11 → 283,11
else
linesp = pstyle->getLineSpacing();
vg.LineSpa = linesp;
vg.Ausri = pstyle->getAlignment();
vg.textAlignment = pstyle->getAlignment();
vg.Indent = pstyle->getIndent();
vg.First = pstyle->getFirstLineIndent();
vg.Avor = pstyle->getSpaceAbove();
vg.Anach = pstyle->getSpaceBelow();
vg.gapBefore = pstyle->getSpaceAbove();
vg.gapAfter = pstyle->getSpaceBelow();
vg.Font = validateFont(font);
vg.FontSize = font->getSize();
vg.TabValues.clear();
305,7 → 305,7
vg.SColor = parseColor(font->getStrokeColor());
vg.SShade = font->getStrokeShade();
vg.BaseAdj = pstyle->isAdjToBaseline();
textFrame->Doc->Vorlagen.append(vg);
textFrame->Doc->docParagraphStyles.append(vg);
ScApp->Mpal->Spal->updateFormatList();
}
 
318,8 → 318,8
 
void gtAction::removeParagraphStyle(int index)
{
QValueList<StVorL>::iterator it = ScApp->doc->Vorlagen.at(index);
ScApp->doc->Vorlagen.remove(it);
QValueList<ParagraphStyle>::iterator it = ScApp->doc->docParagraphStyles.at(index);
ScApp->doc->docParagraphStyles.remove(it);
}
 
void gtAction::updateParagraphStyle(const QString& pstyleName, gtParagraphStyle* pstyle)
332,7 → 332,7
void gtAction::updateParagraphStyle(int pstyleIndex, gtParagraphStyle* pstyle)
{
gtFont* font = pstyle->getFont();
struct StVorL vg;
struct ParagraphStyle vg;
vg.Vname = pstyle->getName();
double linesp;
if (pstyle->getAutoLineSpacing())
340,11 → 340,11
else
linesp = pstyle->getLineSpacing();
vg.LineSpa = linesp;
vg.Ausri = pstyle->getAlignment();
vg.textAlignment = pstyle->getAlignment();
vg.Indent = pstyle->getIndent();
vg.First = pstyle->getFirstLineIndent();
vg.Avor = pstyle->getSpaceAbove();
vg.Anach = pstyle->getSpaceBelow();
vg.gapBefore = pstyle->getSpaceAbove();
vg.gapAfter = pstyle->getSpaceBelow();
vg.Font = validateFont(font);
vg.FontSize = font->getSize();
vg.TabValues.clear();
362,7 → 362,7
vg.SColor = parseColor(font->getStrokeColor());
vg.SShade = font->getStrokeShade();
vg.BaseAdj = pstyle->isAdjToBaseline();
ScApp->doc->Vorlagen[pstyleIndex] = vg;
ScApp->doc->docParagraphStyles[pstyleIndex] = vg;
}
 
QString gtAction::validateFont(gtFont* font)
490,7 → 490,7
if (s == "None")
return ret; // don't want None to become Black or any color
bool found = false;
CListe::Iterator it;
ColorList::Iterator it;
for (it = ScApp->doc->PageColors.begin(); it != ScApp->doc->PageColors.end(); ++it)
{
if (it.key() == s)
564,8 → 564,8
 
void gtAction::finalize()
{
if (ScApp->doc->Trenner->AutoCheck)
ScApp->doc->Trenner->slotHyphenate(textFrame);
if (ScApp->doc->docHyphenator->AutoCheck)
ScApp->doc->docHyphenator->slotHyphenate(textFrame);
ScApp->view->DrawNew();
ScApp->slotDocCh();
}
/branches/Version13x/Scribus/scribus/mpalette.cpp
83,7 → 83,7
QLineEdit::focusOutEvent(e);
}
 
Mpalette::Mpalette( QWidget* parent, preV *Prefs) : QDialog( parent, "Mdouble", false, 0)
Mpalette::Mpalette( QWidget* parent, ApplicationPrefs *Prefs) : QDialog( parent, "Mdouble", false, 0)
{
setCaption( tr( "Properties" ) );
HaveDoc = false;
1480,9 → 1480,9
double newRR = RoundRect->value() / old * UmReFaktor;
double newRM = RoundRect->maxValue() / old * UmReFaktor;
 
if (doc->Einheit > 3)
doc->Einheit = 0;
QString ein = unitGetSuffixFromIndex(doc->Einheit);
if (doc->docUnitIndex > 3)
doc->docUnitIndex = 0;
QString ein = unitGetSuffixFromIndex(doc->docUnitIndex);
 
Xpos->setSuffix( ein );
Ypos->setSuffix( ein );
1497,9 → 1497,9
DRight->setSuffix( ein );
RoundRect->setSuffix( ein );
 
int xywhdecimals = unitGetDecimalsFromIndex(doc->Einheit);
int xywhdecimals = unitGetDecimalsFromIndex(doc->docUnitIndex);
int dp2[] = {10, 1000, 10000, 10};
int distdecimals = dp2[doc->Einheit];
int distdecimals = dp2[doc->docUnitIndex];
 
Xpos->setValues( minXYVal, maxXYWHVal, xywhdecimals, newX );
Ypos->setValues( minXYVal, maxXYWHVal, xywhdecimals, newY );
1538,7 → 1538,7
RoundRect->setMaxValue(newRM);
RoundRect->setValue(newRR);
 
Cpal->UnitChange(old, UmReFaktor, doc->Einheit);
Cpal->UnitChange(old, UmReFaktor, doc->docUnitIndex);
HaveItem = tmp;
}
 
1595,8 → 1595,8
inY = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
if (tmp)
{
inX -= doc->ActPage->Xoffset;
inY -= doc->ActPage->Yoffset;
inX -= doc->currentPage->Xoffset;
inY -= doc->currentPage->Yoffset;
}
Xpos->setValue(inX*UmReFaktor);
Ypos->setValue(inY*UmReFaktor);
1917,8 → 1917,8
base = 0;
if ((HaveDoc) && (HaveItem))
{
x += doc->ActPage->Xoffset;
y += doc->ActPage->Yoffset;
x += doc->currentPage->Xoffset;
y += doc->currentPage->Yoffset;
if (ScApp->view->GroupSel)
{
ScApp->view->getGroupRect(&gx, &gy, &gw, &gh);
1974,8 → 1974,8
base = 0;
if ((HaveDoc) && (HaveItem))
{
x += doc->ActPage->Xoffset;
y += doc->ActPage->Yoffset;
x += doc->currentPage->Xoffset;
y += doc->currentPage->Yoffset;
if (ScApp->view->GroupSel)
{
ScApp->view->getGroupRect(&gx, &gy, &gw, &gh);
2322,7 → 2322,7
return;
if ((HaveDoc) && (HaveItem))
{
if ((CurItem->HasSel) || (doc->AppMode == 1))
if ((CurItem->HasSel) || (doc->appMode == NormalMode))
{
ScApp->view->chKerning(Extra->value());
emit DocChanged();
2329,9 → 2329,9
}
else
{
if (uint(CurItem->CPos) != CurItem->Ptext.count())
if (uint(CurItem->CPos) != CurItem->itemText.count())
{
CurItem->Ptext.at(CurItem->CPos)->cextra = Extra->value();
CurItem->itemText.at(CurItem->CPos)->cextra = Extra->value();
ScApp->view->RefreshItem(CurItem);
emit DocChanged();
}
2563,7 → 2563,7
return;
if ((HaveDoc) && (HaveItem))
{
if (doc->CurrentABStil < 5)
if (doc->currentParaStyle < 5)
emit NewAbStyle(a);
}
}
2839,9 → 2839,9
if ((HaveDoc) && (HaveItem))
{
if (Cpal->gradEditButton->isOn())
ScApp->setAppMode(25);
ScApp->setAppMode(EditGradientVectors);
else
ScApp->setAppMode(1);
ScApp->setAppMode(NormalMode);
ScApp->view->RefreshItem(CurItem);
}
}
2953,7 → 2953,7
return;
TxFill->clear();
TxStroke->clear();
CListe::Iterator it;
ColorList::Iterator it;
QPixmap pm = QPixmap(15, 15);
TxFill->insertItem( tr("None"));
TxStroke->insertItem( tr("None"));
3095,7 → 3095,7
{
if (ScApp->ScriptRunning)
return;
CListe::Iterator it;
ColorList::Iterator it;
int c = 0;
PM2->setValue(shb);
PM1->setValue(shp);
3298,7 → 3298,7
ColWidth = (CurItem->Width - (CurItem->ColGap * (CurItem->Cols - 1)) - CurItem->Extra - CurItem->RExtra - lineCorr) / CurItem->Cols;
else
ColWidth = CurItem->Width;
TabManager *dia = new TabManager(this, doc->Einheit, CurItem->TabValues, ColWidth);
TabManager *dia = new TabManager(this, doc->docUnitIndex, CurItem->TabValues, ColWidth);
if (dia->exec())
{
CurItem->TabValues = dia->tmpTab;
/branches/Version13x/Scribus/scribus/util.cpp
90,16 → 90,16
 
 
QColor SetColor(ScribusDoc *currentDoc, QString color, int shad);
void GetItemProps(bool newVersion, QDomElement *obj, struct CLBuf *OB);
void GetItemProps(bool newVersion, QDomElement *obj, struct CopyPasteBuffer *OB);
QStringList sortQStringList(QStringList aList);
void ReOrderText(ScribusDoc *currentDoc, ScribusView *view);
void WordAndPara(PageItem* b, int *w, int *p, int *c, int *wN, int *pN, int *cN);
void CopyPageItem(struct CLBuf *Buffer, PageItem *b);
void CopyPageItem(struct CopyPasteBuffer *Buffer, PageItem *b);
bool overwrite(QWidget *parent, QString filename);
void setBestEncoding(FT_Face face);
int setBestEncoding(FT_Face face);
FPointArray traceChar(FT_Face face, uint chr, int chs, double *x, double *y, bool &err);
FPoint GetMaxClipF(FPointArray Clip);
FPoint GetMinClipF(FPointArray Clip);
FPoint getMaxClipF(FPointArray* Clip);
FPoint getMinClipF(FPointArray* Clip);
QPixmap FontSample(QString da, int s, QString ts, QColor back);
QPixmap fontSamples(QString da, int s, QString ts, QColor back);
QString Path2Relative(QString Path);
973,8 → 973,8
{
if (currentDoc->Layers[la2].Level == Level)
{
ll->Sichtbar = currentDoc->Layers[la2].Sichtbar;
ll->Drucken = currentDoc->Layers[la2].Drucken;
ll->isViewable = currentDoc->Layers[la2].isViewable;
ll->isPrintable = currentDoc->Layers[la2].isPrintable;
ll->LNr = currentDoc->Layers[la2].LNr;
break;
}
1323,7 → 1323,7
return Ndir;
}
 
void setBestEncoding(FT_Face face)
int setBestEncoding(FT_Face face)
{
FT_ULong charcode;
FT_UInt gindex;
1331,6 → 1331,7
int countUniCode = 0;
int chmapUniCode = 0;
int chmapCustom = 0;
int retVal = 0;
FT_CharMap defaultEncoding = face->charmap;
for(int u = 0; u < face->num_charmaps; u++)
{
1350,14 → 1351,30
{
chmapCustom = u;
foundEncoding = true;
retVal = 1;
break;
}
else if (face->charmaps[u]->encoding == FT_ENCODING_MS_SYMBOL)
{
chmapCustom = u;
foundEncoding = true;
retVal = 2;
break;
}
}
if (countUniCode > 255)
{
FT_Set_Charmap(face, face->charmaps[chmapUniCode]);
retVal = 0;
}
else if (foundEncoding)
FT_Set_Charmap(face, face->charmaps[chmapCustom]);
else
{
FT_Set_Charmap(face, defaultEncoding);
retVal = 0;
}
return retVal;
}
 
bool GlyNames(QMap<uint, QString> *GList, QString Dat)
1570,14 → 1587,14
return pts2;
}
 
FPoint GetMaxClipF(FPointArray Clip)
FPoint getMaxClipF(FPointArray* Clip)
{
FPoint np, rp;
double mx = 0;
double my = 0;
for (uint c = 0; c < Clip.size(); ++c)
for (uint c = 0; c < Clip->size(); ++c)
{
np = Clip.point(c);
np = Clip->point(c);
if (np.x() > 900000)
continue;
if (np.x() > mx)
1589,14 → 1606,14
return rp;
}
 
FPoint GetMinClipF(FPointArray Clip)
FPoint getMinClipF(FPointArray* Clip)
{
FPoint np, rp;
double mx = 99999;
double my = 99999;
for (uint c = 0; c < Clip.size(); ++c)
for (uint c = 0; c < Clip->size(); ++c)
{
np = Clip.point(c);
np = Clip->point(c);
if (np.x() > 900000)
continue;
if (np.x() < mx)
1618,7 → 1635,7
FPoint gp;
error = FT_Init_FreeType( &library );
error = FT_New_Face( library, da, 0, &face );
setBestEncoding(face);
int encode = setBestEncoding(face);
double uniEM = static_cast<double>(face->units_per_EM);
int h = qRound(face->height / uniEM) * s + 1;
double a = static_cast<double>(face->descender) / uniEM * s + 1;
1633,23 → 1650,55
p->setBrush(back);
p->drawRect(0.0, 0.0, static_cast<double>(w), static_cast<double>(h));
p->setBrush(Qt::black);
for (uint n = 0; n < ts.length(); ++n)
FPointArray gly;
uint dv;
dv = ts[0].unicode();
error = false;
gly = traceChar(face, dv, s, &x, &y, &error);
if ((encode != 0) || (error))
{
uint dv = ts[n].unicode();
error = false;
FPointArray gly = traceChar(face, dv, s, &x, &y, &error);
if (error)
break;
if (gly.size() > 3)
FT_ULong charcode;
FT_UInt gindex;
gindex = 0;
charcode = FT_Get_First_Char(face, &gindex );
for (uint n = 0; n < ts.length(); ++n)
{
gly.translate(static_cast<double>(pen_x) / 64.0, a);
gp = GetMaxClipF(gly);
ymax = QMAX(ymax, gp.y());
p->setupPolygon(&gly);
p->fillPath();
gly = traceChar(face, charcode, s, &x, &y, &error);
if (error)
break;
if (gly.size() > 3)
{
gly.translate(static_cast<double>(pen_x) / 64.0, a);
gp = getMaxClipF(&gly);
ymax = QMAX(ymax, gp.y());
p->setupPolygon(&gly);
p->fillPath();
}
pen_x += face->glyph->advance.x;
charcode = FT_Get_Next_Char(face, charcode, &gindex );
if (gindex == 0)
break;
}
pen_x += face->glyph->advance.x;
}
else
{
for (uint n = 0; n < ts.length(); ++n)
{
dv = ts[n].unicode();
error = false;
gly = traceChar(face, dv, s, &x, &y, &error);
if (gly.size() > 3)
{
gly.translate(static_cast<double>(pen_x) / 64.0, a);
gp = getMaxClipF(&gly);
ymax = QMAX(ymax, gp.y());
p->setupPolygon(&gly);
p->fillPath();
}
pen_x += face->glyph->advance.x;
}
}
p->end();
pm.resize(QMIN(qRound(gp.x()), w), QMIN(qRound(ymax), h));
delete p;
1671,7 → 1720,8
ret.fill(back);
for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) {
sample = FontSample(da, s, *it, back);
painter->drawPixmap(0, y, sample, 0, 0);
if (!sample.isNull())
painter->drawPixmap(0, y, sample, 0, 0);
y = y + sample.height();
if (x < sample.width())
x = sample.width();
1678,9 → 1728,12
} // for
delete(painter);
QPixmap final(x, y);
QPainter *fpainter = new QPainter(&final);
fpainter->drawPixmap(0, 0, ret, 0, 0, x, y);
delete(fpainter);
if ((x != 0) && (y != 0))
{
QPainter *fpainter = new QPainter(&final);
fpainter->drawPixmap(0, 0, ret, 0, 0, x, y);
delete(fpainter);
}
return final;
}
 
1707,7 → 1760,7
return retval;
}
 
void CopyPageItem(struct CLBuf *Buffer, PageItem *b)
void CopyPageItem(struct CopyPasteBuffer *Buffer, PageItem *b)
{
uint a;
Buffer->PType = b->PType;
1799,29 → 1852,29
Buffer->Pfile2 = b->Pfile2;
Buffer->Pfile3 = b->Pfile3;
QString Text = "";
if (b->Ptext.count() != 0)
if (b->itemText.count() != 0)
{
for (a=0; a<b->Ptext.count(); ++a)
for (a=0; a<b->itemText.count(); ++a)
{
if( (b->Ptext.at(a)->ch == "\n") || (b->Ptext.at(a)->ch == "\r"))
if( (b->itemText.at(a)->ch == "\n") || (b->itemText.at(a)->ch == "\r"))
Text += QString(QChar(5))+"\t";
else if(b->Ptext.at(a)->ch == "\t")
else if(b->itemText.at(a)->ch == "\t")
Text += QString(QChar(4))+"\t";
else
Text += b->Ptext.at(a)->ch+"\t";
Text += b->Ptext.at(a)->cfont+"\t";
Text += QString::number(b->Ptext.at(a)->csize / 10.0)+"\t";
Text += b->Ptext.at(a)->ccolor+"\t";
Text += QString::number(b->Ptext.at(a)->cextra)+"\t";
Text += QString::number(b->Ptext.at(a)->cshade)+'\t';
Text += QString::number(b->Ptext.at(a)->cstyle)+'\t';
Text += QString::number(b->Ptext.at(a)->cab)+'\t';
Text += b->Ptext.at(a)->cstroke+"\t";
Text += QString::number(b->Ptext.at(a)->cshade2)+'\t';
Text += QString::number(b->Ptext.at(a)->cscale)+'\n';
Text += b->itemText.at(a)->ch+"\t";
Text += b->itemText.at(a)->cfont+"\t";
Text += QString::number(b->itemText.at(a)->csize / 10.0)+"\t";
Text += b->itemText.at(a)->ccolor+"\t";
Text += QString::number(b->itemText.at(a)->cextra)+"\t";
Text += QString::number(b->itemText.at(a)->cshade)+'\t';
Text += QString::number(b->itemText.at(a)->cstyle)+'\t';
Text += QString::number(b->itemText.at(a)->cab)+'\t';
Text += b->itemText.at(a)->cstroke+"\t";
Text += QString::number(b->itemText.at(a)->cshade2)+'\t';
Text += QString::number(b->itemText.at(a)->cscale)+'\n';
}
}
Buffer->Ptext = Text;
Buffer->itemText = Text;
Buffer->Clip = b->Clip.copy();
Buffer->PoLine = b->PoLine.copy();
Buffer->ContourLine = b->ContourLine.copy();
1833,7 → 1886,7
Buffer->BaseOffs = b->BaseOffs;
Buffer->Textflow = b->Textflow;
Buffer->Textflow2 = b->Textflow2;
Buffer->Ausrich = b->Ausrich;
Buffer->textAlignment = b->textAlignment;
Buffer->IFont = b->IFont;
Buffer->ISize = b->ISize;
Buffer->ExtraV = b->ExtraV;
1904,9 → 1957,9
}
while (nb != 0)
{
for (uint a = 0; a < nb->Ptext.count(); ++a)
for (uint a = 0; a < nb->itemText.count(); ++a)
{
QChar b = nb->Ptext.at(a)->ch[0];
QChar b = nb->itemText.at(a)->ch[0];
if (b == QChar(13))
{
if (a >= nb->MaxChars)
1931,13 → 1984,13
nbl = nb;
nb = nb->NextBox;
}
if (nbl->MaxChars < nbl->Ptext.count())
if (nbl->MaxChars < nbl->itemText.count())
paraN++;
else
para++;
if (Dat.isLetterOrNumber())
{
if (nbl->MaxChars < nbl->Ptext.count())
if (nbl->MaxChars < nbl->itemText.count())
wwN++;
else
ww++;
2007,7 → 2060,7
return retList;
}
 
void GetItemProps(bool newVersion, QDomElement *obj, struct CLBuf *OB)
void GetItemProps(bool newVersion, QDomElement *obj, struct CopyPasteBuffer *OB)
{
QString tmp;
int x, y;
/branches/Version13x/Scribus/scribus/tabguides.h
19,7 → 19,7
Q_OBJECT
 
public:
TabGuides( QWidget* parent, struct guidesStruct *prefsData, double unitBase, QString unit);
TabGuides( QWidget* parent, struct guidesPrefs *prefsData, double unitBase, QString unit);
~TabGuides() {};
 
MSpinBox* majorSpace;
/branches/Version13x/Scribus/scribus/vruler.cpp
81,7 → 81,7
QFont ff = font();
ff.setPointSize(8);
setFont(ff);
switch (doku->Einheit)
switch (doku->docUnitIndex)
{
case 0:
if (sc > 1)
177,7 → 177,7
if ((qRound((xl+of)*sc) > offs) && (qRound((xl+of)*sc) < offs+height()))
{
p.drawLine(11, qRound((xl+of)*sc), 24, qRound((xl+of)*sc));
switch (doku->Einheit)
switch (doku->docUnitIndex)
{
case 2:
{
/branches/Version13x/Scribus/scribus/page.h
36,7 → 36,7
double Yoffset;
double Width;
double Height;
Margs Margins;
MarginStruct Margins;
/** Nummer der Seite */
uint PageNr;
bool LeftPg;
/branches/Version13x/Scribus/scribus/cpalette.cpp
230,7 → 230,7
emit QueryItem();
}
 
void Cpalette::SetColors(CListe newColorList)
void Cpalette::SetColors(ColorList newColorList)
{
colorList.clear();
colorList = newColorList;
242,7 → 242,7
disconnect(colorListQLBox, SIGNAL(clicked(QListBoxItem*)), this, SLOT(selectColor(QListBoxItem*)));
disconnect(colorListQLBox, SIGNAL(selected(QListBoxItem*)), this, SLOT(selectColor(QListBoxItem*)));
colorListQLBox->clear();
CListe::Iterator it;
ColorList::Iterator it;
QPixmap pm = QPixmap(30, 15);
if ((!GradientMode) || (Mode == 1))
colorListQLBox->insertItem( tr("None"));
305,7 → 305,7
{
disconnect(colorListQLBox, SIGNAL(clicked(QListBoxItem*)), this, SLOT(selectColor(QListBoxItem*)));
disconnect(colorListQLBox, SIGNAL(selected(QListBoxItem*)), this, SLOT(selectColor(QListBoxItem*)));
CListe::Iterator it;
ColorList::Iterator it;
int c = 0;
if ((colorName != "None") && (colorName != ""))
{
/branches/Version13x/Scribus/scribus/cmykfw.h
34,7 → 34,7
Q_OBJECT
 
public:
CMYKChoose( QWidget* parent, CMYKColor orig, QString name, CListe *Colors, QStringList Cust );
CMYKChoose( QWidget* parent, CMYKColor orig, QString name, ColorList *Colors, QStringList Cust );
~CMYKChoose() {};
virtual void mouseReleaseEvent(QMouseEvent *m);
QColor CMYK2RGB(int c, int m, int y, int k);
79,8 → 79,8
bool Wsave;
bool dynamic;
int BlackComp;
CListe *EColors;
CListe CurrSwatch;
ColorList *EColors;
ColorList CurrSwatch;
QStringList CColSet;
QString Fnam;
 
/branches/Version13x/Scribus/scribus/werktoolb.cpp
64,7 → 64,7
Linien->setToggleButton( true );
Linien->setPopup(LinM);
Linien->setPopupDelay(0);
LMode = 8;
LMode = DrawLine;
Rotiere = new QToolButton(loadIcon("Rotieren.xpm"), tr("Rotate Item"), QString::null, this, SLOT(ModeFromTB()), this);
Rotiere->setToggleButton( true );
Rotiere->setEnabled(false);
131,7 → 131,7
SubMode = s;
ValCount = c;
ShapeVals = vals;
emit NewMode(2);
emit NewMode(DrawShapes);
}
 
void WerkToolB::SelShape2()
150,7 → 150,7
Polygon->setOn(false);
Measure->setOn(false);
Rechteck->setOn(true);
emit NewMode(2);
emit NewMode(DrawShapes);
}
 
void WerkToolB::ModeFromTB()
172,42 → 172,42
if (Select == sender())
{
Select->setOn(true);
emit NewMode(1);
emit NewMode(NormalMode);
}
if (Rotiere == sender())
{
Rotiere->setOn(true);
emit NewMode(9);
emit NewMode(Rotation);
}
if (Textedit == sender())
{
Textedit->setOn(true);
emit NewMode(7);
emit NewMode(EditMode);
}
if (Textedit2 == sender())
{
Textedit2->setOn(true);
emit NewMode(3);
emit NewMode(StartStoryEditor);
}
if (Zoom == sender())
{
Zoom->setOn(true);
emit NewMode(6);
emit NewMode(Magnifier);
}
if (Texte == sender())
{
Texte->setOn(true);
emit NewMode(5);
emit NewMode(DrawText);
}
if (BildB == sender())
{
BildB->setOn(true);
emit NewMode(4);
emit NewMode(DrawPicture);
}
if (TableB == sender())
{
TableB->setOn(true);
emit NewMode(22);
emit NewMode(DrawTable);
}
if (Linien == sender())
{
217,22 → 217,22
if (KetteEin == sender())
{
KetteEin->setOn(true);
emit NewMode(10);
emit NewMode(LinkFrames);
}
if (KetteAus == sender())
{
KetteAus->setOn(true);
emit NewMode(11);
emit NewMode(UnlinkFrames);
}
if (Polygon == sender())
{
Polygon->setOn(true);
emit NewMode(12);
emit NewMode(DrawRegularPolygon);
}
if (Measure == sender())
{
Measure->setOn(true);
emit NewMode(24);
emit NewMode(MeasurementTool);
}
}
 
254,7 → 254,7
Measure->setOn(false);
int c = LinM->indexOf(id);
QString icn[] = {"Stift.xpm", "beziertool.png", "Stiftalt.xpm"};
int lm[] = {8, 13, 21};
int lm[] = {DrawLine, DrawBezierLine, DrawFreehandLine};
Linien->setPixmap(loadIcon(icn[c]));
LMode = lm[c];
emit NewMode(LMode);
304,7 → 304,7
}
PDFTool->setOn(false);
PDFaTool->setOn(true);
emit NewMode(19+PDFnotiz);
emit NewMode(InsertPDFTextAnnotation+PDFnotiz);
}
 
void WerkToolBP::setPDFtool(int id)
315,7 → 315,7
PDFTool->setPixmap(loadIcon(tmp[c]));
PDFTool->setOn(true);
PDFaTool->setOn(false);
emit NewMode(14+PDFwerkz);
emit NewMode(InsertPDFButton+PDFwerkz);
}
 
void WerkToolBP::Docken(QDockWindow::Place )
336,11 → 336,11
if (PDFTool == sender())
{
PDFTool->setOn(true);
emit NewMode(14+PDFwerkz);
emit NewMode(InsertPDFButton+PDFwerkz);
}
if (PDFaTool == sender())
{
PDFaTool->setOn(true);
emit NewMode(19+PDFnotiz);
emit NewMode(InsertPDFTextAnnotation+PDFnotiz);
}
}
/branches/Version13x/Scribus/scribus/spalette.cpp
42,7 → 42,7
if (e < 5)
setCurrentItem(0);
else
setCurrentText(currentDoc->Vorlagen[e].Vname);
setCurrentText(currentDoc->docParagraphStyles[e].Vname);
}
 
void Spalette::updateFormatList()
54,8 → 54,8
QStringList st;
st.clear();
insertItem( tr("No Style"));
for (uint x = 5; x < currentDoc->Vorlagen.count(); ++x)
st.append(currentDoc->Vorlagen[x].Vname);
for (uint x = 5; x < currentDoc->docParagraphStyles.count(); ++x)
st.append(currentDoc->docParagraphStyles[x].Vname);
st.sort();
insertStringList(st);
}
70,9 → 70,9
emit newStyle(0);
return;
}
for (uint x = 5; x < currentDoc->Vorlagen.count(); ++x)
for (uint x = 5; x < currentDoc->docParagraphStyles.count(); ++x)
{
if (currentDoc->Vorlagen[x].Vname == currentText())
if (currentDoc->docParagraphStyles[x].Vname == currentText())
{
emit newStyle(x);
break;
/branches/Version13x/Scribus/scribus/newfile.cpp
10,10 → 10,10
 
extern QPixmap loadIcon(QString nam);
 
NewDoc::NewDoc( QWidget* parent, preV *Vor )
NewDoc::NewDoc( QWidget* parent, ApplicationPrefs *Vor )
: QDialog( parent, "newDoc", true, 0 )
{
unitIndex = Vor->Einheit;
unitIndex = Vor->docUnitIndex;
unitSuffix = unitGetSuffixFromIndex(unitIndex);
unitRatio = unitGetRatioFromIndex(unitIndex);
int precision = unitGetPrecisionFromIndex(unitIndex);
/branches/Version13x/Scribus/scribus/scfonts_ttf.cpp
20,7 → 20,7
#include FT_OUTLINE_H
#include FT_GLYPH_H
extern FPointArray traceChar(FT_Face face, uint chr, int chs, double *x, double *y, bool *err);
extern void setBestEncoding(FT_Face face);
extern int setBestEncoding(FT_Face face);
 
QString Foi_ttf::RealName()
{
/branches/Version13x/Scribus/scribus/hruler.cpp
79,7 → 79,7
}
if (ActCol == 0)
return;
if (doku->CurrentABStil > 4)
if (doku->currentParaStyle > 4)
{
Pos = (ItemPos+First+Indent+(ColWidth+ColGap)*(ActCol-1)+Offset+Extra+lineCorr)*Scaling-offs;
fpo = QRect(static_cast<int>(Pos)-3, 11, 6, 6);
159,12 → 159,12
emit DocChanged(false);
break;
case 3:
doku->Vorlagen[doku->CurrentABStil].First = First;
doku->docParagraphStyles[doku->currentParaStyle].First = First;
emit DocChanged(false);
break;
case 4:
doku->Vorlagen[doku->CurrentABStil].Indent = Indent;
doku->Vorlagen[doku->CurrentABStil].First = First;
doku->docParagraphStyles[doku->currentParaStyle].Indent = Indent;
doku->docParagraphStyles[doku->currentParaStyle].First = First;
emit DocChanged(false);
break;
case 5:
174,8 → 174,8
if (TabValues[ActTab] > 4.0)
TabValues[ActTab] = 0.0;
}
if (doku->CurrentABStil > 4)
doku->Vorlagen[doku->CurrentABStil].TabValues = TabValues;
if (doku->currentParaStyle > 4)
doku->docParagraphStyles[doku->currentParaStyle].TabValues = TabValues;
else
view->SelItem.at(0)->TabValues = TabValues;
emit DocChanged(false);
193,8 → 193,8
it = TabValues.remove(it);
TabValues.remove(it);
ActTab = 0;
if (doku->CurrentABStil > 4)
doku->Vorlagen[doku->CurrentABStil].TabValues = TabValues;
if (doku->currentParaStyle > 4)
doku->docParagraphStyles[doku->currentParaStyle].TabValues = TabValues;
else
view->SelItem.at(0)->TabValues = TabValues;
emit DocChanged(false);
303,9 → 303,9
p.begin(view->viewport());
p.setRasterOp(XorROP);
p.setPen(QPen(white, 1, DotLine, FlatCap, MiterJoin));
QPoint out = view->contentsToViewport(QPoint(0, qRound(doku->ActPage->Yoffset*Scaling)));
p.drawLine(Markp, out.y(), Markp, out.y()+qRound(doku->ActPage->Height * Scaling));
p.drawLine(py.x(), out.y(), py.x(), out.y()+qRound(doku->ActPage->Height * Scaling));
QPoint out = view->contentsToViewport(QPoint(0, qRound(doku->currentPage->Yoffset*Scaling)));
p.drawLine(Markp, out.y(), Markp, out.y()+qRound(doku->currentPage->Height * Scaling));
p.drawLine(py.x(), out.y(), py.x(), out.y()+qRound(doku->currentPage->Height * Scaling));
p.end();
Markp = py.x();
}
322,7 → 322,7
qApp->setOverrideCursor(QCursor(SizeHorCursor), true);
QRect fpo;
double ColWidth = (ItemEndPos - ItemPos - (ColGap * (Cols - 1)) - Extra - RExtra - 2*lineCorr) / Cols;
if (doku->CurrentABStil > 4)
if (doku->currentParaStyle > 4)
{
for (int CurrCol = 0; CurrCol < Cols; ++CurrCol)
{
386,7 → 386,7
QFont ff = font();
ff.setPointSize(8);
setFont(ff);
switch (doku->Einheit)
switch (doku->docUnitIndex)
{
case 0:
/* PFJ - 29.02.04 - Altered so the if isn't executed twice. Repeated */
480,7 → 480,7
for (xl = 0; xl < doku->PageB+(iter2/2); xl += iter2)
{
p.drawLine(qRound((xl+of)*sc), 11, qRound((xl+of)*sc), 24);
switch (doku->Einheit)
switch (doku->docUnitIndex)
{
case 2:
{
506,10 → 506,10
break;
}
}
if (((xx == 0) && (doku->ActPage->PageNr % 2 == 0) && (doku->FirstPageLeft))
|| ((xx == 1) && (doku->ActPage->PageNr % 2 != 0) && (doku->FirstPageLeft))
|| ((xx == 0) && (doku->ActPage->PageNr % 2 != 0) && (!doku->FirstPageLeft))
|| ((xx == 1) && (doku->ActPage->PageNr % 2 == 0) && (!doku->FirstPageLeft))
if (((xx == 0) && (doku->currentPage->PageNr % 2 == 0) && (doku->FirstPageLeft))
|| ((xx == 1) && (doku->currentPage->PageNr % 2 != 0) && (doku->FirstPageLeft))
|| ((xx == 0) && (doku->currentPage->PageNr % 2 != 0) && (!doku->FirstPageLeft))
|| ((xx == 1) && (doku->currentPage->PageNr % 2 == 0) && (!doku->FirstPageLeft))
|| (pc == 1))
{
if (ItemPosValid)
537,7 → 537,7
for (xl = Pos; xl < EndPos; xl += iter2)
{
p.drawLine(qRound(xl*sc), 11, qRound(xl*sc), 24);
switch (doku->Einheit)
switch (doku->docUnitIndex)
{
case 2:
{
597,7 → 597,7
p.drawLine(qRound(Pos*sc), 23, qRound((Pos+4/sc)*sc), 23);
p.drawLine(qRound(Pos*sc), 11, qRound((Pos+4/sc)*sc), 11);
}
if (doku->CurrentABStil > 4)
if (doku->currentParaStyle > 4)
{
p.setPen(QPen(blue, 1, SolidLine, FlatCap, MiterJoin));
double fpos = Pos+First+Indent;
/branches/Version13x/Scribus/scribus/search.cpp
27,7 → 27,7
extern PrefsFile* prefsFile;
 
 
SearchReplace::SearchReplace( QWidget* parent, ScribusDoc *doc, preV *Prefs, PageItem* ite, bool mode )
SearchReplace::SearchReplace( QWidget* parent, ScribusDoc *doc, ApplicationPrefs *Prefs, PageItem* ite, bool mode )
: QDialog( parent, "SearchReplace", true, 0 )
{
setCaption( tr( "Search/Replace" ) );
34,7 → 34,7
setIcon(loadIcon("AppIcon.png"));
QPixmap pm;
pm = QPixmap(30, 15);
CListe::Iterator it;
ColorList::Iterator it;
Item = ite;
Doc = doc;
NotFound = false;
84,13 → 84,13
size_t ar_sty = sizeof(tmp_sty) / sizeof(*tmp_sty);
for (uint a = 0; a < ar_sty; ++a)
SStyleVal->insertItem(tmp_sty[a]);
if (doc->Vorlagen.count() > 5)
if (doc->docParagraphStyles.count() > 5)
{
for (uint x = 5; x < doc->Vorlagen.count(); ++x)
SStyleVal->insertItem(doc->Vorlagen[x].Vname);
for (uint x = 5; x < doc->docParagraphStyles.count(); ++x)
SStyleVal->insertItem(doc->docParagraphStyles[x].Vname);
}
SStyleVal->listBox()->setMinimumWidth(SStyleVal->listBox()->maxItemWidth()+24);
SStyleVal->setCurrentItem(doc->CurrentABStil);
SStyleVal->setCurrentItem(doc->currentParaStyle);
SStyleVal->setEnabled(false);
SearchLayout->addWidget( SStyleVal, 1, 1 );
SFontVal = new FontCombo(Search, Prefs);
182,13 → 182,13
RStyleVal->setEditable(false);
for (uint a = 0; a < ar_sty; ++a)
RStyleVal->insertItem(tmp_sty[a]);
if (doc->Vorlagen.count() > 5)
if (doc->docParagraphStyles.count() > 5)
{
for (uint x = 5; x < doc->Vorlagen.count(); ++x)
RStyleVal->insertItem(doc->Vorlagen[x].Vname);
for (uint x = 5; x < doc->docParagraphStyles.count(); ++x)
RStyleVal->insertItem(doc->docParagraphStyles[x].Vname);
}
RStyleVal->listBox()->setMinimumWidth(RStyleVal->listBox()->maxItemWidth()+24);
RStyleVal->setCurrentItem(doc->CurrentABStil);
RStyleVal->setCurrentItem(doc->currentParaStyle);
RStyleVal->setEnabled(false);
ReplaceLayout->addWidget( RStyleVal, 1, 1 );
RFontVal = new FontCombo(Replace, Prefs);
351,8 → 351,8
AllReplace->setEnabled(false);
if (SMode)
{
for (uint a = 0; a < Item->Ptext.count(); ++a)
Item->Ptext.at(a)->cselect = false;
for (uint a = 0; a < Item->itemText.count(); ++a)
Item->itemText.at(a)->cselect = false;
Item->HasSel = false;
}
QString fCol = "";
399,11 → 399,11
uint a;
if (SMode)
{
for (a = as; a < Item->Ptext.count(); ++a)
for (a = as; a < Item->itemText.count(); ++a)
{
if (SText->isChecked())
{
QString chx = Item->Ptext.at(a)->ch;
QString chx = Item->itemText.at(a)->ch;
if (CaseIgnore->isChecked())
chx = chx.lower();
found = chx == sText.mid(inde, 1) ? true : false;
414,47 → 414,47
found = true;
if (SSize->isChecked())
{
if (Item->Ptext.at(a)->csize != sSize)
if (Item->itemText.at(a)->csize != sSize)
found = false;
}
if (SFont->isChecked())
{
if (Item->Ptext.at(a)->cfont != sFont)
if (Item->itemText.at(a)->cfont != sFont)
found = false;
}
if (SStyle->isChecked())
{
if (Item->Ptext.at(a)->cab != sStyle)
if (Item->itemText.at(a)->cab != sStyle)
found = false;
}
if (SStroke->isChecked())
{
if (Item->Ptext.at(a)->cstroke != sCol)
if (Item->itemText.at(a)->cstroke != sCol)
found = false;
}
if (SStrokeS->isChecked())
{
if (Item->Ptext.at(a)->cshade2 != sStrokeSh)
if (Item->itemText.at(a)->cshade2 != sStrokeSh)
found = false;
}
if (SFillS->isChecked())
{
if (Item->Ptext.at(a)->cshade != sFillSh)
if (Item->itemText.at(a)->cshade != sFillSh)
found = false;
}
if (SEffect->isChecked())
{
if ((Item->Ptext.at(a)->cstyle & 127) != sEff)
if ((Item->itemText.at(a)->cstyle & 127) != sEff)
found = false;
}
if (SFill->isChecked())
{
if (Item->Ptext.at(a)->ccolor != fCol)
if (Item->itemText.at(a)->ccolor != fCol)
found = false;
}
if (found)
{
Item->Ptext.at(a)->cselect = true;
Item->itemText.at(a)->cselect = true;
Item->HasSel = true;
if (rep)
{
467,16 → 467,16
if (inde == 0)
ReplStart = a;
inde++;
if ((Word->isChecked()) && (inde == 1) && (Item->Ptext.at(a)->ch[0].isSpace()))
if ((Word->isChecked()) && (inde == 1) && (Item->itemText.at(a)->ch[0].isSpace()))
{
inde--;
Item->Ptext.at(a)->cselect = false;
Item->itemText.at(a)->cselect = false;
}
if ((Word->isChecked()) && (inde == sText.length()) &&
(!Item->Ptext.at(QMIN(Item->MaxChars-1,a+1))->ch[0].isSpace()))
(!Item->itemText.at(QMIN(Item->MaxChars-1,a+1))->ch[0].isSpace()))
{
for (uint xx = ReplStart; xx < a+1; ++xx)
Item->Ptext.at(QMIN(xx,Item->MaxChars-1))->cselect = false;
Item->itemText.at(QMIN(xx,Item->MaxChars-1))->cselect = false;
Item->HasSel = false;
inde = 0;
found = false;
495,13 → 495,13
if (SText->isChecked())
{
for (uint xx = ReplStart; xx < a+1; ++xx)
Item->Ptext.at(QMIN(xx,Item->MaxChars-1))->cselect = false;
Item->itemText.at(QMIN(xx,Item->MaxChars-1))->cselect = false;
Item->HasSel = false;
}
inde = 0;
}
}
if ((!found) || (a == Item->Ptext.count()))
if ((!found) || (a == Item->itemText.count()))
{
Doc->DoDrawing = true;
ScApp->view->RefreshItem(Item);
662,7 → 662,7
{
QString repl, sear;
uint cs, cx;
struct Pti *hg;
struct ScText *hg;
if (RText->isChecked())
{
repl = RTextVal->text();
670,7 → 670,7
if (sear.length() == repl.length())
{
for (cs = 0; cs < sear.length(); ++cs)
Item->Ptext.at(ReplStart+cs)->ch = repl[cs];
Item->itemText.at(ReplStart+cs)->ch = repl[cs];
}
else
{
677,10 → 677,10
if (sear.length() < repl.length())
{
for (cs = 0; cs < sear.length(); ++cs)
Item->Ptext.at(ReplStart+cs)->ch = repl[cs];
Item->itemText.at(ReplStart+cs)->ch = repl[cs];
for (cx = cs; cx < repl.length(); ++cx)
{
hg = new Pti;
hg = new ScText;
hg->ch = repl[cx];
if (RSize->isChecked())
hg->csize = qRound(RSizeVal->value() * 10.0);
702,12 → 702,12
if (RStyle->isChecked())
hg->cab = RStyleVal->currentItem();
else
hg->cab = Doc->CurrentABStil;
if (Doc->Vorlagen[hg->cab].Font != "")
hg->cab = Doc->currentParaStyle;
if (Doc->docParagraphStyles[hg->cab].Font != "")
{
hg->cfont = Doc->Vorlagen[hg->cab].Font;
hg->csize = Doc->Vorlagen[hg->cab].FontSize;
hg->cstyle = Doc->Vorlagen[hg->cab].FontEffect;
hg->cfont = Doc->docParagraphStyles[hg->cab].Font;
hg->csize = Doc->docParagraphStyles[hg->cab].FontSize;
hg->cstyle = Doc->docParagraphStyles[hg->cab].FontEffect;
}
if (RFont->isChecked())
hg->cfont = RFontVal->currentText();
719,7 → 719,7
hg->PRot = 0;
hg->PtransX = 0;
hg->PtransY = 0;
Item->Ptext.insert(ReplStart+cx, hg);
Item->itemText.insert(ReplStart+cx, hg);
}
Item->CPos = ReplStart+cx;
}
726,9 → 726,9
else
{
for (cs = 0; cs < repl.length(); ++cs)
Item->Ptext.at(ReplStart+cs)->ch = repl[cs];
Item->itemText.at(ReplStart+cs)->ch = repl[cs];
for (uint cxx = cs; cxx < sear.length(); ++cxx)
Item->Ptext.remove(ReplStart+cs);
Item->itemText.remove(ReplStart+cs);
Item->CPos = ReplStart+cs;
}
}
751,20 → 751,20
{
int s = REffVal->getStyle();
Doc->CurrentStyle = s;
if (Item->Ptext.count() != 0)
if (Item->itemText.count() != 0)
{
for (uint a = 0; a < Item->Ptext.count(); ++a)
for (uint a = 0; a < Item->itemText.count(); ++a)
{
if (Item->Ptext.at(a)->cselect)
if (Item->itemText.at(a)->cselect)
{
Item->Ptext.at(a)->cstyle &= ~127;
Item->Ptext.at(a)->cstyle |= s;
Item->itemText.at(a)->cstyle &= ~127;
Item->itemText.at(a)->cstyle |= s;
}
}
}
}
for (uint a = 0; a < Item->Ptext.count(); ++a)
Item->Ptext.at(a)->cselect = false;
for (uint a = 0; a < Item->itemText.count(); ++a)
Item->itemText.at(a)->cselect = false;
}
else
{
798,7 → 798,7
ScApp->CurrStED->Editor->setFarbe(ScApp->CurrStED->Editor->CurrTextFill, ScApp->CurrStED->Editor->CurrTextFillSh);
ScApp->CurrStED->Editor->insert(RTextVal->text());
connect(ScApp->CurrStED->Editor, SIGNAL(cursorPositionChanged(int, int)), ScApp->CurrStED, SLOT(updateProps(int, int)));
ScApp->CurrStED->newAlign(ScApp->CurrStED->Editor->CurrentABStil);
ScApp->CurrStED->newAlign(ScApp->CurrStED->Editor->currentParaStyle);
}
}
}
939,7 → 939,7
SEffect->setChecked(false);
REffect->setChecked(false);
STextVal->setText("");
SStyleVal->setCurrentItem(Doc->CurrentABStil);
SStyleVal->setCurrentItem(Doc->currentParaStyle);
SFontVal->setCurrentText(Doc->CurrFont);
SSizeVal->setValue(Doc->CurrFontSize / 10.0);
SFillVal->setCurrentText(Doc->CurrTextFill);
953,7 → 953,7
RStyle->setChecked(false);
RText->setChecked(false);
RTextVal->setText("");
RStyleVal->setCurrentItem(Doc->CurrentABStil);
RStyleVal->setCurrentItem(Doc->currentParaStyle);
RFontVal->setCurrentText(Doc->CurrFont);
RSizeVal->setValue(Doc->CurrFontSize / 10.0);
RFillVal->setCurrentText(Doc->CurrTextFill);
993,7 → 993,7
SEffect->setChecked(prefs->getBool("SEffect", false));
REffect->setChecked(prefs->getBool("REffect", false));
STextVal->setText(prefs->get("STextVal", ""));
int tmp = prefs->getInt("SStyleVal", Doc->CurrentABStil);
int tmp = prefs->getInt("SStyleVal", Doc->currentParaStyle);
if (tmp < 0 || tmp >= SStyleVal->count())
SStyleVal->setCurrentItem(0);
else
1012,7 → 1012,7
RStyle->setChecked(prefs->getBool("RStyle", false));
RText->setChecked(prefs->getBool("RText", false));
RTextVal->setText(prefs->get("RTextVal", ""));
tmp = prefs->getInt("RStyleVal", Doc->CurrentABStil);
tmp = prefs->getInt("RStyleVal", Doc->currentParaStyle);
if (tmp < 0 || tmp >= RStyleVal->count())
RStyleVal->setCurrentItem(0);
else
/branches/Version13x/Scribus/scribus/arrowchooser.cpp
6,7 → 6,7
#include "scpainter.h"
#include <qimage.h>
 
extern FPoint GetMinClipF(FPointArray Clip);
extern FPoint getMinClipF(FPointArray* Clip);
 
ArrowChooser::ArrowChooser(QWidget* pa, bool direction) : QComboBox(true, pa)
{
17,7 → 17,7
arrowDirection = direction;
}
 
void ArrowChooser::rebuildList(QValueList<arrowDesc> *arrowStyles)
void ArrowChooser::rebuildList(QValueList<ArrowDesc> *arrowStyles)
{
clear();
FPointArray Path;
33,7 → 33,7
painter->translate(3.0, 3.0);
Path.resize(0);
Path = (*arrowStyles->at(a)).points.copy();
FPoint min = GetMinClipF(Path);
FPoint min = getMinClipF(&Path);
Path.translate(-min.x(), -min.y());
FPoint max = Path.WidthHeight();
QWMatrix mm;
/branches/Version13x/Scribus/scribus/applytemplate.cpp
59,7 → 59,7
FromPage = new QSpinBox( buttonGroup1, "FromPage" );
FromPage->setMinValue( 1 );
FromPage->setMaxValue(view->Pages.count());
FromPage->setValue(view->ActPage->PageNr+1);
FromPage->setValue(view->currentPage->PageNr+1);
layout2->addWidget( FromPage );
TextLabel2 = new QLabel( buttonGroup1, "textLabel1" );
TextLabel2->setText( tr( "To:" ) );
/branches/Version13x/Scribus/scribus/libprefs/prefs.cpp
30,18 → 30,18
extern bool CMSavail;
extern ProfilesL InputProfiles;
 
extern "C" void* Run(QWidget *d, preV *prefsData);
extern "C" void* Run(QWidget *d, ApplicationPrefs *prefsData);
 
/*!
\fn void* Run(QWidget *d, preV *prefsData)
\fn void* Run(QWidget *d, ApplicationPrefs *prefsData)
\author Franz Schmid
\date
\brief Creates Preferences dialog and returns pointer to it
\param d QWidget * to Preferences dialog widget
\param prefsData preV * struct
\param prefsData ApplicationPrefs * struct
\retval dia * widget pointer
*/
void* Run(QWidget *d, preV *prefsData)
void* Run(QWidget *d, ApplicationPrefs *prefsData)
{
Preferences *dia = new Preferences(d, prefsData);
return dia;
48,26 → 48,26
}
 
/*!
\fn Preferences::Preferences( QWidget* parent, preV *prefsData)
\fn Preferences::Preferences( QWidget* parent, ApplicationPrefs *prefsData)
\author Franz Schmid
\date
\brief Constructor for Preferences dialog box
\param parent QWidget pointer to parent window
\param prefsData preV * struct
\param prefsData ApplicationPrefs * struct
\retval Preferences dialog
*/
Preferences::Preferences( QWidget* parent, preV *prefsData) : PrefsDialogBase( parent )
Preferences::Preferences( QWidget* parent, ApplicationPrefs *prefsData) : PrefsDialogBase( parent )
{
int decimals;
fon = &prefsData->AvailFonts;
ap = (ScribusApp*)parent;
Umrech = 1.0;
Einheit = prefsData->Einheit;
docUnitIndex = prefsData->docUnitIndex;
int f[] = {2, 3, 4};
if (Einheit == 3)
if (docUnitIndex == 3)
decimals = f[0];
else
decimals = f[Einheit];
decimals = f[docUnitIndex];
DisScale = prefsData->DisScale;
setCaption( tr( "Preferences" ) );
 
231,7 → 231,7
UnitCombo->insertItem( tr( "Inches (in)" ) );
UnitCombo->insertItem( tr( "Picas (p)" ) );
UnitCombo->setEditable(false);
UnitCombo->setCurrentItem(prefsData->Einheit);
UnitCombo->setCurrentItem(prefsData->docUnitIndex);
unitComboText = new QLabel( UnitCombo, tr( "Units:" ), GroupSize, "unitComboText" );
Layout6->addWidget( unitComboText, 2, 0 );
Layout6->addWidget( UnitCombo, 2, 1 );
417,7 → 417,7
colorComboText->setEditable(false);
QPixmap pmT2;
pmT2 = QPixmap(15, 15);
CListe::Iterator itc;
ColorList::Iterator itc;
colorComboText->insertItem( tr("None"));
if (prefsData->DpenText == "None")
colorComboText->setCurrentItem(colorComboText->count()-1);
817,7 → 817,7
checkUnprintable = new QCheckBox( pageBackground, "checkUnprintable" );
checkUnprintable->setText( tr( "Display &Unprintable Area in Margin Color" ) );
checkUnprintable->setAccel( QKeySequence( tr( "Alt+U" ) ) );
checkUnprintable->setChecked( prefsData->RandFarbig );
checkUnprintable->setChecked( prefsData->marginColored );
pageBackgroundLayout->addWidget( checkUnprintable );
tabViewLayout->addWidget( pageBackground );
 
1516,7 → 1516,7
oldH /= AltUmrech;
oldHM /= AltUmrech;
QString einh;
Einheit = UnitCombo->currentItem();
docUnitIndex = UnitCombo->currentItem();
switch (UnitCombo->currentItem())
{
case 0:
1619,7 → 1619,7
void Preferences::drawRuler()
{
double xl, iter, iter2, maxi;
switch (Einheit)
switch (docUnitIndex)
{
case 0:
iter = 10.0;
1662,7 → 1662,7
p.drawLine(static_cast<int>(xl), 6, static_cast<int>(xl), 19);
p.save();
p.scale(1.0 / DisScale, 1.0);
switch (Einheit)
switch (docUnitIndex)
{
case 2:
p.drawText(static_cast<int>((xl+qRound(2/DisScale)) * DisScale), 12,
/branches/Version13x/Scribus/scribus/libprefs/prefs.h
44,7 → 44,7
Q_OBJECT
 
public:
Preferences( QWidget* parent, preV *prefsData);
Preferences( QWidget* parent, ApplicationPrefs *prefsData);
~Preferences();
 
//const QString getSelectedGUILang( void );
238,7 → 238,7
double RandB;
double RandL;
double RandR;
int Einheit;
int docUnitIndex;
double DisScale;
ScribusApp *ap;
QColor colorPaper;
/branches/Version13x/Scribus/scribus/fontcombo.h
51,10 → 51,10
class FontCombo : public QComboBox
{
public:
FontCombo(QWidget* pa, preV *Prefs);
FontCombo(QWidget* pa, ApplicationPrefs *Prefs);
~FontCombo() {};
 
void RebuildList(preV *Prefs, ScribusDoc *currentDoc);
void RebuildList(ApplicationPrefs *Prefs, ScribusDoc *currentDoc);
};
 
#endif
/branches/Version13x/Scribus/scribus/multiline.cpp
93,7 → 93,7
 
layout4 = new QHBoxLayout( 0, 0, 6, "layout4");
Color = new QComboBox( true, Properties, "Color" );
CListe::Iterator it;
ColorList::Iterator it;
QPixmap pm = QPixmap(30, 15);
for (it = doc->PageColors.begin(); it != doc->PageColors.end(); ++it)
{
221,7 → 221,7
void MultiLine::reSort()
{
int cc = 0;
struct singleLine sl;
struct SingleLine sl;
sl.Color = TempVorl[CurLin].Color;
sl.Shade = TempVorl[CurLin].Shade;
sl.Dash = TempVorl[CurLin].Dash;
311,7 → 311,7
 
void MultiLine::NewSubLine()
{
struct singleLine sl;
struct SingleLine sl;
sl.Color = TempVorl[CurLin].Color;
sl.Shade = TempVorl[CurLin].Shade;
sl.Dash = TempVorl[CurLin].Dash;
/branches/Version13x/Scribus/scribus/serializer.cpp
37,7 → 37,7
{
uint a;
QString Dat = "";
QPtrList<Pti> y = Item->Ptext;
QPtrList<ScText> y = Item->itemText;
for (a=0; a<y.count(); ++a)
{
QString b = y.at(a)->ch;
50,7 → 50,7
 
void Serializer::GetText(PageItem *Item, int Absatz, QString font, int size, bool Append)
{
struct Pti *hg;
struct ScText *hg;
PageItem *nb;
PageItem *it = Item;
ScribusDoc* doku = it->Doc;
68,7 → 68,7
it = nb;
while (nb != 0)
{
nb->Ptext.clear();
nb->itemText.clear();
nb->CPos = 0;
nb = nb->NextBox;
}
77,19 → 77,19
{
if ((Objekt.at(a) == QChar(0)) || (Objekt.at(a) == QChar(13)))
continue;
hg = new Pti;
hg = new ScText;
hg->ch = Objekt.at(a);
if ((hg->ch == QChar(10)) || (hg->ch == QChar(5)))
hg->ch = QChar(13);
if (doku->Vorlagen[Absatz].Font != "")
if (doku->docParagraphStyles[Absatz].Font != "")
{
hg->cfont = doku->Vorlagen[Absatz].Font;
hg->csize = doku->Vorlagen[Absatz].FontSize;
hg->cstyle = doku->Vorlagen[Absatz].FontEffect;
hg->ccolor = doku->Vorlagen[Absatz].FColor;
hg->cshade = doku->Vorlagen[Absatz].FShade;
hg->cstroke = doku->Vorlagen[Absatz].SColor;
hg->cshade2 = doku->Vorlagen[Absatz].SShade;
hg->cfont = doku->docParagraphStyles[Absatz].Font;
hg->csize = doku->docParagraphStyles[Absatz].FontSize;
hg->cstyle = doku->docParagraphStyles[Absatz].FontEffect;
hg->ccolor = doku->docParagraphStyles[Absatz].FColor;
hg->cshade = doku->docParagraphStyles[Absatz].FShade;
hg->cstroke = doku->docParagraphStyles[Absatz].SColor;
hg->cshade2 = doku->docParagraphStyles[Absatz].SShade;
}
else
{
111,9 → 111,9
hg->PtransX = 0;
hg->PtransY = 0;
if (Append)
it->Ptext.insert(it->CPos, hg);
it->itemText.insert(it->CPos, hg);
else
it->Ptext.append(hg);
it->itemText.append(hg);
it->CPos += 1;
}
}
/branches/Version13x/Scribus/scribus/scpreview.h
10,7 → 10,7
class ScPreview
{
public:
ScPreview(preV *prefs);
ScPreview(ApplicationPrefs *prefs);
~ScPreview() {};
QPixmap createPreview(QString data);
void SetFarbe(QColor *tmp, QString farbe, int shad);
18,7 → 18,7
QMap<QString,CMYKColor> Farben;
QMap<QString,multiLine> MLineStyles;
QValueList<uint> Segments;
preV *Prefs;
ApplicationPrefs *Prefs;
FT_Library library;
};
#endif
/branches/Version13x/Scribus/scribus/annot.cpp
23,7 → 23,7
extern QPixmap loadIcon(QString nam);
extern PrefsFile* prefsFile;
 
Annot::Annot(QWidget* parent, PageItem *it, int Seite, int b, int h, CListe Farben, ScribusView* vie)
Annot::Annot(QWidget* parent, PageItem *it, int Seite, int b, int h, ColorList Farben, ScribusView* vie)
: QDialog( parent, "AN", true, 0 )
{
setCaption( tr( "Field Properties" ) );
146,7 → 146,7
TextLabel40a->setText( tr( "Color:" ) );
GroupBox20Layout->addWidget( TextLabel40a, 0, 0 );
BorderC = new QComboBox( true, GroupBox20, "BorderC" );
CListe::Iterator cit;
ColorList::Iterator cit;
QPixmap pm;
BorderC->insertItem( tr("None"));
if (item->AnBColor == "None")
1026,9 → 1026,6
Layout1_2->addWidget( PushButton1 );
PushButton2 = new QPushButton( this, "PushButton2" );
PushButton2->setText( tr( "Cancel" ) );
Layout1_2->addWidget( PushButton2 );
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout1_2->addItem( spacer );
AnnotLayout->addLayout( Layout1_2 );
connect(PushButton1, SIGNAL(clicked()), this, SLOT(SetVals()));
connect(PushButton2, SIGNAL(clicked()), this, SLOT(reject()));
/branches/Version13x/Scribus/scribus/reformdoc.cpp
21,15 → 21,15
extern bool CMSavail;
extern ProfilesL InputProfiles;
 
ReformDoc::ReformDoc( QWidget* parent, ScribusDoc* doc, preV *prefsData ) : PrefsDialogBase( parent )
ReformDoc::ReformDoc( QWidget* parent, ScribusDoc* doc, ApplicationPrefs *prefsData ) : PrefsDialogBase( parent )
{
einheit = doc->Einheit;
einheit = doc->docUnitIndex;
docc = doc;
ap = (ScribusApp*)parent;
fon = &prefsData->AvailFonts;
Umrech = UmReFaktor;
QString ein = unitGetSuffixFromIndex(doc->Einheit);
decimals = unitGetDecimalsFromIndex(doc->Einheit);
QString ein = unitGetSuffixFromIndex(doc->docUnitIndex);
decimals = unitGetDecimalsFromIndex(doc->docUnitIndex);
int i=-1;
pageWidth = doc->PageB * UmReFaktor;
pageHeight = doc->PageH * UmReFaktor;
98,7 → 98,7
unitCombo->insertItem( tr( "Inches (in)" ) );
unitCombo->insertItem( tr( "Picas (p)" ) );
unitCombo->setEditable(false);
unitCombo->setCurrentItem(doc->Einheit);
unitCombo->setCurrentItem(doc->docUnitIndex);
unitQLabel = new QLabel(unitCombo, tr( "&Unit:" ), dsGroupBox7, "unitQLabel" );
dsLayout4->addWidget( unitQLabel, 2, 0 );
dsLayout4->addWidget( unitCombo, 2, 1 );
238,7 → 238,7
checkUnprintable = new QCheckBox( pageBackground, "checkUnprintable" );
checkUnprintable->setText( tr( "Display &Unprintable Area in Margin Color" ) );
checkUnprintable->setAccel( QKeySequence( tr( "Alt+U" ) ) );
checkUnprintable->setChecked( doc->RandFarbig );
checkUnprintable->setChecked( doc->marginColored );
pageBackgroundLayout->addWidget( checkUnprintable );
tabViewLayout->addWidget( pageBackground );
 
391,7 → 391,7
colorComboText->setEditable(false);
QPixmap pmT2;
pmT2 = QPixmap(15, 15);
CListe::Iterator itc;
ColorList::Iterator itc;
colorComboText->insertItem( tr("None"));
if (doc->DpenText == "None")
colorComboText->setCurrentItem(colorComboText->count()-1);
709,11 → 709,11
addItem( tr("Tools"), loadIcon("tools.png"), tabTools);
 
tabHyphenator = new HySettings(prefsWidgets, &ap->LangTransl);
tabHyphenator->verbose->setChecked(!doc->Trenner->Automatic);
tabHyphenator->input->setChecked(doc->Trenner->AutoCheck);
tabHyphenator->language->setCurrentText(ap->LangTransl[doc->Trenner->Language]);
tabHyphenator->wordLen->setValue(doc->Trenner->MinWordLen);
tabHyphenator->maxCount->setValue(doc->Trenner->HyCount);
tabHyphenator->verbose->setChecked(!doc->docHyphenator->Automatic);
tabHyphenator->input->setChecked(doc->docHyphenator->AutoCheck);
tabHyphenator->language->setCurrentText(ap->LangTransl[doc->docHyphenator->Language]);
tabHyphenator->wordLen->setValue(doc->docHyphenator->MinWordLen);
tabHyphenator->maxCount->setValue(doc->docHyphenator->HyCount);
addItem( tr("Hyphenator"), loadIcon("hyphenate.png"), tabHyphenator);
int cmsTab = 0;
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
22,7 → 22,7
#include "pageitem.h"
#include <qfile.h>
 
ScribusDoc::ScribusDoc(struct preV *prefsData)
ScribusDoc::ScribusDoc(struct ApplicationPrefs *prefsData)
{
prefsValues = prefsData;
modified = false;
104,8 → 104,8
MagMax = prefsData->MagMax;
MagStep = prefsData->MagStep;
Before = prefsData->Before;
Einheit = prefsData->Einheit;
RandFarbig = prefsData->RandFarbig;
docUnitIndex = prefsData->docUnitIndex;
marginColored = prefsData->marginColored;
Language = prefsData->Language;
MinWordLen = prefsData->MinWordLen;
HyCount = prefsData->HyCount;
139,15 → 139,15
FirstAuto = 0;
DraggedElem = 0;
GroupCounter = 1;
Vorlagen.clear();
struct StVorL vg;
docParagraphStyles.clear();
struct ParagraphStyle vg;
vg.Vname = "Normal Internal";
vg.LineSpa = 15;
vg.Ausri = 0;
vg.textAlignment = 0;
vg.Indent = 0;
vg.First = 0;
vg.Avor = 0;
vg.Anach = 0;
vg.gapBefore = 0;
vg.gapAfter = 0;
vg.Font = "";
vg.FontSize = Dsize;
vg.TabValues.clear();
159,26 → 159,26
vg.SColor = Dpen;
vg.SShade = Dshade2;
vg.BaseAdj = false;
Vorlagen.append(vg);
docParagraphStyles.append(vg);
vg.Vname = "Center Internal";
vg.Ausri = 1;
Vorlagen.append(vg);
vg.textAlignment = 1;
docParagraphStyles.append(vg);
vg.Vname = "Rechts Internal";
vg.Ausri = 2;
Vorlagen.append(vg);
vg.textAlignment = 2;
docParagraphStyles.append(vg);
vg.Vname = "Block Internal";
vg.Ausri = 3;
Vorlagen.append(vg);
vg.textAlignment = 3;
docParagraphStyles.append(vg);
vg.Vname = "EBlock Internal";
vg.Ausri = 4;
Vorlagen.append(vg);
vg.textAlignment = 4;
docParagraphStyles.append(vg);
Layers.clear();
struct Layer ll;
ll.LNr = 0;
ll.Level = 0;
ll.Name = QObject::tr("Background");
ll.Sichtbar = true;
ll.Drucken = true;
ll.isViewable = true;
ll.isPrintable = true;
Layers.append(ll);
ActiveLayer = 0;
JavaScripts.clear();
185,7 → 185,7
UnDoValid = false;
UnData.UnCode = -1;
CurrentStyle = 0;
CurrentABStil = 0;
currentParaStyle = 0;
TotalItems = 0;
TemplateMode = false;
PDF_Optionen.Thumbnails = false;
274,10 → 274,10
* including plugins.
* - 2004-09-14 Craig Ringer
*/
void ScribusDoc::loadStylesFromFile(QString fileName, QValueList<StVorL> *tempStyles)
void ScribusDoc::loadStylesFromFile(QString fileName, QValueList<ParagraphStyle> *tempStyles)
{
// This won't create the QValueList<StVorL> will it?
QValueList<StVorL> *wrkStyles = NULL;
// This won't create the QValueList<ParagraphStyle> will it?
QValueList<ParagraphStyle> *wrkStyles = NULL;
/*
* Use the working styles struct if passed, or work directly
* on the document styles otherwise. Note that tempStyles,
287,39 → 287,39
if (tempStyles != NULL)
wrkStyles = tempStyles;
else
wrkStyles = &Vorlagen;
wrkStyles = &docParagraphStyles;
if (!fileName.isEmpty())
{
ScriXmlDoc *ss = new ScriXmlDoc();
ss->Vorlagen.clear();
ss->docParagraphStyles.clear();
for (uint x = 5; x < wrkStyles->count(); ++x)
ss->Vorlagen.append((*wrkStyles)[x]);
ss->docParagraphStyles.append((*wrkStyles)[x]);
uint old = wrkStyles->count()-5;
if (ss->ReadStyles(fileName, this, prefsValues))
{
if (ss->Vorlagen.count() > old)
if (ss->docParagraphStyles.count() > old)
{
for (uint xx=old; xx<ss->Vorlagen.count(); ++xx)
for (uint xx=old; xx<ss->docParagraphStyles.count(); ++xx)
{
struct StVorL sty;
sty.Vname = ss->Vorlagen[xx].Vname;
sty.LineSpa = ss->Vorlagen[xx].LineSpa;
sty.Ausri = ss->Vorlagen[xx].Ausri;
sty.Indent = ss->Vorlagen[xx].Indent;
sty.First = ss->Vorlagen[xx].First;
sty.Avor = ss->Vorlagen[xx].Avor;
sty.Anach = ss->Vorlagen[xx].Anach;
sty.Font = ss->Vorlagen[xx].Font;
sty.FontSize = ss->Vorlagen[xx].FontSize;
sty.TabValues = ss->Vorlagen[xx].TabValues;
sty.Drop = ss->Vorlagen[xx].Drop;
sty.DropLin = ss->Vorlagen[xx].DropLin;
sty.FontEffect = ss->Vorlagen[xx].FontEffect;
sty.FColor = ss->Vorlagen[xx].FColor;
sty.FShade = ss->Vorlagen[xx].FShade;
sty.SColor = ss->Vorlagen[xx].SColor;
sty.SShade = ss->Vorlagen[xx].SShade;
sty.BaseAdj = ss->Vorlagen[xx].BaseAdj;
struct ParagraphStyle sty;
sty.Vname = ss->docParagraphStyles[xx].Vname;
sty.LineSpa = ss->docParagraphStyles[xx].LineSpa;
sty.textAlignment = ss->docParagraphStyles[xx].textAlignment;
sty.Indent = ss->docParagraphStyles[xx].Indent;
sty.First = ss->docParagraphStyles[xx].First;
sty.gapBefore = ss->docParagraphStyles[xx].gapBefore;
sty.gapAfter = ss->docParagraphStyles[xx].gapAfter;
sty.Font = ss->docParagraphStyles[xx].Font;
sty.FontSize = ss->docParagraphStyles[xx].FontSize;
sty.TabValues = ss->docParagraphStyles[xx].TabValues;
sty.Drop = ss->docParagraphStyles[xx].Drop;
sty.DropLin = ss->docParagraphStyles[xx].DropLin;
sty.FontEffect = ss->docParagraphStyles[xx].FontEffect;
sty.FColor = ss->docParagraphStyles[xx].FColor;
sty.FShade = ss->docParagraphStyles[xx].FShade;
sty.SColor = ss->docParagraphStyles[xx].SColor;
sty.SShade = ss->docParagraphStyles[xx].SShade;
sty.BaseAdj = ss->docParagraphStyles[xx].BaseAdj;
wrkStyles->append(sty);
}
}
/branches/Version13x/Scribus/scribus/frameedit.cpp
245,8 → 245,8
disconnect(EditCont, SIGNAL(clicked()), this, SLOT(ToggleConMode()));
disconnect(AbsMode, SIGNAL(clicked()), this, SLOT(ToggleAbsMode()));
QString tmp_abs[]={" pt", " mm", " in", "p"};
YSpin->setSuffix(tr(tmp_abs[doc->Einheit]));
XSpin->setSuffix(tr(tmp_abs[doc->Einheit]));
YSpin->setSuffix(tr(tmp_abs[doc->docUnitIndex]));
XSpin->setSuffix(tr(tmp_abs[doc->docUnitIndex]));
AbsMode->setChecked(false);
EditCont->setChecked(false);
connect(AbsMode, SIGNAL(clicked()), this, SLOT(ToggleAbsMode()));
/branches/Version13x/Scribus/scribus/tabtypography.h
14,7 → 14,7
Q_OBJECT
 
public:
TabTypograpy( QWidget* parent, struct typoStruct *prefsData, double unitBase, QString unit);
TabTypograpy( QWidget* parent, struct typoPrefs *prefsData, double unitBase, QString unit);
~TabTypograpy() {};
 
QGroupBox* groupBox1a;
/branches/Version13x/Scribus/scribus/cpalette.h
70,7 → 70,7
QSpinBox* TransSpin;
int Mode;
QString sFarbe;
CListe colorList;
ColorList colorList;
bool CSichtbar;
QString Color;
int Shade;
82,7 → 82,7
public slots:
void InhaltButton();
void InnenButton();
void SetColors(CListe newColorList);
void SetColors(ColorList newColorList);
void updateCList();
void updateBoxS(QString Farbe);
void selectColor(QListBoxItem *c);
/branches/Version13x/Scribus/scribus/scribusview.h
50,7 → 50,7
Q_OBJECT
 
public:
ScribusView(QWidget *parent=0, ScribusDoc *doc=0, preV *prefs=0);
ScribusView(QWidget *parent=0, ScribusDoc *doc=0, ApplicationPrefs *prefs=0);
~ScribusView() {};
/** Vergroesserungseingabefeld */
MSpinBox* LE;
60,7 → 60,7
Vruler *VR;
/** Dokument zu dem die Seite gehoert */
ScribusDoc *Doc;
preV *Prefs;
ApplicationPrefs *Prefs;
double Scale;
double OldScale;
double GroupX;
248,7 → 248,7
void LoadPict(QString fn, int ItNr);
void AdjustPreview(PageItem *b, bool reload = true);
void AdjustPictScale(PageItem *b, bool reload = true);
void PasteItem(struct CLBuf *Buffer, bool loading, bool drag = false);
void PasteItem(struct CopyPasteBuffer *Buffer, bool loading, bool drag = false);
void BuildAObj();
void doAlign(QValueList<uint> &Object, int moveCode, double xp, double xdisp, double ydisp, double minx = 0.0);
void AlignObj(bool xa, bool ya, bool Vth, bool Vtv, double xdisp, double ydisp, int xart, int yart);
/branches/Version13x/Scribus/scribus/fontprefs.h
19,7 → 19,7
Q_OBJECT
 
public:
FontPrefs( QWidget* parent, SCFonts &flist, bool Hdoc, preV *prefs, QString PPath );
FontPrefs( QWidget* parent, SCFonts &flist, bool Hdoc, ApplicationPrefs *prefs, QString PPath );
~FontPrefs() {};
void ReadPath();
void RebuildDialog();
42,7 → 42,7
QPtrList<QCheckBox> FlagsUse;
QPtrList<QCheckBox> FlagsSub;
QPtrList<QComboBox> FlagsRepl;
preV *Prefs;
ApplicationPrefs *Prefs;
QMap<QString,QString> RList;
QStringList UsedFonts;
QStringList ExtraFonts;
/branches/Version13x/Scribus/scribus/editformats.cpp
10,7 → 10,7
extern QPixmap loadIcon(QString nam);
extern PrefsFile* prefsFile;
 
StilFormate::StilFormate( QWidget* parent, ScribusDoc *doc, preV *avail)
StilFormate::StilFormate( QWidget* parent, ScribusDoc *doc, ApplicationPrefs *avail)
: QDialog( parent, "Formate", true, 0)
{
resize( 327, 260 );
72,7 → 72,7
connect(DeleteB, SIGNAL(clicked()), this, SLOT(deleteFormat()));
connect(ListBox1, SIGNAL(highlighted(QListBoxItem*)), this, SLOT(selFormat(QListBoxItem*)));
connect( ListBox1, SIGNAL( selected(QListBoxItem*) ), this, SLOT( selEditFormat(QListBoxItem*) ) );
TempVorl = doc->Vorlagen;
TempVorl = doc->docParagraphStyles;
UpdateFList();
}
 
114,14 → 114,14
 
void StilFormate::dupFormat()
{
struct StVorL sty;
struct ParagraphStyle sty;
sty.Vname = tr("Copy of %1").arg(TempVorl[sFnumber].Vname);
sty.LineSpa = TempVorl[sFnumber].LineSpa;
sty.Ausri = TempVorl[sFnumber].Ausri;
sty.textAlignment = TempVorl[sFnumber].textAlignment;
sty.Indent = TempVorl[sFnumber].Indent;
sty.First = TempVorl[sFnumber].First;
sty.Avor = TempVorl[sFnumber].Avor;
sty.Anach = TempVorl[sFnumber].Anach;
sty.gapBefore = TempVorl[sFnumber].gapBefore;
sty.gapAfter = TempVorl[sFnumber].gapAfter;
sty.Font = TempVorl[sFnumber].Font;
sty.FontSize = TempVorl[sFnumber].FontSize;
sty.TabValues = TempVorl[sFnumber].TabValues;
136,7 → 136,7
TempVorl.append(sty);
sFnumber = TempVorl.count()-1;
EditStyle* dia2 = new EditStyle(this, &TempVorl[sFnumber], TempVorl, true, fon,
static_cast<double>(Docu->typographicSetttings.autoLineSpacing), Docu->Einheit, Docu);
static_cast<double>(Docu->typographicSetttings.autoLineSpacing), Docu->docUnitIndex, Docu);
if (!dia2->exec())
TempVorl.remove(TempVorl.fromLast());
delete dia2;
145,14 → 145,14
 
void StilFormate::neuesFormat()
{
struct StVorL sty;
struct ParagraphStyle sty;
sty.Vname = tr("New Style");
sty.LineSpa = ((Docu->Dsize / 10.0) * static_cast<double>(Docu->typographicSetttings.autoLineSpacing) / 100) + (Docu->Dsize / 10.0);
sty.Ausri = 0;
sty.textAlignment = 0;
sty.Indent = 0;
sty.First = 0;
sty.Avor = 0;
sty.Anach = 0;
sty.gapBefore = 0;
sty.gapAfter = 0;
sty.Font = Docu->Dfont;
sty.FontSize = Docu->Dsize;
sty.TabValues.clear();
166,7 → 166,7
sty.BaseAdj = false;
TempVorl.append(sty);
sFnumber = TempVorl.count()-1;
EditStyle* dia2 = new EditStyle(this, &TempVorl[sFnumber], TempVorl, true, fon, static_cast<double>(Docu->typographicSetttings.autoLineSpacing), Docu->Einheit, Docu);
EditStyle* dia2 = new EditStyle(this, &TempVorl[sFnumber], TempVorl, true, fon, static_cast<double>(Docu->typographicSetttings.autoLineSpacing), Docu->docUnitIndex, Docu);
if (!dia2->exec())
TempVorl.remove(TempVorl.fromLast());
delete dia2;
176,7 → 176,7
void StilFormate::editFormat()
{
EditStyle* dia = new EditStyle(this, &TempVorl[sFnumber], TempVorl, false, fon,
static_cast<double>(Docu->typographicSetttings.autoLineSpacing), Docu->Einheit, Docu);
static_cast<double>(Docu->typographicSetttings.autoLineSpacing), Docu->docUnitIndex, Docu);
dia->exec();
delete dia;
UpdateFList();
/branches/Version13x/Scribus/scribus/newfile.h
21,7 → 21,7
Q_OBJECT
 
public:
NewDoc( QWidget* parent, preV *Vor );
NewDoc( QWidget* parent, ApplicationPrefs *Vor );
~NewDoc() {};
 
QButtonGroup* ButtonGroup1_2;
/branches/Version13x/Scribus/scribus/layers.cpp
174,13 → 174,13
Table->setText(layers->count()-(*it).Level-1, 0, (*it).Name);
QCheckBox *cp = new QCheckBox(this, tmp.setNum((*it).Level));
cp->setPixmap(loadIcon("DateiPrint16.png"));
cp->setChecked((*it).Drucken);
cp->setChecked((*it).isPrintable);
Table->setCellWidget(layers->count()-(*it).Level-1, 1, cp);
FlagsPrint.append(cp);
connect(cp, SIGNAL(clicked()), this, SLOT(printLayer()));
QCheckBox *cp2 = new QCheckBox(this, tmp.setNum((*it).Level));
cp2->setPixmap(loadIcon("Layervisible.xpm"));
cp2->setChecked((*it).Sichtbar);
cp2->setChecked((*it).isViewable);
FlagsSicht.append(cp2);
connect(cp2, SIGNAL(clicked()), this, SLOT(visibleLayer()));
Table->setCellWidget(layers->count()-(*it).Level-1, 2, cp2);
198,8 → 198,8
ll.LNr = layers->last().LNr + 1;
ll.Level = layers->count();
ll.Name = tr("New Layer")+" "+tmp.setNum(ll.LNr);
ll.Sichtbar = true;
ll.Drucken = true;
ll.isViewable = true;
ll.isPrintable = true;
layers->append(ll);
rebuildList();
*Activ = ll.LNr;
323,7 → 323,7
{
if ((*it).Level == num)
{
(*it).Sichtbar = it2.current()->isChecked();
(*it).isViewable = it2.current()->isChecked();
emit LayerChanged();
ScApp->slotDocCh();
}
339,7 → 339,7
{
if ((*it).Level == num)
{
(*it).Drucken = it2.current()->isChecked();
(*it).isPrintable = it2.current()->isChecked();
ScApp->slotDocCh();
}
}
/branches/Version13x/Scribus/scribus/scribusXml.h
22,12 → 22,12
~ScriXmlDoc() {};
bool IsScribus(QString fileName);
QString ReadDatei(QString fileName);
QString AskForFont(SCFonts &avail, QString fStr, preV *Prefs, ScribusDoc *doc);
QString GetItemText(QDomElement *it, ScribusDoc *doc, preV *Prefs, bool VorLFound, bool impo);
QString AskForFont(SCFonts &avail, QString fStr, ApplicationPrefs *Prefs, ScribusDoc *doc);
QString GetItemText(QDomElement *it, ScribusDoc *doc, ApplicationPrefs *Prefs, bool VorLFound, bool impo);
void SetItemProps(QDomElement *ob, PageItem* item, bool newFormat);
bool ReadLStyles(QString fileName, QMap<QString,multiLine> *Sty);
void GetStyle(QDomElement *pg, struct StVorL *vg, QValueList<StVorL> &Vorlagen, ScribusDoc* doc, preV *Prefs, bool fl);
bool ReadStyles(QString fileName, ScribusDoc* doc, preV *Prefs);
void GetStyle(QDomElement *pg, struct ParagraphStyle *vg, QValueList<ParagraphStyle> &docParagraphStyles, ScribusDoc* doc, ApplicationPrefs *Prefs, bool fl);
bool ReadStyles(QString fileName, ScribusDoc* doc, ApplicationPrefs *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);
34,15 → 34,15
QString WriteElem(QPtrList<PageItem> *Selitems, ScribusDoc *doc, ScribusView *view);
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, ScribusView *view);
QMap<QString,QString> &FontSub, ApplicationPrefs *Prefs, ScribusView *view);
bool ReadDoc(QString fileName, SCFonts &avail, ScribusDoc *docu, ScribusView *viewx, QProgressBar *dia2);
void WritePages(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, QProgressBar *dia2, uint maxC, bool master);
void WriteObjects(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, QProgressBar *dia2, uint maxC, bool master);
bool WriteDoc(QString fileName, ScribusDoc *docu, QProgressBar *dia2);
void WritePref(preV *Vor, QString ho);
bool ReadPref(struct preV *Vorein, QString ho);
CListe Farben;
QValueList<StVorL> Vorlagen;
void WritePref(ApplicationPrefs *Vor, QString ho);
bool ReadPref(struct ApplicationPrefs *Vorein, QString ho);
ColorList Farben;
QValueList<ParagraphStyle> docParagraphStyles;
struct Linked {
int Start;
int StPag;
/branches/Version13x/Scribus/scribus/pdfopts.h
27,8 → 27,8
Q_OBJECT
 
public:
PDF_Opts( QWidget* parent, QString Fname, QMap<QString,QFont> DocFonts, ScribusView *vie, PDFOpt *Optionen,
QValueList<PreSet> Eff, ProfilesL *PDFXProfiles, SCFonts &AllFonts );
PDF_Opts( QWidget* parent, QString Fname, QMap<QString,QFont> DocFonts, ScribusView *vie, PDFOptions *Optionen,
QValueList<PDFPresentationData> Eff, ProfilesL *PDFXProfiles, SCFonts &AllFonts );
~PDF_Opts();
 
QWidget* tabGeneral;
152,11 → 152,11
QValueList<QString> FontsToEmbed;
QValueList<QString> FontsToSubset;
ScribusView *view;
QValueList<PreSet> EffVal;
QValueList<PDFPresentationData> EffVal;
int PgSel;
int Einheit;
int docUnitIndex;
QString SelLPIcolor;
PDFOpt *Opts;
PDFOptions *Opts;
 
public slots:
void DoExport();
/branches/Version13x/Scribus/scribus/scribusXml.cpp
40,7 → 40,7
extern int QStoInt(QString in);
extern bool loadText(QString nam, QString *Buffer);
extern QString Path2Relative(QString Path);
extern void GetItemProps(bool newVersion, QDomElement *obj, struct CLBuf *OB);
extern void GetItemProps(bool newVersion, QDomElement *obj, struct CopyPasteBuffer *OB);
extern QColor SetColor(ScribusDoc *currentDoc, QString color, int shad);
 
/*!
98,7 → 98,7
/** end changes */
}
 
QString ScriXmlDoc::GetItemText(QDomElement *it, ScribusDoc *doc, preV *Prefs, bool VorLFound, bool impo)
QString ScriXmlDoc::GetItemText(QDomElement *it, ScribusDoc *doc, ApplicationPrefs *Prefs, bool VorLFound, bool impo)
{
QString tmp2, tmf, tmpf, tmp3, tmp;
tmp = "";
142,7 → 142,7
return tmp;
}
 
QString ScriXmlDoc::AskForFont(SCFonts &avail, QString fStr, preV *Prefs, ScribusDoc *doc)
QString ScriXmlDoc::AskForFont(SCFonts &avail, QString fStr, ApplicationPrefs *Prefs, ScribusDoc *doc)
{
QFont fo;
QString tmpf = fStr;
394,7 → 394,7
while(!MuLn.isNull())
{
QDomElement MuL = MuLn.toElement();
struct singleLine sl;
struct SingleLine sl;
sl.Color = MuL.attribute("Color");
sl.Dash = QStoInt(MuL.attribute("Dash"));
sl.LineEnd = QStoInt(MuL.attribute("LineEnd"));
421,7 → 421,7
return true;
}
 
void ScriXmlDoc::GetStyle(QDomElement *pg, struct StVorL *vg, QValueList<StVorL> &Vorlagen, ScribusDoc* doc, preV *Prefs, bool fl)
void ScriXmlDoc::GetStyle(QDomElement *pg, struct ParagraphStyle *vg, QValueList<ParagraphStyle> &docParagraphStyles, ScribusDoc* doc, ApplicationPrefs *Prefs, bool fl)
{
bool fou;
QString tmpf, tmf, tmV;
431,9 → 431,9
vg->LineSpa = QStodouble(pg->attribute("LINESP"));
vg->Indent = QStodouble(pg->attribute("INDENT","0"));
vg->First = QStodouble(pg->attribute("FIRST","0"));
vg->Ausri = QStoInt(pg->attribute("ALIGN"));
vg->Avor = QStodouble(pg->attribute("VOR","0"));
vg->Anach = QStodouble(pg->attribute("NACH","0"));
vg->textAlignment = QStoInt(pg->attribute("ALIGN"));
vg->gapBefore = QStodouble(pg->attribute("VOR","0"));
vg->gapAfter = QStodouble(pg->attribute("NACH","0"));
tmpf = pg->attribute("FONT", doc->Dfont);
if (tmpf == "")
tmpf = doc->Dfont;
466,27 → 466,27
}
else
vg->TabValues.clear();
for (uint xx=0; xx<Vorlagen.count(); ++xx)
for (uint xx=0; xx<docParagraphStyles.count(); ++xx)
{
if (vg->Vname == Vorlagen[xx].Vname)
if (vg->Vname == docParagraphStyles[xx].Vname)
{
if ((vg->LineSpa == Vorlagen[xx].LineSpa) &&
(vg->Indent == Vorlagen[xx].Indent) &&
(vg->First == Vorlagen[xx].First) &&
(vg->Ausri == Vorlagen[xx].Ausri) &&
(vg->Avor == Vorlagen[xx].Avor) &&
(vg->Anach == Vorlagen[xx].Anach) &&
(vg->Font == Vorlagen[xx].Font) &&
(vg->TabValues == Vorlagen[xx].TabValues) &&
(vg->Drop == Vorlagen[xx].Drop) &&
(vg->DropLin == Vorlagen[xx].DropLin) &&
(vg->FontEffect == Vorlagen[xx].FontEffect) &&
(vg->FColor == Vorlagen[xx].FColor) &&
(vg->FShade == Vorlagen[xx].FShade) &&
(vg->SColor == Vorlagen[xx].SColor) &&
(vg->SShade == Vorlagen[xx].SShade) &&
(vg->BaseAdj == Vorlagen[xx].BaseAdj) &&
(vg->FontSize == Vorlagen[xx].FontSize))
if ((vg->LineSpa == docParagraphStyles[xx].LineSpa) &&
(vg->Indent == docParagraphStyles[xx].Indent) &&
(vg->First == docParagraphStyles[xx].First) &&
(vg->textAlignment == docParagraphStyles[xx].textAlignment) &&
(vg->gapBefore == docParagraphStyles[xx].gapBefore) &&
(vg->gapAfter == docParagraphStyles[xx].gapAfter) &&
(vg->Font == docParagraphStyles[xx].Font) &&
(vg->TabValues == docParagraphStyles[xx].TabValues) &&
(vg->Drop == docParagraphStyles[xx].Drop) &&
(vg->DropLin == docParagraphStyles[xx].DropLin) &&
(vg->FontEffect == docParagraphStyles[xx].FontEffect) &&
(vg->FColor == docParagraphStyles[xx].FColor) &&
(vg->FShade == docParagraphStyles[xx].FShade) &&
(vg->SColor == docParagraphStyles[xx].SColor) &&
(vg->SShade == docParagraphStyles[xx].SShade) &&
(vg->BaseAdj == docParagraphStyles[xx].BaseAdj) &&
(vg->FontSize == docParagraphStyles[xx].FontSize))
{
if (fl)
{
497,7 → 497,7
}
else
{
vg->Vname = "Copy of "+Vorlagen[xx].Vname;
vg->Vname = "Copy of "+docParagraphStyles[xx].Vname;
fou = false;
}
break;
505,27 → 505,27
}
if (!fou)
{
for (uint xx=0; xx< Vorlagen.count(); ++xx)
for (uint xx=0; xx< docParagraphStyles.count(); ++xx)
{
if ((vg->LineSpa == Vorlagen[xx].LineSpa) &&
(vg->Indent == Vorlagen[xx].Indent) &&
(vg->First == Vorlagen[xx].First) &&
(vg->Ausri == Vorlagen[xx].Ausri) &&
(vg->Avor == Vorlagen[xx].Avor) &&
(vg->Anach == Vorlagen[xx].Anach) &&
(vg->Font == Vorlagen[xx].Font) &&
(vg->TabValues == Vorlagen[xx].TabValues) &&
(vg->Drop == Vorlagen[xx].Drop) &&
(vg->DropLin == Vorlagen[xx].DropLin) &&
(vg->FontEffect == Vorlagen[xx].FontEffect) &&
(vg->FColor == Vorlagen[xx].FColor) &&
(vg->FShade == Vorlagen[xx].FShade) &&
(vg->SColor == Vorlagen[xx].SColor) &&
(vg->SShade == Vorlagen[xx].SShade) &&
(vg->BaseAdj == Vorlagen[xx].BaseAdj) &&
(vg->FontSize == Vorlagen[xx].FontSize))
if ((vg->LineSpa == docParagraphStyles[xx].LineSpa) &&
(vg->Indent == docParagraphStyles[xx].Indent) &&
(vg->First == docParagraphStyles[xx].First) &&
(vg->textAlignment == docParagraphStyles[xx].textAlignment) &&
(vg->gapBefore == docParagraphStyles[xx].gapBefore) &&
(vg->gapAfter == docParagraphStyles[xx].gapAfter) &&
(vg->Font == docParagraphStyles[xx].Font) &&
(vg->TabValues == docParagraphStyles[xx].TabValues) &&
(vg->Drop == docParagraphStyles[xx].Drop) &&
(vg->DropLin == docParagraphStyles[xx].DropLin) &&
(vg->FontEffect == docParagraphStyles[xx].FontEffect) &&
(vg->FColor == docParagraphStyles[xx].FColor) &&
(vg->FShade == docParagraphStyles[xx].FShade) &&
(vg->SColor == docParagraphStyles[xx].SColor) &&
(vg->SShade == docParagraphStyles[xx].SShade) &&
(vg->BaseAdj == docParagraphStyles[xx].BaseAdj) &&
(vg->FontSize == docParagraphStyles[xx].FontSize))
{
vg->Vname = Vorlagen[xx].Vname;
vg->Vname = docParagraphStyles[xx].Vname;
fou = true;
if (fl)
{
538,10 → 538,10
}
if (!fou)
{
Vorlagen.append(*vg);
docParagraphStyles.append(*vg);
if (fl)
{
DoVorl[VorlC] = tmV.setNum(Vorlagen.count()-1);
DoVorl[VorlC] = tmV.setNum(docParagraphStyles.count()-1);
VorlC++;
}
}
548,9 → 548,9
}
 
bool ScriXmlDoc::ReadStyles(QString fileName, ScribusDoc* doc, preV *Prefs)
bool ScriXmlDoc::ReadStyles(QString fileName, ScribusDoc* doc, ApplicationPrefs *Prefs)
{
struct StVorL vg;
struct ParagraphStyle vg;
QDomDocument docu("scridoc");
QString f = "";
QString tmpf, tmf;
572,7 → 572,7
{
QDomElement pg=PAGE.toElement();
if(pg.tagName()=="STYLE")
GetStyle(&pg, &vg, Vorlagen, doc, Prefs, false);
GetStyle(&pg, &vg, docParagraphStyles, doc, Prefs, false);
PAGE=PAGE.nextSibling();
}
DOC=DOC.nextSibling();
666,8 → 666,8
 
bool ScriXmlDoc::ReadPage(QString fileName, SCFonts &avail, ScribusDoc *doc, ScribusView *view, int PageToLoad, bool Mpage)
{
struct CLBuf OB;
struct StVorL vg;
struct CopyPasteBuffer OB;
struct ParagraphStyle vg;
struct Layer la;
struct ScribusDoc::BookMa bok;
struct Linked Link;
725,7 → 725,7
}
if(pg.tagName()=="STYLE")
{
GetStyle(&pg, &vg, doc->Vorlagen, doc, view->Prefs, true);
GetStyle(&pg, &vg, doc->docParagraphStyles, doc, view->Prefs, true);
VorLFound = true;
}
if(pg.tagName()=="JAVA")
735,8 → 735,8
la.LNr = QStoInt(pg.attribute("NUMMER"));
la.Level = QStoInt(pg.attribute("LEVEL"));
la.Name = pg.attribute("NAME");
la.Sichtbar = QStoInt(pg.attribute("SICHTBAR"));
la.Drucken = QStoInt(pg.attribute("DRUCKEN"));
la.isViewable = QStoInt(pg.attribute("SICHTBAR"));
la.isPrintable = QStoInt(pg.attribute("DRUCKEN"));
bool laex = false;
for (uint la2 = 0; la2 < doc->Layers.count(); ++la2)
{
768,7 → 768,7
while(!MuLn.isNull())
{
QDomElement MuL = MuLn.toElement();
struct singleLine sl;
struct SingleLine sl;
sl.Color = MuL.attribute("Color");
sl.Dash = QStoInt(MuL.attribute("Dash"));
sl.LineEnd = QStoInt(MuL.attribute("LineEnd"));
790,7 → 790,7
}
if ((pg.tagName()=="PAGE") && (QStoInt(pg.attribute("NUM")) == PageToLoad))
{
a = doc->ActPage->PageNr;
a = doc->currentPage->PageNr;
if ((pg.attribute("NAM", "") == "") && (Mpage))
{
PAGE=PAGE.nextSibling();
865,7 → 865,7
if ((OB.isBookmark) && (doc->BookMarks.count() == 0))
doc->OldBM = true;
OB.BMnr = QStoInt(obj.attribute("BookNr","0"));
OB.Ausrich = DoVorl[QStoInt(obj.attribute("ALIGN","0"))].toUInt();
OB.textAlignment = DoVorl[QStoInt(obj.attribute("ALIGN","0"))].toUInt();
tmpf = obj.attribute("IFONT", doc->Dfont);
if (tmpf == "")
tmpf = doc->Dfont;
908,7 → 908,7
tmp += GetItemText(&it, doc, view->Prefs, VorLFound, true);
IT=IT.nextSibling();
}
OB.Ptext = tmp;
OB.itemText = tmp;
if ((OB.PType == 5) && (OB.Height != 0))
{
OB.Rot += atan2(OB.Height,OB.Width)*(180.0/3.1415927);
994,8 → 994,8
 
bool ScriXmlDoc::ReadDoc(QString fileName, SCFonts &avail, ScribusDoc *doc, ScribusView *view, QProgressBar *dia2)
{
struct CLBuf OB;
struct StVorL vg;
struct CopyPasteBuffer OB;
struct ParagraphStyle vg;
struct Layer la;
struct ScribusDoc::BookMa bok;
int counter, Pgc;
1049,7 → 1049,7
doc->PageAT=QStoInt(dc.attribute("AUTOTEXT"));
doc->PageSp=QStoInt(dc.attribute("AUTOSPALTEN"));
doc->PageSpa=QStodouble(dc.attribute("ABSTSPALTEN"));
doc->Einheit = QStoInt(dc.attribute("UNITS","0"));
doc->docUnitIndex = QStoInt(dc.attribute("UNITS","0"));
doc->guidesSettings.gridShown = view->Prefs->guidesSettings.gridShown;
doc->guidesSettings.guidesShown = view->Prefs->guidesSettings.guidesShown;
doc->guidesSettings.framesShown = view->Prefs->guidesSettings.framesShown;
1147,9 → 1147,9
vg.LineSpa = QStodouble(pg.attribute("LINESP"));
vg.Indent = QStodouble(pg.attribute("INDENT","0"));
vg.First = QStodouble(pg.attribute("FIRST","0"));
vg.Ausri = QStoInt(pg.attribute("ALIGN"));
vg.Avor = QStodouble(pg.attribute("VOR","0"));
vg.Anach = QStodouble(pg.attribute("NACH","0"));
vg.textAlignment = QStoInt(pg.attribute("ALIGN"));
vg.gapBefore = QStodouble(pg.attribute("VOR","0"));
vg.gapAfter = QStodouble(pg.attribute("NACH","0"));
tmpf = pg.attribute("FONT", doc->Dfont);
if (tmpf == "")
tmpf = doc->Dfont;
1182,7 → 1182,7
}
else
vg.TabValues.clear();
doc->Vorlagen.append(vg);
doc->docParagraphStyles.append(vg);
}
if(pg.tagName()=="JAVA")
doc->JavaScripts[pg.attribute("NAME")] = pg.attribute("SCRIPT");
1191,8 → 1191,8
la.LNr = QStoInt(pg.attribute("NUMMER"));
la.Level = QStoInt(pg.attribute("LEVEL"));
la.Name = pg.attribute("NAME");
la.Sichtbar = QStoInt(pg.attribute("SICHTBAR"));
la.Drucken = QStoInt(pg.attribute("DRUCKEN"));
la.isViewable = QStoInt(pg.attribute("SICHTBAR"));
la.isPrintable = QStoInt(pg.attribute("DRUCKEN"));
doc->Layers.append(la);
}
if(pg.tagName()=="Bookmark")
1217,7 → 1217,7
while(!MuLn.isNull())
{
QDomElement MuL = MuLn.toElement();
struct singleLine sl;
struct SingleLine sl;
sl.Color = MuL.attribute("Color");
sl.Dash = QStoInt(MuL.attribute("Dash"));
sl.LineEnd = QStoInt(MuL.attribute("LineEnd"));
1319,7 → 1319,7
if ((OB.isBookmark) && (doc->BookMarks.count() == 0))
doc->OldBM = true;
OB.BMnr = QStoInt(obj.attribute("BookNr","0"));
OB.Ausrich = QStoInt(obj.attribute("ALIGN","0"));
OB.textAlignment = QStoInt(obj.attribute("ALIGN","0"));
OB.startArrowIndex = 0;
OB.endArrowIndex = 0;
tmpf = obj.attribute("IFONT", doc->Dfont);
1364,7 → 1364,7
tmp += GetItemText(&it, doc, view->Prefs, false, false);
IT=IT.nextSibling();
}
OB.Ptext = tmp;
OB.itemText = tmp;
int docGc = doc->GroupCounter;
doc->GroupCounter = 0;
if ((OB.PType == 5) && (OB.Height != 0))
1489,7 → 1489,7
QDomElement pdfF = PFO.toElement();
if(pdfF.tagName() == "LPI")
{
struct LPIset lpo;
struct LPIData lpo;
lpo.Angle = QStoInt(pdfF.attribute("Angle"));
lpo.Frequency = QStoInt(pdfF.attribute("Frequency"));
lpo.SpotFunc = QStoInt(pdfF.attribute("SpotFunction"));
1507,10 → 1507,10
}
if(pdfF.tagName() == "Effekte")
{
struct PreSet ef;
ef.EffektLen = QStoInt(pdfF.attribute("EffektLen"));
ef.AnzeigeLen = QStoInt(pdfF.attribute("AnzeigeLen"));
ef.Effekt = QStoInt(pdfF.attribute("Effekt"));
struct PDFPresentationData ef;
ef.pageEffectDuration = QStoInt(pdfF.attribute("pageEffectDuration"));
ef.pageViewDuration = QStoInt(pdfF.attribute("pageViewDuration"));
ef.effectType = QStoInt(pdfF.attribute("effectType"));
ef.Dm = QStoInt(pdfF.attribute("Dm"));
ef.M = QStoInt(pdfF.attribute("M"));
ef.Di = QStoInt(pdfF.attribute("Di"));
1533,8 → 1533,8
la.LNr = 0;
la.Level = 0;
la.Name = tr("Background");
la.Sichtbar = true;
la.Drucken = true;
la.isViewable = true;
la.isPrintable = true;
doc->Layers.append(la);
}
if (LFrames.count() != 0)
1573,7 → 1573,7
Its->NextBox = 0;
}
}
view->UN->setText(doc->Einheit == 0 ? "pt" : "mm");
view->UN->setText(doc->docUnitIndex == 0 ? "pt" : "mm");
dia2->setProgress(DOC.childNodes().count());
return true;
}
1614,10 → 1614,10
return true;
}
 
bool ScriXmlDoc::ReadElem(QString fileName, SCFonts &avail, ScribusDoc *doc, int Xp, int Yp, bool Fi, bool loc, QMap<QString,QString> &FontSub, preV *Prefs, ScribusView *view)
bool ScriXmlDoc::ReadElem(QString fileName, SCFonts &avail, ScribusDoc *doc, int Xp, int Yp, bool Fi, bool loc, QMap<QString,QString> &FontSub, ApplicationPrefs *Prefs, ScribusView *view)
{
struct CLBuf OB;
struct StVorL vg;
struct CopyPasteBuffer OB;
struct ParagraphStyle vg;
QString tmp, tmpf, tmp2, tmp3, tmp4, f, tmV, tmf;
QFont fo;
QMap<QString,QString> DoMul;
1691,7 → 1691,7
{
if (QStoInt(pg.attribute("Index")) > startNumArrows)
{
struct arrowDesc arrow;
struct ArrowDesc arrow;
double xa, ya;
arrow.name = pg.attribute("Name");
arrow.userArrow = true;
1748,7 → 1748,7
while(!MuLn.isNull())
{
QDomElement MuL = MuLn.toElement();
struct singleLine sl;
struct SingleLine sl;
sl.Color = MuL.attribute("Color");
sl.Dash = QStoInt(MuL.attribute("Dash"));
sl.LineEnd = QStoInt(MuL.attribute("LineEnd"));
1763,7 → 1763,7
}
if(pg.tagName()=="STYLE")
{
GetStyle(&pg, &vg, doc->Vorlagen, doc, Prefs, true);
GetStyle(&pg, &vg, doc->docParagraphStyles, doc, Prefs, true);
VorLFound = true;
}
DOC=DOC.nextSibling();
1784,7 → 1784,7
OB.NamedLStyle = "";
OB.isBookmark = false;
OB.BMnr = 0;
OB.Ausrich = DoVorl[QStoInt(pg.attribute("ALIGN","0"))].toUInt();
OB.textAlignment = DoVorl[QStoInt(pg.attribute("ALIGN","0"))].toUInt();
tmf = pg.attribute("IFONT", doc->Dfont);
if (tmf == "")
tmf = doc->Dfont;
1827,7 → 1827,7
tmp += GetItemText(&it, doc, Prefs, VorLFound, true);
IT=IT.nextSibling();
}
OB.Ptext = tmp;
OB.itemText = tmp;
if ((OB.PType == 5) && (OB.Height != 0))
{
OB.Rot += atan2(OB.Height,OB.Width)*(180.0/3.1415927);
1892,15 → 1892,15
qHeapSort(ELL);
if (view->GroupSel)
{
elem.setAttribute("XP", view->GroupX - doc->ActPage->Xoffset);
elem.setAttribute("YP", view->GroupY - doc->ActPage->Yoffset);
elem.setAttribute("XP", view->GroupX - doc->currentPage->Xoffset);
elem.setAttribute("YP", view->GroupY - doc->currentPage->Yoffset);
elem.setAttribute("W", view->GroupW);
elem.setAttribute("H", view->GroupH);
}
else
{
elem.setAttribute("XP", item->Xpos - doc->ActPage->Xoffset);
elem.setAttribute("YP", item->Ypos - doc->ActPage->Yoffset);
elem.setAttribute("XP", item->Xpos - doc->currentPage->Xoffset);
elem.setAttribute("YP", item->Ypos - doc->currentPage->Yoffset);
elem.setAttribute("W", item->Width);
elem.setAttribute("H", item->Height);
}
1913,7 → 1913,7
fn.setAttribute("NAME",itf.key());
elem.appendChild(fn);
}
CListe::Iterator itc;
ColorList::Iterator itc;
for (itc = doc->PageColors.begin(); itc != doc->PageColors.end(); ++itc)
{
QDomElement co=docu.createElement("COLOR");
1922,64 → 1922,64
co.setAttribute("CMYK",doc->PageColors[itc.key()].name());
elem.appendChild(co);
}
QMap<int, StVorL> UsedStyles;
QMap<int, ParagraphStyle> UsedStyles;
QMap<int, int> UsedMapped2Saved;
int NewStylesNum = 5;
UsedStyles.clear();
UsedMapped2Saved.clear();
struct StVorL vg;
if (doc->Vorlagen.count() > 5)
struct ParagraphStyle vg;
if (doc->docParagraphStyles.count() > 5)
{
for (uint co=0; co<Selitems->count(); ++co)
{
item = doc->Items.at(ELL[co]);
if (item->Ausrich > 4)
if (item->textAlignment > 4)
{
vg.Vname = doc->Vorlagen[item->Ausrich].Vname;
vg.LineSpa = doc->Vorlagen[item->Ausrich].LineSpa;
vg.Ausri = doc->Vorlagen[item->Ausrich].Ausri;
vg.Indent = doc->Vorlagen[item->Ausrich].Indent;
vg.First = doc->Vorlagen[item->Ausrich].First;
vg.Avor = doc->Vorlagen[item->Ausrich].Avor;
vg.Anach = doc->Vorlagen[item->Ausrich].Anach;
vg.Font = doc->Vorlagen[item->Ausrich].Font;
vg.FontSize = doc->Vorlagen[item->Ausrich].FontSize;
vg.TabValues = doc->Vorlagen[item->Ausrich].TabValues;
vg.Drop = doc->Vorlagen[item->Ausrich].Drop;
vg.DropLin = doc->Vorlagen[item->Ausrich].DropLin;
vg.FontEffect = doc->Vorlagen[item->Ausrich].FontEffect;
vg.FColor = doc->Vorlagen[item->Ausrich].FColor;
vg.FShade = doc->Vorlagen[item->Ausrich].FShade;
vg.SColor = doc->Vorlagen[item->Ausrich].SColor;
vg.SShade = doc->Vorlagen[item->Ausrich].SShade;
vg.BaseAdj = doc->Vorlagen[item->Ausrich].BaseAdj;
UsedStyles[item->Ausrich] = vg;
vg.Vname = doc->docParagraphStyles[item->textAlignment].Vname;
vg.LineSpa = doc->docParagraphStyles[item->textAlignment].LineSpa;
vg.textAlignment = doc->docParagraphStyles[item->textAlignment].textAlignment;
vg.Indent = doc->docParagraphStyles[item->textAlignment].Indent;
vg.First = doc->docParagraphStyles[item->textAlignment].First;
vg.gapBefore = doc->docParagraphStyles[item->textAlignment].gapBefore;
vg.gapAfter = doc->docParagraphStyles[item->textAlignment].gapAfter;
vg.Font = doc->docParagraphStyles[item->textAlignment].Font;
vg.FontSize = doc->docParagraphStyles[item->textAlignment].FontSize;
vg.TabValues = doc->docParagraphStyles[item->textAlignment].TabValues;
vg.Drop = doc->docParagraphStyles[item->textAlignment].Drop;
vg.DropLin = doc->docParagraphStyles[item->textAlignment].DropLin;
vg.FontEffect = doc->docParagraphStyles[item->textAlignment].FontEffect;
vg.FColor = doc->docParagraphStyles[item->textAlignment].FColor;
vg.FShade = doc->docParagraphStyles[item->textAlignment].FShade;
vg.SColor = doc->docParagraphStyles[item->textAlignment].SColor;
vg.SShade = doc->docParagraphStyles[item->textAlignment].SShade;
vg.BaseAdj = doc->docParagraphStyles[item->textAlignment].BaseAdj;
UsedStyles[item->textAlignment] = vg;
}
if (((item->PType == 4) || (item->PType == 8)) && (item->Ptext.count() != 0))
if (((item->PType == 4) || (item->PType == 8)) && (item->itemText.count() != 0))
{
for (uint tx = 0; tx < item->Ptext.count(); ++tx)
for (uint tx = 0; tx < item->itemText.count(); ++tx)
{
if (item->Ptext.at(tx)->cab > 4)
if (item->itemText.at(tx)->cab > 4)
{
vg.Vname = doc->Vorlagen[item->Ptext.at(tx)->cab].Vname;
vg.LineSpa = doc->Vorlagen[item->Ptext.at(tx)->cab].LineSpa;
vg.Ausri = doc->Vorlagen[item->Ptext.at(tx)->cab].Ausri;
vg.Indent = doc->Vorlagen[item->Ptext.at(tx)->cab].Indent;
vg.First = doc->Vorlagen[item->Ptext.at(tx)->cab].First;
vg.Avor = doc->Vorlagen[item->Ptext.at(tx)->cab].Avor;
vg.Anach = doc->Vorlagen[item->Ptext.at(tx)->cab].Anach;
vg.Font = doc->Vorlagen[item->Ptext.at(tx)->cab].Font;
vg.FontSize = doc->Vorlagen[item->Ptext.at(tx)->cab].FontSize;
vg.TabValues = doc->Vorlagen[item->Ptext.at(tx)->cab].TabValues;
vg.Drop = doc->Vorlagen[item->Ptext.at(tx)->cab].Drop;
vg.DropLin = doc->Vorlagen[item->Ptext.at(tx)->cab].DropLin;
vg.FontEffect = doc->Vorlagen[item->Ptext.at(tx)->cab].FontEffect;
vg.FColor = doc->Vorlagen[item->Ptext.at(tx)->cab].FColor;
vg.FShade = doc->Vorlagen[item->Ptext.at(tx)->cab].FShade;
vg.SColor = doc->Vorlagen[item->Ptext.at(tx)->cab].SColor;
vg.SShade = doc->Vorlagen[item->Ptext.at(tx)->cab].SShade;
vg.BaseAdj = doc->Vorlagen[item->Ptext.at(tx)->cab].BaseAdj;
UsedStyles[item->Ptext.at(tx)->cab] = vg;
vg.Vname = doc->docParagraphStyles[item->itemText.at(tx)->cab].Vname;
vg.LineSpa = doc->docParagraphStyles[item->itemText.at(tx)->cab].LineSpa;
vg.textAlignment = doc->docParagraphStyles[item->itemText.at(tx)->cab].textAlignment;
vg.Indent = doc->docParagraphStyles[item->itemText.at(tx)->cab].Indent;
vg.First = doc->docParagraphStyles[item->itemText.at(tx)->cab].First;
vg.gapBefore = doc->docParagraphStyles[item->itemText.at(tx)->cab].gapBefore;
vg.gapAfter = doc->docParagraphStyles[item->itemText.at(tx)->cab].gapAfter;
vg.Font = doc->docParagraphStyles[item->itemText.at(tx)->cab].Font;
vg.FontSize = doc->docParagraphStyles[item->itemText.at(tx)->cab].FontSize;
vg.TabValues = doc->docParagraphStyles[item->itemText.at(tx)->cab].TabValues;
vg.Drop = doc->docParagraphStyles[item->itemText.at(tx)->cab].Drop;
vg.DropLin = doc->docParagraphStyles[item->itemText.at(tx)->cab].DropLin;
vg.FontEffect = doc->docParagraphStyles[item->itemText.at(tx)->cab].FontEffect;
vg.FColor = doc->docParagraphStyles[item->itemText.at(tx)->cab].FColor;
vg.FShade = doc->docParagraphStyles[item->itemText.at(tx)->cab].FShade;
vg.SColor = doc->docParagraphStyles[item->itemText.at(tx)->cab].SColor;
vg.SShade = doc->docParagraphStyles[item->itemText.at(tx)->cab].SShade;
vg.BaseAdj = doc->docParagraphStyles[item->itemText.at(tx)->cab].BaseAdj;
UsedStyles[item->itemText.at(tx)->cab] = vg;
}
}
}
1993,12 → 1993,12
NewStylesNum++;
QDomElement fo=docu.createElement("STYLE");
fo.setAttribute("NAME",UsedStyles[actSt].Vname);
fo.setAttribute("ALIGN",UsedStyles[actSt].Ausri);
fo.setAttribute("ALIGN",UsedStyles[actSt].textAlignment);
fo.setAttribute("LINESP",UsedStyles[actSt].LineSpa);
fo.setAttribute("INDENT",UsedStyles[actSt].Indent);
fo.setAttribute("FIRST",UsedStyles[actSt].First);
fo.setAttribute("VOR",UsedStyles[actSt].Avor);
fo.setAttribute("NACH",UsedStyles[actSt].Anach);
fo.setAttribute("VOR",UsedStyles[actSt].gapBefore);
fo.setAttribute("NACH",UsedStyles[actSt].gapAfter);
fo.setAttribute("FONT",UsedStyles[actSt].Font);
fo.setAttribute("FONTSIZE",UsedStyles[actSt].FontSize / 10.0);
fo.setAttribute("DROP", static_cast<int>(UsedStyles[actSt].Drop));
2038,9 → 2038,9
}
elem.appendChild(MuL);
}
QMap<int, arrowDesc> usedArrows;
QMap<int, arrowDesc>::Iterator itar;
struct arrowDesc arrow;
QMap<int, ArrowDesc> usedArrows;
QMap<int, ArrowDesc>::Iterator itar;
struct ArrowDesc arrow;
for (uint co=0; co<Selitems->count(); ++co)
{
item = doc->Items.at(ELL[co]);
2085,10 → 2085,10
QDir::setCurrent(QDir::homeDirPath());
item = doc->Items.at(ELL[co]);
QDomElement ob=docu.createElement("ITEM");
if (item->Ausrich > 4)
ob.setAttribute("ALIGN",UsedMapped2Saved[item->Ausrich]);
if (item->textAlignment > 4)
ob.setAttribute("ALIGN",UsedMapped2Saved[item->textAlignment]);
else
ob.setAttribute("ALIGN",item->Ausrich);
ob.setAttribute("ALIGN",item->textAlignment);
SetItemProps(&ob, item, false);
if (item->GrType != 0)
{
2108,30 → 2108,30
ob.setAttribute("GRENDY", item->GrEndY);
}
QDir::setCurrent(CurDirP);
for(uint k=0;k<item->Ptext.count();++k)
for(uint k=0;k<item->itemText.count();++k)
{
QDomElement it=docu.createElement("ITEXT");
ts = item->Ptext.at(k)->csize / 10.0;
tf = item->Ptext.at(k)->cfont;
tc = item->Ptext.at(k)->ccolor;
te = item->Ptext.at(k)->cextra;
tsh = item->Ptext.at(k)->cshade;
tst = item->Ptext.at(k)->cstyle;
if (item->Ptext.at(k)->cab > 4)
tsb = UsedMapped2Saved[item->Ptext.at(k)->cab];
ts = item->itemText.at(k)->csize / 10.0;
tf = item->itemText.at(k)->cfont;
tc = item->itemText.at(k)->ccolor;
te = item->itemText.at(k)->cextra;
tsh = item->itemText.at(k)->cshade;
tst = item->itemText.at(k)->cstyle;
if (item->itemText.at(k)->cab > 4)
tsb = UsedMapped2Saved[item->itemText.at(k)->cab];
else
tsb = item->Ptext.at(k)->cab;
tcs = item->Ptext.at(k)->cstroke;
tshs = item->Ptext.at(k)->cshade2;
tsc = item->Ptext.at(k)->cscale;
if (item->Ptext.at(k)->ch == QChar(13))
tsb = item->itemText.at(k)->cab;
tcs = item->itemText.at(k)->cstroke;
tshs = item->itemText.at(k)->cshade2;
tsc = item->itemText.at(k)->cscale;
if (item->itemText.at(k)->ch == QChar(13))
text = QChar(5);
else if (item->Ptext.at(k)->ch == QChar(9))
else if (item->itemText.at(k)->ch == QChar(9))
text = QChar(4);
else
text = item->Ptext.at(k)->ch;
text = item->itemText.at(k)->ch;
k++;
if (k == item->Ptext.count())
if (k == item->itemText.count())
{
it.setAttribute("CH",text);
it.setAttribute("CSIZE",ts);
2147,19 → 2147,19
ob.appendChild(it);
break;
}
ts2 = item->Ptext.at(k)->csize / 10.0;
tf2 = item->Ptext.at(k)->cfont;
tc2 = item->Ptext.at(k)->ccolor;
te2 = item->Ptext.at(k)->cextra;
tsh2 = item->Ptext.at(k)->cshade;
tst2 = item->Ptext.at(k)->cstyle;
if (item->Ptext.at(k)->cab > 4)
tsb2 = UsedMapped2Saved[item->Ptext.at(k)->cab];
ts2 = item->itemText.at(k)->csize / 10.0;
tf2 = item->itemText.at(k)->cfont;
tc2 = item->itemText.at(k)->ccolor;
te2 = item->itemText.at(k)->cextra;
tsh2 = item->itemText.at(k)->cshade;
tst2 = item->itemText.at(k)->cstyle;
if (item->itemText.at(k)->cab > 4)
tsb2 = UsedMapped2Saved[item->itemText.at(k)->cab];
else
tsb2 = item->Ptext.at(k)->cab;
tcs2 = item->Ptext.at(k)->cstroke;
tshs2 = item->Ptext.at(k)->cshade2;
tsc2 = item->Ptext.at(k)->cscale;
tsb2 = item->itemText.at(k)->cab;
tcs2 = item->itemText.at(k)->cstroke;
tshs2 = item->itemText.at(k)->cshade2;
tsc2 = item->itemText.at(k)->cscale;
while ((ts2 == ts)
&& (tsb2 == tsb)
&& (tf2 == tf)
2171,28 → 2171,28
&& (tcs2 == tcs)
&& (tst2 == tst))
{
if (item->Ptext.at(k)->ch == QChar(13))
if (item->itemText.at(k)->ch == QChar(13))
text += QChar(5);
else if (item->Ptext.at(k)->ch == QChar(9))
else if (item->itemText.at(k)->ch == QChar(9))
text += QChar(4);
else
text += item->Ptext.at(k)->ch;
text += item->itemText.at(k)->ch;
k++;
if (k == item->Ptext.count())
if (k == item->itemText.count())
break;
ts2 = item->Ptext.at(k)->csize / 10.0;
tf2 = item->Ptext.at(k)->cfont;
tc2 = item->Ptext.at(k)->ccolor;
te2 = item->Ptext.at(k)->cextra;
tsh2 = item->Ptext.at(k)->cshade;
tst2 = item->Ptext.at(k)->cstyle;
if (item->Ptext.at(k)->cab > 4)
tsb2 = UsedMapped2Saved[item->Ptext.at(k)->cab];
ts2 = item->itemText.at(k)->csize / 10.0;
tf2 = item->itemText.at(k)->cfont;
tc2 = item->itemText.at(k)->ccolor;
te2 = item->itemText.at(k)->cextra;
tsh2 = item->itemText.at(k)->cshade;
tst2 = item->itemText.at(k)->cstyle;
if (item->itemText.at(k)->cab > 4)
tsb2 = UsedMapped2Saved[item->itemText.at(k)->cab];
else
tsb2 = item->Ptext.at(k)->cab;
tcs2 = item->Ptext.at(k)->cstroke;
tshs2 = item->Ptext.at(k)->cshade2;
tsc2 = item->Ptext.at(k)->cscale;
tsb2 = item->itemText.at(k)->cab;
tcs2 = item->itemText.at(k)->cstroke;
tshs2 = item->itemText.at(k)->cshade2;
tsc2 = item->itemText.at(k)->cscale;
}
it.setAttribute("CH",text);
it.setAttribute("CSIZE",ts);
2208,10 → 2208,10
k--;
ob.appendChild(it);
}
ob.setAttribute("NUMTEXT",item->Ptext.count());
ob.setAttribute("NUMTEXT",item->itemText.count());
QString txnu = "";
for(uint kt=0;kt<item->Ptext.count();++kt)
txnu += tmp.setNum(item->Ptext.at(kt)->xp) + " " + tmpy.setNum(item->Ptext.at(kt)->yp) + " ";
for(uint kt=0;kt<item->itemText.count();++kt)
txnu += tmp.setNum(item->itemText.at(kt)->xp) + " " + tmpy.setNum(item->itemText.at(kt)->yp) + " ";
ob.setAttribute("TEXTCOOR", txnu);
ob.setAttribute("BACKITEM", -1);
ob.setAttribute("BACKPAGE", -1);
2321,30 → 2321,30
ob.setAttribute("GRENDX", item->GrEndX);
ob.setAttribute("GRENDY", item->GrEndY);
}
ob.setAttribute("ALIGN",item->Ausrich);
ob.setAttribute("ALIGN",item->textAlignment);
ob.setAttribute("BOOKMARK", item->isBookmark ? 1 : 0);
ob.setAttribute("BookNr", item->BMnr);
for(uint k=0;k<item->Ptext.count();++k)
for(uint k=0;k<item->itemText.count();++k)
{
QDomElement it=docu->createElement("ITEXT");
ts = item->Ptext.at(k)->csize / 10.0;
tf = item->Ptext.at(k)->cfont;
tc = item->Ptext.at(k)->ccolor;
te = item->Ptext.at(k)->cextra;
tsh = item->Ptext.at(k)->cshade;
tst = item->Ptext.at(k)->cstyle;
tsb = item->Ptext.at(k)->cab;
tcs = item->Ptext.at(k)->cstroke;
tshs = item->Ptext.at(k)->cshade2;
tsc = item->Ptext.at(k)->cscale;
if (item->Ptext.at(k)->ch == QChar(13))
ts = item->itemText.at(k)->csize / 10.0;
tf = item->itemText.at(k)->cfont;
tc = item->itemText.at(k)->ccolor;
te = item->itemText.at(k)->cextra;
tsh = item->itemText.at(k)->cshade;
tst = item->itemText.at(k)->cstyle;
tsb = item->itemText.at(k)->cab;
tcs = item->itemText.at(k)->cstroke;
tshs = item->itemText.at(k)->cshade2;
tsc = item->itemText.at(k)->cscale;
if (item->itemText.at(k)->ch == QChar(13))
text = QChar(5);
else if (item->Ptext.at(k)->ch == QChar(9))
else if (item->itemText.at(k)->ch == QChar(9))
text = QChar(4);
else
text = item->Ptext.at(k)->ch;
text = item->itemText.at(k)->ch;
k++;
if (k == item->Ptext.count())
if (k == item->itemText.count())
{
it.setAttribute("CH",text);
it.setAttribute("CSIZE",ts);
2360,16 → 2360,16
ob.appendChild(it);
break;
}
ts2 = item->Ptext.at(k)->csize / 10.0;
tf2 = item->Ptext.at(k)->cfont;
tc2 = item->Ptext.at(k)->ccolor;
te2 = item->Ptext.at(k)->cextra;
tsh2 = item->Ptext.at(k)->cshade;
tst2 = item->Ptext.at(k)->cstyle;
tsb2 = item->Ptext.at(k)->cab;
tcs2 = item->Ptext.at(k)->cstroke;
tshs2 = item->Ptext.at(k)->cshade2;
tsc2 = item->Ptext.at(k)->cscale;
ts2 = item->itemText.at(k)->csize / 10.0;
tf2 = item->itemText.at(k)->cfont;
tc2 = item->itemText.at(k)->ccolor;
te2 = item->itemText.at(k)->cextra;
tsh2 = item->itemText.at(k)->cshade;
tst2 = item->itemText.at(k)->cstyle;
tsb2 = item->itemText.at(k)->cab;
tcs2 = item->itemText.at(k)->cstroke;
tshs2 = item->itemText.at(k)->cshade2;
tsc2 = item->itemText.at(k)->cscale;
while ((ts2 == ts)
&& (tsb2 == tsb)
&& (tf2 == tf)
2381,25 → 2381,25
&& (tcs2 == tcs)
&& (tst2 == tst))
{
if (item->Ptext.at(k)->ch == QChar(13))
if (item->itemText.at(k)->ch == QChar(13))
text += QChar(5);
else if (item->Ptext.at(k)->ch == QChar(9))
else if (item->itemText.at(k)->ch == QChar(9))
text += QChar(4);
else
text += item->Ptext.at(k)->ch;
text += item->itemText.at(k)->ch;
k++;
if (k == item->Ptext.count())
if (k == item->itemText.count())
break;
ts2 = item->Ptext.at(k)->csize / 10.0;
tf2 = item->Ptext.at(k)->cfont;
tc2 = item->Ptext.at(k)->ccolor;
te2 = item->Ptext.at(k)->cextra;
tsh2 = item->Ptext.at(k)->cshade;
tst2 = item->Ptext.at(k)->cstyle;
tsb2 = item->Ptext.at(k)->cab;
tcs2 = item->Ptext.at(k)->cstroke;
tshs2 = item->Ptext.at(k)->cshade2;
tsc2 = item->Ptext.at(k)->cscale;
ts2 = item->itemText.at(k)->csize / 10.0;
tf2 = item->itemText.at(k)->cfont;
tc2 = item->itemText.at(k)->ccolor;
te2 = item->itemText.at(k)->cextra;
tsh2 = item->itemText.at(k)->cshade;
tst2 = item->itemText.at(k)->cstyle;
tsb2 = item->itemText.at(k)->cab;
tcs2 = item->itemText.at(k)->cstroke;
tshs2 = item->itemText.at(k)->cshade2;
tsc2 = item->itemText.at(k)->cscale;
}
it.setAttribute("CH",text);
it.setAttribute("CSIZE",ts);
2455,7 → 2455,7
dc.setAttribute("AUTOTEXT",1);
dc.setAttribute("AUTOSPALTEN",doc->PageSp);
dc.setAttribute("ABSTSPALTEN",doc->PageSpa);
dc.setAttribute("UNITS",doc->Einheit);
dc.setAttribute("UNITS",doc->docUnitIndex);
dc.setAttribute("DFONT",doc->Dfont);
dc.setAttribute("DSIZE",doc->Dsize / 10.0);
dc.setAttribute("DCOL",doc->DCols);
2556,7 → 2556,7
dc.setAttribute("BACKG", static_cast<int>(doc->Before));
dc.setAttribute("PAGEC",doc->papColor.name());
dc.setAttribute("MARGC",doc->guidesSettings.margColor.name());
dc.setAttribute("RANDF", static_cast<int>(doc->RandFarbig));
dc.setAttribute("RANDF", static_cast<int>(doc->marginColored));
QMap<QString,multiLine>::Iterator itMU;
for (itMU = doc->MLineStyles.begin(); itMU != doc->MLineStyles.end(); ++itMU)
{
2577,7 → 2577,7
}
dc.appendChild(MuL);
}
QValueList<arrowDesc>::Iterator itar;
QValueList<ArrowDesc>::Iterator itar;
for (itar = doc->arrowStyles.begin(); itar != doc->arrowStyles.end(); ++itar)
{
if ((*itar).userArrow)
2622,7 → 2622,7
fn.setAttribute("Parent", (*itbm).Parent);
dc.appendChild(fn);
}
CListe::Iterator itc;
ColorList::Iterator itc;
for (itc = doc->PageColors.begin(); itc != doc->PageColors.end(); ++itc)
{
QDomElement co=docu.createElement("COLOR");
2631,35 → 2631,35
co.setAttribute("CMYK",doc->PageColors[itc.key()].name());
dc.appendChild(co);
}
if (doc->Vorlagen.count() > 5)
if (doc->docParagraphStyles.count() > 5)
{
for (uint ff = 5; ff < doc->Vorlagen.count(); ++ff)
for (uint ff = 5; ff < doc->docParagraphStyles.count(); ++ff)
{
QDomElement fo=docu.createElement("STYLE");
fo.setAttribute("NAME",doc->Vorlagen[ff].Vname);
fo.setAttribute("ALIGN",doc->Vorlagen[ff].Ausri);
fo.setAttribute("LINESP",doc->Vorlagen[ff].LineSpa);
fo.setAttribute("INDENT",doc->Vorlagen[ff].Indent);
fo.setAttribute("FIRST",doc->Vorlagen[ff].First);
fo.setAttribute("VOR",doc->Vorlagen[ff].Avor);
fo.setAttribute("NACH",doc->Vorlagen[ff].Anach);
fo.setAttribute("FONT",doc->Vorlagen[ff].Font);
fo.setAttribute("FONTSIZE",doc->Vorlagen[ff].FontSize / 10.0);
fo.setAttribute("DROP", static_cast<int>(doc->Vorlagen[ff].Drop));
fo.setAttribute("DROPLIN", doc->Vorlagen[ff].DropLin);
fo.setAttribute("EFFECT", doc->Vorlagen[ff].FontEffect);
fo.setAttribute("NUMTAB", static_cast<int>(doc->Vorlagen[ff].TabValues.count()));
fo.setAttribute("NAME",doc->docParagraphStyles[ff].Vname);
fo.setAttribute("ALIGN",doc->docParagraphStyles[ff].textAlignment);
fo.setAttribute("LINESP",doc->docParagraphStyles[ff].LineSpa);
fo.setAttribute("INDENT",doc->docParagraphStyles[ff].Indent);
fo.setAttribute("FIRST",doc->docParagraphStyles[ff].First);
fo.setAttribute("VOR",doc->docParagraphStyles[ff].gapBefore);
fo.setAttribute("NACH",doc->docParagraphStyles[ff].gapAfter);
fo.setAttribute("FONT",doc->docParagraphStyles[ff].Font);
fo.setAttribute("FONTSIZE",doc->docParagraphStyles[ff].FontSize / 10.0);
fo.setAttribute("DROP", static_cast<int>(doc->docParagraphStyles[ff].Drop));
fo.setAttribute("DROPLIN", doc->docParagraphStyles[ff].DropLin);
fo.setAttribute("EFFECT", doc->docParagraphStyles[ff].FontEffect);
fo.setAttribute("NUMTAB", static_cast<int>(doc->docParagraphStyles[ff].TabValues.count()));
QString tlp = "";
QString tmp = "";
QValueList<double>::Iterator tax;
for (tax = doc->Vorlagen[ff].TabValues.begin(); tax != doc->Vorlagen[ff].TabValues.end(); ++tax)
for (tax = doc->docParagraphStyles[ff].TabValues.begin(); tax != doc->docParagraphStyles[ff].TabValues.end(); ++tax)
tlp += tmp.setNum((*tax)) + " ";
fo.setAttribute("TABS", tlp);
fo.setAttribute("FCOLOR",doc->Vorlagen[ff].FColor);
fo.setAttribute("FSHADE",doc->Vorlagen[ff].FShade);
fo.setAttribute("SCOLOR",doc->Vorlagen[ff].SColor);
fo.setAttribute("SSHADE",doc->Vorlagen[ff].SShade);
fo.setAttribute("BASE", static_cast<int>(doc->Vorlagen[ff].BaseAdj));
fo.setAttribute("FCOLOR",doc->docParagraphStyles[ff].FColor);
fo.setAttribute("FSHADE",doc->docParagraphStyles[ff].FShade);
fo.setAttribute("SCOLOR",doc->docParagraphStyles[ff].SColor);
fo.setAttribute("SSHADE",doc->docParagraphStyles[ff].SShade);
fo.setAttribute("BASE", static_cast<int>(doc->docParagraphStyles[ff].BaseAdj));
dc.appendChild(fo);
}
}
2669,8 → 2669,8
la.setAttribute("NUMMER",doc->Layers[lay].LNr);
la.setAttribute("LEVEL",doc->Layers[lay].Level);
la.setAttribute("NAME",doc->Layers[lay].Name);
la.setAttribute("SICHTBAR", static_cast<int>(doc->Layers[lay].Sichtbar));
la.setAttribute("DRUCKEN", static_cast<int>(doc->Layers[lay].Drucken));
la.setAttribute("SICHTBAR", static_cast<int>(doc->Layers[lay].isViewable));
la.setAttribute("DRUCKEN", static_cast<int>(doc->Layers[lay].isPrintable));
dc.appendChild(la);
}
QDomElement pdf = docu.createElement("PDF");
2723,15 → 2723,15
for (uint pdoE = 0; pdoE < doc->PDF_Optionen.PresentVals.count(); ++pdoE)
{
QDomElement pdf3 = docu.createElement("Effekte");
pdf3.setAttribute("EffektLen", doc->PDF_Optionen.PresentVals[pdoE].EffektLen);
pdf3.setAttribute("AnzeigeLen", doc->PDF_Optionen.PresentVals[pdoE].AnzeigeLen);
pdf3.setAttribute("Effekt", doc->PDF_Optionen.PresentVals[pdoE].Effekt);
pdf3.setAttribute("pageEffectDuration", doc->PDF_Optionen.PresentVals[pdoE].pageEffectDuration);
pdf3.setAttribute("pageViewDuration", doc->PDF_Optionen.PresentVals[pdoE].pageViewDuration);
pdf3.setAttribute("effectType", doc->PDF_Optionen.PresentVals[pdoE].effectType);
pdf3.setAttribute("Dm", doc->PDF_Optionen.PresentVals[pdoE].Dm);
pdf3.setAttribute("M", doc->PDF_Optionen.PresentVals[pdoE].M);
pdf3.setAttribute("Di", doc->PDF_Optionen.PresentVals[pdoE].Di);
pdf.appendChild(pdf3);
}
QMap<QString,LPIset>::Iterator itlp;
QMap<QString,LPIData>::Iterator itlp;
for (itlp = doc->PDF_Optionen.LPISettings.begin(); itlp != doc->PDF_Optionen.LPISettings.end(); ++itlp)
{
QDomElement pdf4 = docu.createElement("LPI");
2790,7 → 2790,7
return true;
}
 
void ScriXmlDoc::WritePref(preV *Vor, QString ho)
void ScriXmlDoc::WritePref(ApplicationPrefs *Vor, QString ho)
{
QDomDocument docu("scribusrc");
QString st="<SCRIBUSRC></SCRIBUSRC>";
2801,7 → 2801,7
dc.setAttribute("RAD",Vor->Wheelval);
dc.setAttribute("APF",Vor->AppFontSize);
dc.setAttribute("GRAB",Vor->guidesSettings.grabRad);
dc.setAttribute("UNIT",Vor->Einheit);
dc.setAttribute("UNIT",Vor->docUnitIndex);
dc.setAttribute("RCD", Vor->RecentDCount);
dc.setAttribute("DOC", Vor->DocDir);
dc.setAttribute("PROFILES", Vor->ProfileDir);
2834,7 → 2834,7
QDomElement dc1a=docu.createElement("PAGE");
dc1a.setAttribute("PAGEC",Vor->DpapColor.name());
dc1a.setAttribute("MARGC",Vor->guidesSettings.margColor.name());
dc1a.setAttribute("RANDF", static_cast<int>(Vor->RandFarbig));
dc1a.setAttribute("RANDF", static_cast<int>(Vor->marginColored));
dc1a.setAttribute("DScale",Vor->DisScale);
elem.appendChild(dc1a);
QDomElement dc2=docu.createElement("FONTS");
2996,7 → 2996,7
rde.setAttribute("MODE", static_cast<int>(Vor->Automatic));
rde.setAttribute("INMODE", static_cast<int>(Vor->AutoCheck));
elem.appendChild(rde);
CListe::Iterator itc;
ColorList::Iterator itc;
for (itc = Vor->DColors.begin(); itc != Vor->DColors.end(); ++itc)
{
QDomElement co=docu.createElement("COLOR");
3052,7 → 3052,7
f.close();
}
 
bool ScriXmlDoc::ReadPref(struct preV *Vorein, QString ho)
bool ScriXmlDoc::ReadPref(struct ApplicationPrefs *Vorein, QString ho)
{
QDomDocument docu("scridoc");
QFile f(ho);
3078,7 → 3078,7
Vorein->GUI = dc.attribute("STILT","Default");
Vorein->Wheelval = QStoInt(dc.attribute("RAD"));
Vorein->guidesSettings.grabRad = QStoInt(dc.attribute("GRAB","4"));
Vorein->Einheit = QStoInt(dc.attribute("UNIT","0"));
Vorein->docUnitIndex = QStoInt(dc.attribute("UNIT","0"));
Vorein->AppFontSize = QStoInt(dc.attribute("APF","12"));
Vorein->RecentDCount = dc.attribute("RCD","5").toUInt();
Vorein->DocDir = dc.attribute("DOC","");
3119,7 → 3119,7
{
Vorein->DpapColor = QColor(dc.attribute("PAGEC"));
Vorein->guidesSettings.margColor = QColor(dc.attribute("MARGC","#0000ff"));
Vorein->RandFarbig = static_cast<bool>(QStoInt(dc.attribute("RANDF","0")));
Vorein->marginColored = static_cast<bool>(QStoInt(dc.attribute("RANDF","0")));
Vorein->DisScale = QStodouble(dc.attribute("DScale","1"));
}
if (dc.tagName()=="TYPO")
/branches/Version13x/Scribus/scribus/fileloader.h
21,8 → 21,8
QString ReadDatei(QString fileName);
bool LoadFile(ScribusApp* app);
bool ReadDoc(ScribusApp* app, QString fileName, SCFonts &avail, ScribusDoc *doc, ScribusView *view, QProgressBar *dia2);
QString AskForFont(SCFonts &avail, QString fStr, preV *Prefs, ScribusDoc *doc);
QString GetItemText(QDomElement *it, ScribusDoc *doc, preV *Prefs, bool VorLFound, bool impo);
QString AskForFont(SCFonts &avail, QString fStr, ApplicationPrefs *Prefs, ScribusDoc *doc);
QString GetItemText(QDomElement *it, ScribusDoc *doc, ApplicationPrefs *Prefs, bool VorLFound, bool impo);
QString FileName;
int FileType;
bool havePS;
/branches/Version13x/Scribus/scribus/scfonts.cpp
32,7 → 32,7
#endif
 
extern FPointArray traceChar(FT_Face face, uint chr, int chs, double *x, double *y, bool *err);
extern void setBestEncoding(FT_Face face);
extern int setBestEncoding(FT_Face face);
extern bool loadText(QString nam, QString *Buffer);
extern bool GlyNames(QMap<uint, QString> *GList, QString Dat);
 
/branches/Version13x/Scribus/scribus/edit1format.cpp
13,7 → 13,7
extern QPixmap fontSamples(QString da, int s, QString ts, QColor back);
 
 
EditStyle::EditStyle( QWidget* parent, struct StVorL *vor, QValueList<StVorL> v, bool neu, preV *Prefs, double au, int dEin, ScribusDoc *doc)
EditStyle::EditStyle( QWidget* parent, struct ParagraphStyle *vor, QValueList<ParagraphStyle> v, bool neu, ApplicationPrefs *Prefs, double au, int dEin, ScribusDoc *doc)
: QDialog( parent, "EditST", true, 0)
{
parentDoc = doc;
72,7 → 72,7
GroupFontLayout->addMultiCellWidget( EffeS, 1, 1, 3, 4, Qt::AlignLeft );
 
AligS = new AlignSelect(GroupFont);
AligS->setStyle(vor->Ausri);
AligS->setStyle(vor->textAlignment);
AligLabel = new QLabel( AligS, tr("&Alignment:"), GroupFont, "AligLabel" );
GroupFontLayout->addWidget( AligLabel, 2, 0 );
GroupFontLayout->addWidget( AligS, 2, 1, Qt::AlignLeft );
109,7 → 109,7
 
TxFill->clear();
TxStroke->clear();
CListe::Iterator it;
ColorList::Iterator it;
QPixmap pm = QPixmap(15, 15);
TxFill->insertItem( tr("None"));
TxStroke->insertItem( tr("None"));
243,8 → 243,8
}
AboveV->setSuffix(ein);
BelowV->setSuffix(ein);
BelowV->setValue(vor->Anach * UmReFaktor);
AboveV->setValue(vor->Avor * UmReFaktor);
BelowV->setValue(vor->gapAfter * UmReFaktor);
AboveV->setValue(vor->gapBefore * UmReFaktor);
ColorChange();
updatePreview();
}
308,12 → 308,12
}
}
werte->FontEffect = EffeS->getStyle();
werte->Ausri = AligS->getStyle();
werte->textAlignment = AligS->getStyle();
werte->LineSpa = LineSpVal->value();
werte->Indent = TabList->getLeftIndent();
werte->First = TabList->getFirstLine();
werte->Avor = AboveV->value() / UmReFaktor;
werte->Anach = BelowV->value() / UmReFaktor;
werte->gapBefore = AboveV->value() / UmReFaktor;
werte->gapAfter = BelowV->value() / UmReFaktor;
werte->Vname = Name->text();
werte->Font = FontC->currentText();
werte->FontSize = qRound(SizeC->value() * 10.0);
/branches/Version13x/Scribus/scribus/story.cpp
81,7 → 81,7
p.begin(this);
if ((editor != 0) && (noUpdt))
{
int st = editor->CurrentABStil;
int st = editor->currentParaStyle;
for (int pa = 0; pa < editor->paragraphs(); ++pa)
{
QRect re = editor->paragraphRect(pa);
102,7 → 102,7
if (st < 5)
p.drawText(re, Qt::AlignLeft | Qt::AlignTop, tr("No Style"));
else
p.drawText(re, Qt::AlignLeft | Qt::AlignTop, editor->doc->Vorlagen[st].Vname);
p.drawText(re, Qt::AlignLeft | Qt::AlignTop, editor->doc->docParagraphStyles[st].Vname);
}
else
{
110,16 → 110,16
if (st < 5)
p.drawText(re, Qt::AlignLeft | Qt::AlignTop, tr("No Style"));
else
p.drawText(re, Qt::AlignLeft | Qt::AlignTop, editor->doc->Vorlagen[st].Vname);
p.drawText(re, Qt::AlignLeft | Qt::AlignTop, editor->doc->docParagraphStyles[st].Vname);
}
}
else
{
st = editor->CurrentABStil;
st = editor->currentParaStyle;
if (st < 5)
p.drawText(re, Qt::AlignLeft | Qt::AlignTop, tr("No Style"));
else
p.drawText(re, Qt::AlignLeft | Qt::AlignTop, editor->doc->Vorlagen[st].Vname);
p.drawText(re, Qt::AlignLeft | Qt::AlignTop, editor->doc->docParagraphStyles[st].Vname);
}
}
}
273,7 → 273,7
if (chars->count() > 0)
ca = chars->at(0)->cab;
else
ca = CurrentABStil;
ca = currentParaStyle;
for (int s = 0; s < a; ++s)
{
hg = chars2->take(0);
340,7 → 340,7
if (p >= static_cast<int>(StyledText.count()))
{
StyledText.append(chars);
ParagStyles.append(CurrentABStil);
ParagStyles.append(currentParaStyle);
}
else
{
351,13 → 351,13
chars->append(chars2->take(i));
}
StyledText.insert(p+1, chars);
ParagStyles.insert(ParagStyles.at(p+1), CurrentABStil);
ParagStyles.insert(ParagStyles.at(p+1), currentParaStyle);
}
}
else
{
StyledText.append(chars);
ParagStyles.append(CurrentABStil);
ParagStyles.append(currentParaStyle);
}
}
break;
417,7 → 417,7
chars->clear();
p2 = static_cast<int>(StyledText.count());
StyledText.append(chars);
ParagStyles.append(CurrentABStil);
ParagStyles.append(currentParaStyle);
}
else
chars = StyledText.at(p);
424,7 → 424,7
if (chars->count() != 0)
ccab = chars->at(0)->cab;
else
ccab = CurrentABStil;
ccab = currentParaStyle;
for (uint a = 0; a < t.length(); ++a)
{
if (t[a] == QChar(13))
490,7 → 490,7
chars->clear();
p2 = static_cast<int>(StyledText.count());
StyledText.append(chars);
ParagStyles.append(CurrentABStil);
ParagStyles.append(currentParaStyle);
}
else
chars = StyledText.at(p);
497,7 → 497,7
if (chars->count() != 0)
ccab = chars->at(0)->cab;
else
ccab = CurrentABStil;
ccab = currentParaStyle;
for (uint a = 0; a < cBuffer.count()-1; ++a)
{
struct PtiSmall *hg;
600,7 → 600,7
{
ChList *chars;
b->CPos = 0;
b->Ptext.clear();
b->itemText.clear();
uint c = 0;
for (uint p = 0; p < StyledText.count(); ++p)
{
607,8 → 607,8
if (p != 0)
{
c = StyledText.at(p-1)->count()-1;
struct Pti *hg;
hg = new Pti;
struct ScText *hg;
hg = new ScText;
hg->ch = QChar(13);
chars = StyledText.at(p-1);
if (chars->count() != 0)
634,10 → 634,10
hg->cstyle = CurrentStyle;
hg->cextra = CurrTextKern;
hg->cscale = CurrTextScale;
if (doc->Vorlagen[ParagStyles[p-1]].Font != "")
if (doc->docParagraphStyles[ParagStyles[p-1]].Font != "")
{
hg->cfont = doc->Vorlagen[ParagStyles[p-1]].Font;
hg->csize = doc->Vorlagen[ParagStyles[p-1]].FontSize;
hg->cfont = doc->docParagraphStyles[ParagStyles[p-1]].Font;
hg->csize = doc->docParagraphStyles[ParagStyles[p-1]].FontSize;
}
}
hg->cab = ParagStyles[p-1];
647,13 → 647,13
hg->PRot = 0;
hg->PtransX = 0;
hg->PtransY = 0;
b->Ptext.append(hg);
b->itemText.append(hg);
}
chars = StyledText.at(p);
for (uint c = 0; c < chars->count(); ++c)
{
struct Pti *hg;
hg = new Pti;
struct ScText *hg;
hg = new ScText;
hg->ch = chars->at(c)->ch;
hg->cfont = chars->at(c)->cfont;
hg->csize = chars->at(c)->csize;
671,7 → 671,7
hg->PRot = 0;
hg->PtransX = 0;
hg->PtransY = 0;
b->Ptext.append(hg);
b->itemText.append(hg);
}
}
}
680,7 → 680,7
{
int align = 0;
if (style > 4)
align = doc->Vorlagen[style].Ausri;
align = doc->docParagraphStyles[style].textAlignment;
else
align = style;
switch (align)
727,12 → 727,12
}
if (nb != 0)
{
if (nb->Ptext.count() != 0)
if (nb->itemText.count() != 0)
{
Ccol = nb->Ptext.at(0)->ccolor;
Csha = nb->Ptext.at(0)->cshade;
Csty = nb->Ptext.at(0)->cstyle;
Ali = nb->Ptext.at(0)->cab;
Ccol = nb->itemText.at(0)->ccolor;
Csha = nb->itemText.at(0)->cshade;
Csty = nb->itemText.at(0)->cstyle;
Ali = nb->itemText.at(0)->cab;
}
else
{
739,7 → 739,7
Ccol = b->TxtFill;
Csha = b->ShTxtFill;
Csha = b->TxTStyle;
Ali = b->Ausrich;
Ali = b->textAlignment;
}
setAlign(Ali);
setFarbe(Ccol, Csha);
747,13 → 747,13
}
while (nb != 0)
{
for (uint a = 0; a < nb->Ptext.count(); ++a)
for (uint a = 0; a < nb->itemText.count(); ++a)
{
if (nb->Ptext.at(a)->ch == QChar(13))
if (nb->itemText.at(a)->ch == QChar(13))
{
StyledText.append(chars);
ParagStyles.append(nb->Ptext.at(a)->cab);
Ali = nb->Ptext.at(a)->cab;
ParagStyles.append(nb->itemText.at(a)->cab);
Ali = nb->itemText.at(a)->cab;
chars = new ChList;
chars->setAutoDelete(true);
chars->clear();
762,17 → 762,17
else
{
hg = new PtiSmall;
hg->ch = nb->Ptext.at(a)->ch;
hg->cfont = nb->Ptext.at(a)->cfont;
hg->csize = nb->Ptext.at(a)->csize;
hg->ccolor = nb->Ptext.at(a)->ccolor;
hg->cshade = nb->Ptext.at(a)->cshade;
hg->cstroke = nb->Ptext.at(a)->cstroke;
hg->cshade2 = nb->Ptext.at(a)->cshade2;
hg->cscale = nb->Ptext.at(a)->cscale;
hg->cstyle = nb->Ptext.at(a)->cstyle;
hg->cab = nb->Ptext.at(a)->cab;
hg->cextra = nb->Ptext.at(a)->cextra;
hg->ch = nb->itemText.at(a)->ch;
hg->cfont = nb->itemText.at(a)->cfont;
hg->csize = nb->itemText.at(a)->csize;
hg->ccolor = nb->itemText.at(a)->ccolor;
hg->cshade = nb->itemText.at(a)->cshade;
hg->cstroke = nb->itemText.at(a)->cstroke;
hg->cshade2 = nb->itemText.at(a)->cshade2;
hg->cscale = nb->itemText.at(a)->cscale;
hg->cstyle = nb->itemText.at(a)->cstyle;
hg->cab = nb->itemText.at(a)->cab;
hg->cextra = nb->itemText.at(a)->cextra;
if ((Ccol == hg->ccolor) && (Ali == hg->cab) && (Csha == hg->cshade) && (Csty == hg->cstyle))
{
if (hg->ch == QChar(30))
827,7 → 827,7
chars = new ChList;
chars->setAutoDelete(true);
chars->clear();
setAlign(b->Ausrich);
setAlign(b->textAlignment);
setFarbe(b->TxtFill, b->ShTxtFill);
setStyle(b->TxTStyle);
for (uint a = 0; a < tx.length(); ++a)
835,7 → 835,7
if (tx[a] == QChar(13))
{
StyledText.append(chars);
ParagStyles.append(b->Ausrich);
ParagStyles.append(b->textAlignment);
chars = new ChList;
chars->setAutoDelete(true);
chars->clear();
853,7 → 853,7
hg->cshade2 = b->ShTxtStroke;
hg->cscale = b->TxtScale;
hg->cstyle = b->TxTStyle;
hg->cab = b->Ausrich;
hg->cab = b->textAlignment;
hg->cextra = 0;
Text += hg->ch;
chars->append(hg);
861,7 → 861,7
}
insert(Text);
StyledText.append(chars);
ParagStyles.append(b->Ausrich);
ParagStyles.append(b->textAlignment);
if (StyledText.count() != 0)
emit setProps(0, 0);
setCursorPosition(0, 0);
893,7 → 893,7
Ccol = CurrTextFill;
Csha = CurrTextFillSh;
Csty = CurrentStyle;
Ali = CurrentABStil;
Ali = currentParaStyle;
}
setAlign(Ali);
setFarbe(Ccol, Csha);
1117,7 → 1117,7
if (chars->count() > 0)
ca = chars->at(0)->cab;
else
ca = CurrentABStil;
ca = currentParaStyle;
for (int s = 0; s < a; ++s)
{
hg = chars2->take(0);
1267,7 → 1267,7
TxFill->setEditable(false);
PM2 = new ShadeButton(this);
TxFill->clear();
CListe::Iterator it;
ColorList::Iterator it;
QPixmap pm = QPixmap(15, 15);
TxFill->insertItem( tr("None"));
for (it = doc->PageColors.begin(); it != doc->PageColors.end(); ++it)
1311,7 → 1311,7
TxStroke->setEditable(false);
PM1 = new ShadeButton(this);
TxStroke->clear();
CListe::Iterator it;
ColorList::Iterator it;
QPixmap pm = QPixmap(15, 15);
TxStroke->insertItem( tr("None"));
for (it = doc->PageColors.begin(); it != doc->PageColors.end(); ++it)
1824,7 → 1824,7
 
void StoryEditor::updateProps(int p, int ch)
{
CListe::Iterator it;
ColorList::Iterator it;
int c = 0;
struct PtiSmall *hg;
SEditor::ChList *chars;
1841,7 → 1841,7
Editor->CurrFont = CurrItem->IFont;
Editor->CurrFontSize = CurrItem->ISize;
Editor->CurrentStyle = CurrItem->TxTStyle;
Editor->CurrentABStil = CurrItem->Ausrich;
Editor->currentParaStyle = CurrItem->textAlignment;
Editor->CurrTextKern = CurrItem->ExtraV;
Editor->CurrTextScale = CurrItem->TxtScale;
c = 0;
1872,7 → 1872,7
}
}
StrokeTools->SetColor(c);
AlignTools->SetAlign(CurrItem->Ausrich);
AlignTools->SetAlign(CurrItem->textAlignment);
StyleTools->SetKern(CurrItem->ExtraV);
StyleTools->SetStyle(CurrItem->TxTStyle);
FontTools->SetSize(CurrItem->ISize / 10.0);
1889,7 → 1889,7
StrokeTools->TxStroke->setEnabled(false);
StrokeTools->PM1->setEnabled(false);
}
Editor->setAlign(Editor->CurrentABStil);
Editor->setAlign(Editor->currentParaStyle);
Editor->setStyle(Editor->CurrentStyle);
Editor->setFarbe(Editor->CurrTextFill, Editor->CurrTextFillSh);
firstSet = true;
1896,20 → 1896,20
return;
}
chars = Editor->StyledText.at(p);
Editor->CurrentABStil = Editor->ParagStyles[p];
Editor->currentParaStyle = Editor->ParagStyles[p];
if (chars->count() == 0)
{
if (Editor->CurrentABStil > 4)
if (Editor->currentParaStyle > 4)
{
Editor->CurrFont = doc->Vorlagen[Editor->CurrentABStil].Font;
Editor->CurrFontSize = doc->Vorlagen[Editor->CurrentABStil].FontSize;
Editor->CurrentStyle = doc->Vorlagen[Editor->CurrentABStil].FontEffect;
Editor->CurrTextFill = doc->Vorlagen[Editor->CurrentABStil].FColor;
Editor->CurrTextFillSh = doc->Vorlagen[Editor->CurrentABStil].FShade;
Editor->CurrTextStroke = doc->Vorlagen[Editor->CurrentABStil].SColor;
Editor->CurrTextStrokeSh = doc->Vorlagen[Editor->CurrentABStil].SShade;
Editor->CurrFont = doc->docParagraphStyles[Editor->currentParaStyle].Font;
Editor->CurrFontSize = doc->docParagraphStyles[Editor->currentParaStyle].FontSize;
Editor->CurrentStyle = doc->docParagraphStyles[Editor->currentParaStyle].FontEffect;
Editor->CurrTextFill = doc->docParagraphStyles[Editor->currentParaStyle].FColor;
Editor->CurrTextFillSh = doc->docParagraphStyles[Editor->currentParaStyle].FShade;
Editor->CurrTextStroke = doc->docParagraphStyles[Editor->currentParaStyle].SColor;
Editor->CurrTextStrokeSh = doc->docParagraphStyles[Editor->currentParaStyle].SShade;
}
Editor->setAlign(Editor->CurrentABStil);
Editor->setAlign(Editor->currentParaStyle);
Editor->setStyle(Editor->CurrentStyle);
Editor->setFarbe(Editor->CurrTextFill, Editor->CurrTextFillSh);
}
1978,7 → 1978,7
FontTools->SetSize(Editor->CurrFontSize / 10.0);
FontTools->SetFont(Editor->CurrFont);
FontTools->SetScale(Editor->CurrTextScale);
AlignTools->SetAlign(Editor->CurrentABStil);
AlignTools->SetAlign(Editor->currentParaStyle);
updateStatus();
}
 
2187,17 → 2187,17
PageItem* nb2 = nb;
while (nb2 != 0)
{
nb2->Ptext.clear();
nb2->itemText.clear();
nb2->CPos = 0;
nb2->Dirty = false;
nb2 = nb2->NextBox;
}
Editor->saveItemText(nb);
if (doc->Trenner->AutoCheck)
if (doc->docHyphenator->AutoCheck)
{
if (doc->Trenner->Language != nb->Language)
doc->Trenner->slotNewDict(nb->Language);
doc->Trenner->slotHyphenate(nb);
if (doc->docHyphenator->Language != nb->Language)
doc->docHyphenator->slotNewDict(nb->Language);
doc->docHyphenator->slotHyphenate(nb);
}
bool rep = doc->RePos;
doc->RePos = true;
2243,7 → 2243,7
disconnect(AlignTools, SIGNAL(NewAlign(int)), this, SLOT(newAlign(int)));
emit EditSt();
AlignTools->Spal->setFormats(doc);
AlignTools->SetAlign(Editor->CurrentABStil);
AlignTools->SetAlign(Editor->currentParaStyle);
connect(AlignTools, SIGNAL(newStyle(int)), this, SLOT(newAlign(int)));
connect(AlignTools, SIGNAL(NewAlign(int)), this, SLOT(newAlign(int)));
Editor->setCursorPosition(p, i);
2255,39 → 2255,39
 
void StoryEditor::newAlign(int st)
{
Editor->CurrentABStil = st;
Editor->currentParaStyle = st;
changeAlign(st);
}
 
void StoryEditor::changeAlignSB(int pa, int align)
{
Editor->CurrentABStil = align;
(*Editor->ParagStyles.at(pa)) = Editor->CurrentABStil;
Editor->currentParaStyle = align;
(*Editor->ParagStyles.at(pa)) = Editor->currentParaStyle;
if (Editor->StyledText.count() != 0)
{
disconnect(Editor, SIGNAL(cursorPositionChanged(int, int)), this, SLOT(updateProps(int, int)));
SEditor::ChList *chars;
(*Editor->ParagStyles.at(pa)) = Editor->CurrentABStil;
(*Editor->ParagStyles.at(pa)) = Editor->currentParaStyle;
if (Editor->StyledText.at(pa)->count() > 0)
{
chars = Editor->StyledText.at(pa);
for (uint s = 0; s < chars->count(); ++s)
{
if (Editor->CurrentABStil > 4)
if (Editor->currentParaStyle > 4)
{
if (doc->Vorlagen[Editor->CurrentABStil].Font != "")
if (doc->docParagraphStyles[Editor->currentParaStyle].Font != "")
{
chars->at(s)->cfont = doc->Vorlagen[Editor->CurrentABStil].Font;
chars->at(s)->csize = doc->Vorlagen[Editor->CurrentABStil].FontSize;
chars->at(s)->cfont = doc->docParagraphStyles[Editor->currentParaStyle].Font;
chars->at(s)->csize = doc->docParagraphStyles[Editor->currentParaStyle].FontSize;
chars->at(s)->cstyle &= ~127;
chars->at(s)->cstyle |= doc->Vorlagen[Editor->CurrentABStil].FontEffect;
chars->at(s)->ccolor = doc->Vorlagen[Editor->CurrentABStil].FColor;
chars->at(s)->cshade = doc->Vorlagen[Editor->CurrentABStil].FShade;
chars->at(s)->cstroke = doc->Vorlagen[Editor->CurrentABStil].SColor;
chars->at(s)->cshade2 = doc->Vorlagen[Editor->CurrentABStil].SShade;
chars->at(s)->cstyle |= doc->docParagraphStyles[Editor->currentParaStyle].FontEffect;
chars->at(s)->ccolor = doc->docParagraphStyles[Editor->currentParaStyle].FColor;
chars->at(s)->cshade = doc->docParagraphStyles[Editor->currentParaStyle].FShade;
chars->at(s)->cstroke = doc->docParagraphStyles[Editor->currentParaStyle].SColor;
chars->at(s)->cshade2 = doc->docParagraphStyles[Editor->currentParaStyle].SShade;
}
}
if ((Editor->CurrentABStil < 5) && (chars->at(s)->cab > 4))
if ((Editor->currentParaStyle < 5) && (chars->at(s)->cab > 4))
{
chars->at(s)->ccolor = CurrItem->TxtFill;
chars->at(s)->cshade = CurrItem->ShTxtFill;
2298,7 → 2298,7
chars->at(s)->cstyle &= ~127;
chars->at(s)->cstyle |= CurrItem->TxTStyle;
}
chars->at(s)->cab = Editor->CurrentABStil;
chars->at(s)->cab = Editor->currentParaStyle;
}
Editor->updateFromChars(pa);
}
2309,17 → 2309,17
}
else
{
if (Editor->CurrentABStil > 4)
if (Editor->currentParaStyle > 4)
{
if (doc->Vorlagen[Editor->CurrentABStil].Font != "")
if (doc->docParagraphStyles[Editor->currentParaStyle].Font != "")
{
Editor->CurrFont = doc->Vorlagen[Editor->CurrentABStil].Font;
Editor->CurrFontSize = doc->Vorlagen[Editor->CurrentABStil].FontSize;
Editor->CurrentStyle = doc->Vorlagen[Editor->CurrentABStil].FontEffect;
Editor->CurrTextFill = doc->Vorlagen[Editor->CurrentABStil].FColor;
Editor->CurrTextFillSh = doc->Vorlagen[Editor->CurrentABStil].FShade;
Editor->CurrTextStroke = doc->Vorlagen[Editor->CurrentABStil].SColor;
Editor->CurrTextStrokeSh = doc->Vorlagen[Editor->CurrentABStil].SShade;
Editor->CurrFont = doc->docParagraphStyles[Editor->currentParaStyle].Font;
Editor->CurrFontSize = doc->docParagraphStyles[Editor->currentParaStyle].FontSize;
Editor->CurrentStyle = doc->docParagraphStyles[Editor->currentParaStyle].FontEffect;
Editor->CurrTextFill = doc->docParagraphStyles[Editor->currentParaStyle].FColor;
Editor->CurrTextFillSh = doc->docParagraphStyles[Editor->currentParaStyle].FShade;
Editor->CurrTextStroke = doc->docParagraphStyles[Editor->currentParaStyle].SColor;
Editor->CurrTextStrokeSh = doc->docParagraphStyles[Editor->currentParaStyle].SShade;
}
}
else
2379,27 → 2379,27
}
for (int pa = PStart; pa < QMIN(PEnd+1, static_cast<int>(Editor->StyledText.count())); ++pa)
{
(*Editor->ParagStyles.at(pa)) = Editor->CurrentABStil;
(*Editor->ParagStyles.at(pa)) = Editor->currentParaStyle;
if (Editor->StyledText.at(pa)->count() > 0)
{
chars = Editor->StyledText.at(pa);
for (uint s = 0; s < chars->count(); ++s)
{
if (Editor->CurrentABStil > 4)
if (Editor->currentParaStyle > 4)
{
if (doc->Vorlagen[Editor->CurrentABStil].Font != "")
if (doc->docParagraphStyles[Editor->currentParaStyle].Font != "")
{
chars->at(s)->cfont = doc->Vorlagen[Editor->CurrentABStil].Font;
chars->at(s)->csize = doc->Vorlagen[Editor->CurrentABStil].FontSize;
chars->at(s)->cfont = doc->docParagraphStyles[Editor->currentParaStyle].Font;
chars->at(s)->csize = doc->docParagraphStyles[Editor->currentParaStyle].FontSize;
chars->at(s)->cstyle &= ~127;
chars->at(s)->cstyle |= doc->Vorlagen[Editor->CurrentABStil].FontEffect;
chars->at(s)->ccolor = doc->Vorlagen[Editor->CurrentABStil].FColor;
chars->at(s)->cshade = doc->Vorlagen[Editor->CurrentABStil].FShade;
chars->at(s)->cstroke = doc->Vorlagen[Editor->CurrentABStil].SColor;
chars->at(s)->cshade2 = doc->Vorlagen[Editor->CurrentABStil].SShade;
chars->at(s)->cstyle |= doc->docParagraphStyles[Editor->currentParaStyle].FontEffect;
chars->at(s)->ccolor = doc->docParagraphStyles[Editor->currentParaStyle].FColor;
chars->at(s)->cshade = doc->docParagraphStyles[Editor->currentParaStyle].FShade;
chars->at(s)->cstroke = doc->docParagraphStyles[Editor->currentParaStyle].SColor;
chars->at(s)->cshade2 = doc->docParagraphStyles[Editor->currentParaStyle].SShade;
}
}
if ((Editor->CurrentABStil < 5) && (chars->at(s)->cab > 4))
if ((Editor->currentParaStyle < 5) && (chars->at(s)->cab > 4))
{
chars->at(s)->ccolor = CurrItem->TxtFill;
chars->at(s)->cshade = CurrItem->ShTxtFill;
2410,7 → 2410,7
chars->at(s)->cstyle &= ~127;
chars->at(s)->cstyle |= CurrItem->TxTStyle;
}
chars->at(s)->cab = Editor->CurrentABStil;
chars->at(s)->cab = Editor->currentParaStyle;
}
Editor->updateFromChars(pa);
}
2424,17 → 2424,17
}
else
{
if (Editor->CurrentABStil > 4)
if (Editor->currentParaStyle > 4)
{
if (doc->Vorlagen[Editor->CurrentABStil].Font != "")
if (doc->docParagraphStyles[Editor->currentParaStyle].Font != "")
{
Editor->CurrFont = doc->Vorlagen[Editor->CurrentABStil].Font;
Editor->CurrFontSize = doc->Vorlagen[Editor->CurrentABStil].FontSize;
Editor->CurrentStyle = doc->Vorlagen[Editor->CurrentABStil].FontEffect;
Editor->CurrTextFill = doc->Vorlagen[Editor->CurrentABStil].FColor;
Editor->CurrTextFillSh = doc->Vorlagen[Editor->CurrentABStil].FShade;
Editor->CurrTextStroke = doc->Vorlagen[Editor->CurrentABStil].SColor;
Editor->CurrTextStrokeSh = doc->Vorlagen[Editor->CurrentABStil].SShade;
Editor->CurrFont = doc->docParagraphStyles[Editor->currentParaStyle].Font;
Editor->CurrFontSize = doc->docParagraphStyles[Editor->currentParaStyle].FontSize;
Editor->CurrentStyle = doc->docParagraphStyles[Editor->currentParaStyle].FontEffect;
Editor->CurrTextFill = doc->docParagraphStyles[Editor->currentParaStyle].FColor;
Editor->CurrTextFillSh = doc->docParagraphStyles[Editor->currentParaStyle].FShade;
Editor->CurrTextStroke = doc->docParagraphStyles[Editor->currentParaStyle].SColor;
Editor->CurrTextStrokeSh = doc->docParagraphStyles[Editor->currentParaStyle].SShade;
}
}
else
/branches/Version13x/Scribus/scribus/editformats.h
15,7 → 15,7
Q_OBJECT
 
public:
StilFormate( QWidget* parent, ScribusDoc *doc, preV *avail);
StilFormate( QWidget* parent, ScribusDoc *doc, ApplicationPrefs *avail);
~StilFormate() {};
 
QListBox* ListBox1;
28,8 → 28,8
QPushButton* ExitB;
QPushButton* CancelB;
int sFnumber;
QValueList<StVorL> TempVorl;
preV *fon;
QValueList<ParagraphStyle> TempVorl;
ApplicationPrefs *fon;
ScribusDoc *Docu;
void UpdateFList();
 
/branches/Version13x/Scribus/scribus/pageitem.h
58,7 → 58,7
/** Zeichnet das Item */
void paintObj(QRect e=QRect(), QPixmap *ppX = 0);
void DrawObj(ScPainter *p, QRect e);
double SetZeichAttr(struct Pti *hl, int *chs, QString *chx);
double SetZeichAttr(struct ScText *hl, int *chs, QString *chx);
void SetFarbe(QColor *tmp, QString farbe, int shad);
void DrawZeichenS(ScPainter *p, struct ZZ *hl);
void DrawPolyL(QPainter *p, QPointArray pts);
180,7 → 180,7
/** Cursorposition */
int CPos;
/** Text des Elements */
QPtrList<Pti> Ptext;
QPtrList<ScText> itemText;
/** Flag ob Element gedruckt wird */
bool isPrintable;
/** Flag fuer PDF-Bookmark */
241,7 → 241,7
int NextPg;
bool Tinput;
bool isAutoText;
int Ausrich;
int textAlignment;
uint MaxChars;
bool Redrawn;
double ExtraV;
/branches/Version13x/Scribus/scribus/scribusstructs.h
18,28 → 18,28
#include "pageitem.h"
 
/* Struktur fuer Pageitem Text */
struct Pti
struct ScText
{
QString ch;
double xp;
double yp;
bool cselect;
int csize;
QString cfont;
QString ccolor;
QString cstroke;
bool cselect;
double cextra;
int cshade;
int cshade2;
int cstyle;
int cab;
int cscale;
double cextra;
double xp;
double yp;
int PtransX;
int PtransY;
int cscale;
double PRot;
QString cfont;
QString ccolor;
QString cstroke;
QString ch;
};
 
struct CLBuf
struct CopyPasteBuffer
{
int PType;
double Xpos;
134,7 → 134,7
QString EmProfile;
int IRender;
bool UseEmbedded;
QString Ptext;
QString itemText;
QPointArray Clip;
FPointArray PoLine;
FPointArray ContourLine;
143,7 → 143,7
bool Textflow;
bool Textflow2;
bool UseContour;
int Ausrich;
int textAlignment;
QString IFont;
int ISize;
QValueStack<int> Groups;
177,8 → 177,8
int endArrowIndex;
};
 
/** Seitenraender */
struct Margs
/** Pagemargins */
struct MarginStruct
{
double Top;
double Left;
186,15 → 186,15
double Bottom;
};
 
struct StVorL
struct ParagraphStyle
{
QString Vname;
double LineSpa;
int Ausri;
int textAlignment;
double Indent;
double First;
double Avor;
double Anach;
double gapBefore;
double gapAfter;
QString Font;
int FontSize;
QValueList<double> TabValues;
208,7 → 208,7
bool BaseAdj;
};
 
struct CMSset
struct CMSData
{
QString DefaultMonitorProfile;
QString DefaultPrinterProfile;
242,7 → 242,7
int UnCode;
};
 
struct singleLine
struct SingleLine
{
double Width;
int Dash;
252,7 → 252,7
int Shade;
};
 
struct arrowDesc
struct ArrowDesc
{
QString name;
bool userArrow;
264,21 → 264,21
int LNr;
int Level;
QString Name;
bool Sichtbar;
bool Drucken;
bool isPrintable;
bool isViewable;
};
 
struct PreSet
struct PDFPresentationData
{
int EffektLen;
int AnzeigeLen;
int Effekt;
int pageEffectDuration;
int pageViewDuration;
int effectType;
int Dm;
int M;
int Di;
};
 
struct LPIset
struct LPIData
{
int Frequency;
int Angle;
285,7 → 285,7
int SpotFunc;
};
 
struct PDFOpt
struct PDFOptions
{
bool Thumbnails;
bool Articles;
304,13 → 304,13
bool MirrorV;
int RotateDeg;
bool PresentMode;
QValueList<PreSet> PresentVals;
QValueList<PDFPresentationData> PresentVals;
QString Datei;
bool UseRGB;
bool UseProfiles;
bool UseProfiles2;
bool UseLPI;
QMap<QString,LPIset> LPISettings;
QMap<QString,LPIData> LPISettings;
QString SolidProf;
int SComp;
QString ImageProf;
337,9 → 337,9
};
 
/** Definition der Farbenlisten */
typedef QMap<QString,CMYKColor> CListe;
typedef QMap<QString,CMYKColor> ColorList;
 
struct typoStruct
struct typoPrefs
{
int valueSuperScript;
int scalingSuperScript;
351,7 → 351,7
double offsetBaseGrid;
};
 
struct windowStruct
struct windowPrefs
{
int xPosition;
int yPosition;
361,7 → 361,7
bool docked;
};
 
struct guidesStruct
struct guidesPrefs
{
bool gridShown;
QColor majorColor;
381,19 → 381,19
QColor margColor;
};
 
struct preV
struct ApplicationPrefs
{
SCFonts AvailFonts;
QValueList<arrowDesc> arrowStyles;
QValueList<ArrowDesc> arrowStyles;
QString DefFont;
int DefSize;
CListe DColors;
ColorList DColors;
int Wheelval;
int AppFontSize;
QColor DpapColor;
QString GUI;
guidesStruct guidesSettings;
typoStruct typographicSetttings;
guidesPrefs guidesSettings;
typoPrefs typographicSetttings;
QString Dpen;
QString Dbrush;
int Dshade;
416,26 → 416,26
double ScaleX;
double ScaleY;
bool Before;
int Einheit;
windowStruct mainToolBarSettings;
windowStruct pdfToolBarSettings;
windowStruct mPaletteSettings;
windowStruct measurePalSettings;
windowStruct treePalSettings;
windowStruct nodePalSettings;
windowStruct mainWinSettings;
windowStruct scrapPalSettings;
windowStruct layerPalSettings;
windowStruct pagePalSettings;
windowStruct bookmPalSettings;
int docUnitIndex;
windowPrefs mainToolBarSettings;
windowPrefs pdfToolBarSettings;
windowPrefs mPaletteSettings;
windowPrefs measurePalSettings;
windowPrefs treePalSettings;
windowPrefs nodePalSettings;
windowPrefs mainWinSettings;
windowPrefs scrapPalSettings;
windowPrefs layerPalSettings;
windowPrefs pagePalSettings;
windowPrefs bookmPalSettings;
bool SepalT;
bool SepalN;
int PSize;
bool SaveAtQ;
bool RandFarbig;
bool marginColored;
QStringList RecentDocs;
uint RecentDCount;
CMSset DCMSset;
CMSData DCMSset;
QMap<int,Keys> KeyActions;
int PolyC;
int PolyFd;
519,7 → 519,35
};
 
typedef QMap<QString,QString> ProfilesL;
typedef QValueVector<singleLine> multiLine;
typedef QValueVector<SingleLine> multiLine;
enum AppMode
{
NormalMode,
DrawShapes,
StartStoryEditor,
DrawPicture,
DrawText,
Magnifier,
EditMode,
DrawLine,
Rotation,
LinkFrames,
UnlinkFrames,
DrawRegularPolygon,
DrawBezierLine,
InsertPDFButton,
InsertPDFTextfield,
InsertPDFCheckbox,
InsertPDFCombobox,
InsertPDFListbox,
InsertPDFTextAnnotation,
InsertPDFLinkAnnotation,
DrawFreehandLine,
DrawTable,
PanningMode,
MeasurementTool,
EditGradientVectors
};
 
#endif
 
/branches/Version13x/Scribus/scribus/scrap.cpp
24,7 → 24,7
 
/* The Scrapbook View Class
* inherited from QIconView */
BibView::BibView(QWidget* parent, preV *prefs) : QIconView(parent)
BibView::BibView(QWidget* parent, ApplicationPrefs *prefs) : QIconView(parent)
{
Objekte.clear();
Prefs = prefs;
149,7 → 149,7
}
 
/* This is the main Dialog-Class for the Scrapbook */
Biblio::Biblio( QWidget* parent, preV *prefs)
Biblio::Biblio( QWidget* parent, ApplicationPrefs *prefs)
: QDialog( parent, "Sclib", false, 0 )
{
resize( 230, 190 );
/branches/Version13x/Scribus/scribus/cmsprefs.cpp
1,7 → 1,7
#include "cmsprefs.h"
#include "cmsprefs.moc"
 
CMSPrefs::CMSPrefs( QWidget* parent, CMSset *Vor, ProfilesL *InputProfiles, ProfilesL *PrinterProfiles, ProfilesL *MonitorProfiles)
CMSPrefs::CMSPrefs( QWidget* parent, CMSData *Vor, ProfilesL *InputProfiles, ProfilesL *PrinterProfiles, ProfilesL *MonitorProfiles)
: QWidget( parent, "CMS" )
{
prefs = Vor;
/branches/Version13x/Scribus/scribus/reformdoc.h
37,7 → 37,7
Q_OBJECT
 
public:
ReformDoc( QWidget* parent, ScribusDoc* doc, preV *prefsData );
ReformDoc( QWidget* parent, ScribusDoc* doc, ApplicationPrefs *prefsData );
~ReformDoc() {};
QWidget* tabPage;
QGroupBox* groupBox7;
/branches/Version13x/Scribus/scribus/seiten.cpp
654,7 → 654,7
Vie->Doc->resetPage(tpr, lr, rr, br, fp);
Vie->reformPages();
Vie->DrawNew();
Vie->GotoPage(Vie->Doc->ActPage->PageNr);
Vie->GotoPage(Vie->Doc->currentPage->PageNr);
RebuildPage();
Vie->Doc->setModified();
LP->setEnabled(fp ? true : false);
672,7 → 672,7
Vie->Doc->resetPage(tpr, lr, rr, br, fp2);
Vie->reformPages();
Vie->DrawNew();
Vie->GotoPage(Vie->Doc->ActPage->PageNr);
Vie->GotoPage(Vie->Doc->currentPage->PageNr);
RebuildPage();
Vie->Doc->setModified();
}
/branches/Version13x/Scribus/scribus/guidemanager.cpp
70,8 → 70,8
tp[3] = tr(" p");
int dp[] = {100, 1000, 10000, 100};
Einheit = Einh;
decimals = dp[Einheit];
docUnitIndex = Einh;
decimals = dp[docUnitIndex];
LocHor = YGuides; // in page XGuides and YGuides are inverted
LocVer = XGuides;
388,7 → 388,7
QString GuideManager::GetUnit()
{
QString tmp = tp[Einheit];
QString tmp = tp[docUnitIndex];
return tmp;
}
/branches/Version13x/Scribus/scribus/pageitem.cpp
99,7 → 99,7
IFont = Doc->Dfont;
ISize = Doc->Dsize;
LineSp = ((Doc->Dsize / 10.0) * static_cast<double>(Doc->typographicSetttings.autoLineSpacing) / 100) + (Doc->Dsize / 10.0);
Doc->Vorlagen[0].LineSpa = LineSp;
Doc->docParagraphStyles[0].LineSpa = LineSp;
CurX = 0;
CurY = 0;
CPos = 0;
108,8 → 108,8
BExtra = 1;
RExtra = 1;
ExtraV = 0;
Ptext.clear();
Ptext.setAutoDelete(true);
itemText.clear();
itemText.setAutoDelete(true);
MaxChars = 0;
Pfile = "";
pixm = QImage();
151,7 → 151,7
Segments.clear();
PoShow = false;
BaseOffs = 0;
OwnPage = Doc->ActPage->PageNr;
OwnPage = Doc->currentPage->PageNr;
PicArt = true;
PicAvail = false;
isPrintable = true;
223,7 → 223,7
Textflow2 = false;
Tinput = false;
isAutoText = false;
Ausrich = 0;
textAlignment = 0;
Redrawn = false;
isRaster = false;
Sizing = false;
271,7 → 271,7
isSingleSel = false;
Dirty = false;
ChangedMasterItem = false;
OnMasterPage = Doc->ActPage->PageNam;
OnMasterPage = Doc->currentPage->PageNam;
startArrowIndex = Doc->DstartArrow;
endArrowIndex = Doc->DendArrow;
}
293,7 → 293,7
double oldCurY, LastXp, EndX, OFs, OFs2, wide, rota, wid, lineCorr, ColWidth, kernVal, RTabX;
double sc = ScApp->view->Scale;
QString chx, chx2, chx3;
struct Pti *hl;
struct ScText *hl;
struct ZZ *Zli;
struct ZZ *Zli2;
QPtrList<ZZ> LiList;
321,13 → 321,13
LiList.setAutoDelete(true);
for (int xxx=0; xxx<5; ++xxx)
{
Doc->Vorlagen[xxx].LineSpa = LineSp;
Doc->Vorlagen[xxx].FontSize = ISize;
Doc->Vorlagen[xxx].Indent = 0;
Doc->Vorlagen[xxx].First = 0;
Doc->Vorlagen[xxx].Avor = 0;
Doc->Vorlagen[xxx].Anach = 0;
Doc->Vorlagen[xxx].Ausri = xxx;
Doc->docParagraphStyles[xxx].LineSpa = LineSp;
Doc->docParagraphStyles[xxx].FontSize = ISize;
Doc->docParagraphStyles[xxx].Indent = 0;
Doc->docParagraphStyles[xxx].First = 0;
Doc->docParagraphStyles[xxx].gapBefore = 0;
Doc->docParagraphStyles[xxx].gapAfter = 0;
Doc->docParagraphStyles[xxx].textAlignment = xxx;
}
pf.begin(ScApp->view->viewport());
QPoint trans = ScApp->view->contentsToViewport(QPoint(qRound(Xpos*sc), qRound(Ypos*sc)));
648,7 → 648,7
p->drawImage(&pixm);
p->restore();
}
if ((Ptext.count() != 0) && (Dirty))
if ((itemText.count() != 0) && (Dirty))
{
if (flippedH % 2 != 0)
{
661,11 → 661,11
p->scale(1, -1);
}
struct ZZ Zli3;
for (a = 0; a < Ptext.count(); ++a)
for (a = 0; a < itemText.count(); ++a)
{
if (a > MaxChars)
break;
hl = Ptext.at(a);
hl = itemText.at(a);
chx = hl->ch;
if (hl->ch == QChar(30))
chx = ExpandToken(a);
708,7 → 708,7
}
}
}
if (Ptext.count() > MaxChars)
if (itemText.count() > MaxChars)
{
if (!Doc->RePos)
{
733,7 → 733,7
p->restore();
break;
}
if ((Ptext.count() != 0) || (NextBox != 0))
if ((itemText.count() != 0) || (NextBox != 0))
{
if (NextBox != 0)
{
740,10 → 740,10
nb = NextBox;
while (nb != 0)
{
a = nb->Ptext.count();
a = nb->itemText.count();
for (uint s=0; s<a; ++s)
{
Ptext.append(nb->Ptext.take(0));
itemText.append(nb->itemText.take(0));
}
nb->MaxChars = 0;
nb = nb->NextBox;
750,7 → 750,7
}
nb = NextBox;
}
Doc->Vorlagen[0].LineSpa = LineSp;
Doc->docParagraphStyles[0].LineSpa = LineSp;
QRegion cl = QRegion(pf2.xForm(Clip));
for (a = 0; a < Doc->Items.count(); ++a)
{
807,15 → 807,15
ColBound = FPoint((ColWidth + ColGap) * CurrCol+Extra + lineCorr, ColWidth * (CurrCol+1) + ColGap * CurrCol + Extra+lineCorr);
ColBound = FPoint(ColBound.x(), ColBound.y()+RExtra+lineCorr);
CurX = ColBound.x();
if (Ptext.count() > 0)
if (itemText.count() > 0)
{
hl = Ptext.at(0);
if (Doc->Vorlagen[hl->cab].Drop)
hl = itemText.at(0);
if (Doc->docParagraphStyles[hl->cab].Drop)
{
if (Doc->Vorlagen[hl->cab].BaseAdj)
chs = qRound(Doc->typographicSetttings.valueBaseGrid * Doc->Vorlagen[hl->cab].DropLin * 10);
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
chs = qRound(Doc->typographicSetttings.valueBaseGrid * Doc->docParagraphStyles[hl->cab].DropLin * 10);
else
chs = qRound(Doc->Vorlagen[hl->cab].LineSpa * Doc->Vorlagen[hl->cab].DropLin * 10);
chs = qRound(Doc->docParagraphStyles[hl->cab].LineSpa * Doc->docParagraphStyles[hl->cab].DropLin * 10);
}
else
chs = hl->csize;
825,7 → 825,7
else
{
desc2 = -(*Doc->AllFonts)[IFont]->numDescender * (ISize / 10.0);
CurY = Doc->Vorlagen[0].LineSpa+TExtra+lineCorr-desc2;
CurY = Doc->docParagraphStyles[0].LineSpa+TExtra+lineCorr-desc2;
}
firstDes = desc2;
LiList.clear();
838,11 → 838,11
aSpa = 0;
absa = 0;
MaxChars = 0;
MaxText = Ptext.count();
MaxText = itemText.count();
StartOfCol = true;
for (a = 0; a < MaxText; ++a)
{
hl = Ptext.at(a);
hl = itemText.at(a);
chx = hl->ch;
if (hl->ch == QChar(30))
chx = ExpandToken(a);
854,24 → 854,24
nb = BackBox;
while (nb != 0)
{
if (nb->Ptext.count() != 0)
if (nb->itemText.count() != 0)
{
if (nb->Ptext.at(nb->Ptext.count()-1)->ch == QChar(13))
if (nb->itemText.at(nb->itemText.count()-1)->ch == QChar(13))
{
CurX += Doc->Vorlagen[absa].First;
CurX += Doc->Vorlagen[absa].Indent;
CurY += Doc->Vorlagen[absa].Avor;
CurX += Doc->docParagraphStyles[absa].First;
CurX += Doc->docParagraphStyles[absa].Indent;
CurY += Doc->docParagraphStyles[absa].gapBefore;
if (chx != QChar(13))
DropCmode = Doc->Vorlagen[absa].Drop;
DropCmode = Doc->docParagraphStyles[absa].Drop;
else
DropCmode = false;
if (DropCmode)
DropLines = Doc->Vorlagen[absa].DropLin;
DropLines = Doc->docParagraphStyles[absa].DropLin;
break;
}
else
{
CurX += Doc->Vorlagen[absa].Indent;
CurX += Doc->docParagraphStyles[absa].Indent;
break;
}
}
881,17 → 881,17
else
{
if (chx != QChar(13))
DropCmode = Doc->Vorlagen[absa].Drop;
DropCmode = Doc->docParagraphStyles[absa].Drop;
else
DropCmode = false;
CurX += Doc->Vorlagen[absa].First;
CurX += Doc->Vorlagen[absa].Indent;
CurY += Doc->Vorlagen[absa].Avor;
CurX += Doc->docParagraphStyles[absa].First;
CurX += Doc->docParagraphStyles[absa].Indent;
CurY += Doc->docParagraphStyles[absa].gapBefore;
if (DropCmode)
DropLines = Doc->Vorlagen[absa].DropLin;
DropLines = Doc->docParagraphStyles[absa].DropLin;
}
}
if (((Doc->Vorlagen[absa].Ausri == 3) || (Doc->Vorlagen[absa].Ausri == 4)) && (LiList.count() == 0) && (hl->ch == " "))
if (((Doc->docParagraphStyles[absa].textAlignment == 3) || (Doc->docParagraphStyles[absa].textAlignment == 4)) && (LiList.count() == 0) && (hl->ch == " "))
{
hl->cstyle |= 256;
continue;
900,28 → 900,28
hl->cstyle &= 255;
if (LiList.count() == 0)
{
if ((a > 0) && (Ptext.at(a-1)->ch == QChar(13)))
if ((a > 0) && (itemText.at(a-1)->ch == QChar(13)))
{
CurX += Doc->Vorlagen[absa].First;
CurX += Doc->Vorlagen[absa].Indent;
CurY += Doc->Vorlagen[absa].Avor;
CurX += Doc->docParagraphStyles[absa].First;
CurX += Doc->docParagraphStyles[absa].Indent;
CurY += Doc->docParagraphStyles[absa].gapBefore;
if (chx != QChar(13))
DropCmode = Doc->Vorlagen[absa].Drop;
DropCmode = Doc->docParagraphStyles[absa].Drop;
else
DropCmode = false;
if (DropCmode)
{
DropLines = Doc->Vorlagen[absa].DropLin;
if (Doc->Vorlagen[hl->cab].BaseAdj)
DropLines = Doc->docParagraphStyles[absa].DropLin;
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
CurY += Doc->typographicSetttings.valueBaseGrid * (DropLines-1);
else
CurY += Doc->Vorlagen[absa].LineSpa * (DropLines-1);
CurY += Doc->docParagraphStyles[absa].LineSpa * (DropLines-1);
}
}
}
if (DropCmode)
{
if (Doc->Vorlagen[hl->cab].BaseAdj)
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
{
chsd = qRound(10 * ((Doc->typographicSetttings.valueBaseGrid * DropLines) / ((*Doc->AllFonts)[hl->cfont]->numAscent+(*Doc->AllFonts)[hl->cfont]->numDescender)));
chs = qRound(10 * ((Doc->typographicSetttings.valueBaseGrid * DropLines) / (*Doc->AllFonts)[hl->cfont]->numAscent));
928,8 → 928,8
}
else
{
chsd = qRound(10 * ((Doc->Vorlagen[absa].LineSpa * DropLines) / ((*Doc->AllFonts)[hl->cfont]->numAscent+(*Doc->AllFonts)[hl->cfont]->numDescender)));
chs = qRound(10 * ((Doc->Vorlagen[absa].LineSpa * DropLines) / (*Doc->AllFonts)[hl->cfont]->numAscent));
chsd = qRound(10 * ((Doc->docParagraphStyles[absa].LineSpa * DropLines) / ((*Doc->AllFonts)[hl->cfont]->numAscent+(*Doc->AllFonts)[hl->cfont]->numDescender)));
chs = qRound(10 * ((Doc->docParagraphStyles[absa].LineSpa * DropLines) / (*Doc->AllFonts)[hl->cfont]->numAscent));
}
hl->csize = chsd;
}
942,10 → 942,10
chx2 = chx;
if (a < MaxText-1)
{
if (Ptext.at(a+1)->ch == QChar(29))
if (itemText.at(a+1)->ch == QChar(29))
chx3 = " ";
else
chx3 = Ptext.at(a+1)->ch;
chx3 = itemText.at(a+1)->ch;
wide = Cwidth(Doc, hl->cfont, chx2, chs, chx3);
}
else
974,10 → 974,15
if (StartOfCol)
{
CurY = asce+TExtra+lineCorr+1;
if (((a > 0) && (Ptext.at(a-1)->ch == QChar(13))) || (a == 0))
CurY += Doc->Vorlagen[hl->cab].Avor;
if (((a > 0) && (itemText.at(a-1)->ch == QChar(13))) || (a == 0))
{
CurY += Doc->docParagraphStyles[hl->cab].gapBefore;
CurX += Doc->docParagraphStyles[hl->cab].First;
CurX += Doc->docParagraphStyles[hl->cab].Indent;
}
CurY = asce+TExtra+lineCorr+1;
}
if (Doc->Vorlagen[hl->cab].BaseAdj)
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
{
double by = Ypos;
if (OwnPage != -1)
998,11 → 1003,24
{
fBorder = false;
if (StartOfCol)
{
if (((a > 0) && (itemText.at(a-1)->ch == QChar(13))) || (a == 0))
{
CurX = ColBound.x();
CurX += Doc->docParagraphStyles[hl->cab].First;
CurX += Doc->docParagraphStyles[hl->cab].Indent;
}
else
CurX = ColBound.x();
CurY++;
}
else
CurY += Doc->Vorlagen[hl->cab].LineSpa;
if (Doc->Vorlagen[hl->cab].BaseAdj)
{
CurY += Doc->docParagraphStyles[hl->cab].LineSpa;
CurX = ColBound.x();
}
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
{
double by = Ypos;
if (OwnPage != -1)
by = Ypos - Doc->Pages.at(OwnPage)->Yoffset;
1010,7 → 1028,6
int ol2 = static_cast<int>(ol1 / Doc->typographicSetttings.valueBaseGrid);
CurY = ceil( ol2 / 10000.0 ) * Doc->typographicSetttings.valueBaseGrid + Doc->typographicSetttings.offsetBaseGrid - by;
}
CurX = ColBound.x();
if (CurY+BExtra+lineCorr > Height)
{
StartOfCol = true;
1023,28 → 1040,28
CurX = ColBound.x();
ColBound = FPoint(ColBound.x(), ColBound.y()+RExtra+lineCorr);
CurY = asce+TExtra+lineCorr+1;
if ((a > 0) && (Ptext.at(a-1)->ch == QChar(13)))
if ((a > 0) && (itemText.at(a-1)->ch == QChar(13)))
{
if (chx != QChar(13))
DropCmode = Doc->Vorlagen[hl->cab].Drop;
DropCmode = Doc->docParagraphStyles[hl->cab].Drop;
else
DropCmode = false;
CurX += Doc->Vorlagen[hl->cab].First;
CurX += Doc->Vorlagen[hl->cab].Indent;
CurX += Doc->docParagraphStyles[hl->cab].First;
CurX += Doc->docParagraphStyles[hl->cab].Indent;
if (DropCmode)
{
if (Doc->Vorlagen[hl->cab].BaseAdj)
desc2 = -(*Doc->AllFonts)[hl->cfont]->numDescender * Doc->typographicSetttings.valueBaseGrid * Doc->Vorlagen[hl->cab].DropLin;
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
desc2 = -(*Doc->AllFonts)[hl->cfont]->numDescender * Doc->typographicSetttings.valueBaseGrid * Doc->docParagraphStyles[hl->cab].DropLin;
else
desc2 = -(*Doc->AllFonts)[hl->cfont]->numDescender * Doc->Vorlagen[hl->cab].LineSpa * Doc->Vorlagen[hl->cab].DropLin;
desc2 = -(*Doc->AllFonts)[hl->cfont]->numDescender * Doc->docParagraphStyles[hl->cab].LineSpa * Doc->docParagraphStyles[hl->cab].DropLin;
}
CurY += Doc->Vorlagen[hl->cab].Avor;
CurY += Doc->docParagraphStyles[hl->cab].gapBefore;
if (DropCmode)
DropLines = Doc->Vorlagen[hl->cab].DropLin;
DropLines = Doc->docParagraphStyles[hl->cab].DropLin;
}
else
CurX += Doc->Vorlagen[hl->cab].Indent;
if (Doc->Vorlagen[hl->cab].BaseAdj)
CurX += Doc->docParagraphStyles[hl->cab].Indent;
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
{
double by = Ypos;
if (OwnPage != -1)
1090,7 → 1107,7
if (hl->cab < 5)
tTabValues = TabValues;
else
tTabValues = Doc->Vorlagen[hl->cab].TabValues;
tTabValues = Doc->docParagraphStyles[hl->cab].TabValues;
if (tTabValues.isEmpty())
{
if ((CurX - ColBound.x()) != 0)
1140,8 → 1157,19
hl->xp = CurX;
if ((TabCode == 4) && (RTab))
CurX += (wide+kernVal) / 2;
pt1 = QPoint(static_cast<int>(ceil(CurX+RExtra)), static_cast<int>(CurY+desc));
pt2 = QPoint(static_cast<int>(ceil(CurX+RExtra)), static_cast<int>(ceil(CurY-asce)));
if ((hl->cstyle & 128) || (hl->ch == "-"))
{
if ((HyphenCount < Doc->HyCount) || (Doc->HyCount == 0))
{
pt1 = QPoint(qRound(ceil(CurX+RExtra+Cwidth(Doc, hl->cfont, "-", hl->csize))), qRound(CurY+desc));
pt2 = QPoint(qRound(ceil(CurX+RExtra+Cwidth(Doc, hl->cfont, "-", hl->csize))), qRound(ceil(CurY-asce)));
}
}
else
{
pt1 = QPoint(qRound(ceil(CurX+RExtra)), qRound(CurY+desc));
pt2 = QPoint(qRound(ceil(CurX+RExtra)), qRound(ceil(CurY-asce)));
}
if ((!cl.contains(pf2.xForm(pt1))) || (!cl.contains(pf2.xForm(pt2))) || (CurX+RExtra+lineCorr > ColBound.y()))
outs = true;
if (CurY > (Height - BExtra - lineCorr))
1168,7 → 1196,7
{
if (a > 0)
{
if (Ptext.at(a-1)->ch != " ") // || ((Doc->AppMode == 7) && (Ptext.at(QMAX(CPos-1,0))->yp == hl->yp) && (Select)))
if (itemText.at(a-1)->ch != " ")
{
LastXp = hl->xp;
LastSP = BuPos;
1201,8 → 1229,8
for (uint rtx = StartRT; rtx < LiList.count(); ++rtx)
{
LiList.at(rtx)->xco = QMAX(LiList.at(rtx)->xco-(wide+kernVal) / cen, 0.0);
Ptext.at(StartRT2+rtx2)->xp = QMAX(Ptext.at(StartRT2+rtx2)->xp-(wide+kernVal) / cen, 0.0);
if (Ptext.at(StartRT2+rtx2)->xp < RTabX)
itemText.at(StartRT2+rtx2)->xp = QMAX(itemText.at(StartRT2+rtx2)->xp-(wide+kernVal) / cen, 0.0);
if (itemText.at(StartRT2+rtx2)->xp < RTabX)
{
RTab = false;
TabCode = 0;
1219,7 → 1247,7
maxDX = CurX;
QPointArray tcli;
tcli.resize(4);
if (Doc->Vorlagen[hl->cab].BaseAdj)
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
{
CurY -= Doc->typographicSetttings.valueBaseGrid * (DropLines-1);
double by = Ypos;
1233,9 → 1261,9
}
else
{
CurY -= Doc->Vorlagen[absa].LineSpa * (DropLines-1);
tcli.setPoint(0, QPoint(qRound(hl->xp), qRound(maxDY-DropLines*Doc->Vorlagen[absa].LineSpa)));
tcli.setPoint(1, QPoint(qRound(hl->xp+wide), qRound(maxDY-DropLines*Doc->Vorlagen[absa].LineSpa)));
CurY -= Doc->docParagraphStyles[absa].LineSpa * (DropLines-1);
tcli.setPoint(0, QPoint(qRound(hl->xp), qRound(maxDY-DropLines*Doc->docParagraphStyles[absa].LineSpa)));
tcli.setPoint(1, QPoint(qRound(hl->xp+wide), qRound(maxDY-DropLines*Doc->docParagraphStyles[absa].LineSpa)));
}
tcli.setPoint(2, QPoint(qRound(hl->xp+wide), qRound(maxDY)));
tcli.setPoint(3, QPoint(qRound(hl->xp), qRound(maxDY)));
1252,25 → 1280,25
{
a -= BuPos - LastSP;
a++;
if (Ptext.at(a)->cstyle & 128)
if (itemText.at(a)->cstyle & 128)
{
HyphenCount++;
Ptext.at(a)->cstyle |= 512;
itemText.at(a)->cstyle |= 512;
Zli = new ZZ;
Zli->Zeich = "-";
Zli->Farb = Ptext.at(a)->ccolor;
Zli->Farb2 = Ptext.at(a)->cstroke;
Zli->shade = Ptext.at(a)->cshade;
Zli->shade2 = Ptext.at(a)->cshade2;
Zli->xco = LastXp - Cwidth(Doc, Ptext.at(a)->cfont, "-", Ptext.at(a)->csize);
Zli->yco = Ptext.at(a)->yp;
Zli->Sele = Ptext.at(a)->cselect;
Zli->Siz = Ptext.at(a)->csize;
Zli->Style = Ptext.at(a)->cstyle;
Zli->ZFo = Ptext.at(a)->cfont;
Zli->wide = Cwidth(Doc, Ptext.at(a)->cfont, "-", Ptext.at(a)->csize);
Zli->kern = Ptext.at(a)->cextra;
Zli->scale = Ptext.at(a)->cscale;
Zli->Farb = itemText.at(a)->ccolor;
Zli->Farb2 = itemText.at(a)->cstroke;
Zli->shade = itemText.at(a)->cshade;
Zli->shade2 = itemText.at(a)->cshade2;
Zli->xco = LastXp - Cwidth(Doc, itemText.at(a)->cfont, "-", itemText.at(a)->csize);
Zli->yco = itemText.at(a)->yp;
Zli->Sele = itemText.at(a)->cselect;
Zli->Siz = itemText.at(a)->csize;
Zli->Style = itemText.at(a)->cstyle;
Zli->ZFo = itemText.at(a)->cfont;
Zli->wide = Cwidth(Doc, itemText.at(a)->cfont, "-", itemText.at(a)->csize);
Zli->kern = itemText.at(a)->cextra;
Zli->scale = itemText.at(a)->cscale;
LiList.insert(LastSP+1, Zli);
LastSP += 1;
}
1280,7 → 1308,7
hl->cstyle &= 511;
}
BuPos = LastSP+1;
if (Doc->Vorlagen[absa].Ausri != 0)
if (Doc->docParagraphStyles[absa].textAlignment != 0)
{
EndX = LastXp;
do
1290,11 → 1318,11
EndX++;
}
while ((cl.contains(pf2.xForm(pt1))) && (cl.contains(pf2.xForm(pt2))) && (EndX+RExtra+lineCorr < ColBound.y()));
if (Doc->Vorlagen[absa].Ausri == 2)
if (Doc->docParagraphStyles[absa].textAlignment == 2)
OFs = EndX - LastXp;
if (Doc->Vorlagen[absa].Ausri == 1)
if (Doc->docParagraphStyles[absa].textAlignment == 1)
OFs = (EndX - LastXp) / 2;
if ((Doc->Vorlagen[absa].Ausri == 3) || (Doc->Vorlagen[absa].Ausri == 4))
if ((Doc->docParagraphStyles[absa].textAlignment == 3) || (Doc->docParagraphStyles[absa].textAlignment == 4))
{
aSpa = 0;
for (uint sof = 0; sof<BuPos-1; ++sof)
1336,7 → 1364,7
}
else
{
if (Doc->Vorlagen[absa].Ausri != 0)
if (Doc->docParagraphStyles[absa].textAlignment != 0)
{
EndX = CurX;
do
1346,13 → 1374,13
EndX++;
}
while ((cl.contains(pf2.xForm(pt1))) && (cl.contains(pf2.xForm(pt2))) && (EndX+RExtra+lineCorr < ColBound.y()));
if (Doc->Vorlagen[absa].Ausri == 2)
if (Doc->docParagraphStyles[absa].textAlignment == 2)
OFs = EndX - CurX;
if (Doc->Vorlagen[absa].Ausri == 1)
if (Doc->docParagraphStyles[absa].textAlignment == 1)
OFs = (EndX - CurX) / 2;
if (Doc->Vorlagen[absa].Ausri == 3)
if (Doc->docParagraphStyles[absa].textAlignment == 3)
OFs = 0;
if (Doc->Vorlagen[absa].Ausri == 4)
if (Doc->docParagraphStyles[absa].textAlignment == 4)
{
aSpa = 0;
for (uint sof = 0; sof<LiList.count(); ++sof)
1402,7 → 1430,7
if (CurX+RExtra+lineCorr > ColBound.y())
{
fromOut = false;
CurY += Doc->Vorlagen[hl->cab].LineSpa;
CurY += Doc->docParagraphStyles[hl->cab].LineSpa;
if ((CurY+desc+BExtra+lineCorr > Height) && (CurrCol+1 == Cols))
{
goNoRoom = true;
1421,10 → 1449,10
else
CurX = ColBound.x();
if (hl->ch != QChar(13))
CurX += Doc->Vorlagen[hl->cab].Indent;
CurX += Doc->docParagraphStyles[hl->cab].Indent;
else
{
CurY += Doc->Vorlagen[hl->cab].Anach;
CurY += Doc->docParagraphStyles[hl->cab].gapAfter;
if (BuPos3 > 0)
BuPos3 -= 1;
}
1444,7 → 1472,7
if (CurY < maxDY)
CurY = maxDY;
}
CurY += Doc->Vorlagen[hl->cab].LineSpa;
CurY += Doc->docParagraphStyles[hl->cab].LineSpa;
if (AbsHasDrop)
{
if (CurY > maxDY)
1458,10 → 1486,10
else
CurX = ColBound.x();
if (hl->ch != QChar(13))
CurX += Doc->Vorlagen[hl->cab].Indent;
CurX += Doc->docParagraphStyles[hl->cab].Indent;
else
{
CurY += Doc->Vorlagen[hl->cab].Anach;
CurY += Doc->docParagraphStyles[hl->cab].gapAfter;
if (BuPos3 > 0)
BuPos3 -= 1;
}
1476,14 → 1504,14
double wide2 = 0;
Zli2 = LiList.at(zc);
double xcoZli = Zli2->xco;
Ptext.at(startLin+zc)->xp = Zli2->xco;
Ptext.at(startLin+zc)->yp = Zli2->yco;
itemText.at(startLin+zc)->xp = Zli2->xco;
itemText.at(startLin+zc)->yp = Zli2->yco;
if (Zli2->Farb != "None")
{
SetFarbe(&tmp, Zli2->Farb, Zli2->shade);
p->setBrush(tmp);
}
if ((((Zli2->Sele) && (Select)) || (((NextBox != 0) || (BackBox != 0)) && (Zli2->Sele))) && (Doc->AppMode == 7))
if ((((Zli2->Sele) && (Select)) || (((NextBox != 0) || (BackBox != 0)) && (Zli2->Sele))) && (Doc->appMode == EditMode))
{
wide = Zli2->wide;
desc = static_cast<int>((*Doc->AllFonts)[Zli2->ZFo]->numDescender * (-Zli2->Siz / 10.0));
1525,7 → 1553,7
}
}
}
if (Doc->Vorlagen[absa].Ausri != 0)
if (Doc->docParagraphStyles[absa].textAlignment != 0)
{
EndX = CurX;
do
1535,13 → 1563,13
EndX++;
}
while ((cl.contains(pf2.xForm(pt1))) && (cl.contains(pf2.xForm(pt2))) && (EndX+RExtra+lineCorr < ColBound.y()));
if (Doc->Vorlagen[absa].Ausri == 2)
if (Doc->docParagraphStyles[absa].textAlignment == 2)
OFs = EndX - CurX;
if (Doc->Vorlagen[absa].Ausri == 1)
if (Doc->docParagraphStyles[absa].textAlignment == 1)
OFs = (EndX - CurX) / 2;
if (Doc->Vorlagen[absa].Ausri == 3)
if (Doc->docParagraphStyles[absa].textAlignment == 3)
OFs = 0;
if (Doc->Vorlagen[absa].Ausri == 4)
if (Doc->docParagraphStyles[absa].textAlignment == 4)
{
aSpa = 0;
for (uint sof = 0; sof<LiList.count(); ++sof)
1574,14 → 1602,14
double wide2 = 0;
Zli2 = LiList.at(zc);
double xcoZli = Zli2->xco;
Ptext.at(startLin+zc)->xp = Zli2->xco;
Ptext.at(startLin+zc)->yp = Zli2->yco;
itemText.at(startLin+zc)->xp = Zli2->xco;
itemText.at(startLin+zc)->yp = Zli2->yco;
if (Zli2->Farb != "None")
{
SetFarbe(&tmp, Zli2->Farb, Zli2->shade);
p->setBrush(tmp);
}
if ((((Zli2->Sele) && (Select)) || (((NextBox != 0) || (BackBox != 0)) && (Zli2->Sele))) && (Doc->AppMode == 7))
if ((((Zli2->Sele) && (Select)) || (((NextBox != 0) || (BackBox != 0)) && (Zli2->Sele))) && (Doc->appMode == EditMode))
{
wide = Zli2->wide;
desc = qRound((*Doc->AllFonts)[Zli2->ZFo]->numDescender * (-Zli2->Siz / 10.0));
1615,7 → 1643,7
LastSP = 0;
outs = false;
}
MaxChars = Ptext.count();
MaxChars = itemText.count();
Redrawn = true;
pf2.end();
p->restore();
1623,20 → 1651,20
NoRoom: pf2.end();
if (NextBox != 0)
{
nrc2 = Ptext.count();
nrc2 = itemText.count();
for (uint ss=nrc; ss<nrc2; ++ss)
{
NextBox->Ptext.append(Ptext.take(nrc));
NextBox->itemText.append(itemText.take(nrc));
}
if (uint(CPos) > nrc)
{
int nCP = CPos - nrc;
CPos = nrc;
if ((Doc->AppMode == 7) && (Tinput))
if ((Doc->appMode == EditMode) && (Tinput))
{
// OwnPage->Deselect(true);
NextBox->CPos = QMAX(nCP, 1);
// Doc->ActPage = NextBox->OwnPage;
// Doc->currentPage = NextBox->OwnPage;
// NextBox->OwnPage->SelectItemNr(NextBox->ItemNr);
break;
}
1683,8 → 1711,8
doStroke = false;
cl = FlattenPath(PoLine, Segments);
CurX = Extra;
if (Ptext.count() != 0)
CurX += Ptext.at(0)->cextra;
if (itemText.count() != 0)
CurX += itemText.at(0)->cextra;
zae = 0;
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2.0)+pow(cl.point(zae+1).y()-cl.point(zae).y(),2.0));
while (wid < 1)
1692,16 → 1720,16
zae++;
if (zae > cl.size()-2)
{
MaxChars = Ptext.count();
MaxChars = itemText.count();
break;
}
wid = sqrt(pow(cl.point(zae+1).x()-cl.point(zae).x(),2.0) + pow(cl.point(zae+1).y()-cl.point(zae).y(),2.0));
}
rota = xy2Deg(cl.point(zae+1).x()-cl.point(zae).x(),cl.point(zae+1).y()-cl.point(zae).y());
for (a = 0; a < Ptext.count(); ++a)
for (a = 0; a < itemText.count(); ++a)
{
CurY = 0;
hl = Ptext.at(a);
hl = itemText.at(a);
chx = hl->ch;
if ((chx == QChar(30)) || (chx == QChar(13)) || (chx == QChar(9)) || (chx == QChar(28)))
continue;
1711,12 → 1739,12
chx2 = " ";
else
chx2 = chx;
if (a < Ptext.count()-1)
if (a < itemText.count()-1)
{
if (Ptext.at(a+1)->ch == QChar(29))
if (itemText.at(a+1)->ch == QChar(29))
chx3 = " ";
else
chx3 = Ptext.at(a+1)->ch;
chx3 = itemText.at(a+1)->ch;
wide = Cwidth(Doc, hl->cfont, chx2, chs, chx3);
}
else
2005,13 → 2033,13
break;
za2--;
}
while (Ptext.at(za2)->ch == QChar(30));
if (Ptext.at(za2)->ch != QChar(30))
while (itemText.at(za2)->ch == QChar(30));
if (itemText.at(za2)->ch != QChar(30))
za2++;
while (Ptext.at(za2+zae)->ch == QChar(30))
while (itemText.at(za2+zae)->ch == QChar(30))
{
zae++;
if (za2+zae == Ptext.count())
if (za2+zae == itemText.count())
break;
}
QString out="%1";
2040,7 → 2068,7
}
}
 
double PageItem::SetZeichAttr(struct Pti *hl, int *chs, QString *chx)
double PageItem::SetZeichAttr(struct ScText *hl, int *chs, QString *chx)
{
double retval = 0.0;
double asce = (*Doc->AllFonts)[hl->cfont]->numAscent * (hl->csize / 10.0);
/branches/Version13x/Scribus/scribus/tabtypography.cpp
8,7 → 8,7
#include "mspinbox.h"
#include "scribusstructs.h"
 
TabTypograpy::TabTypograpy( QWidget* parent, struct typoStruct *prefsData, double unitBase, QString unit) : QWidget( parent, "tabtypo", 0 )
TabTypograpy::TabTypograpy( QWidget* parent, struct typoPrefs *prefsData, double unitBase, QString unit) : QWidget( parent, "tabtypo", 0 )
{
tabTypoLayout = new QGridLayout( this, 1, 1, 11, 6, "tabTypoLayout");
groupBox1a = new QGroupBox( this, "groupBox1a" );
/branches/Version13x/Scribus/scribus/scribusview.cpp
77,8 → 77,8
extern double xy2Deg(double x, double y);
extern void BezierPoints(QPointArray *ar, QPoint n1, QPoint n2, QPoint n3, QPoint n4);
extern FPointArray RegularPolygonF(double w, double h, uint c, bool star, double factor, double rota);
extern FPoint GetMaxClipF(FPointArray Clip);
extern FPoint GetMinClipF(FPointArray Clip);
extern FPoint getMaxClipF(FPointArray* Clip);
extern FPoint getMinClipF(FPointArray* Clip);
extern void WordAndPara(PageItem* b, int *w, int *p, int *c, int *wN, int *pN, int *cN);
#ifdef HAVE_CMS
QImage ProofPict(QImage *Im, QString Prof, int Rend, cmsHPROFILE emPr=0);
89,7 → 89,7
extern double UmReFaktor;
extern ProfilesL InputProfiles;
 
ScribusView::ScribusView(QWidget *parent, ScribusDoc *doc, preV *prefs) : QScrollView(parent, "s", WRepaintNoErase | WNorthWestGravity)
ScribusView::ScribusView(QWidget *parent, ScribusDoc *doc, ApplicationPrefs *prefs) : QScrollView(parent, "s", WRepaintNoErase | WNorthWestGravity)
{
Ready = false;
updateOn = true;
135,7 → 135,7
UN->setPopup(Unitmen);
UN->setFocusPolicy(QWidget::NoFocus);
UN->setPopupDelay(10);
switch (doc->Einheit)
switch (doc->docUnitIndex)
{
case 0:
UN->setText( tr("pt"));
223,7 → 223,7
painter->setPen(black, 1, SolidLine, FlatCap, MiterJoin);
painter->setBrush(QColor(128,128,128));
painter->drawRect(x+5, y+5, w, h);
if (a == Doc->ActPage->PageNr)
if (a == Doc->currentPage->PageNr)
painter->setPen(red, 2, SolidLine, FlatCap, MiterJoin);
else
painter->setPen(black, 1, SolidLine, FlatCap, MiterJoin);
252,8 → 252,8
{
int x = static_cast<int>(Doc->ScratchLeft * Scale);
int y = static_cast<int>(Doc->ScratchTop * Scale);
int w = static_cast<int>(Doc->ActPage->Width * Scale);
int h = static_cast<int>(Doc->ActPage->Height * Scale);
int w = static_cast<int>(Doc->currentPage->Width * Scale);
int h = static_cast<int>(Doc->currentPage->Height * Scale);
if (QRect(x, y, w+5, h+5).intersects(QRect(clipx, clipy, clipw, cliph)))
{
painter->setFillMode(ScPainter::Solid);
263,11 → 263,11
painter->setBrush(Doc->papColor);
painter->drawRect(x, y, w, h);
if (Doc->Before)
DrawPageMarks(painter, Doc->ActPage, QRect(clipx, clipy, clipw, cliph));
DrawPageMarks(painter, Doc->currentPage, QRect(clipx, clipy, clipw, cliph));
}
DrawPageItems(painter, QRect(clipx, clipy, clipw, cliph));
if ((!Doc->Before) && (QRect(x, y, w+5, h+5).intersects(QRect(clipx, clipy, clipw, cliph))))
DrawPageMarks(painter, Doc->ActPage, QRect(clipx, clipy, clipw, cliph));
DrawPageMarks(painter, Doc->currentPage, QRect(clipx, clipy, clipw, cliph));
}
if ((SelItem.count() != 0) || (linkedFramesToShow.count() != 0))
{
284,7 → 284,8
else
b = SelItem.at(0);
}
if ((((Doc->AppMode == 10) || (Doc->AppMode == 11)) && (b->PType == 4)) || (Doc->guidesSettings.linkShown))
if ((((Doc->appMode == LinkFrames) || (Doc->appMode == UnlinkFrames))
&& (b->PType == 4)) || (Doc->guidesSettings.linkShown))
{
PageItem *nb = b;
if (Doc->guidesSettings.linkShown)
433,9 → 434,9
paintGroupRect();
}
}
if (Doc->AppMode == 7)
if (Doc->appMode == EditMode)
slotDoCurs(true);
if (Doc->AppMode == 25)
if (Doc->appMode == EditGradientVectors)
{
PageItem *b = SelItem.at(0);
QPainter p;
459,7 → 460,7
int Lnr;
struct Layer ll;
PageItem* b;
ll.Sichtbar = false;
ll.isViewable = false;
ll.LNr = 0;
double z = painter->zoomFactor();
if (page->MPageNam != "")
471,7 → 472,7
for (uint la = 0; la < Doc->Layers.count(); ++la)
{
Level2Layer(Doc, &ll, Lnr);
if (ll.Sichtbar)
if (ll.isViewable)
{
for (uint a = 0; a < page->FromMaster.count(); ++a)
{
573,7 → 574,7
int Lnr;
struct Layer ll;
PageItem* b;
ll.Sichtbar = false;
ll.isViewable = false;
ll.LNr = 0;
linkedFramesToShow.clear();
double z = painter->zoomFactor();
583,7 → 584,7
for (uint la2 = 0; la2 < Doc->Layers.count(); ++la2)
{
Level2Layer(Doc, &ll, Lnr);
if (ll.Sichtbar)
if (ll.isViewable)
{
QPtrListIterator<PageItem> docItem(Doc->Items);
while ( (b = docItem.current()) != 0 )
591,7 → 592,7
++docItem;
if (b->LayerNr != ll.LNr)
continue;
if ((Doc->MasterP) && ((b->OwnPage != -1) && (b->OwnPage != static_cast<int>(Doc->ActPage->PageNr))))
if ((Doc->MasterP) && ((b->OwnPage != -1) && (b->OwnPage != static_cast<int>(Doc->currentPage->PageNr))))
continue;
QRect oldR = getRedrawBounding(b);
if (clip.intersects(oldR))
612,7 → 613,7
if (linkedFramesToShow.find(nb) == -1)
linkedFramesToShow.append(nb);
}
if ((Doc->AppMode == 7) && (b->Select) && (b->PType == 4))
if ((Doc->appMode == EditMode) && (b->Select) && (b->PType == 4))
{
HR->ItemPos = b->Xpos - Doc->ScratchLeft;
HR->ItemEndPos = (b->Xpos+b->Width) - Doc->ScratchLeft;
624,8 → 625,8
HR->Cols = b->Cols;
HR->Extra = b->Extra;
HR->RExtra = b->RExtra;
HR->First = Doc->Vorlagen[Doc->CurrentABStil].First;
HR->Indent = Doc->Vorlagen[Doc->CurrentABStil].Indent;
HR->First = Doc->docParagraphStyles[Doc->currentParaStyle].First;
HR->Indent = Doc->docParagraphStyles[Doc->currentParaStyle].Indent;
if ((b->flippedH % 2 != 0) || (b->Reverse))
HR->Revers = true;
else
632,10 → 633,10
HR->Revers = false;
HR->ItemPosValid = true;
HR->repX = false;
if (Doc->CurrentABStil < 5)
if (Doc->currentParaStyle < 5)
HR->TabValues = b->TabValues;
else
HR->TabValues = Doc->Vorlagen[Doc->CurrentABStil].TabValues;
HR->TabValues = Doc->docParagraphStyles[Doc->currentParaStyle].TabValues;
HR->repaint();
}
}
693,7 → 694,7
if (Doc->guidesSettings.marginsShown)
{
p->setPen(Doc->guidesSettings.margColor);
if (Doc->RandFarbig)
if (Doc->marginColored)
{
p->setBrush(Doc->guidesSettings.margColor);
p->drawRect(0, 0, page->Width, page->Margins.Top);
782,7 → 783,7
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
/* else
{
if ((SelItem.count() != 0) && (Mpressed) && (!doku->DragP) && (doku->AppMode == 1))
if ((SelItem.count() != 0) && (Mpressed) && (!doku->DragP) && (doku->appMode == 1))
{
PageItem *b = SelItem.at(0);
if ((b->Locked) || (b->Sizing))
865,7 → 866,7
PaintSizeRect(&p, QRect(pv, QPoint(pv.x()+qRound(gw), pv.y()+qRound(gh))));
DraggedGroupFirst = false;
p.end();
emit MousePos(GroupX-Doc->ActPage->Xoffset, GroupY-Doc->ActPage->Yoffset);
emit MousePos(GroupX-Doc->currentPage->Xoffset, GroupY-Doc->currentPage->Yoffset);
HR->Draw(e->pos().x());
VR->Draw(e->pos().y());
return;
914,7 → 915,7
QString text;
PageItem *b;
bool img = false;
// struct Pti *hg;
// struct ScText *hg;
// uint a;
int re = 0;
e->accept(QTextDrag::canDecode(e));
955,7 → 956,7
}
if (b->PType == 4)
{
if ((b->BackBox != 0) && (b->Ptext.count() == 0))
if ((b->BackBox != 0) && (b->itemText.count() == 0))
return;
if ((fi.exists()) && (!img) && (fi.size() < 500000))
{
962,8 → 963,8
Serializer *ss = new Serializer(ur.path());
if (ss->Read())
{
int st = doku->CurrentABStil;
ss->GetText(b, st, doku->Vorlagen[st].Font, doku->Vorlagen[st].FontSize, true);
int st = doku->currentParaStyle;
ss->GetText(b, st, doku->docParagraphStyles[st].Font, doku->docParagraphStyles[st].FontSize, true);
emit DocChanged();
}
delete ss;
977,7 → 978,7
return;
for (a=0; a<text.length(); ++a)
{
hg = new Pti;
hg = new ScText;
hg->ch = text.at(a);
if (hg->ch == QChar(10))
hg->ch = QChar(13);
1001,7 → 1002,7
hg->PRot = 0;
hg->PtransX = 0;
hg->PtransY = 0;
b->Ptext.insert(b->CPos, hg);
b->itemText.insert(b->CPos, hg);
b->CPos += 1;
}
emit DocChanged();
1113,9 → 1114,9
emit EndNodeEdit();
return;
}
if ((GroupSel) || (Doc->AppMode != 1))
if ((GroupSel) || (Doc->appMode != NormalMode))
{
if ((GroupSel) && (Doc->AppMode == 1))
if ((GroupSel) && (Doc->appMode == NormalMode))
{
if (GetItem(&b))
{
1144,12 → 1145,12
contentsMousePressEvent(m);
return;
}
emit Amode(7);
emit Amode(EditMode);
}
else
if (b->PType == 4)
{
emit b->isAnnotation ? AnnotProps() : Amode(7);
emit b->isAnnotation ? AnnotProps() : Amode(EditMode);
contentsMousePressEvent(m);
}
}
1164,12 → 1165,12
bool fg = false;
double nx = m->x()/Scale;
double ny = m->y()/Scale;
if (Doc->ActPage->YGuides.count() != 0)
if (Doc->currentPage->YGuides.count() != 0)
{
for (uint yg = 0; yg < Doc->ActPage->YGuides.count(); ++yg)
for (uint yg = 0; yg < Doc->currentPage->YGuides.count(); ++yg)
{
if ((Doc->ActPage->YGuides[yg]+Doc->ActPage->Yoffset < (ny+Doc->guidesSettings.grabRad)) &&
(Doc->ActPage->YGuides[yg]+Doc->ActPage->Yoffset > (ny-Doc->guidesSettings.grabRad)))
if ((Doc->currentPage->YGuides[yg]+Doc->currentPage->Yoffset < (ny+Doc->guidesSettings.grabRad)) &&
(Doc->currentPage->YGuides[yg]+Doc->currentPage->Yoffset > (ny-Doc->guidesSettings.grabRad)))
{
fg = true;
break;
1176,12 → 1177,12
}
}
}
if (Doc->ActPage->XGuides.count() != 0)
if (Doc->currentPage->XGuides.count() != 0)
{
for (uint xg = 0; xg < Doc->ActPage->XGuides.count(); ++xg)
for (uint xg = 0; xg < Doc->currentPage->XGuides.count(); ++xg)
{
if ((Doc->ActPage->XGuides[xg]+Doc->ActPage->Xoffset < (nx+Doc->guidesSettings.grabRad)) &&
(Doc->ActPage->XGuides[xg]+Doc->ActPage->Xoffset > (nx-Doc->guidesSettings.grabRad)))
if ((Doc->currentPage->XGuides[xg]+Doc->currentPage->Xoffset < (nx+Doc->guidesSettings.grabRad)) &&
(Doc->currentPage->XGuides[xg]+Doc->currentPage->Xoffset > (nx-Doc->guidesSettings.grabRad)))
{
fg = true;
break;
1198,7 → 1199,7
}
if (MoveGY)
{
Doc->ActPage->YGuides.remove(Doc->ActPage->YGuides[GyM]);
Doc->currentPage->YGuides.remove(Doc->currentPage->YGuides[GyM]);
SetYGuide(m);
MoveGY = false;
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
1207,7 → 1208,7
}
if (MoveGX)
{
Doc->ActPage->XGuides.remove(Doc->ActPage->XGuides[GxM]);
Doc->currentPage->XGuides.remove(Doc->currentPage->XGuides[GxM]);
SetXGuide(m);
MoveGX = false;
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
1215,9 → 1216,9
return;
}
}
if (Doc->AppMode == 25)
if (Doc->appMode == EditGradientVectors)
return;
if (Doc->AppMode == 24)
if (Doc->appMode == MeasurementTool)
{
QPainter p;
p.begin(viewport());
1230,9 → 1231,9
emit PaintingDone();
return;
}
if (Doc->AppMode == 23)
if (Doc->appMode == PanningMode)
return;
if (Doc->AppMode == 22)
if (Doc->appMode == DrawTable)
{
if ((SelItem.count() == 0) && (HaveSelRect) && (!MidButt))
{
1268,7 → 1269,7
{
p.drawRect(AreaR);
p.end();
Doc->AppMode = 1;
Doc->appMode = NormalMode;
emit PaintingDone();
return;
}
1277,7 → 1278,7
{
p.drawRect(AreaR);
p.end();
Doc->AppMode = 1;
Doc->appMode = NormalMode;
emit PaintingDone();
delete dia;
return;
1329,15 → 1330,15
}
emit DoGroup();
}
Doc->AppMode = 1;
Doc->appMode = NormalMode;
emit PaintingDone();
emit DocChanged();
updateContents();
return;
}
if (Doc->AppMode == 21)
if (Doc->appMode == DrawFreehandLine)
{
Doc->AppMode = 1;
Doc->appMode = NormalMode;
if (RecordP.size() > 1)
{
uint z = PaintPolyLine(0, 0, 1, 1, Doc->Dwidth, "None", Doc->DpenLine);
1455,7 → 1456,7
updateContents();
return;
}
if ((!GetItem(&b)) && (m->button() == RightButton) && (!Doc->DragP) && (Doc->AppMode == 1))
if ((!GetItem(&b)) && (m->button() == RightButton) && (!Doc->DragP) && (Doc->appMode == NormalMode))
{
int menid;
QPopupMenu *pmen = new QPopupMenu();
1487,7 → 1488,7
delete pmen;
return;
}
if ((Doc->AppMode != 6) && (!Doc->EditClip) && (Doc->AppMode != 13))
if ((Doc->appMode != Magnifier) && (!Doc->EditClip) && (Doc->appMode != DrawBezierLine))
{
if ((GetItem(&b)) && (m->button() == RightButton) && (!Doc->DragP))
{
1615,7 → 1616,7
pmen->insertItem( tr("&Get Text..."), this, SIGNAL(LoadPic()));
pmen->insertItem( tr("&Append Text..."), this, SIGNAL(AppendText()));
pmen->insertItem( tr("&Edit Text..."), this, SIGNAL(EditText()));
if (Doc->ActPage->PageNam == "")
if (Doc->currentPage->PageNam == "")
{
int pxb = pmenPDF->insertItem( tr("Is PDF &Bookmark"), this, SLOT(ToggleBookmark()));
pmenPDF->setItemChecked(pxb, b->isBookmark);
1690,7 → 1691,7
pmenLevel->insertItem( tr("&Raise"), this, SLOT(RaiseItem()));
}
}
if (((b->PType == 4) || (b->PType == 2) || (b->PType == 6)) && (Doc->AppMode != 7))
if (((b->PType == 4) || (b->PType == 2) || (b->PType == 6)) && (Doc->appMode != EditMode))
{
if (b->PType == 4)
{
1720,9 → 1721,9
pmen->insertItem( tr("Cu&t"), this, SIGNAL(CutItem()));
if (!((b->isTableItem) && (b->isSingleSel)))
pmen->insertItem( tr("&Copy"), this, SIGNAL(CopyItem()));
if ((Doc->AppMode == 7) && (ScApp->Buffer2.startsWith("<SCRIBUSTEXT")) && (b->PType == 4))
if ((Doc->appMode == EditMode) && (ScApp->Buffer2.startsWith("<SCRIBUSTEXT")) && (b->PType == 4))
pmen->insertItem( tr("&Paste"), ScApp, SLOT(slotEditPaste()));
if ((!b->Locked) && (Doc->AppMode != 7) && (!((b->isTableItem) && (b->isSingleSel))))
if ((!b->Locked) && (Doc->appMode != 7) && (!((b->isTableItem) && (b->isSingleSel))))
pmen->insertItem( tr("&Delete"), this, SLOT(DeleteItem()));
if ((b->PType == 2) || (b->PType == 4))
pmen->insertItem( tr("C&lear Contents"), this, SLOT(ClearItem()));
1740,7 → 1741,7
delete pmenLevel;
delete pmenPDF;
}
if (Doc->AppMode == 10)
if (Doc->appMode == LinkFrames)
{
updateContents();
if (Doc->ElemToLink != 0)
1747,13 → 1748,13
return;
else
{
Doc->AppMode = 1;
Doc->appMode = NormalMode;
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
emit PaintingDone();
return;
}
}
if (Doc->AppMode == 12)
if (Doc->appMode == DrawRegularPolygon)
{
b = SelItem.at(0);
FPoint np1 = FPoint(m->x() / Scale, m->y() / Scale);
1772,12 → 1773,12
}
np = FPoint(cli.point(0));
b->PoLine.putPoints(b->PoLine.size(), 2, np.x(), np.y(), np.x(), np.y());
FPoint tp2 = GetMinClipF(b->PoLine);
FPoint tp2 = getMinClipF(&b->PoLine);
if ((tp2.x() > -1) || (tp2.y() > -1))
{
SizeItem(b->Width - tp2.x(), b->Height - tp2.y(), b->ItemNr, false, false, false);
}
FPoint tp = GetMaxClipF(b->PoLine);
FPoint tp = getMaxClipF(&b->PoLine);
SizeItem(tp.x(), tp.y(), b->ItemNr, false, false, false);
b->Clip = FlattenPath(b->PoLine, b->Segments);
AdjustItemSize(b);
1786,7 → 1787,7
b->OwnPage = OnPage(b);
updateContents();
}
if (Doc->AppMode == 8)
if (Doc->appMode == DrawLine)
{
b = SelItem.at(0);
QPainter p;
2349,7 → 2350,7
double scx = b->Width / b->OldB2;
double scy = b->Height / b->OldH2;
scx = scx != scy ? scx / scy : 1.0;
if (b->Ptext.count() != 0)
if (b->itemText.count() != 0)
{
b->ISize = QMAX(qRound(b->ISize * scy), 1);
b->LineSp = ((b->ISize / 10.0)* static_cast<double>(Doc->typographicSetttings.autoLineSpacing) / 100) + (b->ISize / 10.0);
2360,10 → 2361,10
emit ItemTextCols(b->Cols, b->ColGap);
emit ItemTextSize(b->ISize);
emit ItemTextSca(b->TxtScale);
for (uint aa = 0; aa < b->Ptext.count(); ++aa)
for (uint aa = 0; aa < b->itemText.count(); ++aa)
{
b->Ptext.at(aa)->csize = QMAX(qRound(b->Ptext.at(aa)->csize*scy), 1);
b->Ptext.at(aa)->cscale = QMAX(QMIN(qRound(b->Ptext.at(aa)->cscale*scx), 400), 25);
b->itemText.at(aa)->csize = QMAX(qRound(b->itemText.at(aa)->csize*scy), 1);
b->itemText.at(aa)->cscale = QMAX(QMIN(qRound(b->itemText.at(aa)->cscale*scx), 400), 25);
}
}
}
2478,11 → 2479,11
}
HaveSelRect = false;
}
if (Doc->AppMode != 7)
if (Doc->appMode != EditMode)
{
if (Doc->AppMode == 9)
if (Doc->appMode == Rotation)
Doc->RotMode = RotMode;
Doc->AppMode = 1;
Doc->appMode = NormalMode;
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
emit PaintingDone();
}
2505,7 → 2506,7
}
}
}
if ((Doc->AppMode == 7) && !HanMove)
if ((Doc->appMode == EditMode) && !HanMove)
{
b = SelItem.at(0);
uint a;
2513,8 → 2514,8
{
if (oldCp == b->CPos)
{
for (a = 0; a < b->Ptext.count(); ++a)
b->Ptext.at(a)->cselect = false;
for (a = 0; a < b->itemText.count(); ++a)
b->itemText.at(a)->cselect = false;
b->HasSel = false;
emit HasNoTextSel();
RefreshItem(b);
2523,7 → 2524,7
else
emit DocChanged();
}
if (Doc->AppMode == 6)
if (Doc->appMode == Magnifier)
{
double sc = Scale;
if (HaveSelRect)
2548,7 → 2549,7
{
SetCPo(Mxp, Myp);
HaveSelRect = false;
Doc->AppMode = 1;
Doc->appMode = NormalMode;
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
emit PaintingDone();
}
2561,7 → 2562,7
if (sc == Scale)
{
HaveSelRect = false;
Doc->AppMode = 1;
Doc->appMode = NormalMode;
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
emit PaintingDone();
}
2569,7 → 2570,7
qApp->setOverrideCursor(QCursor(loadIcon("LupeZ.xpm")), true);
}
}
if ((Doc->AppMode == 13) && (m->button() == LeftButton))
if ((Doc->appMode == DrawBezierLine) && (m->button() == LeftButton))
{
b = SelItem.at(0);
b->ClipEdited = true;
2594,7 → 2595,7
b->PoLine.addPoint(lxy);
b->PoLine.addPoint(lk);
}
FPoint np2 = GetMinClipF(b->PoLine);
FPoint np2 = getMinClipF(&b->PoLine);
if (np2.x() < 0)
{
b->PoLine.translate(-np2.x(), 0);
2621,13 → 2622,13
}
p.end();
}
if ((Doc->AppMode == 13) && (m->button() == RightButton))
if ((Doc->appMode == DrawBezierLine) && (m->button() == RightButton))
{
b = SelItem.at(0);
b->PoLine.resize(b->PoLine.size()-2);
if (b->PoLine.size() < 4)
{
// emit DelObj(Doc->ActPage->PageNr, b->ItemNr);
// emit DelObj(Doc->currentPage->PageNr, b->ItemNr);
Doc->Items.remove(b->ItemNr);
SelItem.removeFirst();
emit HaveSel(-1);
2639,7 → 2640,7
AdjustItemSize(b);
b->ContourLine = b->PoLine.copy();
}
Doc->AppMode = 1;
Doc->appMode = NormalMode;
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
emit PaintingDone();
emit DocChanged();
2669,13 → 2670,13
double sc = Scale;
HR->Draw(m->x());
VR->Draw(m->y());
emit MousePos(m->x()/Scale-Doc->ActPage->Xoffset, m->y()/Scale-Doc->ActPage->Yoffset);
emit MousePos(m->x()/Scale-Doc->currentPage->Xoffset, m->y()/Scale-Doc->currentPage->Yoffset);
if (Doc->guidesSettings.guidesShown)
{
if (MoveGY)
{
FromHRuler(m);
if (((m->y()/sc) < Doc->ActPage->Yoffset) || ((m->y()/sc) > Doc->ActPage->Height+Doc->ActPage->Yoffset))
if (((m->y()/sc) < Doc->currentPage->Yoffset) || ((m->y()/sc) > Doc->currentPage->Height+Doc->currentPage->Yoffset))
qApp->setOverrideCursor(QCursor(loadIcon("DelPoint.png")), true);
else
qApp->setOverrideCursor(QCursor(SPLITHC), true);
2684,7 → 2685,7
if (MoveGX)
{
FromVRuler(m);
if (((m->x()/sc) < Doc->ActPage->Xoffset) || ((m->x()/sc) > Doc->ActPage->Width+Doc->ActPage->Xoffset))
if (((m->x()/sc) < Doc->currentPage->Xoffset) || ((m->x()/sc) > Doc->currentPage->Width+Doc->currentPage->Xoffset))
qApp->setOverrideCursor(QCursor(loadIcon("DelPoint.png")), true);
else
qApp->setOverrideCursor(QCursor(SPLITVC), true);
2693,8 → 2694,8
}
/* if ((!Doc->DragP) && (Mpressed) && (SelItem.count() != 0))
{
int cx = Anz->contentsX() - Anz->childX(doku->ActPage->parentWidget());
int cy = Anz->contentsY() - Anz->childY(doku->ActPage->parentWidget());
int cx = Anz->contentsX() - Anz->childX(doku->currentPage->parentWidget());
int cy = Anz->contentsY() - Anz->childY(doku->currentPage->parentWidget());
int cw = Anz->visibleWidth();
int ch = Anz->visibleHeight();
if ((m->y() < cy+10) || ((ch - (m->y() - cy)) - 10 < 0) || (m->x() < cx + 10) || ((cw - (m->x() - cx)) - 10 < 0))
2713,7 → 2714,7
else
BlockLeave = false;
} */
if (Mpressed && (Doc->AppMode == 25))
if (Mpressed && (Doc->appMode == EditGradientVectors))
{
PageItem *b = SelItem.at(0);
newX = m->x();
2740,7 → 2741,7
b->Width * UmReFaktor, b->Height * UmReFaktor);
return;
}
if (Mpressed && (Doc->AppMode == 24))
if (Mpressed && (Doc->appMode == MeasurementTool))
{
newX = m->x();
newY = m->y();
2753,14 → 2754,14
p.end();
Mxp = newX;
Myp = newY;
double dxp = Dxp / sc - Doc->ActPage->Xoffset;
double dyp = Dyp / sc - Doc->ActPage->Yoffset;
double nxp = newX / sc - Doc->ActPage->Xoffset;
double nyp = newY / sc - Doc->ActPage->Yoffset;
emit MVals(dxp, dyp, nxp, nyp, -xy2Deg(newX/sc - Dxp*sc, newY/sc - Dyp/sc), sqrt(pow(newX/sc - Dxp/sc,2)+pow(newY/sc - Dyp/sc,2)), Doc->Einheit);
double dxp = Dxp / sc - Doc->currentPage->Xoffset;
double dyp = Dyp / sc - Doc->currentPage->Yoffset;
double nxp = newX / sc - Doc->currentPage->Xoffset;
double nyp = newY / sc - Doc->currentPage->Yoffset;
emit MVals(dxp, dyp, nxp, nyp, -xy2Deg(newX/sc - Dxp*sc, newY/sc - Dyp/sc), sqrt(pow(newX/sc - Dxp/sc,2)+pow(newY/sc - Dyp/sc,2)), Doc->docUnitIndex);
return;
}
if (Mpressed && (Doc->AppMode == 23))
if (Mpressed && (Doc->appMode == PanningMode))
{
int scroX = m->x() - qRound((Mxp * sc));
int scroY = m->y() - qRound((Myp * sc));
2769,7 → 2770,7
Myp = static_cast<int>((m->y()-scroY)/sc);
return;
}
if (Mpressed && (Doc->AppMode == 21))
if (Mpressed && (Doc->appMode == DrawFreehandLine))
{
newX = m->x();
newY = m->y();
2798,7 → 2799,7
{
newX = static_cast<int>(m->x()/sc);
newY = static_cast<int>(m->y()/sc);
if ((Mpressed) && (m->state() == RightButton) && (!Doc->DragP) && (Doc->AppMode == 1) && (!b->Locked) && (!((b->isTableItem) && (b->isSingleSel))))
if ((Mpressed) && (m->state() == RightButton) && (!Doc->DragP) && (Doc->appMode == NormalMode) && (!b->Locked) && (!((b->isTableItem) && (b->isSingleSel))))
{
if ((abs(Dxp - newX) > 10) || (abs(Dyp - newY) > 10))
{
2823,7 → 2824,7
}
if (Doc->DragP)
return;
if (Mpressed && (Doc->AppMode == 9))
if (Mpressed && (Doc->appMode == Rotation))
{
double newW = xy2Deg(m->x()/sc - RCenter.x(), m->y()/sc - RCenter.y());
if (GroupSel)
2833,7 → 2834,7
oldW = newW;
emit DocChanged();
}
if (Doc->AppMode == 13)
if (Doc->appMode == DrawBezierLine)
{
p.begin(viewport());
ToView(&p);
2880,7 → 2881,7
Mxp = newX;
Myp = newY;
}
if (Mpressed && (Doc->AppMode == 12))
if (Mpressed && (Doc->appMode == DrawRegularPolygon))
{
p.begin(viewport());
ToView(&p);
2906,7 → 2907,7
Mxp = newX;
Myp = newY;
}
if (Mpressed && (Doc->AppMode == 8))
if (Mpressed && (Doc->appMode == DrawLine))
{
p.begin(viewport());
ToView(&p);
2925,7 → 2926,7
Mxp = newX;
Myp = newY;
}
if (Mpressed && (Doc->AppMode == 7) && (!HanMove))
if (Mpressed && (Doc->appMode == EditMode) && (!HanMove))
{
if (b->PType == 2)
{
2935,17 → 2936,17
}
if (b->PType == 4)
{
for (a = 0; a < b->Ptext.count(); ++a)
b->Ptext.at(a)->cselect = false;
for (a = 0; a < b->itemText.count(); ++a)
b->itemText.at(a)->cselect = false;
b->HasSel = false;
slotSetCurs(m->x(), m->y());
if (b->Ptext.count() > 0)
if (b->itemText.count() > 0)
{
if (b->CPos < oldCp)
{
for (c = b->CPos; c < oldCp; ++c)
{
b->Ptext.at(c)->cselect = true;
b->itemText.at(c)->cselect = true;
b->HasSel = true;
}
}
2953,7 → 2954,7
{
for (c = oldCp; c < b->CPos; ++c)
{
b->Ptext.at(c)->cselect = true;
b->itemText.at(c)->cselect = true;
b->HasSel = true;
}
}
2962,7 → 2963,7
emit b->HasSel ? HasTextSel() : HasNoTextSel();
}
}
if (Mpressed && (m->state() & LeftButton) && ((Doc->AppMode == 1) || ((Doc->AppMode == 7) && HanMove)) && (!b->Locked))
if (Mpressed && (m->state() & LeftButton) && ((Doc->appMode == NormalMode) || ((Doc->appMode == EditMode) && HanMove)) && (!b->Locked))
{
if (Doc->EditClip)
{
3340,9 → 3341,9
}
}
}
if ((!Mpressed) && (Doc->AppMode != 13))
if ((!Mpressed) && (Doc->appMode != DrawBezierLine))
{
if (Doc->AppMode == 6)
if (Doc->appMode == Magnifier)
{
qApp->setOverrideCursor(QCursor(loadIcon("LupeZ.xpm")), true);
return;
3405,7 → 3406,7
break;
}
}
if (Doc->AppMode == 9)
if (Doc->appMode == Rotation)
qApp->setOverrideCursor(QCursor(loadIcon("Rotieren2.xpm")), true);
}
else
3481,9 → 3482,9
if ((tx.intersects(mpo)) && (!b->Locked))
{
qApp->setOverrideCursor(QCursor(SizeAllCursor), true);
if (Doc->AppMode == 9)
if (Doc->appMode == Rotation)
qApp->setOverrideCursor(QCursor(loadIcon("Rotieren2.xpm")), true);
if (Doc->AppMode == 7)
if (Doc->appMode == EditMode)
{
if (b->PType == 4)
qApp->setOverrideCursor(QCursor(ibeamCursor), true);
3518,18 → 3519,18
SeRy = newY;
HaveSelRect = true;
}
if ((Doc->guidesSettings.guidesShown) && (Doc->AppMode == 1) && (!Doc->GuideLock) && (OnPage(m->x()/sc, m->y()/sc) != -1))
if ((Doc->guidesSettings.guidesShown) && (Doc->appMode == NormalMode) && (!Doc->GuideLock) && (OnPage(m->x()/sc, m->y()/sc) != -1))
{
if (Doc->ActPage->YGuides.count() != 0)
if (Doc->currentPage->YGuides.count() != 0)
{
for (uint yg = 0; yg < Doc->ActPage->YGuides.count(); ++yg)
for (uint yg = 0; yg < Doc->currentPage->YGuides.count(); ++yg)
{
if ((Doc->ActPage->YGuides[yg]+Doc->ActPage->Yoffset < (static_cast<int>(m->y()/sc)+Doc->guidesSettings.guideRad)) &&
(Doc->ActPage->YGuides[yg]+Doc->ActPage->Yoffset > (static_cast<int>(m->y()/sc)-Doc->guidesSettings.guideRad)))
if ((Doc->currentPage->YGuides[yg]+Doc->currentPage->Yoffset < (static_cast<int>(m->y()/sc)+Doc->guidesSettings.guideRad)) &&
(Doc->currentPage->YGuides[yg]+Doc->currentPage->Yoffset > (static_cast<int>(m->y()/sc)-Doc->guidesSettings.guideRad)))
{
if ((Mpressed) && (GyM != -1))
MoveGY = true;
if (((m->x()/sc) < Doc->ActPage->Xoffset) || ((m->x()/sc) >= Doc->ActPage->Width-1+Doc->ActPage->Xoffset))
if (((m->x()/sc) < Doc->currentPage->Xoffset) || ((m->x()/sc) >= Doc->currentPage->Width-1+Doc->currentPage->Xoffset))
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
else
qApp->setOverrideCursor(QCursor(SPLITHC), true);
3538,16 → 3539,16
}
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
}
if (Doc->ActPage->XGuides.count() != 0)
if (Doc->currentPage->XGuides.count() != 0)
{
for (uint xg = 0; xg < Doc->ActPage->XGuides.count(); ++xg)
for (uint xg = 0; xg < Doc->currentPage->XGuides.count(); ++xg)
{
if ((Doc->ActPage->XGuides[xg]+Doc->ActPage->Xoffset < (static_cast<int>(m->x()/sc)+Doc->guidesSettings.guideRad)) &&
(Doc->ActPage->XGuides[xg]+Doc->ActPage->Xoffset > (static_cast<int>(m->x()/sc)-Doc->guidesSettings.guideRad)))
if ((Doc->currentPage->XGuides[xg]+Doc->currentPage->Xoffset < (static_cast<int>(m->x()/sc)+Doc->guidesSettings.guideRad)) &&
(Doc->currentPage->XGuides[xg]+Doc->currentPage->Xoffset > (static_cast<int>(m->x()/sc)-Doc->guidesSettings.guideRad)))
{
if ((Mpressed) && (GxM != -1))
MoveGX = true;
if (((m->y()/sc) < Doc->ActPage->Yoffset) || ((m->y()/sc) >= Doc->ActPage->Height-1+Doc->ActPage->Yoffset))
if (((m->y()/sc) < Doc->currentPage->Yoffset) || ((m->y()/sc) >= Doc->currentPage->Height-1+Doc->currentPage->Yoffset))
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
else
qApp->setOverrideCursor(QCursor(SPLITVC), true);
3588,7 → 3589,7
Mxp = qRound(m->x()/Scale);
Myp = qRound(m->y()/Scale);
mpo = QRect(m->x()-Doc->guidesSettings.grabRad, m->y()-Doc->guidesSettings.grabRad, Doc->guidesSettings.grabRad*2, Doc->guidesSettings.grabRad*2);
if (Doc->AppMode != 7)
if (Doc->appMode != EditMode)
{
Rxp = ApplyGrid(QPoint(Mxp, Myp)).x();
Rxpd = Mxp - Rxp;
3602,9 → 3603,9
Ryp = Myp;
Rxp = Mxp;
}
switch (Doc->AppMode)
switch (Doc->appMode)
{
case 1:
case NormalMode:
if ((Doc->EditClip) && (SelItem.count() != 0))
{
b = SelItem.at(0);
3982,7 → 3983,7
Dyp = Myp;
}
break;
case 2:
case DrawShapes:
selectPage(m);
switch (Doc->SubMode)
{
4003,19 → 4004,19
}
emit HaveSel(6);
break;
case 4:
case DrawPicture:
selectPage(m);
z = PaintPict(Rxp, Ryp, 1+Rxpd, 1+Rypd);
SetupDraw(z);
emit HaveSel(2);
break;
case 5:
case DrawText:
selectPage(m);
z = PaintText(Rxp, Ryp, 1+Rxpd, 1+Rypd, Doc->Dwidth, Doc->DpenText);
SetupDraw(z);
emit HaveSel(4);
break;
case 6:
case Magnifier:
Mpressed = true;
if ((m->state() == ShiftButton) || (m->button() == RightButton))
Magnify = false;
4022,7 → 4023,7
else
Magnify = true;
break;
case 7:
case EditMode:
HowTo = 0;
HanMove = false;
slotDoCurs(false);
4046,7 → 4047,7
{
Deselect(true);
slotDoCurs(true);
emit Amode(1);
emit Amode(NormalMode);
return;
}
b = SelItem.at(0);
4059,7 → 4060,7
{
b = SelItem.at(0);
if ((b->PType == 4) || (b->PType == 2))
emit Amode(7);
emit Amode(EditMode);
else
{
emit PaintingDone();
4086,14 → 4087,14
{
Serializer *ss = new Serializer("");
ss->Objekt = cc;
int st = Doc->CurrentABStil;
int st = Doc->currentParaStyle;
if (st > 5)
ss->GetText(b, st, Doc->Vorlagen[st].Font, Doc->Vorlagen[st].FontSize, true);
ss->GetText(b, st, Doc->docParagraphStyles[st].Font, Doc->docParagraphStyles[st].FontSize, true);
else
ss->GetText(b, st, b->IFont, b->ISize, true);
delete ss;
if (Doc->Trenner->AutoCheck)
Doc->Trenner->slotHyphenate(b);
if (Doc->docHyphenator->AutoCheck)
Doc->docHyphenator->slotHyphenate(b);
}
else
{
4104,7 → 4105,7
}
}
break;
case 8:
case DrawLine:
selectPage(m);
z = PaintLine(Rxp, Ryp, 1+Rxpd, Rypd, Doc->DwidthLine, Doc->DpenLine);
b = Doc->Items.at(z);
4122,7 → 4123,7
emit ItemTrans(b->Transparency, b->TranspStroke);
emit HaveSel(5);
break;
case 9:
case Rotation:
if (GetItem(&b))
{
RotMode = Doc->RotMode;
4184,12 → 4185,12
}
}
break;
case 10:
case LinkFrames:
b = Doc->ElemToLink;
SeleItem(m);
if (GetItem(&bb))
{
if ((bb->Ptext.count() == 0) && (bb->NextBox == 0) && (bb->BackBox == 0) && (b != bb))
if ((bb->itemText.count() == 0) && (bb->NextBox == 0) && (bb->BackBox == 0) && (b != bb))
{
b->NextBox = bb;
bb->BackBox = b;
4212,7 → 4213,7
else
Doc->ElemToLink = 0;
break;
case 11:
case UnlinkFrames:
SeleItem(m);
if (GetItem(&b))
{
4223,15 → 4224,15
PageItem* nb = b->NextBox;
while (nb != 0)
{
uint a = nb->Ptext.count();
uint a = nb->itemText.count();
for (uint s=0; s<a; ++s)
b->Ptext.append(nb->Ptext.take(0));
b->itemText.append(nb->itemText.take(0));
nb = nb->NextBox;
}
}
uint a2 = b->Ptext.count();
uint a2 = b->itemText.count();
for (uint s = 0; s < a2; ++s)
b->BackBox->Ptext.append(b->Ptext.take(0));
b->BackBox->itemText.append(b->itemText.take(0));
b->BackBox->NextBox = 0;
b->BackBox = 0;
}
4239,7 → 4240,7
updateContents();
}
break;
case 12:
case DrawRegularPolygon:
{
selectPage(m);
z = PaintPoly(Rxp, Ryp, 1+Rxpd, 1+Rypd, Doc->Dwidth, Doc->Dbrush, Doc->Dpen);
4272,7 → 4273,7
emit HaveSel(6);
break;
}
case 13:
case DrawBezierLine:
if (m->button() == RightButton)
break;
if (FirstPoly)
4292,7 → 4293,7
p.end();
npf = ApplyGridF(npf);
b->PoLine.addPoint(npf);
npf2 = GetMinClipF(b->PoLine);
npf2 = getMinClipF(&b->PoLine);
if (npf2.x() < 0)
{
b->PoLine.translate(-npf2.x(), 0);
4314,42 → 4315,42
emit ItemTrans(b->Transparency, b->TranspStroke);
emit HaveSel(7);
break;
case 14:
case 15:
case 16:
case 17:
case 18:
case 19:
case 20:
case InsertPDFButton:
case InsertPDFTextfield:
case InsertPDFCheckbox:
case InsertPDFCombobox:
case InsertPDFListbox:
case InsertPDFTextAnnotation:
case InsertPDFLinkAnnotation:
selectPage(m);
z = PaintText(Rxp, Ryp, 1+Rxpd, 1+Rypd, Doc->Dwidth, Doc->DpenText);
b = Doc->Items.at(z);
b->isAnnotation = true;
switch (Doc->AppMode)
switch (Doc->appMode)
{
case 14:
case InsertPDFButton:
b->AnType = 2;
b->AnFlag = 65536;
break;
case 15:
case InsertPDFTextfield:
b->AnType = 3;
break;
case 16:
case InsertPDFCheckbox:
b->AnType = 4;
break;
case 17:
case InsertPDFCombobox:
b->AnType = 5;
b->AnFlag = 131072;
break;
case 18:
case InsertPDFListbox:
b->AnType = 6;
break;
case 19:
case InsertPDFTextAnnotation:
b->AnType = 10;
break;
case 20:
case InsertPDFLinkAnnotation:
b->AnType = 11;
b->AnZiel = Doc->ActPage->PageNr;
b->AnZiel = Doc->currentPage->PageNr;
b->AnAction = "0 0";
b->Textflow = false;
break;
4357,17 → 4358,17
SetupDraw(z);
emit HaveSel(4);
break;
case 21:
case DrawFreehandLine:
RecordP.resize(0);
Deselect(false);
break;
case 22:
case DrawTable:
Deselect(false);
break;
case 23:
case PanningMode:
break;
case 24:
case 25:
case MeasurementTool:
case EditGradientVectors:
Mpressed = true;
qApp->setOverrideCursor(QCursor(CrossCursor), true);
Dxp = m->x();
4740,12 → 4741,12
double oldy = b->Ypos;
b->Xpos += newX;
b->Ypos += newY;
if ((Doc->useRaster) && (!Imoved) && (!fromMP) && (static_cast<int>(Doc->ActPage->PageNr) == b->OwnPage))
if ((Doc->useRaster) && (!Imoved) && (!fromMP) && (static_cast<int>(Doc->currentPage->PageNr) == b->OwnPage))
{
b->Xpos = qRound(b->Xpos / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid;
b->Ypos = qRound(b->Ypos / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid;
}
if ((Doc->SnapGuides) && (!Imoved) && (Doc->AppMode == 1) && (!Doc->EditClip) && (!fromMP))
if ((Doc->SnapGuides) && (!Imoved) && (Doc->appMode == NormalMode) && (!Doc->EditClip) && (!fromMP))
SnapToGuides(b);
if ((b->Xpos != oldx) || (b->Ypos != oldy))
retw = true;
4762,7 → 4763,7
emit ItemPos(b->Xpos, b->Ypos);
}
if (!Doc->loading)
emit UpdtObj(Doc->ActPage->PageNr, b->ItemNr);
emit UpdtObj(Doc->currentPage->PageNr, b->ItemNr);
QRect oldR = getRedrawBounding(b);
setRedrawBounding(b);
QRect newR = getRedrawBounding(b);
4814,7 → 4815,7
 
void ScribusView::UpdateClip(PageItem* b)
{
if (Doc->AppMode == 13)
if (Doc->appMode == DrawBezierLine)
return;
int ph = static_cast<int>(QMAX(1.0, b->Pwidth / 2.0));
switch (b->PType)
4956,12 → 4957,12
 
void ScribusView::UpdatePolyClip(PageItem *b)
{
struct Pti *hl;
struct ScText *hl;
int asce = 1;
int desc = 1;
for (uint a = 0; a < b->Ptext.count(); ++a)
for (uint a = 0; a < b->itemText.count(); ++a)
{
hl = b->Ptext.at(a);
hl = b->itemText.at(a);
int des = static_cast<int>((*Doc->AllFonts)[hl->cfont]->numDescender * (-hl->csize / 10.0));
int asc = static_cast<int>((*Doc->AllFonts)[hl->cfont]->numAscent * (hl->csize / 10.0));
if (asc > asce)
5084,8 → 5085,8
if (EditContour)
{
FPoint tp, tp2;
tp2 = GetMinClipF(b->ContourLine);
tp = GetMaxClipF(b->ContourLine);
tp2 = getMinClipF(&b->ContourLine);
tp = getMaxClipF(&b->ContourLine);
ma.translate(qRound(tp.x()), 0);
ma.scale(-1, 1);
b->ContourLine.map(ma);
5117,8 → 5118,8
if (EditContour)
{
FPoint tp, tp2;
tp2 = GetMinClipF(b->ContourLine);
tp = GetMaxClipF(b->ContourLine);
tp2 = getMinClipF(&b->ContourLine);
tp = getMaxClipF(&b->ContourLine);
ma.translate(0, qRound(tp.y()));
ma.scale(1, -1);
b->ContourLine.map(ma);
5150,8 → 5151,8
if (EditContour)
{
FPoint tp, tp2;
tp2 = GetMinClipF(b->ContourLine);
tp = GetMaxClipF(b->ContourLine);
tp2 = getMinClipF(&b->ContourLine);
tp = getMaxClipF(&b->ContourLine);
b->ContourLine.translate(-qRound((tp.x() + tp2.x()) / 2.0), -qRound((tp.y() + tp2.y()) / 2.0));
switch (mode)
{
5851,11 → 5852,11
}
}
bb->ISize = QMAX(qRound(bb->ISize*((scx+scy)/2)), 1);
if ((bb->Ptext.count() != 0) && (!bb->isTableItem))
if ((bb->itemText.count() != 0) && (!bb->isTableItem))
{
bb->LineSp = ((bb->ISize / 10.0) * static_cast<double>(Doc->typographicSetttings.autoLineSpacing) / 100) + (bb->ISize / 10.0);
for (aa = 0; aa < bb->Ptext.count(); ++aa)
bb->Ptext.at(aa)->csize = QMAX(qRound(bb->Ptext.at(aa)->csize*((scx+scy)/2)), 1);
for (aa = 0; aa < bb->itemText.count(); ++aa)
bb->itemText.at(aa)->csize = QMAX(qRound(bb->itemText.at(aa)->csize*((scx+scy)/2)), 1);
if (bb->PType == 8)
UpdatePolyClip(bb);
}
5942,7 → 5943,7
b->Sizing = false;
FPointArray Clip;
Clip = b->PoLine;
FPoint tp2 = GetMinClipF(Clip);
FPoint tp2 = getMinClipF(&Clip);
SizeItem(b->Width - tp2.x(), b->Height - tp2.y(), b->ItemNr, true, false, false);
Clip.translate(-tp2.x(), -tp2.y());
if (b->Rot != 0)
5956,7 → 5957,7
MoveItemI(-tp2.x()/b->LocalScX, 0, b->ItemNr, false);
if (b->flippedV % 2 == 0)
MoveItemI(0, -tp2.y()/b->LocalScY, b->ItemNr, false);
FPoint tp = GetMaxClipF(Clip);
FPoint tp = getMaxClipF(&Clip);
if (b->flippedH % 2 != 0)
MoveItemI((b->Width - tp.x())/b->LocalScX, 0, b->ItemNr, false);
if (b->flippedV % 2 != 0)
5977,14 → 5978,14
int isSpace;
if ( dir > 0 )
{
isSpace = b->Ptext.at(oldPos)->ch.at(0).isSpace();
isSpace = b->itemText.at(oldPos)->ch.at(0).isSpace();
b->CPos = oldPos +1;
for (i=oldPos+1; i < len; i++)
{
if ( b->Ptext.at(i)->ch.at(0).isSpace() == isSpace )
if ( b->itemText.at(i)->ch.at(0).isSpace() == isSpace )
{
if ( expandSel )
b->Ptext.at(i)->cselect = state;
b->itemText.at(i)->cselect = state;
}
else
break;
5993,13 → 5994,13
}
else if ( oldPos > 0 )
{
isSpace = b->Ptext.at(oldPos-1)->ch.at(0).isSpace();
isSpace = b->itemText.at(oldPos-1)->ch.at(0).isSpace();
for (i=oldPos-2; i > 0; i--)
{
if ( b->Ptext.at(i)->ch.at(0).isSpace() == isSpace )
if ( b->itemText.at(i)->ch.at(0).isSpace() == isSpace )
{
if ( expandSel )
b->Ptext.at(i)->cselect = state;
b->itemText.at(i)->cselect = state;
}
else
break;
6017,11 → 6018,11
int isSpace;
if ( dir > 0 && oldPos < len )
{
isSpace = b->Ptext.at(oldPos)->ch.at(0).isSpace();
isSpace = b->itemText.at(oldPos)->ch.at(0).isSpace();
b->CPos = oldPos +1;
for (i=oldPos+1; i < len; i++)
{
if ( b->Ptext.at(i)->ch.at(0).isSpace() != isSpace )
if ( b->itemText.at(i)->ch.at(0).isSpace() != isSpace )
break;
b->CPos++;
}
6029,10 → 6030,10
else if ( dir < 0 && oldPos > 0 )
{
oldPos--;
isSpace = b->Ptext.at(oldPos)->ch.at(0).isSpace();
isSpace = b->itemText.at(oldPos)->ch.at(0).isSpace();
for (i=oldPos; i >= 0; i--)
{
if ( b->Ptext.at(i)->ch.at(0).isSpace() != isSpace )
if ( b->itemText.at(i)->ch.at(0).isSpace() != isSpace )
break;
b->CPos--;
}
6051,7 → 6052,7
 
void ScribusView::ExpandSel(PageItem *b, int dir, int oldPos)
{
int len = b->Ptext.count();
int len = b->itemText.count();
int rightSel = false; // assume left right and actual char not selected
int leftSel = false;
int actSel = false;
6074,8 → 6075,8
if ( oldPos == 0 )
leftSel = false;
else
leftSel = b->Ptext.at(oldPos-1)->cselect;
actSel = b->Ptext.at(oldPos)->cselect;
leftSel = b->itemText.at(oldPos-1)->cselect;
actSel = b->itemText.at(oldPos)->cselect;
rightSel = false; // not relevant
}
else if ( dir > 0 && oldPos == len) // -> key
6084,10 → 6085,10
}
else if ( dir < 0 && oldPos > 0 ) // <- key
{
actSel = b->Ptext.at(oldPos-1)->cselect;
actSel = b->itemText.at(oldPos-1)->cselect;
leftSel = false; // not relevant
if ( oldPos < len )
rightSel = b->Ptext.at(oldPos)->cselect;
rightSel = b->itemText.at(oldPos)->cselect;
else
rightSel = false;
}
6102,7 → 6103,7
int i;
for (i=0; i < len; i++ )
{
b->Ptext.at(i)->cselect = false;
b->itemText.at(i)->cselect = false;
}
b->HasSel = false;
emit HasNoTextSel();
6140,7 → 6141,7
sel = rightSel == true;
}
for ( i = start; i < end; i++)
b->Ptext.at(i)->cselect = sel;
b->itemText.at(i)->cselect = sel;
if ( ! sel )
emit HasNoTextSel();
RefreshItem(b);
6157,9 → 6158,9
{
if ( i->HasSel )
{
l = i->Ptext.count();
l = i->itemText.count();
for (n=0; n < l; n++ )
i->Ptext.at(n)->cselect = false;
i->itemText.at(n)->cselect = false;
RefreshItem(i);
i->HasSel = false;
}
6193,49 → 6194,49
TransformM(b, &p);
uint a, i;
int xp, yp, w, h, chs;
for (a=0; a<b->Ptext.count(); ++a)
for (a=0; a<b->itemText.count(); ++a)
{
xp = static_cast<int>(b->Ptext.at(a)->xp);
yp = static_cast<int>(b->Ptext.at(a)->yp);
chx = b->Ptext.at(a)->ch;
xp = static_cast<int>(b->itemText.at(a)->xp);
yp = static_cast<int>(b->itemText.at(a)->yp);
chx = b->itemText.at(a)->ch;
if (chx == QChar(30))
chx = b->ExpandToken(a);
if (chx == QChar(29))
chx = " ";
chs = b->Ptext.at(a)->csize;
b->SetZeichAttr(b->Ptext.at(a), &chs, &chx);
chs = b->itemText.at(a)->csize;
b->SetZeichAttr(b->itemText.at(a), &chs, &chx);
if ((chx == QChar(13)) || (chx == QChar(9)))
w = 1;
else
w = qRound(Cwidth(Doc, b->Ptext.at(a)->cfont, chx, chs)*(b->Ptext.at(a)->cscale / 100.0));
h = static_cast<int>(Doc->Vorlagen[b->Ptext.at(a)->cab].LineSpa);
w = qRound(Cwidth(Doc, b->itemText.at(a)->cfont, chx, chs)*(b->itemText.at(a)->cscale / 100.0));
h = static_cast<int>(Doc->docParagraphStyles[b->itemText.at(a)->cab].LineSpa);
if (QRegion(p.xForm(QRect(xp-1, yp-h, w+1, h))).contains(QPoint(xP, yP)))
{
b->CPos = a;
p.end();
Doc->CurrFont = b->Ptext.at(a)->cfont;
Doc->CurrFontSize = b->Ptext.at(a)->csize;
Doc->CurrTextFill = b->Ptext.at(a)->ccolor;
Doc->CurrTextFillSh = b->Ptext.at(a)->cshade;
Doc->CurrTextStroke = b->Ptext.at(a)->cstroke;
Doc->CurrTextStrokeSh = b->Ptext.at(a)->cshade2;
Doc->CurrTextScale = b->Ptext.at(a)->cscale;
emit ItemTextSca(b->Ptext.at(a)->cscale);
emit ItemTextFont(b->Ptext.at(a)->cfont);
emit ItemTextSize(b->Ptext.at(a)->csize);
emit ItemTextUSval(b->Ptext.at(a)->cextra);
emit ItemTextStil(b->Ptext.at(a)->cstyle);
emit ItemTextAbs(b->Ptext.at(a)->cab);
emit ItemTextFarben(b->Ptext.at(a)->cstroke, b->Ptext.at(a)->ccolor, b->Ptext.at(a)->cshade2, b->Ptext.at(a)->cshade);
Doc->CurrFont = b->itemText.at(a)->cfont;
Doc->CurrFontSize = b->itemText.at(a)->csize;
Doc->CurrTextFill = b->itemText.at(a)->ccolor;
Doc->CurrTextFillSh = b->itemText.at(a)->cshade;
Doc->CurrTextStroke = b->itemText.at(a)->cstroke;
Doc->CurrTextStrokeSh = b->itemText.at(a)->cshade2;
Doc->CurrTextScale = b->itemText.at(a)->cscale;
emit ItemTextSca(b->itemText.at(a)->cscale);
emit ItemTextFont(b->itemText.at(a)->cfont);
emit ItemTextSize(b->itemText.at(a)->csize);
emit ItemTextUSval(b->itemText.at(a)->cextra);
emit ItemTextStil(b->itemText.at(a)->cstyle);
emit ItemTextAbs(b->itemText.at(a)->cab);
emit ItemTextFarben(b->itemText.at(a)->cstroke, b->itemText.at(a)->ccolor, b->itemText.at(a)->cshade2, b->itemText.at(a)->cshade);
return true;
}
}
QPoint np;
for (a=0; a<b->Ptext.count(); ++a)
for (a=0; a<b->itemText.count(); ++a)
{
xp = static_cast<int>(b->Ptext.at(a)->xp);
yp = static_cast<int>(b->Ptext.at(a)->yp);
np = p.xForm(QPoint(xp, yp - static_cast<int>(Doc->Vorlagen[b->Ptext.at(a)->cab].LineSpa)));
xp = static_cast<int>(b->itemText.at(a)->xp);
yp = static_cast<int>(b->itemText.at(a)->yp);
np = p.xForm(QPoint(xp, yp - static_cast<int>(Doc->docParagraphStyles[b->itemText.at(a)->cab].LineSpa)));
if (yP < np.y())
{
b->CPos = a;
6244,40 → 6245,40
i = a - 1;
else
i = a;
Doc->CurrFont = b->Ptext.at(i)->cfont;
Doc->CurrFontSize = b->Ptext.at(i)->csize;
Doc->CurrTextFill = b->Ptext.at(i)->ccolor;
Doc->CurrTextFillSh = b->Ptext.at(i)->cshade;
Doc->CurrTextStroke = b->Ptext.at(i)->cstroke;
Doc->CurrTextStrokeSh = b->Ptext.at(i)->cshade2;
Doc->CurrTextScale = b->Ptext.at(i)->cscale;
emit ItemTextSca(b->Ptext.at(i)->cscale);
emit ItemTextFarben(b->Ptext.at(i)->cstroke, b->Ptext.at(i)->ccolor, b->Ptext.at(i)->cshade2, b->Ptext.at(i)->cshade);
emit ItemTextFont(b->Ptext.at(i)->cfont);
emit ItemTextSize(b->Ptext.at(i)->csize);
emit ItemTextUSval(b->Ptext.at(i)->cextra);
emit ItemTextStil(b->Ptext.at(i)->cstyle);
emit ItemTextAbs(b->Ptext.at(i)->cab);
Doc->CurrFont = b->itemText.at(i)->cfont;
Doc->CurrFontSize = b->itemText.at(i)->csize;
Doc->CurrTextFill = b->itemText.at(i)->ccolor;
Doc->CurrTextFillSh = b->itemText.at(i)->cshade;
Doc->CurrTextStroke = b->itemText.at(i)->cstroke;
Doc->CurrTextStrokeSh = b->itemText.at(i)->cshade2;
Doc->CurrTextScale = b->itemText.at(i)->cscale;
emit ItemTextSca(b->itemText.at(i)->cscale);
emit ItemTextFarben(b->itemText.at(i)->cstroke, b->itemText.at(i)->ccolor, b->itemText.at(i)->cshade2, b->itemText.at(i)->cshade);
emit ItemTextFont(b->itemText.at(i)->cfont);
emit ItemTextSize(b->itemText.at(i)->csize);
emit ItemTextUSval(b->itemText.at(i)->cextra);
emit ItemTextStil(b->itemText.at(i)->cstyle);
emit ItemTextAbs(b->itemText.at(i)->cab);
return true;
}
}
b->CPos = b->Ptext.count();
if (b->Ptext.count() != 0)
b->CPos = b->itemText.count();
if (b->itemText.count() != 0)
{
Doc->CurrFont = b->Ptext.at(b->CPos-1)->cfont;
Doc->CurrFontSize = b->Ptext.at(b->CPos-1)->csize;
Doc->CurrTextFill = b->Ptext.at(b->CPos-1)->ccolor;
Doc->CurrTextFillSh = b->Ptext.at(b->CPos-1)->cshade;
Doc->CurrTextStroke = b->Ptext.at(b->CPos-1)->cstroke;
Doc->CurrTextStrokeSh = b->Ptext.at(b->CPos-1)->cshade2;
Doc->CurrTextScale = b->Ptext.at(b->CPos-1)->cscale;
emit ItemTextSca(b->Ptext.at(b->CPos-1)->cscale);
emit ItemTextFarben(b->Ptext.at(b->CPos-1)->cstroke, b->Ptext.at(b->CPos-1)->ccolor, b->Ptext.at(b->CPos-1)->cshade2, b->Ptext.at(b->CPos-1)->cshade);
emit ItemTextFont(b->Ptext.at(b->CPos-1)->cfont);
emit ItemTextSize(b->Ptext.at(b->CPos-1)->csize);
emit ItemTextUSval(b->Ptext.at(b->CPos-1)->cextra);
emit ItemTextStil(b->Ptext.at(b->CPos-1)->cstyle);
emit ItemTextAbs(b->Ptext.at(b->CPos-1)->cab);
Doc->CurrFont = b->itemText.at(b->CPos-1)->cfont;
Doc->CurrFontSize = b->itemText.at(b->CPos-1)->csize;
Doc->CurrTextFill = b->itemText.at(b->CPos-1)->ccolor;
Doc->CurrTextFillSh = b->itemText.at(b->CPos-1)->cshade;
Doc->CurrTextStroke = b->itemText.at(b->CPos-1)->cstroke;
Doc->CurrTextStrokeSh = b->itemText.at(b->CPos-1)->cshade2;
Doc->CurrTextScale = b->itemText.at(b->CPos-1)->cscale;
emit ItemTextSca(b->itemText.at(b->CPos-1)->cscale);
emit ItemTextFarben(b->itemText.at(b->CPos-1)->cstroke, b->itemText.at(b->CPos-1)->ccolor, b->itemText.at(b->CPos-1)->cshade2, b->itemText.at(b->CPos-1)->cshade);
emit ItemTextFont(b->itemText.at(b->CPos-1)->cfont);
emit ItemTextSize(b->itemText.at(b->CPos-1)->csize);
emit ItemTextUSval(b->itemText.at(b->CPos-1)->cextra);
emit ItemTextStil(b->itemText.at(b->CPos-1)->cstyle);
emit ItemTextAbs(b->itemText.at(b->CPos-1)->cab);
p.end();
return true;
}
6296,7 → 6297,7
emit ItemTextSize(b->ISize);
emit ItemTextUSval(b->ExtraV);
emit ItemTextStil(b->TxTStyle);
emit ItemTextAbs(b->Ausrich);
emit ItemTextAbs(b->textAlignment);
p.end();
return true;
}
6312,7 → 6313,7
PageItem *b;
if (GetItem(&b))
{
if (b->PType != 4) // || (b->Ptext.count() == 0)) { return; }
if (b->PType != 4) // || (b->itemText.count() == 0)) { return; }
return;
QPainter p;
QString chx;
6323,71 → 6324,71
TransformM(b, &p);
if (b->CPos > 0)
{
offs = QMIN(b->CPos-1, static_cast<int>(b->Ptext.count()-1));
if (b->CPos < static_cast<int>(b->Ptext.count()-1))
offs = QMIN(b->CPos-1, static_cast<int>(b->itemText.count()-1));
if (b->CPos < static_cast<int>(b->itemText.count()-1))
{
if (b->Ptext.at(offs+1)->cstyle & 256)
if (b->itemText.at(offs+1)->cstyle & 256)
{
if (b->CPos < static_cast<int>(b->Ptext.count()-1))
if (b->CPos < static_cast<int>(b->itemText.count()-1))
b->CPos++;
return;
}
}
if (b->Ptext.at(offs)->yp == 0)
if (b->itemText.at(offs)->yp == 0)
return;
chx = b->Ptext.at(offs)->ch;
chx = b->itemText.at(offs)->ch;
if (chx == QChar(30))
chx = b->ExpandToken(offs);
if (chx == QChar(29))
chx = " ";
chs = b->Ptext.at(offs)->csize;
b->SetZeichAttr(b->Ptext.at(offs), &chs, &chx);
if (b->CPos != static_cast<int>(b->Ptext.count()))
chs = b->itemText.at(offs)->csize;
b->SetZeichAttr(b->itemText.at(offs), &chs, &chx);
if (b->CPos != static_cast<int>(b->itemText.count()))
{
if (b->Ptext.at(b->CPos)->ch == QChar(9))
if (b->itemText.at(b->CPos)->ch == QChar(9))
{
xp = static_cast<int>(b->Ptext.at(b->CPos-1)->xp);
chs = b->Ptext.at(b->CPos-1)->csize;
chx = b->Ptext.at(b->CPos-1)->ch;
xp += qRound(Cwidth(Doc, b->Ptext.at(b->CPos-1)->cfont, chx, chs)*(b->Ptext.at(b->CPos-1)->cscale / 100.0));
xp = static_cast<int>(b->itemText.at(b->CPos-1)->xp);
chs = b->itemText.at(b->CPos-1)->csize;
chx = b->itemText.at(b->CPos-1)->ch;
xp += qRound(Cwidth(Doc, b->itemText.at(b->CPos-1)->cfont, chx, chs)*(b->itemText.at(b->CPos-1)->cscale / 100.0));
}
else
xp = static_cast<int>(b->Ptext.at(offs+1)->xp);
xp = static_cast<int>(b->itemText.at(offs+1)->xp);
}
else
{
xp = static_cast<int>(b->Ptext.at(offs)->xp);
if (b->Ptext.at(offs)->ch != QChar(9))
xp = static_cast<int>(b->itemText.at(offs)->xp);
if (b->itemText.at(offs)->ch != QChar(9))
{
chs = b->Ptext.at(offs)->csize;
chx = b->Ptext.at(offs)->ch;
xp += qRound(Cwidth(Doc, b->Ptext.at(offs)->cfont, chx, chs)*(b->Ptext.at(offs)->cscale / 100.0));
chs = b->itemText.at(offs)->csize;
chx = b->itemText.at(offs)->ch;
xp += qRound(Cwidth(Doc, b->itemText.at(offs)->cfont, chx, chs)*(b->itemText.at(offs)->cscale / 100.0));
}
}
if (b->CPos != static_cast<int>(b->Ptext.count()))
if (b->CPos != static_cast<int>(b->itemText.count()))
{
if (b->Ptext.at(offs)->yp != b->Ptext.at(offs+1)->yp)
if (b->itemText.at(offs)->yp != b->itemText.at(offs+1)->yp)
{
offs++;
if (b->Ptext.at(offs)->ch == QChar(13))
if (b->itemText.at(offs)->ch == QChar(13))
{
offs--;
xp = static_cast<int>(b->Ptext.at(offs)->xp);
chs = b->Ptext.at(offs)->csize;
chx = b->Ptext.at(offs)->ch;
xp += qRound(Cwidth(Doc, b->Ptext.at(offs)->cfont, chx, chs)*(b->Ptext.at(offs)->cscale / 100.0));
xp = static_cast<int>(b->itemText.at(offs)->xp);
chs = b->itemText.at(offs)->csize;
chx = b->itemText.at(offs)->ch;
xp += qRound(Cwidth(Doc, b->itemText.at(offs)->cfont, chx, chs)*(b->itemText.at(offs)->cscale / 100.0));
}
else
xp = static_cast<int>(b->Ptext.at(offs)->xp);
xp = static_cast<int>(b->itemText.at(offs)->xp);
}
}
yp = static_cast<int>(b->Ptext.at(offs)->yp);
desc = static_cast<int>((*Doc->AllFonts)[b->Ptext.at(offs)->cfont]->numDescender * (-b->Ptext.at(offs)->csize / 10.0));
asce = static_cast<int>((*Doc->AllFonts)[b->Ptext.at(offs)->cfont]->numAscent * (b->Ptext.at(offs)->csize / 10.0));
yp = static_cast<int>(b->itemText.at(offs)->yp);
desc = static_cast<int>((*Doc->AllFonts)[b->itemText.at(offs)->cfont]->numDescender * (-b->itemText.at(offs)->csize / 10.0));
asce = static_cast<int>((*Doc->AllFonts)[b->itemText.at(offs)->cfont]->numAscent * (b->itemText.at(offs)->csize / 10.0));
}
else
{
if (b->Ptext.count() == 0)
if (b->itemText.count() == 0)
{
double lineCorr;
if (b->Pcolor2 != "None")
6401,7 → 6402,7
}
else
{
if (b->Ptext.at(b->CPos)->ch == QChar(9))
if (b->itemText.at(b->CPos)->ch == QChar(9))
{
double lineCorr;
if (b->Pcolor2 != "None")
6411,10 → 6412,10
xp = static_cast<int>(b->Extra + lineCorr);
}
else
xp = static_cast<int>(b->Ptext.at(b->CPos)->xp);
yp = static_cast<int>(b->Ptext.at(b->CPos)->yp);
desc = static_cast<int>((*Doc->AllFonts)[b->Ptext.at(b->CPos)->cfont]->numDescender * (-b->Ptext.at(b->CPos)->csize / 10.0));
asce = static_cast<int>((*Doc->AllFonts)[b->Ptext.at(b->CPos)->cfont]->numAscent * (b->Ptext.at(b->CPos)->csize / 10.0));
xp = static_cast<int>(b->itemText.at(b->CPos)->xp);
yp = static_cast<int>(b->itemText.at(b->CPos)->yp);
desc = static_cast<int>((*Doc->AllFonts)[b->itemText.at(b->CPos)->cfont]->numDescender * (-b->itemText.at(b->CPos)->csize / 10.0));
asce = static_cast<int>((*Doc->AllFonts)[b->itemText.at(b->CPos)->cfont]->numAscent * (b->itemText.at(b->CPos)->csize / 10.0));
}
}
yp1 = yp - asce;
6458,7 → 6459,7
tx2 = p->xForm(QPoint(0, static_cast<int>(b->Height)));
if (mpo.contains(tx) || mpo.contains(tx2))
{
if (Doc->AppMode == 9)
if (Doc->appMode == Rotation)
qApp->setOverrideCursor(QCursor(loadIcon("Rotieren2.xpm")), true);
else
{
6493,7 → 6494,7
tx2 = p->xForm(QPoint(0, 0));
if (mpo.contains(tx) || mpo.contains(tx2))
{
if (Doc->AppMode == 9)
if (Doc->appMode == Rotation)
qApp->setOverrideCursor(QCursor(loadIcon("Rotieren2.xpm")), true);
else
{
6514,12 → 6515,12
int retw = -1;
if (Doc->MasterP)
{
int x = static_cast<int>(Doc->ActPage->Xoffset);
int y = static_cast<int>(Doc->ActPage->Yoffset);
int w = static_cast<int>(Doc->ActPage->Width);
int h = static_cast<int>(Doc->ActPage->Height);
int x = static_cast<int>(Doc->currentPage->Xoffset);
int y = static_cast<int>(Doc->currentPage->Yoffset);
int w = static_cast<int>(Doc->currentPage->Width);
int h = static_cast<int>(Doc->currentPage->Height);
if (QRect(x, y, w, h).contains(QPoint(qRound(x2), qRound(y2))))
retw = Doc->ActPage->PageNr;
retw = Doc->currentPage->PageNr;
}
else
{
6544,16 → 6545,16
int retw = -1;
if (Doc->MasterP)
{
int x = static_cast<int>(Doc->ActPage->Xoffset);
int y = static_cast<int>(Doc->ActPage->Yoffset);
int w = static_cast<int>(Doc->ActPage->Width);
int h = static_cast<int>(Doc->ActPage->Height);
int x = static_cast<int>(Doc->currentPage->Xoffset);
int y = static_cast<int>(Doc->currentPage->Yoffset);
int w = static_cast<int>(Doc->currentPage->Width);
int h = static_cast<int>(Doc->currentPage->Height);
int x2 = static_cast<int>(b->Xpos);
int y2 = static_cast<int>(b->Ypos);
int w2 = static_cast<int>(b->Width);
int h2 = static_cast<int>(b->Height);
if (QRect(x, y, w, h).intersects(QRect(x2, y2, w2, h2)))
retw = Doc->ActPage->PageNr;
retw = Doc->currentPage->PageNr;
}
else
{
6697,9 → 6698,9
int h = static_cast<int>(Doc->Pages.at(a)->Height * Scale);
if (QRect(x, y, w, h).intersects(mpo))
{
if (Doc->ActPage->PageNr != a)
if (Doc->currentPage->PageNr != a)
{
Doc->ActPage = Doc->Pages.at(a);
Doc->currentPage = Doc->Pages.at(a);
setMenTxt(a);
DrawNew();
}
6734,9 → 6735,9
int h = static_cast<int>(Doc->Pages.at(a)->Height * Scale);
if (QRect(x, y, w, h).intersects(mpo))
{
if (Doc->ActPage->PageNr != a)
if (Doc->currentPage->PageNr != a)
{
Doc->ActPage = Doc->Pages.at(a);
Doc->currentPage = Doc->Pages.at(a);
setMenTxt(a);
DrawNew();
}
6747,11 → 6748,11
if (m->state() == (ControlButton | AltButton))
Deselect(false);
if ((m->state() == (ShiftButton | AltButton)) && (!Doc->MasterP) && (Doc->ActPage->FromMaster.count() != 0))
if ((m->state() == (ShiftButton | AltButton)) && (!Doc->MasterP) && (Doc->currentPage->FromMaster.count() != 0))
{
Page* Mp = Doc->MasterPages.at(Doc->MasterNames[Doc->ActPage->MPageNam]);
b = Doc->ActPage->FromMaster.last();
for (a = 0; a < Doc->ActPage->FromMaster.count(); ++a)
Page* Mp = Doc->MasterPages.at(Doc->MasterNames[Doc->currentPage->MPageNam]);
b = Doc->currentPage->FromMaster.last();
for (a = 0; a < Doc->currentPage->FromMaster.count(); ++a)
{
if (b->LayerNr == Doc->ActiveLayer)
{
6760,8 → 6761,8
double OldY = b->Ypos;
if (!b->ChangedMasterItem)
{
b->Xpos = OldX - Mp->Xoffset + Doc->ActPage->Xoffset;
b->Ypos = OldY - Mp->Yoffset + Doc->ActPage->Yoffset;
b->Xpos = OldX - Mp->Xoffset + Doc->currentPage->Xoffset;
b->Ypos = OldY - Mp->Yoffset + Doc->currentPage->Yoffset;
}
Transform(b, &p);
if ((QRegion(p.xForm(QPointArray(QRect(0, 0, static_cast<int>(b->Width), static_cast<int>(b->Height))))).contains(mpo)) ||
6769,7 → 6770,7
{
if (!b->Select)
{
if ((m->state() != ShiftButton) || (Doc->AppMode == 10) || (Doc->AppMode == 11))
if ((m->state() != ShiftButton) || (Doc->appMode == LinkFrames) || (Doc->appMode == UnlinkFrames))
Deselect(false);
if (b->Groups.count() != 0)
{
6866,7 → 6867,7
b->Ypos = OldY;
}
}
b = Doc->ActPage->FromMaster.prev();
b = Doc->currentPage->FromMaster.prev();
}
}
if ((m->state() == (ControlButton | ShiftButton)) && (SelItem.count() != 0))
6894,7 → 6895,7
SelItem.clear();
return false;
}
if ((Doc->MasterP) && (!((b->OwnPage == -1) || (b->OwnPage == static_cast<int>(Doc->ActPage->PageNr)))))
if ((Doc->MasterP) && (!((b->OwnPage == -1) || (b->OwnPage == static_cast<int>(Doc->currentPage->PageNr)))))
continue;
if (b->LayerNr == Doc->ActiveLayer)
{
6905,7 → 6906,7
{
if (!b->Select)
{
if ((m->state() != ShiftButton) || (Doc->AppMode == 10) || (Doc->AppMode == 11))
if ((m->state() != ShiftButton) || (Doc->appMode == LinkFrames) || (Doc->appMode == UnlinkFrames))
Deselect(false);
if (b->Groups.count() != 0)
{
7006,16 → 7007,16
}
b = Doc->Items.prev();
}
if ((Doc->guidesSettings.guidesShown) && (Doc->AppMode == 1) && (!Doc->GuideLock) && (OnPage(Mxp, Myp) != -1))
if ((Doc->guidesSettings.guidesShown) && (Doc->appMode == NormalMode) && (!Doc->GuideLock) && (OnPage(Mxp, Myp) != -1))
{
GxM = -1;
GyM = -1;
if (Doc->ActPage->YGuides.count() != 0)
if (Doc->currentPage->YGuides.count() != 0)
{
for (uint yg = 0; yg < Doc->ActPage->YGuides.count(); ++yg)
for (uint yg = 0; yg < Doc->currentPage->YGuides.count(); ++yg)
{
if ((Doc->ActPage->YGuides[yg]+Doc->ActPage->Yoffset < (Myp+Doc->guidesSettings.grabRad)) &&
(Doc->ActPage->YGuides[yg]+Doc->ActPage->Yoffset > (Myp-Doc->guidesSettings.grabRad)))
if ((Doc->currentPage->YGuides[yg]+Doc->currentPage->Yoffset < (Myp+Doc->guidesSettings.grabRad)) &&
(Doc->currentPage->YGuides[yg]+Doc->currentPage->Yoffset > (Myp-Doc->guidesSettings.grabRad)))
{
GyM = yg;
QPoint py = viewport()->mapFromGlobal(m->globalPos());
7024,12 → 7025,12
}
}
}
if (Doc->ActPage->XGuides.count() != 0)
if (Doc->currentPage->XGuides.count() != 0)
{
for (uint xg = 0; xg < Doc->ActPage->XGuides.count(); ++xg)
for (uint xg = 0; xg < Doc->currentPage->XGuides.count(); ++xg)
{
if ((Doc->ActPage->XGuides[xg]+Doc->ActPage->Xoffset < (Mxp+Doc->guidesSettings.grabRad)) &&
(Doc->ActPage->XGuides[xg]+Doc->ActPage->Xoffset > (Mxp-Doc->guidesSettings.grabRad)))
if ((Doc->currentPage->XGuides[xg]+Doc->currentPage->Xoffset < (Mxp+Doc->guidesSettings.grabRad)) &&
(Doc->currentPage->XGuides[xg]+Doc->currentPage->Xoffset > (Mxp-Doc->guidesSettings.grabRad)))
{
GxM = xg;
QPoint py = viewport()->mapFromGlobal(m->globalPos());
7120,7 → 7121,7
Doc->UnData.Height = b->Height;
Doc->UnData.Rot = b->Rot;
Doc->UnData.Item = b;
Doc->UnData.PageNr = Doc->ActPage->PageNr;
Doc->UnData.PageNr = Doc->currentPage->PageNr;
Doc->UnData.ItemNr = b->ItemNr;
}
 
7237,7 → 7238,7
SelItem.append(b);
b->paintObj();
Imoved = true;
Doc->AppMode = 1;
Doc->appMode = NormalMode;
emit DocChanged();
b->Sizing = b->PType == 5 ? false : true;
EmitValues(b);
7258,9 → 7259,9
emit ItemTextUSval(b->ExtraV);
emit SetDistValues(b->Extra, b->TExtra, b->BExtra, b->RExtra);
emit ItemTextCols(b->Cols, b->ColGap);
if (Doc->AppMode != 7)
if (Doc->appMode != EditMode)
{
emit ItemTextAbs(b->Ausrich);
emit ItemTextAbs(b->textAlignment);
emit ItemTextFont(b->IFont);
emit ItemTextSize(b->ISize);
}
7543,7 → 7544,7
if (SelItem.count() != 0)
{
PageItem *b = SelItem.at(0);
if (b->Ptext.count() != 0)
if (b->itemText.count() != 0)
{
int t = QMessageBox::warning(this, tr("Warning"),
tr("Do you really want to clear all your Text?"),
7557,15 → 7558,15
Serializer *ss = new Serializer(pfad2);
if (ss->Read(""))
{
int st = Doc->CurrentABStil;
int st = Doc->currentParaStyle;
if (st > 5)
ss->GetText(b, st, Doc->Vorlagen[st].Font, Doc->Vorlagen[st].FontSize, true);
ss->GetText(b, st, Doc->docParagraphStyles[st].Font, Doc->docParagraphStyles[st].FontSize, true);
else
ss->GetText(b, st, b->IFont, b->ISize, true);
}
delete ss;
if (Doc->Trenner->AutoCheck)
Doc->Trenner->slotHyphenate(b);
if (Doc->docHyphenator->AutoCheck)
Doc->docHyphenator->slotHyphenate(b);
updateContents();
emit DocChanged();
}
7754,7 → 7755,7
RefreshItem(b);
emit HaveSel(b->PType);
if (!Doc->loading)
emit UpdtObj(Doc->ActPage->PageNr, b->ItemNr);
emit UpdtObj(Doc->currentPage->PageNr, b->ItemNr);
EmitValues(b);
emit DocChanged();
}
7772,7 → 7773,7
RefreshItem(b);
emit HaveSel(b->PType);
if (!Doc->loading)
emit UpdtObj(Doc->ActPage->PageNr, b->ItemNr);
emit UpdtObj(Doc->currentPage->PageNr, b->ItemNr);
EmitValues(b);
emit DocChanged();
}
7786,7 → 7787,7
RefreshItem(b);
emit HaveSel(b->PType);
if (!Doc->loading)
emit UpdtObj(Doc->ActPage->PageNr, b->ItemNr);
emit UpdtObj(Doc->currentPage->PageNr, b->ItemNr);
EmitValues(b);
emit DocChanged();
}
7802,7 → 7803,7
RefreshItem(b);
emit HaveSel(b->PType);
if (!Doc->loading)
emit UpdtObj(Doc->ActPage->PageNr, b->ItemNr);
emit UpdtObj(Doc->currentPage->PageNr, b->ItemNr);
EmitValues(b);
emit DocChanged();
}
7823,7 → 7824,7
RefreshItem(b);
emit HaveSel(b->PType);
if (!Doc->loading)
emit UpdtObj(Doc->ActPage->PageNr, b->ItemNr);
emit UpdtObj(Doc->currentPage->PageNr, b->ItemNr);
EmitValues(b);
emit DocChanged();
}
7838,7 → 7839,7
{
if (b->PType == 4)
{
if ((b->Ptext.count() != 0) && ((b->NextBox == 0) || (b->BackBox == 0)))
if ((b->itemText.count() != 0) && ((b->NextBox == 0) || (b->BackBox == 0)))
{
int t = QMessageBox::warning(this, tr("Warning"),
tr("Do you really want to clear all your Text?"),
7856,7 → 7857,7
}
while (nb != 0)
{
nb->Ptext.clear();
nb->itemText.clear();
nb->CPos = 0;
nb = nb->NextBox;
}
7866,7 → 7867,7
b->pixm = QImage();
b->pixmOrg = QImage();
if (b->PType == 2)
emit UpdtObj(Doc->ActPage->PageNr, b->ItemNr);
emit UpdtObj(Doc->currentPage->PageNr, b->ItemNr);
updateContents();
emit DocChanged();
}
7884,7 → 7885,7
if ((Doc->UnData.UnCode == 0) && (Doc->UnDoValid))
delete Doc->UnData.Item;
Doc->UnData.UnCode = 0;
Doc->UnData.PageNr = Doc->ActPage->PageNr;
Doc->UnData.PageNr = Doc->currentPage->PageNr;
if (anz == 1)
Doc->UnDoValid = true;
else
7914,9 → 7915,9
if (b->BackBox == 0)
{
b->NextBox->BackBox = b->BackBox;
c = b->Ptext.count();
c = b->itemText.count();
for (a = 0; a < c; ++a)
b->NextBox->Ptext.prepend(b->Ptext.take(b->Ptext.count()-1));
b->NextBox->itemText.prepend(b->itemText.take(b->itemText.count()-1));
if ((b->isAutoText) && (b->NextBox == 0))
Doc->LastAuto = 0;
}
7932,9 → 7933,9
if (b->isAutoText)
Doc->LastAuto = b->BackBox;
}
c = b->Ptext.count();
c = b->itemText.count();
for (a = 0; a < c; ++a)
b->BackBox->Ptext.append(b->Ptext.take(0));
b->BackBox->itemText.append(b->itemText.take(0));
}
}
}
8077,7 → 8078,7
fe->Margins.Bottom = Doc->PageM.Bottom;
fe->PageNr = nr;
Doc->Pages.insert(nr, fe);
Doc->ActPage = fe;
Doc->currentPage = fe;
Doc->PageC++;
PGS->setMaxValue(Doc->PageC);
reformPages();
8154,7 → 8155,7
delete Seite;
Doc->UnDoValid = false;
Doc->PageC -= 1;
Doc->ActPage = Doc->Pages.at(0);
Doc->currentPage = Doc->Pages.at(0);
if (Doc->TemplateMode)
Doc->MasterPages = Doc->Pages;
else
8341,9 → 8342,9
else
resizeContents(qRound((Doc->PageB+Doc->ScratchLeft+Doc->ScratchRight) * Scale), qRound(Doc->PageC * (Doc->PageH+Doc->ScratchBottom+Doc->ScratchTop) * Scale));
if (!ScApp->ScriptRunning)
setContentsPos(qRound((Doc->ActPage->Xoffset-10) * Scale), qRound((Doc->ActPage->Yoffset-10) * Scale));
setContentsPos(qRound((Doc->currentPage->Xoffset-10) * Scale), qRound((Doc->currentPage->Yoffset-10) * Scale));
setRulerPos(contentsX(), contentsY());
setMenTxt(Doc->ActPage->PageNr);
setMenTxt(Doc->currentPage->PageNr);
}
 
void ScribusView::setMenTxt(int Seite)
8478,7 → 8479,7
HR->repX = false;
HR->repaint();
VR->repaint();
setMenTxt(Doc->ActPage->PageNr);
setMenTxt(Doc->currentPage->PageNr);
disconnect(LE, SIGNAL(valueChanged(int)), this, SLOT(Zval()));
LE->setValue(Scale/Prefs->DisScale*100);
connect(LE, SIGNAL(valueChanged(int)), this, SLOT(Zval()));
8556,10 → 8557,10
 
void ScribusView::GotoPage(int Seite)
{
Doc->ActPage = Doc->Pages.at(Seite);
Doc->currentPage = Doc->Pages.at(Seite);
if (ScApp->ScriptRunning)
return;
SetCPo(qRound(Doc->ActPage->Xoffset-10), qRound(Doc->ActPage->Yoffset-10));
SetCPo(qRound(Doc->currentPage->Xoffset-10), qRound(Doc->currentPage->Yoffset-10));
PGS->setMaxValue(Doc->PageC);
if ((!Doc->loading) && (!Doc->MasterP))
PGS->GotoPg(Seite);
8577,12 → 8578,12
}
Doc->PageC = 1;
Doc->MasterP = true;
Doc->ActPage = Doc->Pages.at(nr);
Doc->currentPage = Doc->Pages.at(nr);
PGS->setEnabled(false);
updateOn = false;
slotDoZoom();
oldX = qRound(Doc->ActPage->Xoffset - 10);
oldY = qRound(Doc->ActPage->Yoffset - 10);
oldX = qRound(Doc->currentPage->Xoffset - 10);
oldY = qRound(Doc->currentPage->Yoffset - 10);
SetCPo(oldX, oldY);
updateOn = true;
DrawNew();
8597,14 → 8598,14
Doc->PageC = Doc->DocPages.count();
Doc->Pages = Doc->DocPages;
Doc->MasterP = false;
Doc->ActPage = Doc->Pages.at(0);
Doc->currentPage = Doc->Pages.at(0);
PGS->setEnabled(true);
Scale = OldScale;
updateOn = false;
GotoPage(0);
slotDoZoom();
oldX = qRound(Doc->ActPage->Xoffset - 10);
oldY = qRound(Doc->ActPage->Yoffset - 10);
oldX = qRound(Doc->currentPage->Xoffset - 10);
oldY = qRound(Doc->currentPage->Yoffset - 10);
SetCPo(oldX, oldY);
updateOn = true;
DrawNew();
8662,8 → 8663,8
bool frs = Doc->guidesSettings.framesShown;
bool mas = Doc->MasterP;
Doc->MasterP = true;
Page* act = Doc->ActPage;
Doc->ActPage = Doc->MasterPages.at(Nr);
Page* act = Doc->currentPage;
Doc->currentPage = Doc->MasterPages.at(Nr);
if (!mas)
{
Doc->DocItems = Doc->Items;
8681,7 → 8682,7
DrawPageItems(painter, QRect(clipx, clipy, clipw, cliph));
Doc->guidesSettings.framesShown = frs;
Scale = sca;
Doc->ActPage = act;
Doc->currentPage = act;
if (!mas)
{
Doc->MasterItems = Doc->Items;
8716,8 → 8717,8
bool frs = Doc->guidesSettings.framesShown;
Doc->guidesSettings.framesShown = false;
Scale = 1;
Page* act = Doc->ActPage;
Doc->ActPage = Doc->Pages.at(Nr);
Page* act = Doc->currentPage;
Doc->currentPage = Doc->Pages.at(Nr);
pm = QPixmap(clipw, cliph);
ScPainter *painter = new ScPainter(&pm, pm.width(), pm.height());
painter->clear(Doc->papColor);
8732,7 → 8733,7
painter->end();
Doc->guidesSettings.framesShown = frs;
Scale = sca;
Doc->ActPage = act;
Doc->currentPage = act;
QImage im2;
QImage im = pm.convertToImage();
double sx = im.width() / static_cast<double>(maxGr);
8754,7 → 8755,7
{
QPoint py = viewport()->mapFromGlobal(m->globalPos());
int newY = py.y();
emit MousePos(m->x()/Scale-Doc->ActPage->Xoffset, m->y()/Scale-Doc->ActPage->Yoffset);
emit MousePos(m->x()/Scale-Doc->currentPage->Xoffset, m->y()/Scale-Doc->currentPage->Yoffset);
HR->Draw(m->x());
VR->Draw(m->y());
QPainter p;
8774,7 → 8775,7
{
QPoint py = viewport()->mapFromGlobal(m->globalPos());
int newY = py.x();
emit MousePos(m->x()/Scale-Doc->ActPage->Xoffset, m->y()/Scale-Doc->ActPage->Yoffset);
emit MousePos(m->x()/Scale-Doc->currentPage->Xoffset, m->y()/Scale-Doc->currentPage->Yoffset);
HR->Draw(m->x());
VR->Draw(m->y());
QPainter p;
9209,7 → 9210,7
SelItem.at(a)->LineSp = w;
RefreshItem(SelItem.at(a));
}
Doc->Vorlagen[0].LineSpa = w;
Doc->docParagraphStyles[0].LineSpa = w;
}
}
 
9259,13 → 9260,13
for (aa = 0; aa < SelItem.count(); ++aa)
{
PageItem *b = SelItem.at(aa);
if (Doc->AppMode == 1)
if (Doc->appMode == NormalMode)
{
b->IFont = fon;
if (b->Ptext.count() != 0)
if (b->itemText.count() != 0)
{
for (a = 0; a < b->Ptext.count(); ++a)
b->Ptext.at(a)->cfont = fon;
for (a = 0; a < b->itemText.count(); ++a)
b->itemText.at(a)->cfont = fon;
if (b->PType == 8)
{
UpdatePolyClip(b);
9272,18 → 9273,18
AdjustItemSize(b);
}
if (!Doc->loading)
emit UpdtObj(Doc->ActPage->PageNr, b->ItemNr);
emit UpdtObj(Doc->currentPage->PageNr, b->ItemNr);
RefreshItem(b);
}
}
if ((b->HasSel) && (Doc->AppMode == 7))
if ((b->HasSel) && (Doc->appMode == EditMode))
{
if (b->Ptext.count() != 0)
if (b->itemText.count() != 0)
{
for (a = 0; a < b->Ptext.count(); ++a)
for (a = 0; a < b->itemText.count(); ++a)
{
if (b->Ptext.at(a)->cselect)
b->Ptext.at(a)->cfont = fon;
if (b->itemText.at(a)->cselect)
b->itemText.at(a)->cfont = fon;
}
RefreshItem(b);
}
9325,17 → 9326,17
b = SelItem.at(a);
if ((b->PType == 4) || (b->PType == 8))
{
if (Doc->AppMode != 7)
if (Doc->appMode != EditMode)
b->TxtFill = farbe;
for (i=0; i<b->Ptext.count(); ++i)
for (i=0; i<b->itemText.count(); ++i)
{
if (Doc->AppMode == 7)
if (Doc->appMode == EditMode)
{
if (b->Ptext.at(i)->cselect)
b->Ptext.at(i)->ccolor = farbe;
if (b->itemText.at(i)->cselect)
b->itemText.at(i)->ccolor = farbe;
}
else
b->Ptext.at(i)->ccolor = farbe;
b->itemText.at(i)->ccolor = farbe;
}
}
RefreshItem(b);
9355,17 → 9356,17
b = SelItem.at(a);
if (b->PType == 4)
{
if (Doc->AppMode != 7)
if (Doc->appMode != EditMode)
b->ShTxtFill = sha;
for (i=0; i<b->Ptext.count(); ++i)
for (i=0; i<b->itemText.count(); ++i)
{
if (Doc->AppMode == 7)
if (Doc->appMode == EditMode)
{
if (b->Ptext.at(i)->cselect)
b->Ptext.at(i)->cshade = sha;
if (b->itemText.at(i)->cselect)
b->itemText.at(i)->cshade = sha;
}
else
b->Ptext.at(i)->cshade = sha;
b->itemText.at(i)->cshade = sha;
}
}
RefreshItem(b);
9387,17 → 9388,17
b = SelItem.at(a);
if ((b->PType == 4) || (b->PType == 8))
{
if (Doc->AppMode != 7)
if (Doc->appMode != EditMode)
b->TxtStroke = farbe;
for (i=0; i<b->Ptext.count(); ++i)
for (i=0; i<b->itemText.count(); ++i)
{
if (Doc->AppMode == 7)
if (Doc->appMode == EditMode)
{
if (b->Ptext.at(i)->cselect)
b->Ptext.at(i)->cstroke = farbe;
if (b->itemText.at(i)->cselect)
b->itemText.at(i)->cstroke = farbe;
}
else
b->Ptext.at(i)->cstroke = farbe;
b->itemText.at(i)->cstroke = farbe;
}
}
RefreshItem(b);
9416,17 → 9417,17
b = SelItem.at(a);
if (b->PType == 4)
{
if (Doc->AppMode != 7)
if (Doc->appMode != EditMode)
b->ShTxtStroke = sha;
for (i=0; i<b->Ptext.count(); ++i)
for (i=0; i<b->itemText.count(); ++i)
{
if (Doc->AppMode == 7)
if (Doc->appMode == EditMode)
{
if (b->Ptext.at(i)->cselect)
b->Ptext.at(i)->cshade2 = sha;
if (b->itemText.at(i)->cselect)
b->itemText.at(i)->cshade2 = sha;
}
else
b->Ptext.at(i)->cshade2 = sha;
b->itemText.at(i)->cshade2 = sha;
}
}
RefreshItem(b);
9445,17 → 9446,17
b = SelItem.at(a);
if (b->PType == 4)
{
if (Doc->AppMode != 7)
if (Doc->appMode != EditMode)
b->TxtScale = sha;
for (i=0; i<b->Ptext.count(); ++i)
for (i=0; i<b->itemText.count(); ++i)
{
if (Doc->AppMode == 7)
if (Doc->appMode == EditMode)
{
if (b->Ptext.at(i)->cselect)
b->Ptext.at(i)->cscale = sha;
if (b->itemText.at(i)->cselect)
b->itemText.at(i)->cscale = sha;
}
else
b->Ptext.at(i)->cscale = sha;
b->itemText.at(i)->cscale = sha;
}
}
RefreshItem(b);
9533,30 → 9534,30
for (uint aa = 0; aa < SelItem.count(); ++aa)
{
PageItem *b = SelItem.at(aa);
if (Doc->AppMode != 7)
if (Doc->appMode != EditMode)
{
b->TxTStyle &= ~127;
b->TxTStyle |= s;
}
if (b->Ptext.count() != 0)
if (b->itemText.count() != 0)
{
if (Doc->AppMode == 7)
if (Doc->appMode == EditMode)
{
for (uint a = 0; a < b->Ptext.count(); ++a)
for (uint a = 0; a < b->itemText.count(); ++a)
{
if (b->Ptext.at(a)->cselect)
if (b->itemText.at(a)->cselect)
{
b->Ptext.at(a)->cstyle &= ~127;
b->Ptext.at(a)->cstyle |= s;
b->itemText.at(a)->cstyle &= ~127;
b->itemText.at(a)->cstyle |= s;
}
}
}
else
{
for (uint a = 0; a < b->Ptext.count(); ++a)
for (uint a = 0; a < b->itemText.count(); ++a)
{
b->Ptext.at(a)->cstyle &= ~127;
b->Ptext.at(a)->cstyle |= s;
b->itemText.at(a)->cstyle &= ~127;
b->itemText.at(a)->cstyle |= s;
}
}
RefreshItem(b);
9577,15 → 9578,15
int a, ax;
PageItem *nb;
bool cr = true;
if (Doc->AppMode == 7)
if (Doc->appMode == EditMode)
{
nb = b;
a = b->CPos;
if (a == static_cast<int>(nb->Ptext.count()))
if (a == static_cast<int>(nb->itemText.count()))
a -= 1;
while ((cr) && (nb != 0))
{
if (nb->Ptext.count() == 0)
if (nb->itemText.count() == 0)
{
nb = nb->BackBox;
if (nb == 0)
9593,12 → 9594,12
cr = false;
break;
}
a = static_cast<int>(nb->Ptext.count()-1);
a = static_cast<int>(nb->itemText.count()-1);
}
ax = a;
for (int xx=0; xx<ax+1; ++xx)
{
if (nb->Ptext.at(a)->ch == QChar(13))
if (nb->itemText.at(a)->ch == QChar(13))
{
cr = false;
break;
9605,30 → 9606,30
}
if (s > 4)
{
if (Doc->Vorlagen[s].Font != "")
if (Doc->docParagraphStyles[s].Font != "")
{
nb->Ptext.at(a)->cfont = Doc->Vorlagen[s].Font;
nb->Ptext.at(a)->csize = Doc->Vorlagen[s].FontSize;
nb->Ptext.at(a)->cstyle &= ~127;
nb->Ptext.at(a)->cstyle |= Doc->Vorlagen[s].FontEffect;
nb->Ptext.at(a)->ccolor = Doc->Vorlagen[s].FColor;
nb->Ptext.at(a)->cshade = Doc->Vorlagen[s].FShade;
nb->Ptext.at(a)->cstroke = Doc->Vorlagen[s].SColor;
nb->Ptext.at(a)->cshade2 = Doc->Vorlagen[s].SShade;
nb->itemText.at(a)->cfont = Doc->docParagraphStyles[s].Font;
nb->itemText.at(a)->csize = Doc->docParagraphStyles[s].FontSize;
nb->itemText.at(a)->cstyle &= ~127;
nb->itemText.at(a)->cstyle |= Doc->docParagraphStyles[s].FontEffect;
nb->itemText.at(a)->ccolor = Doc->docParagraphStyles[s].FColor;
nb->itemText.at(a)->cshade = Doc->docParagraphStyles[s].FShade;
nb->itemText.at(a)->cstroke = Doc->docParagraphStyles[s].SColor;
nb->itemText.at(a)->cshade2 = Doc->docParagraphStyles[s].SShade;
}
}
if ((s < 5) && (nb->Ptext.at(a)->cab > 4))
if ((s < 5) && (nb->itemText.at(a)->cab > 4))
{
nb->Ptext.at(a)->ccolor = nb->TxtFill;
nb->Ptext.at(a)->cshade = nb->ShTxtFill;
nb->Ptext.at(a)->cstroke = nb->TxtStroke;
nb->Ptext.at(a)->cshade2 = nb->ShTxtStroke;
nb->Ptext.at(a)->csize = nb->ISize;
nb->Ptext.at(a)->cfont = nb->IFont;
nb->Ptext.at(a)->cstyle &= ~127;
nb->Ptext.at(a)->cstyle |= nb->TxTStyle;
nb->itemText.at(a)->ccolor = nb->TxtFill;
nb->itemText.at(a)->cshade = nb->ShTxtFill;
nb->itemText.at(a)->cstroke = nb->TxtStroke;
nb->itemText.at(a)->cshade2 = nb->ShTxtStroke;
nb->itemText.at(a)->csize = nb->ISize;
nb->itemText.at(a)->cfont = nb->IFont;
nb->itemText.at(a)->cstyle &= ~127;
nb->itemText.at(a)->cstyle |= nb->TxTStyle;
}
nb->Ptext.at(a)->cab = s;
nb->itemText.at(a)->cab = s;
a--;
}
if (cr)
9635,45 → 9636,45
{
nb = nb->BackBox;
if (nb != 0)
a = static_cast<int>(nb->Ptext.count()-1);
a = static_cast<int>(nb->itemText.count()-1);
}
}
a = b->CPos;
cr = true;
nb = b;
if (a == static_cast<int>(nb->Ptext.count()))
if (a == static_cast<int>(nb->itemText.count()))
cr = false;
while ((cr) && (nb != 0))
{
while (a < static_cast<int>(nb->Ptext.count()))
while (a < static_cast<int>(nb->itemText.count()))
{
if (s > 4)
{
if (Doc->Vorlagen[s].Font != "")
if (Doc->docParagraphStyles[s].Font != "")
{
nb->Ptext.at(a)->cfont = Doc->Vorlagen[s].Font;
nb->Ptext.at(a)->csize = Doc->Vorlagen[s].FontSize;
nb->Ptext.at(a)->cstyle &= ~127;
nb->Ptext.at(a)->cstyle |= Doc->Vorlagen[s].FontEffect;
nb->Ptext.at(a)->ccolor = Doc->Vorlagen[s].FColor;
nb->Ptext.at(a)->cshade = Doc->Vorlagen[s].FShade;
nb->Ptext.at(a)->cstroke = Doc->Vorlagen[s].SColor;
nb->Ptext.at(a)->cshade2 = Doc->Vorlagen[s].SShade;
nb->itemText.at(a)->cfont = Doc->docParagraphStyles[s].Font;
nb->itemText.at(a)->csize = Doc->docParagraphStyles[s].FontSize;
nb->itemText.at(a)->cstyle &= ~127;
nb->itemText.at(a)->cstyle |= Doc->docParagraphStyles[s].FontEffect;
nb->itemText.at(a)->ccolor = Doc->docParagraphStyles[s].FColor;
nb->itemText.at(a)->cshade = Doc->docParagraphStyles[s].FShade;
nb->itemText.at(a)->cstroke = Doc->docParagraphStyles[s].SColor;
nb->itemText.at(a)->cshade2 = Doc->docParagraphStyles[s].SShade;
}
}
if ((s < 5) && (nb->Ptext.at(a)->cab > 4))
if ((s < 5) && (nb->itemText.at(a)->cab > 4))
{
nb->Ptext.at(a)->ccolor = nb->TxtFill;
nb->Ptext.at(a)->cshade = nb->ShTxtFill;
nb->Ptext.at(a)->cstroke = nb->TxtStroke;
nb->Ptext.at(a)->cshade2 = nb->ShTxtStroke;
nb->Ptext.at(a)->csize = nb->ISize;
nb->Ptext.at(a)->cfont = nb->IFont;
nb->Ptext.at(a)->cstyle &= ~127;
nb->Ptext.at(a)->cstyle |= nb->TxTStyle;
nb->itemText.at(a)->ccolor = nb->TxtFill;
nb->itemText.at(a)->cshade = nb->ShTxtFill;
nb->itemText.at(a)->cstroke = nb->TxtStroke;
nb->itemText.at(a)->cshade2 = nb->ShTxtStroke;
nb->itemText.at(a)->csize = nb->ISize;
nb->itemText.at(a)->cfont = nb->IFont;
nb->itemText.at(a)->cstyle &= ~127;
nb->itemText.at(a)->cstyle |= nb->TxTStyle;
}
nb->Ptext.at(a)->cab = s;
if ((nb->Ptext.at(a)->ch == QChar(13)) && (!nb->Ptext.at(a)->cselect))
nb->itemText.at(a)->cab = s;
if ((nb->itemText.at(a)->ch == QChar(13)) && (!nb->itemText.at(a)->cselect))
{
cr = false;
break;
9689,37 → 9690,37
}
else
{
b->Ausrich = s;
if (b->Ptext.count() != 0)
b->textAlignment = s;
if (b->itemText.count() != 0)
{
for (a = 0; a < static_cast<int>(b->Ptext.count()); ++a)
for (a = 0; a < static_cast<int>(b->itemText.count()); ++a)
{
if (s > 4)
{
if (Doc->Vorlagen[s].Font != "")
if (Doc->docParagraphStyles[s].Font != "")
{
b->Ptext.at(a)->cfont = Doc->Vorlagen[s].Font;
b->Ptext.at(a)->csize = Doc->Vorlagen[s].FontSize;
b->Ptext.at(a)->cstyle &= ~127;
b->Ptext.at(a)->cstyle |= Doc->Vorlagen[s].FontEffect;
b->Ptext.at(a)->ccolor = Doc->Vorlagen[s].FColor;
b->Ptext.at(a)->cshade = Doc->Vorlagen[s].FShade;
b->Ptext.at(a)->cstroke = Doc->Vorlagen[s].SColor;
b->Ptext.at(a)->cshade2 = Doc->Vorlagen[s].SShade;
b->itemText.at(a)->cfont = Doc->docParagraphStyles[s].Font;
b->itemText.at(a)->csize = Doc->docParagraphStyles[s].FontSize;
b->itemText.at(a)->cstyle &= ~127;
b->itemText.at(a)->cstyle |= Doc->docParagraphStyles[s].FontEffect;
b->itemText.at(a)->ccolor = Doc->docParagraphStyles[s].FColor;
b->itemText.at(a)->cshade = Doc->docParagraphStyles[s].FShade;
b->itemText.at(a)->cstroke = Doc->docParagraphStyles[s].SColor;
b->itemText.at(a)->cshade2 = Doc->docParagraphStyles[s].SShade;
}
}
if ((s < 5) && (b->Ptext.at(a)->cab > 4))
if ((s < 5) && (b->itemText.at(a)->cab > 4))
{
b->Ptext.at(a)->ccolor = b->TxtFill;
b->Ptext.at(a)->cshade = b->ShTxtFill;
b->Ptext.at(a)->cstroke = b->TxtStroke;
b->Ptext.at(a)->cshade2 = b->ShTxtStroke;
b->Ptext.at(a)->cfont = b->IFont;
b->Ptext.at(a)->csize = b->ISize;
b->Ptext.at(a)->cstyle &= ~127;
b->Ptext.at(a)->cstyle |= b->TxTStyle;
b->itemText.at(a)->ccolor = b->TxtFill;
b->itemText.at(a)->cshade = b->ShTxtFill;
b->itemText.at(a)->cstroke = b->TxtStroke;
b->itemText.at(a)->cshade2 = b->ShTxtStroke;
b->itemText.at(a)->cfont = b->IFont;
b->itemText.at(a)->csize = b->ISize;
b->itemText.at(a)->cstyle &= ~127;
b->itemText.at(a)->cstyle |= b->TxTStyle;
}
b->Ptext.at(a)->cab = s;
b->itemText.at(a)->cab = s;
}
}
}
9736,14 → 9737,14
for (aa = 0; aa < SelItem.count(); ++aa)
{
PageItem *b = SelItem.at(aa);
if ((b->HasSel) && (Doc->AppMode == 7))
if ((b->HasSel) && (Doc->appMode == EditMode))
{
if (b->Ptext.count() != 0)
if (b->itemText.count() != 0)
{
for (a = 0; a < b->Ptext.count(); ++a)
for (a = 0; a < b->itemText.count(); ++a)
{
if (b->Ptext.at(a)->cselect)
b->Ptext.at(a)->cextra = us;
if (b->itemText.at(a)->cselect)
b->itemText.at(a)->cextra = us;
}
RefreshItem(b);
}
9750,13 → 9751,13
}
else
{
if (Doc->AppMode != 7)
if (Doc->appMode != EditMode)
b->ExtraV = us;
if (b->Ptext.count() != 0)
if (b->itemText.count() != 0)
{
for (a = 0; a < b->Ptext.count(); ++a)
for (a = 0; a < b->itemText.count(); ++a)
{
b->Ptext.at(a)->cextra = us;
b->itemText.at(a)->cextra = us;
}
RefreshItem(b);
}
9775,31 → 9776,31
{
PageItem *b = SelItem.at(0);
Doc->CurrFontSize = size;
if (Doc->AppMode != 7)
if (Doc->appMode != EditMode)
{
b->LineSp = ((size / 10.0) * static_cast<double>(Doc->typographicSetttings.autoLineSpacing) / 100) + (size / 10.0);
Doc->Vorlagen[0].LineSpa = b->LineSp;
Doc->docParagraphStyles[0].LineSpa = b->LineSp;
emit ItemTextAttr(b->LineSp);
b->ISize = size;
emit ItemTextSize(b->ISize);
emit ItemTextCols(b->Cols, b->ColGap);
}
if (b->Ptext.count() != 0)
if (b->itemText.count() != 0)
{
if (Doc->AppMode == 7)
if (Doc->appMode == EditMode)
{
for (a = 0; a < b->Ptext.count(); ++a)
for (a = 0; a < b->itemText.count(); ++a)
{
if (b->Ptext.at(a)->cselect)
b->Ptext.at(a)->csize = size;
if (b->itemText.at(a)->cselect)
b->itemText.at(a)->csize = size;
}
}
else
{
for (a = 0; a < b->Ptext.count(); ++a)
for (a = 0; a < b->itemText.count(); ++a)
{
if (b->Ptext.at(a)->cab < 5)
b->Ptext.at(a)->csize = size;
if (b->itemText.at(a)->cab < 5)
b->itemText.at(a)->csize = size;
}
}
if (b->PType == 8)
10198,7 → 10199,7
if (!Doc->loading)
{
emit RasterPic(Item->isRaster);
emit UpdtObj(Doc->ActPage->PageNr, ItNr);
emit UpdtObj(Doc->currentPage->PageNr, ItNr);
}
emit DocChanged();
}
10299,7 → 10300,7
emit SetLocalValues(b->LocalScX, b->LocalScY, b->LocalX, b->LocalY );
}
 
void ScribusView::PasteItem(struct CLBuf *Buffer, bool loading, bool drag)
void ScribusView::PasteItem(struct CopyPasteBuffer *Buffer, bool loading, bool drag)
{
QColor tmp;
if (!loading)
10310,7 → 10311,7
double h = Buffer->Height;
double pw = Buffer->Pwidth;
int z = 0;
struct Pti *hg;
struct ScText *hg;
switch (Buffer->PType)
{
case 1:
10364,9 → 10365,9
Doc->Items.at(z)->BBoxX = Buffer->BBoxX;
Doc->Items.at(z)->BBoxH = Buffer->BBoxH;
}
if (Buffer->Ptext != "")
if (Buffer->itemText != "")
{
QTextStream t(&Buffer->Ptext, IO_ReadOnly);
QTextStream t(&Buffer->itemText, IO_ReadOnly);
QString cc;
while (!t.atEnd())
{
10377,7 → 10378,7
QStringList::Iterator it;
wt = QStringList::split("\t", cc);
it = wt.begin();
hg = new Pti;
hg = new ScText;
hg->ch = (*it);
if (hg->ch == QChar(5))
hg->ch = QChar(13);
10412,7 → 10413,7
hg->PRot = 0;
hg->PtransX = 0;
hg->PtransY = 0;
Doc->Items.at(z)->Ptext.append(hg);
Doc->Items.at(z)->itemText.append(hg);
}
}
Doc->Items.at(z)->LineSp = Buffer->LineSp;
10535,7 → 10536,7
b->BaseOffs = Buffer->BaseOffs;
b->Textflow = Buffer->Textflow;
b->Textflow2 = Buffer->Textflow2;
b->Ausrich = Buffer->Ausrich;
b->textAlignment = Buffer->textAlignment;
b->IFont = Buffer->IFont;
b->ISize = Buffer->ISize;
b->ExtraV = Buffer->ExtraV;
10916,7 → 10917,7
b->PLineEnd = bb->PLineEnd;
b->PLineJoin = bb->PLineJoin;
if (!Doc->loading)
emit UpdtObj(Doc->ActPage->PageNr, b->ItemNr);
emit UpdtObj(Doc->currentPage->PageNr, b->ItemNr);
UpdatePolyClip(b);
AdjustItemSize(b);
double dx = bb->Xpos - b->Xpos;
10968,7 → 10969,7
{
b = SelItem.at(0);
Deselect();
if (b->Ptext.count() == 0)
if (b->itemText.count() == 0)
return;
for (uint a = 0; a < b->MaxChars; ++a)
{
10975,7 → 10976,7
pts.resize(0);
x = 0.0;
y = 0.0;
chx = b->Ptext.at(a)->ch;
chx = b->itemText.at(a)->ch;
if ((chx == QChar(13)) || (chx == QChar(32)) || (chx == QChar(29)))
continue;
if (chx == QChar(30))
10984,12 → 10985,12
if (chx == QChar(32))
continue;
}
int chs = b->Ptext.at(a)->csize;
if (b->Ptext.at(a)->cstyle & 64)
int chs = b->itemText.at(a)->csize;
if (b->itemText.at(a)->cstyle & 64)
{
if (chx.upper() != chx)
{
chs = QMAX(static_cast<int>(b->Ptext.at(a)->csize * Doc->typographicSetttings.valueSmallCaps / 100), 1);
chs = QMAX(static_cast<int>(b->itemText.at(a)->csize * Doc->typographicSetttings.valueSmallCaps / 100), 1);
chx = chx.upper();
}
}
10997,14 → 10998,14
uint chr = chx[0].unicode();
QWMatrix chma;
chma.scale(csi, csi);
pts = (*Doc->AllFonts)[b->Ptext.at(a)->cfont]->GlyphArray[chr].Outlines.copy();
pts = (*Doc->AllFonts)[b->itemText.at(a)->cfont]->GlyphArray[chr].Outlines.copy();
if (pts.size() < 4)
continue;
x = (*Doc->AllFonts)[b->Ptext.at(a)->cfont]->GlyphArray[chr].x * csi;
y = (*Doc->AllFonts)[b->Ptext.at(a)->cfont]->GlyphArray[chr].y * csi;
x = (*Doc->AllFonts)[b->itemText.at(a)->cfont]->GlyphArray[chr].x * csi;
y = (*Doc->AllFonts)[b->itemText.at(a)->cfont]->GlyphArray[chr].y * csi;
pts.map(chma);
chma = QWMatrix();
chma.scale(b->Ptext.at(a)->cscale / 100.0, 1);
chma.scale(b->itemText.at(a)->cscale / 100.0, 1);
pts.map(chma);
chma = QWMatrix();
if ((b->flippedH % 2 != 0) && (!b->Reverse))
11023,12 → 11024,12
bb->AutoName = false;
bb->PoLine = pts.copy();
bb->Rot = b->Rot;
bb->Pcolor = b->Ptext.at(a)->ccolor;
bb->Shade = b->Ptext.at(a)->cshade;
if (b->Ptext.at(a)->cstyle & 4)
bb->Pcolor = b->itemText.at(a)->ccolor;
bb->Shade = b->itemText.at(a)->cshade;
if (b->itemText.at(a)->cstyle & 4)
{
bb->Pcolor2 = b->Ptext.at(a)->cstroke;
bb->Shade2 = b->Ptext.at(a)->cshade2;
bb->Pcolor2 = b->itemText.at(a)->cstroke;
bb->Shade2 = b->itemText.at(a)->cshade2;
}
else
{
11035,21 → 11036,21
bb->Pcolor2 = "None";
bb->Shade2 = 100;
}
bb->Pwidth = QMAX((*Doc->AllFonts)[b->Ptext.at(a)->cfont]->strokeWidth * chs / 2.0, 1);
FPoint tp2 = GetMinClipF(bb->PoLine);
bb->Pwidth = QMAX((*Doc->AllFonts)[b->itemText.at(a)->cfont]->strokeWidth * chs / 2.0, 1);
FPoint tp2 = getMinClipF(&bb->PoLine);
bb->PoLine.translate(-tp2.x(), -tp2.y());
FPoint tp = GetMaxClipF(bb->PoLine);
FPoint tp = getMaxClipF(&bb->PoLine);
bb->Width = tp.x();
bb->Height = tp.y();
bb->Clip = FlattenPath(bb->PoLine, bb->Segments);
FPoint npo;
double textX = b->Ptext.at(a)->xp;
double textY = b->Ptext.at(a)->yp;
double textX = b->itemText.at(a)->xp;
double textY = b->itemText.at(a)->yp;
double wide;
if (a < b->Ptext.count()-1)
wide = Cwidth(Doc, b->Ptext.at(a)->cfont, chx, b->Ptext.at(a)->csize, b->Ptext.at(a+1)->ch);
if (a < b->itemText.count()-1)
wide = Cwidth(Doc, b->itemText.at(a)->cfont, chx, b->itemText.at(a)->csize, b->itemText.at(a+1)->ch);
else
wide = Cwidth(Doc, b->Ptext.at(a)->cfont, chx, b->Ptext.at(a)->csize);
wide = Cwidth(Doc, b->itemText.at(a)->cfont, chx, b->itemText.at(a)->csize);
if (b->flippedH % 2 != 0)
textX = b->Width - textX - wide;
if (b->flippedV % 2 != 0)
/branches/Version13x/Scribus/scribus/scribusdoc.h
51,7 → 51,7
{
 
public:
ScribusDoc(struct preV *prefsData);
ScribusDoc(struct ApplicationPrefs *prefsData);
~ScribusDoc();
void setModified();
void setUnModified();
60,7 → 60,7
void setPage(double b, double h, double t, double l, double r, double bo, double sp, double ab, bool atf, bool fp);
void resetPage(double t, double l, double r, double bo, bool fp);
bool AddFont(QString name, QFont fo);
void loadStylesFromFile(QString fileName, QValueList<StVorL> *tempStyles = NULL);
void loadStylesFromFile(QString fileName, QValueList<ParagraphStyle> *tempStyles = NULL);
 
 
protected:
94,7 → 94,7
/** Number of Pages */
int PageC;
/** Margins */
Margs PageM;
MarginStruct PageM;
/** Number of Columns */
double PageSp;
/** Distance of Columns */
111,8 → 111,8
/** Flag fuer Rasterbenutzung */
bool useRaster;
/** Im Dokument benutzte Farben */
CListe PageColors;
Page* ActPage;
ColorList PageColors;
Page* currentPage;
/** InfoStrings fuer das aktuelle Dokument */
QString DocAutor;
QString DocTitel;
129,7 → 129,7
QString DocCover;
QString DocRights;
QString DocContrib;
int AppMode;
int appMode;
int SubMode;
double *ShapeValues;
int ValCount;
153,12 → 153,12
QString DocName;
QMap<QString,QFont> UsedFonts;
SCFonts *AllFonts;
preV *prefsValues;
ApplicationPrefs *prefsValues;
int Dsize;
QColor papColor;
int CurrentSel;
int CurrentStyle;
int CurrentABStil;
int currentParaStyle;
QString CurrFont;
int CurrFontSize;
QString CurrTextFill;
168,8 → 168,8
int CurrTextScale;
bool EditClip;
int EditClipMode;
typoStruct typographicSetttings;
guidesStruct guidesSettings;
typoPrefs typographicSetttings;
guidesPrefs guidesSettings;
/** Letztes Element fuer AutoTextrahmen */
PageItem *LastAuto;
/** Erstes Element fuer AutoTextrahmen */
184,19 → 184,19
bool ScaleType;
bool AspectRatio;
bool Before;
int Einheit;
int docUnitIndex;
bool DragP;
bool leaveDrag;
PageItem *DraggedElem;
PageItem *ElemToLink;
QValueList<uint> DragElements;
QValueList<StVorL> Vorlagen;
QValueList<ParagraphStyle> docParagraphStyles;
QValueList<Layer> Layers;
bool MasterP;
bool FirstPageLeft;
bool RandFarbig;
bool marginColored;
int GroupCounter;
CMSset CMSSettings;
CMSData CMSSettings;
int ActiveLayer;
#ifdef HAVE_CMS
cmsHPROFILE DocInputProf;
208,7 → 208,7
bool UnDoValid;
UndoData UnData;
int TotalItems;
Hyphenator *Trenner;
Hyphenator *docHyphenator;
int MinWordLen;
int HyCount;
QString Language;
215,7 → 215,7
bool Automatic;
bool AutoCheck;
bool TemplateMode;
struct PDFOpt PDF_Optionen;
struct PDFOptions PDF_Optionen;
bool RePos;
struct BookMa {
QString Title;
240,7 → 240,7
FT_Library library;
QMap<QString,FT_Face> FFonts;
QMap<QString,multiLine> MLineStyles;
QValueList<arrowDesc> arrowStyles;
QValueList<ArrowDesc> arrowStyles;
QWidget* WinHan;
bool DoDrawing;
QValueList<int> OpenNodes;
/branches/Version13x/Scribus/scribus/tabguides.cpp
13,7 → 13,7
#include "mspinbox.h"
#include "scribusstructs.h"
 
TabGuides::TabGuides( QWidget* parent, struct guidesStruct *prefsData, double unitBase, QString unit) : QWidget( parent, "tabguide", 0 )
TabGuides::TabGuides( QWidget* parent, struct guidesPrefs *prefsData, double unitBase, QString unit) : QWidget( parent, "tabguide", 0 )
{
tabGuidesLayout = new QVBoxLayout( this, 10, 5, "tabViewLayout");
checkGrid = new QGroupBox( this, "checkGrid" );
/branches/Version13x/Scribus/scribus/missing.cpp
292,7 → 292,7
};
 
 
MissingFont::MissingFont( QWidget* parent, QString fon, preV *Prefs )
MissingFont::MissingFont( QWidget* parent, QString fon, ApplicationPrefs *Prefs )
: QDialog( parent, "mfont", true, 0 )
{
QPixmap image0( ( const char** ) image100_data );
/branches/Version13x/Scribus/scribus/muster.cpp
12,7 → 12,7
#include "scribusview.h"
 
extern QPixmap loadIcon(QString nam);
extern void CopyPageItem(struct CLBuf *Buffer, PageItem *b);
extern void CopyPageItem(struct CopyPasteBuffer *Buffer, PageItem *b);
 
MusterPages::MusterPages( QWidget* parent, ScribusDoc *pCurrentDoc, ScribusView *pCurrentView, QString temp)
: QDialog( parent, "Muster", false, WDestructiveClose)
115,7 → 115,7
QString templateName;
int nr;
bool atf;
struct CLBuf Buffer;
struct CopyPasteBuffer Buffer;
NewTm *dia = new NewTm(this, tr("&Name:"), tr("New Template"), currentDoc);
dia->Answer->setText( tr("Copy of %1").arg(sMuster));
dia->Answer->selectAll();
146,20 → 146,20
TableItems.clear();
if (currentDoc->Pages.at(inde)->YGuides.count() != 0)
{
currentDoc->ActPage->YGuides.clear();
currentDoc->currentPage->YGuides.clear();
for (uint y = 0; y < currentDoc->Pages.at(inde)->YGuides.count(); ++y)
{
currentDoc->ActPage->YGuides.append(currentDoc->Pages.at(inde)->YGuides[y]);
currentDoc->currentPage->YGuides.append(currentDoc->Pages.at(inde)->YGuides[y]);
}
qHeapSort(currentDoc->ActPage->YGuides);
qHeapSort(currentDoc->currentPage->YGuides);
}
if (currentDoc->Pages.at(inde)->XGuides.count() != 0)
{
for (uint x = 0; x < currentDoc->Pages.at(inde)->XGuides.count(); ++x)
{
currentDoc->ActPage->XGuides.append(currentDoc->Pages.at(inde)->XGuides[x]);
currentDoc->currentPage->XGuides.append(currentDoc->Pages.at(inde)->XGuides[x]);
}
qHeapSort(currentDoc->ActPage->XGuides);
qHeapSort(currentDoc->currentPage->XGuides);
}
uint end = currentDoc->Items.count();
for (uint a = 0; a < end; ++a)
/branches/Version13x/Scribus/scribus/libpostscript/pslib.h
34,12 → 34,12
 
class PSLib {
public:
PSLib(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf = false);
PSLib(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, ColorList DocColors, bool pdf = false);
virtual ~PSLib() {};
virtual bool PS_set_file(QString fn);
virtual void PS_set_Info(QString art, QString was);
virtual void PS_begin_doc(int Ori, double x, double y, double breite, double hoehe, int numpage);
virtual void PS_begin_page(double breite, double hoehe, struct Margs* Ma, bool Clipping);
virtual void PS_begin_page(double breite, double hoehe, struct MarginStruct* Ma, bool Clipping);
virtual void PS_end_page();
virtual void PS_curve(double x1, double y1, double x2, double y2, double x3, double y3);
virtual void PS_moveto(double x, double y);
/branches/Version13x/Scribus/scribus/libpostscript/pslib.cpp
51,15 → 51,15
extern QImage LoadPictCol(QString fn, QString Prof, bool UseEmbedded, bool *realCMYK);
#endif
 
extern "C" void* Run(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf);
extern "C" void* Run(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, ColorList DocColors, bool pdf);
 
void* Run(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf)
void* Run(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, ColorList DocColors, bool pdf)
{
PSLib *dia = new PSLib(psart, AllFonts, DocFonts, DocColors, pdf);
return dia;
}
 
PSLib::PSLib(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, CListe DocColors, bool pdf)
PSLib::PSLib(bool psart, SCFonts &AllFonts, QMap<QString,QFont> DocFonts, ColorList DocColors, bool pdf)
{
QString tmp, tmp2, tmp3, tmp4, CHset;
QStringList wt;
90,7 → 90,7
GrayCalc += " oldsetgray} bind def\n";
Farben = "%%CMYKCustomColor: ";
FNamen = "%%DocumentCustomColors: ";
CListe::Iterator itf;
ColorList::Iterator itf;
int c, m, y, k;
bool erst = true;
for (itf = DocColors.begin(); itf != DocColors.end(); ++itf)
336,7 → 336,7
PutDoc("} bind def\n");
}
 
void PSLib::PS_begin_page(double breite, double hoehe, struct Margs* Ma, bool Clipping)
void PSLib::PS_begin_page(double breite, double hoehe, struct MarginStruct* Ma, bool Clipping)
{
if (Clipping)
{
1033,12 → 1033,12
{
int Lnr = 0;
struct Layer ll;
ll.Drucken = false;
ll.isPrintable = false;
ll.LNr = 0;
for (uint lam = 0; lam < Doc->Layers.count(); ++lam)
{
Level2Layer(Doc, &ll, Lnr);
if (ll.Drucken)
if (ll.isPrintable)
{
for (uint api = 0; api < Doc->MasterItems.count(); ++api)
{
1073,7 → 1073,7
a = pageNs[aa]-1;
if ((!Art) && (view->SelItem.count() != 0))
{
struct Margs Ma;
struct MarginStruct Ma;
Ma.Left = gx;
Ma.Top = gy;
Ma.Bottom = Doc->PageH - (gy + gh);
1110,10 → 1110,10
int h, s, v, k, tsz;
QCString chxc;
QString chx;
struct Pti *hl;
struct ScText *hl;
int Lnr = 0;
struct Layer ll;
ll.Drucken = false;
ll.isPrintable = false;
ll.LNr = 0;
Page* mPage = Doc->MasterPages.at(Doc->MasterNames[Doc->Pages.at(a)->MPageNam]);
if (Doc->MasterItems.count() != 0)
1121,7 → 1121,7
for (uint lam = 0; lam < Doc->Layers.count(); ++lam)
{
Level2Layer(Doc, &ll, Lnr);
if (ll.Drucken)
if (ll.isPrintable)
{
for (uint am = 0; am < Doc->Pages.at(a)->FromMaster.count(); ++am)
{
1240,7 → 1240,7
}
for (uint d = 0; d < ite->MaxChars; ++d)
{
hl = ite->Ptext.at(d);
hl = ite->itemText.at(d);
if ((hl->ch == QChar(13)) || (hl->ch == QChar(10)) || (hl->ch == QChar(9)) || (hl->ch == QChar(28)))
continue;
if (hl->cstyle & 256)
1267,10 → 1267,10
break;
za2--;
}
while (ite->Ptext.at(za2)->ch == QChar(30));
if (ite->Ptext.at(za2)->ch != QChar(30))
while (ite->itemText.at(za2)->ch == QChar(30));
if (ite->itemText.at(za2)->ch != QChar(30))
za2++;
while (ite->Ptext.at(za2+zae)->ch == QChar(30))
while (ite->itemText.at(za2+zae)->ch == QChar(30))
{
zae++;
if (za2+zae == ite->MaxChars)
1309,7 → 1309,7
PS_scale(-1, 1);
if (d < ite->MaxChars-1)
{
QString ctx = ite->Ptext.at(d+1)->ch;
QString ctx = ite->itemText.at(d+1)->ch;
if (ctx == QChar(29))
ctx = " ";
if (ctx == QChar(0xA0))
1350,7 → 1350,7
PS_scale(-1, 1);
if (d < ite->MaxChars-1)
{
QString ctx = ite->Ptext.at(d+1)->ch;
QString ctx = ite->itemText.at(d+1)->ch;
if (ctx == QChar(29))
ctx = " ";
if (ctx == QChar(0xA0))
1585,7 → 1585,7
int h, s, v, k, tsz;
uint d;
double wideR;
struct Pti *hl;
struct ScText *hl;
QValueList<double> dum;
dum.clear();
QString tmps, chx;
1683,11 → 1683,11
{
QString bm = "";
QString cc;
for (d = 0; d < c->Ptext.count(); ++d)
for (d = 0; d < c->itemText.count(); ++d)
{
if ((c->Ptext.at(d)->ch == QChar(13)) || (c->Ptext.at(d)->ch == QChar(10)) || (c->Ptext.at(d)->ch == QChar(28)))
if ((c->itemText.at(d)->ch == QChar(13)) || (c->itemText.at(d)->ch == QChar(10)) || (c->itemText.at(d)->ch == QChar(28)))
break;
bm += "\\"+cc.setNum(QMAX(c->Ptext.at(d)->ch.at(0).unicode(), 32), 8);
bm += "\\"+cc.setNum(QMAX(c->itemText.at(d)->ch.at(0).unicode(), 32), 8);
}
PDF_Bookmark(bm, a->PageNr+1);
}
1695,9 → 1695,9
{
QString bm = "";
QString cc;
for (d = 0; d < c->Ptext.count(); ++d)
for (d = 0; d < c->itemText.count(); ++d)
{
bm += "\\"+cc.setNum(QMAX(c->Ptext.at(d)->ch.at(0).unicode(), 32), 8);
bm += "\\"+cc.setNum(QMAX(c->itemText.at(d)->ch.at(0).unicode(), 32), 8);
}
PDF_Annotation(bm, 0, 0, c->Width, -c->Height);
break;
1723,7 → 1723,7
}
for (d = 0; d < c->MaxChars; ++d)
{
hl = c->Ptext.at(d);
hl = c->itemText.at(d);
if ((hl->ch == QChar(13)) || (hl->ch == QChar(10)) || (hl->ch == QChar(9)) || (hl->ch == QChar(28)))
continue;
if (hl->cstyle & 256)
1750,10 → 1750,10
break;
za2--;
}
while (c->Ptext.at(za2)->ch == QChar(30));
if (c->Ptext.at(za2)->ch != QChar(30))
while (c->itemText.at(za2)->ch == QChar(30));
if (c->itemText.at(za2)->ch != QChar(30))
za2++;
while (c->Ptext.at(za2+zae)->ch == QChar(30))
while (c->itemText.at(za2+zae)->ch == QChar(30))
{
zae++;
if (za2+zae == c->MaxChars)
1792,7 → 1792,7
PS_scale(-1, 1);
if (d < c->MaxChars-1)
{
QString ctx = c->Ptext.at(d+1)->ch;
QString ctx = c->itemText.at(d+1)->ch;
if (ctx == QChar(29))
ctx = " ";
if (ctx == QChar(0xA0))
1833,7 → 1833,7
PS_scale(-1, 1);
if (d < c->MaxChars-1)
{
QString ctx = c->Ptext.at(d+1)->ch;
QString ctx = c->itemText.at(d+1)->ch;
if (ctx == QChar(29))
ctx = " ";
if (ctx == QChar(0xA0))
2187,7 → 2187,7
}
for (d = 0; d < c->MaxChars; ++d)
{
hl = c->Ptext.at(d);
hl = c->itemText.at(d);
if ((hl->ch == QChar(13)) || (hl->ch == QChar(30)) || (hl->ch == QChar(9)) || (hl->ch == QChar(28)))
continue;
tsz = hl->csize;
2230,7 → 2230,7
PS_scale(-1, 1);
if (d < c->MaxChars-1)
{
QString ctx = c->Ptext.at(d+1)->ch;
QString ctx = c->itemText.at(d+1)->ch;
if (ctx == QChar(29))
ctx = " ";
if (ctx == QChar(0xA0))
2280,7 → 2280,7
QPtrList<PageItem> PItems;
int Lnr = 0;
struct Layer ll;
ll.Drucken = false;
ll.isPrintable = false;
ll.LNr = 0;
for (uint la = 0; la < Doc->Layers.count(); ++la)
{
2289,7 → 2289,7
PItems = Doc->MasterItems;
else
PItems = Doc->Items;
if (ll.Drucken)
if (ll.isPrintable)
{
for (b = 0; b < PItems.count(); ++b)
{
/branches/Version13x/Scribus/scribus/libabout/about.cpp
65,7 → 65,7
tabLayout1->addWidget( pixmapLabel1 );
buildID = new QLabel( tab, "BB" );
buildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1. %2 %3 ").arg("29").arg("December").arg("2004");
QString bu = tr("%1. %2 %3 ").arg("01").arg("January").arg("2005");
#ifdef HAVE_CMS
bu += "C";
#else
/branches/Version13x/Scribus/scribus/bookmwin.cpp
118,9 → 118,9
QString bm = "";
QString bm2 = "";
QString cc;
for (uint d = 0; d < ite->Ptext.count(); ++d)
for (uint d = 0; d < ite->itemText.count(); ++d)
{
cc = ite->Ptext.at(d)->ch;
cc = ite->itemText.at(d)->ch;
if ((cc == QChar(13)) || (cc == QChar(10)))
break;
if (cc == QChar(29))
290,7 → 290,8
if (DraggedI->Prev == 0)
{
ip = (BookMItem*)lv->nextSibling();
ip->Prev = 0;
if (ip)
ip->Prev = 0;
}
else
{
318,7 → 319,8
if (DraggedI->Prev == 0)
{
ip = (BookMItem*)lv;
ip->Prev = 0;
if (ip)
ip->Prev = 0;
}
QListViewItemIterator it2(this);
for ( ; it2.current(); ++it2)
516,9 → 518,9
QString bm2 = "";
QString cc;
int nr = b->BMnr;
for (uint d = 0; d < b->Ptext.count(); ++d)
for (uint d = 0; d < b->itemText.count(); ++d)
{
cc = b->Ptext.at(d)->ch;
cc = b->itemText.at(d)->ch;
if ((cc == QChar(13)) || (cc == QChar(10)))
break;
if ((cc == "(") || (cc == ")") || (cc == "\\"))
/branches/Version13x/Scribus/scribus/fontcombo.cpp
47,7 → 47,7
painter->drawText(3, fontMetrics.ascent() + fontMetrics.leading() / 2, fontName);
}
 
FontCombo::FontCombo(QWidget* pa, preV *Prefs) : QComboBox(true, pa)
FontCombo::FontCombo(QWidget* pa, ApplicationPrefs *Prefs) : QComboBox(true, pa)
{
setEditable(false);
QFont f(font());
68,7 → 68,7
listBox()->setMinimumWidth(listBox()->maxItemWidth()+24);
}
 
void FontCombo::RebuildList(preV *Prefs, ScribusDoc *currentDoc)
void FontCombo::RebuildList(ApplicationPrefs *Prefs, ScribusDoc *currentDoc)
{
QStringList rlist;
clear();
/branches/Version13x/Scribus/scribus/cmsprefs.h
15,7 → 15,7
Q_OBJECT
 
public:
CMSPrefs( QWidget* parent, CMSset *Vor, ProfilesL *InputProfiles, ProfilesL *PrinterProfiles, ProfilesL *MonitorProfiles);
CMSPrefs( QWidget* parent, CMSData *Vor, ProfilesL *InputProfiles, ProfilesL *PrinterProfiles, ProfilesL *MonitorProfiles);
~CMSPrefs() {};
 
QCheckBox* checkBox1;
36,7 → 36,7
QCheckBox* simulate;
QCheckBox* gamutC;
QCheckBox* blackP;
CMSset *prefs;
CMSData *prefs;
bool changed;
 
public slots:
/branches/Version13x/Scribus/scribus/scribus.cpp
104,7 → 104,7
 
extern QPixmap loadIcon(QString nam);
extern bool overwrite(QWidget *parent, QString filename);
extern void CopyPageItem(struct CLBuf *Buffer, PageItem *b);
extern void CopyPageItem(struct CopyPasteBuffer *Buffer, PageItem *b);
extern void ReOrderText(ScribusDoc *doc, ScribusView *view);
extern int copyFile(QString source, QString target);
extern int moveFile(QString source, QString target);
404,7 → 404,7
Prefs.ScaleX = 1;
Prefs.ScaleY = 1;
Prefs.Before = true;
Prefs.Einheit = 0;
Prefs.docUnitIndex = 0;
Prefs.PolyC = 4;
Prefs.PolyF = 0.5;
Prefs.PolyS = false;
439,7 → 439,7
Prefs.GCRMode = true;
Prefs.RecentDocs.clear();
Prefs.RecentDCount = 5;
Prefs.RandFarbig = false;
Prefs.marginColored = false;
Prefs.PageFormat = 4;
Prefs.Ausrichtung = 0;
Prefs.PageBreite = 595;
543,7 → 543,7
 
void ScribusApp::initArrowStyles()
{
struct arrowDesc arrow;
struct ArrowDesc arrow;
FPointArray points;
QWMatrix arrowScaling;
arrowScaling.scale(0.5, 0.5);
1108,10 → 1108,10
 
void ScribusApp::ReportMP(double xp, double yp)
{
QString suffix=unitGetSuffixFromIndex(doc->Einheit);
int multiplier=unitGetDecimalsFromIndex(doc->Einheit);
QString suffix=unitGetSuffixFromIndex(doc->docUnitIndex);
int multiplier=unitGetDecimalsFromIndex(doc->docUnitIndex);
double divisor = static_cast<double>(multiplier);
int precision=precision = unitGetPrecisionFromIndex(doc->Einheit);
int precision=precision = unitGetPrecisionFromIndex(doc->docUnitIndex);
QString tmp;
XDat->setText(tmp.setNum(qRound(xp*UmReFaktor * multiplier) / divisor, 'f', precision) + suffix);
YDat->setText(tmp.setNum(qRound(yp*UmReFaktor * multiplier) / divisor, 'f', precision) + suffix);
1130,24 → 1130,24
{
int FirstSel = 0;
bool first = false;
for (Pti *it = b->Ptext.first(); it != 0; it = b->Ptext.next())
for (ScText *it = b->itemText.first(); it != 0; it = b->itemText.next())
{
if (it->cselect)
{
first = true;
b->Ptext.remove();
it = b->Ptext.prev();
b->itemText.remove();
it = b->itemText.prev();
if (it == 0)
it = b->Ptext.first();
it = b->itemText.first();
}
if (!first)
FirstSel++;
}
if (b->Ptext.count() != 0)
if (b->itemText.count() != 0)
{
if (b->Ptext.first()->cselect)
if (b->itemText.first()->cselect)
{
b->Ptext.remove();
b->itemText.remove();
b->CPos = 0;
}
else
1161,24 → 1161,24
 
void ScribusApp::setTBvals(PageItem *b)
{
if (b->Ptext.count() != 0)
if (b->itemText.count() != 0)
{
int ChPos = QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1));
doc->CurrentStyle = b->Ptext.at(ChPos)->cstyle & 127;
doc->CurrentABStil = b->Ptext.at(ChPos)->cab;
setAbsValue(doc->CurrentABStil);
Mpal->setAli(doc->CurrentABStil);
doc->CurrFont = b->Ptext.at(ChPos)->cfont;
doc->CurrFontSize = b->Ptext.at(ChPos)->csize;
doc->CurrTextFill = b->Ptext.at(ChPos)->ccolor;
doc->CurrTextFillSh = b->Ptext.at(ChPos)->cshade;
doc->CurrTextStroke = b->Ptext.at(ChPos)->cstroke;
doc->CurrTextStrokeSh = b->Ptext.at(ChPos)->cshade2;
doc->CurrTextScale = b->Ptext.at(ChPos)->cscale;
int ChPos = QMIN(b->CPos, static_cast<int>(b->itemText.count()-1));
doc->CurrentStyle = b->itemText.at(ChPos)->cstyle & 127;
doc->currentParaStyle = b->itemText.at(ChPos)->cab;
setAbsValue(doc->currentParaStyle);
Mpal->setAli(doc->currentParaStyle);
doc->CurrFont = b->itemText.at(ChPos)->cfont;
doc->CurrFontSize = b->itemText.at(ChPos)->csize;
doc->CurrTextFill = b->itemText.at(ChPos)->ccolor;
doc->CurrTextFillSh = b->itemText.at(ChPos)->cshade;
doc->CurrTextStroke = b->itemText.at(ChPos)->cstroke;
doc->CurrTextStrokeSh = b->itemText.at(ChPos)->cshade2;
doc->CurrTextScale = b->itemText.at(ChPos)->cscale;
emit TextFarben(doc->CurrTextStroke, doc->CurrTextFill, doc->CurrTextStrokeSh, doc->CurrTextFillSh);
emit TextIFont(doc->CurrFont);
emit TextISize(doc->CurrFontSize);
emit TextUSval(b->Ptext.at(ChPos)->cextra);
emit TextUSval(b->itemText.at(ChPos)->cextra);
emit TextStil(doc->CurrentStyle);
emit TextScale(doc->CurrTextScale);
}
1210,7 → 1210,7
{
QWidgetList windows;
QWidget* w = NULL;
struct Pti *hg;
struct ScText *hg;
int kk = k->key();
int as = k->ascii();
double altx, alty;
1255,27 → 1255,27
if ((view->SelItem.count() != 0))
{
b = view->SelItem.at(0);
switch (doc->AppMode)
switch (doc->appMode)
{
case 1:
case NormalMode:
b->Sizing = false;
if (doc->SubMode != -1)
{
view->Deselect(false);
// if (!doc->TemplateMode)
// Tpal->slotRemoveElement(doc->ActPage->PageNr, b->ItemNr);
// Tpal->slotRemoveElement(doc->currentPage->PageNr, b->ItemNr);
doc->Items.remove(b->ItemNr);
}
break;
case 7:
case EditMode:
break;
case 13:
case DrawBezierLine:
b->PoLine.resize(b->PoLine.size()-2);
if (b->PoLine.size() < 4)
{
view->Deselect(false);
// if (!doc->TemplateMode)
// Tpal->slotRemoveElement(doc->ActPage->PageNr, b->ItemNr);
// Tpal->slotRemoveElement(doc->currentPage->PageNr, b->ItemNr);
doc->Items.remove(b->ItemNr);
}
else
1293,7 → 1293,7
default:
view->Deselect(false);
// if (!doc->TemplateMode)
// Tpal->slotRemoveElement(doc->ActPage->PageNr, b->ItemNr);
// Tpal->slotRemoveElement(doc->currentPage->PageNr, b->ItemNr);
doc->Items.remove(b->ItemNr);
break;
}
1312,17 → 1312,17
ButtonState buttonState = k->state();
if ((HaveDoc) && (!view->LE->hasFocus()) && (!view->PGS->PageCombo->hasFocus()))
{
if ((doc->AppMode != 7) && (view->SelItem.count() == 0))
if ((doc->appMode != EditMode) && (view->SelItem.count() == 0))
{
switch (kk)
{
case Key_Space:
keyrep = false;
if (doc->AppMode == 23)
setAppMode(1);
if (doc->appMode == PanningMode)
setAppMode(NormalMode);
else
{
setAppMode(23);
setAppMode(PanningMode);
qApp->setOverrideCursor(QCursor(loadIcon("HandC.xpm")), true);
}
return;
1368,15 → 1368,15
if (kk == Key_F9)
{
keyrep = false;
if (doc->AppMode == 7)
setAppMode(1);
if (doc->appMode == EditMode)
setAppMode(NormalMode);
else
setAppMode(7);
setAppMode(EditMode);
return;
}
switch (doc->AppMode)
switch (doc->appMode)
{
case 1:
case NormalMode:
switch (kk)
{
case Key_Backspace:
1490,7 → 1490,7
}
slotDocCh();
break;
case 7:
case EditMode:
int oldPos = b->CPos; // 15-mar-2004 jjsa for cursor movement with Shift + Arrow key
view->oldCp = b->CPos;
if (b->PType == 4)
1535,7 → 1535,7
DeleteSel(b);
if (conv < 31)
conv = 32;
hg = new Pti;
hg = new ScText;
hg->ch = QString(QChar(conv));
hg->cfont = doc->CurrFont;
hg->csize = doc->CurrFontSize;
1546,11 → 1546,11
hg->cscale = doc->CurrTextScale;
hg->cselect = false;
hg->cstyle = doc->CurrentStyle;
hg->cab = doc->CurrentABStil;
if (doc->Vorlagen[doc->CurrentABStil].Font != "")
hg->cab = doc->currentParaStyle;
if (doc->docParagraphStyles[doc->currentParaStyle].Font != "")
{
hg->cfont = doc->Vorlagen[doc->CurrentABStil].Font;
hg->csize = doc->Vorlagen[doc->CurrentABStil].FontSize;
hg->cfont = doc->docParagraphStyles[doc->currentParaStyle].Font;
hg->csize = doc->docParagraphStyles[doc->currentParaStyle].FontSize;
}
hg->cextra = 0;
hg->xp = 0;
1558,7 → 1558,7
hg->PRot = 0;
hg->PtransX = 0;
hg->PtransY = 0;
b->Ptext.insert(b->CPos, hg);
b->itemText.insert(b->CPos, hg);
b->CPos += 1;
b->Tinput = true;
setTBvals(b);
1586,20 → 1586,20
// go to begin of line
if ( (pos = b->CPos) == 0 )
break; // at begin of frame
len = static_cast<int>(b->Ptext.count());
len = static_cast<int>(b->itemText.count());
if ( pos == len )
pos--;
if ( (buttonState & ControlButton) == 0 )
{
alty = b->Ptext.at(pos)->yp;
c = b->Ptext.at(pos)->ch.at(0).latin1();
alty = b->itemText.at(pos)->yp;
c = b->itemText.at(pos)->ch.at(0).latin1();
if ( c == 13 ) // new line, position is wrong
if ( --pos > 0 )
alty = b->Ptext.at(pos)->yp;
alty = b->itemText.at(pos)->yp;
// check for yp at actual position
if ( pos < len )
{
altx = b->Ptext.at(pos)->yp;
altx = b->itemText.at(pos)->yp;
if ( altx > alty )
{
// we was at begin of line
1606,9 → 1606,9
break;
}
}
while ( pos > 0 && b->Ptext.at(pos-1)->yp == alty )
while ( pos > 0 && b->itemText.at(pos-1)->yp == alty )
pos--;
if ( b->Ptext.at(pos)->ch.at(0).latin1() == 13 )
if ( b->itemText.at(pos)->ch.at(0).latin1() == 13 )
pos++;
}
else
1615,10 → 1615,10
{
// paragraph begin
if ( pos < len &&
b->Ptext.at(pos)->ch.at(0).latin1() == 13 )
b->itemText.at(pos)->ch.at(0).latin1() == 13 )
pos--;
while(pos > 0 )
if ( b->Ptext.at(pos)->ch.at(0).latin1() == 13 )
if ( b->itemText.at(pos)->ch.at(0).latin1() == 13 )
{
pos++;
break;
1632,22 → 1632,22
break;
case Key_End:
// go to end of line
len = static_cast<int>(b->Ptext.count());
len = static_cast<int>(b->itemText.count());
if ( b->CPos >= len )
break; // at end of frame
if ( (buttonState & ControlButton) == 0 )
{
if ( b->CPos < len && b->Ptext.at(b->CPos)->ch.at(0).latin1() == 13 )
if ( b->CPos < len && b->itemText.at(b->CPos)->ch.at(0).latin1() == 13 )
{
// at end of paragraph and therefore line
break;
}
alty = b->Ptext.at(b->CPos)->yp;
while ( b->CPos < len-1 && b->Ptext.at(b->CPos+1)->yp == alty )
alty = b->itemText.at(b->CPos)->yp;
while ( b->CPos < len-1 && b->itemText.at(b->CPos+1)->yp == alty )
b->CPos++;
 
if ( b->CPos < len -1 )
c = b->Ptext.at(b->CPos+1)->ch.at(0).latin1();
c = b->itemText.at(b->CPos+1)->ch.at(0).latin1();
else if ( b->CPos == len - 1 )
c = 13;
else
1658,7 → 1658,7
else
{
// go to end of paragraph
if ( b->Ptext.at(b->CPos)->ch.at(0).latin1() == 13 )
if ( b->itemText.at(b->CPos)->ch.at(0).latin1() == 13 )
{
break;
}
1665,7 → 1665,7
pos = b->CPos;
while ( pos < len )
{
if ( b->Ptext.at(pos)->ch.at(0).latin1() == 13 )
if ( b->itemText.at(pos)->ch.at(0).latin1() == 13 )
break;
else
pos++;
1676,33 → 1676,33
view->ExpandSel(b, 1, oldPos);
break;
case Key_Down:
if (b->CPos != static_cast<int>(b->Ptext.count()))
if (b->CPos != static_cast<int>(b->itemText.count()))
{
alty = b->Ptext.at(b->CPos)->yp;
altx = b->Ptext.at(b->CPos)->xp;
alty = b->itemText.at(b->CPos)->yp;
altx = b->itemText.at(b->CPos)->xp;
do
{
b->CPos += 1;
if (b->CPos == static_cast<int>(b->Ptext.count()))
if (b->CPos == static_cast<int>(b->itemText.count()))
break;
if (b->Ptext.at(b->CPos)->yp > alty)
if (b->itemText.at(b->CPos)->yp > alty)
{
if (b->Ptext.at(b->CPos)->xp >= altx)
if (b->itemText.at(b->CPos)->xp >= altx)
break;
}
}
while (b->CPos < static_cast<int>(b->Ptext.count()));
while (b->CPos < static_cast<int>(b->itemText.count()));
if ( buttonState & ShiftButton )
{
if ( buttonState & AltButton )
b->CPos = b->Ptext.count();
b->CPos = b->itemText.count();
view->ExpandSel(b, 1, oldPos);
}
else
if (b->CPos == static_cast<int>(b->Ptext.count()))
if (b->CPos == static_cast<int>(b->itemText.count()))
if (b->NextBox != 0)
{
if (b->NextBox->Ptext.count() != 0)
if (b->NextBox->itemText.count() != 0)
{
view->Deselect(true);
b->NextBox->CPos = 0;
1715,7 → 1715,7
{
if (b->NextBox != 0)
{
if (b->NextBox->Ptext.count() != 0)
if (b->NextBox->itemText.count() != 0)
{
view->Deselect(true);
b->NextBox->CPos = 0;
1731,10 → 1731,10
case Key_Up:
if (b->CPos > 0)
{
if (b->CPos == static_cast<int>(b->Ptext.count()))
if (b->CPos == static_cast<int>(b->itemText.count()))
b->CPos -= 1;
alty = b->Ptext.at(b->CPos)->yp;
altx = b->Ptext.at(b->CPos)->xp;
alty = b->itemText.at(b->CPos)->yp;
altx = b->itemText.at(b->CPos)->xp;
if (b->CPos > 0)
{
do
1742,9 → 1742,9
b->CPos -= 1;
if (b->CPos == 0)
break;
if (b->Ptext.at(b->CPos)->yp < alty)
if (b->itemText.at(b->CPos)->yp < alty)
{
if (b->Ptext.at(b->CPos)->xp <= altx)
if (b->itemText.at(b->CPos)->xp <= altx)
break;
}
}
1762,7 → 1762,7
if (b->BackBox != 0)
{
view->Deselect(true);
b->BackBox->CPos = b->BackBox->Ptext.count();
b->BackBox->CPos = b->BackBox->itemText.count();
view->SelectItemNr(b->BackBox->ItemNr);
b = b->BackBox;
}
1774,7 → 1774,7
if (b->BackBox != 0)
{
view->Deselect(true);
b->BackBox->CPos = b->BackBox->Ptext.count();
b->BackBox->CPos = b->BackBox->itemText.count();
view->SelectItemNr(b->BackBox->ItemNr);
b = b->BackBox;
}
1790,7 → 1790,7
setTBvals(b);
break;
case Key_Next:
b->CPos = static_cast<int>(b->Ptext.count());
b->CPos = static_cast<int>(b->itemText.count());
if ( buttonState & ShiftButton )
view->ExpandSel(b, 1, oldPos);
setTBvals(b);
1798,7 → 1798,7
case Key_Left:
if ( buttonState & ControlButton )
{
view->setNewPos(b, oldPos, b->Ptext.count(),-1);
view->setNewPos(b, oldPos, b->itemText.count(),-1);
if ( buttonState & ShiftButton )
view->ExpandSel(b, -1, oldPos);
}
1819,18 → 1819,18
if (b->BackBox != 0)
{
view->Deselect(true);
b->BackBox->CPos = b->BackBox->Ptext.count();
b->BackBox->CPos = b->BackBox->itemText.count();
view->SelectItemNr(b->BackBox->ItemNr);
b = b->BackBox;
}
}
}
if ((b->CPos > 0) && (b->CPos == static_cast<int>(b->Ptext.count())))
if ((b->CPos > 0) && (b->CPos == static_cast<int>(b->itemText.count())))
{
if (b->Ptext.at(b->CPos-1)->cstyle & 256)
if (b->itemText.at(b->CPos-1)->cstyle & 256)
{
b->CPos -= 1;
while ((b->CPos > 0) && (b->Ptext.at(b->CPos)->cstyle & 256))
while ((b->CPos > 0) && (b->itemText.at(b->CPos)->cstyle & 256))
{
b->CPos--;
if (b->CPos == 0)
1840,7 → 1840,7
}
else
{
while ((b->CPos > 0) && (b->Ptext.at(b->CPos)->cstyle & 256))
while ((b->CPos > 0) && (b->itemText.at(b->CPos)->cstyle & 256))
{
b->CPos--;
if (b->CPos == 0)
1854,7 → 1854,7
case Key_Right:
if ( buttonState & ControlButton )
{
view->setNewPos(b, oldPos, b->Ptext.count(),1);
view->setNewPos(b, oldPos, b->itemText.count(),1);
if ( buttonState & ShiftButton )
view->ExpandSel(b, 1, oldPos);
}
1861,7 → 1861,7
else if ( buttonState & ShiftButton )
{
b->CPos++;
if ( b->CPos > static_cast<int>(b->Ptext.count()) )
if ( b->CPos > static_cast<int>(b->itemText.count()) )
b->CPos--;
else
view->ExpandSel(b, 1, oldPos);
1869,12 → 1869,12
else
{
b->CPos += 1; // new position within text ?
if (b->CPos > static_cast<int>(b->Ptext.count()))
if (b->CPos > static_cast<int>(b->itemText.count()))
{
b->CPos -= 1;
if (b->NextBox != 0)
{
if (b->NextBox->Ptext.count() != 0)
if (b->NextBox->itemText.count() != 0)
{
view->Deselect(true);
b->NextBox->CPos = 0;
1889,7 → 1889,7
setTBvals(b);
break;
case Key_Delete:
if (b->CPos == static_cast<int>(b->Ptext.count()))
if (b->CPos == static_cast<int>(b->itemText.count()))
{
if (b->HasSel)
{
1900,20 → 1900,20
keyrep = false;
return;
}
if (b->Ptext.count() == 0)
if (b->itemText.count() == 0)
{
keyrep = false;
return;
}
cr = b->Ptext.at(b->CPos)->ch;
cr = b->itemText.at(b->CPos)->ch;
if (b->HasSel)
DeleteSel(b);
else
b->Ptext.remove(b->CPos);
b->itemText.remove(b->CPos);
b->Tinput = false;
if ((cr == QChar(13)) && (b->Ptext.count() != 0))
if ((cr == QChar(13)) && (b->itemText.count() != 0))
{
view->chAbStyle(b, b->Ptext.at(QMAX(b->CPos-1,0))->cab);
view->chAbStyle(b, b->itemText.at(QMAX(b->CPos-1,0))->cab);
b->Tinput = false;
}
setTBvals(b);
1931,23 → 1931,23
keyrep = false;
return;
}
if (b->Ptext.count() == 0)
if (b->itemText.count() == 0)
{
keyrep = false;
return;
}
cr = b->Ptext.at(QMAX(b->CPos-1,0))->ch;
cr = b->itemText.at(QMAX(b->CPos-1,0))->ch;
if (b->HasSel)
DeleteSel(b);
else
{
b->CPos -= 1;
b->Ptext.remove(b->CPos);
b->itemText.remove(b->CPos);
}
b->Tinput = false;
if ((cr == QChar(13)) && (b->Ptext.count() != 0))
if ((cr == QChar(13)) && (b->itemText.count() != 0))
{
view->chAbStyle(b, b->Ptext.at(QMAX(b->CPos-1,0))->cab);
view->chAbStyle(b, b->itemText.at(QMAX(b->CPos-1,0))->cab);
b->Tinput = false;
}
setTBvals(b);
1961,7 → 1961,7
|| ((kk + KeyMod) == Prefs.KeyActions[60].KeyID)
|| ((kk + KeyMod) == Prefs.KeyActions[67].KeyID))
{
hg = new Pti;
hg = new ScText;
if ((kk + KeyMod) == Prefs.KeyActions[60].KeyID)
hg->ch = QString(QChar(30));
else if (kk == Key_Return)
1979,11 → 1979,11
hg->cscale = doc->CurrTextScale;
hg->cselect = false;
hg->cstyle = doc->CurrentStyle;
hg->cab = doc->CurrentABStil;
if (doc->Vorlagen[doc->CurrentABStil].Font != "")
hg->cab = doc->currentParaStyle;
if (doc->docParagraphStyles[doc->currentParaStyle].Font != "")
{
hg->cfont = doc->Vorlagen[doc->CurrentABStil].Font;
hg->csize = doc->Vorlagen[doc->CurrentABStil].FontSize;
hg->cfont = doc->docParagraphStyles[doc->currentParaStyle].Font;
hg->csize = doc->docParagraphStyles[doc->currentParaStyle].FontSize;
}
hg->cextra = 0;
hg->xp = 0;
1991,7 → 1991,7
hg->PRot = 0;
hg->PtransX = 0;
hg->PtransY = 0;
b->Ptext.insert(b->CPos, hg);
b->itemText.insert(b->CPos, hg);
b->CPos += 1;
b->Tinput = true;
view->RefreshItem(b);
1999,7 → 1999,7
}
if ((kk + KeyMod) == Prefs.KeyActions[56].KeyID)
{
b->Ptext.at(QMAX(b->CPos-1,0))->cstyle ^= 128;
b->itemText.at(QMAX(b->CPos-1,0))->cstyle ^= 128;
b->Tinput = true;
view->RefreshItem(b);
break;
2027,7 → 2027,7
}
if (((uc[0] > QChar(31)) || (as == 13) || (as == 30)) && ((*doc->AllFonts)[doc->CurrFont]->CharWidth.contains(uc[0].unicode())))
{
hg = new Pti;
hg = new ScText;
hg->ch = uc;
hg->cfont = doc->CurrFont;
hg->ccolor = doc->CurrTextFill;
2039,11 → 2039,11
hg->cextra = 0;
hg->cselect = false;
hg->cstyle = doc->CurrentStyle;
hg->cab = doc->CurrentABStil;
if (doc->Vorlagen[doc->CurrentABStil].Font != "")
hg->cab = doc->currentParaStyle;
if (doc->docParagraphStyles[doc->currentParaStyle].Font != "")
{
hg->cfont = doc->Vorlagen[doc->CurrentABStil].Font;
hg->csize = doc->Vorlagen[doc->CurrentABStil].FontSize;
hg->cfont = doc->docParagraphStyles[doc->currentParaStyle].Font;
hg->csize = doc->docParagraphStyles[doc->currentParaStyle].FontSize;
}
hg->xp = 0;
hg->yp = 0;
2050,15 → 2050,15
hg->PRot = 0;
hg->PtransX = 0;
hg->PtransY = 0;
b->Ptext.insert(b->CPos, hg);
b->itemText.insert(b->CPos, hg);
b->CPos += 1;
if ((doc->Trenner->AutoCheck) && (b->CPos > 1))
if ((doc->docHyphenator->AutoCheck) && (b->CPos > 1))
{
Twort = "";
Tcoun = 0;
for (int hych = b->CPos-1; hych > -1; hych--)
{
Tcha = b->Ptext.at(hych)->ch;
Tcha = b->itemText.at(hych)->ch;
if (Tcha == " ")
{
Tcoun = hych+1;
2068,9 → 2068,9
}
if (Twort != "")
{
if (doc->Trenner->Language != b->Language)
doc->Trenner->slotNewDict(b->Language);
doc->Trenner->slotHyphenateWord(b, Twort, Tcoun);
if (doc->docHyphenator->Language != b->Language)
doc->docHyphenator->slotNewDict(b->Language);
doc->docHyphenator->slotHyphenateWord(b, Twort, Tcoun);
}
}
b->Tinput = true;
2078,8 → 2078,8
}
break;
}
if (b->Ptext.count() != 0)
if (b->Ptext.at(QMAX(b->CPos-1, 0))->yp != 0)
if (b->itemText.count() != 0)
if (b->itemText.at(QMAX(b->CPos-1, 0))->yp != 0)
view->slotDoCurs(true);
if ((kk == Key_Left) || (kk == Key_Right) || (kk == Key_Up) || (kk == Key_Down))
{
2245,7 → 2245,7
if (HaveDoc)
doc->OpenNodes = Tpal->buildReopenVals();
doc = new ScribusDoc(&Prefs);
doc->Einheit = einh;
doc->docUnitIndex = einh;
if (fp)
doc->FirstPageLeft = firstleft;
doc->PageOri = Ori;
2269,7 → 2269,7
doc->PDF_Optionen.PrintProf = doc->CMSSettings.DefaultPrinterProfile;
doc->PDF_Optionen.Intent = doc->CMSSettings.DefaultIntentMonitor;
doc->PDF_Optionen.Intent2 = doc->CMSSettings.DefaultIntentMonitor2;
struct LPIset lpo;
struct LPIData lpo;
lpo.Frequency = 75;
lpo.SpotFunc = 2;
lpo.Angle = 105;
2283,7 → 2283,7
doc->ActiveLayer = 0;
HaveDoc++;
DocNr++;
doc->AppMode = 1;
doc->appMode = NormalMode;
doc->PageColors = Prefs.DColors;
doc->loading = true;
ScribusWin* w = new ScribusWin(wsp, doc);
2353,7 → 2353,7
doc->setUnModified();
doc->loading = false;
doc->DocItems = doc->Items;
doc->ActPage = doc->Pages.at(0);
doc->currentPage = doc->Pages.at(0);
doc->OpenNodes.clear();
// Tpal->BuildTree(view);
// Sepal->Rebuild();
2428,7 → 2428,7
}
if (doc->TemplateMode)
ActWin->muster->show();
setAppMode(doc->AppMode);
setAppMode(doc->appMode);
}
w->setFocus();
if (w->isMaximized())
2491,7 → 2491,7
doc->FirstPnum = dia->pageNumber->value();
doc->resetPage(tpr2, lr2, rr2, br2, fp);
doc->Before = dia->inBackground->isChecked();
doc->RandFarbig = dia->checkUnprintable->isChecked();
doc->marginColored = dia->checkUnprintable->isChecked();
doc->papColor = dia->colorPaper;
doc->guidesSettings.marginsShown = dia->tabGuides->checkMargin->isChecked();
doc->guidesSettings.framesShown = dia->tabGuides->checkFrame->isChecked();
2602,8 → 2602,8
doc->ASaveTimer->stop();
doc->ASaveTimer->start(doc->AutoSaveTime);
}
doc->Trenner->slotNewDict(dia->tabHyphenator->language->currentText());
doc->Trenner->slotNewSettings(dia->tabHyphenator->wordLen->value(),
doc->docHyphenator->slotNewDict(dia->tabHyphenator->language->currentText());
doc->docHyphenator->slotNewSettings(dia->tabHyphenator->wordLen->value(),
!dia->tabHyphenator->verbose->isChecked(),
dia->tabHyphenator->input->isChecked(),
dia->tabHyphenator->maxCount->value());
2676,7 → 2676,7
doc->Items.at(b)->PicArt = doc->guidesSettings.showPic;
}
view->reformPages();
view->GotoPage(doc->ActPage->PageNr);
view->GotoPage(doc->currentPage->PageNr);
view->DrawNew();
Mpal->ShowCMS();
// Sepal->RebuildPage();
2694,7 → 2694,7
void ScribusApp::SwitchWin()
{
int a;
CListe::Iterator it;
ColorList::Iterator it;
QPixmap pm = QPixmap(15, 15);
a = 0;
ColorMenC->clear();
2736,8 → 2736,8
Lpal->setLayers(&doc->Layers, &doc->ActiveLayer);
view->LaMenu();
view->setLayMenTxt(doc->ActiveLayer);
doc->CurrentABStil = 0;
slotChangeUnit(doc->Einheit, false);
doc->currentParaStyle = 0;
slotChangeUnit(doc->docUnitIndex, false);
if (doc->EditClip)
{
doc->EditClip = !doc->EditClip;
2839,7 → 2839,7
pageMenu->setItemEnabled(pgmv, setter);
editMenu->setItemEnabled(tman, 1);
editMenu->setItemEnabled(jman, 1);
CListe::Iterator it;
ColorList::Iterator it;
QPixmap pm = QPixmap(15, 15);
a = 0;
ColorMenC->clear();
2866,9 → 2866,9
Lpal->setLayers(&doc->Layers, &doc->ActiveLayer);
view->LaMenu();
view->setLayMenTxt(doc->ActiveLayer);
doc->CurrentABStil = 0;
slotChangeUnit(doc->Einheit);
doc->Trenner = new Hyphenator(this, doc, this);
doc->currentParaStyle = 0;
slotChangeUnit(doc->docUnitIndex);
doc->docHyphenator = new Hyphenator(this, doc, this);
buildFontMenu();
connect(view, SIGNAL(changeUN(int)), this, SLOT(slotChangeUnit(int)));
connect(view, SIGNAL(changeLA(int)), Lpal, SLOT(MarkActiveLayer(int)));
2901,7 → 2901,7
connect(view, SIGNAL(ItemRadius(double)), Mpal, SLOT(setRR(double)));
connect(view, SIGNAL(Amode(int)), this, SLOT(setAppMode(int)));
connect(view, SIGNAL(PaintingDone()), this, SLOT(slotSelect()));
/* connect(doc->ActPage, SIGNAL(DocChanged()), this, SLOT(slotDocCh())); */
/* connect(doc->currentPage, SIGNAL(DocChanged()), this, SLOT(slotDocCh())); */
connect(view, SIGNAL(HavePoint(bool, bool)), Npal, SLOT(HaveNode(bool, bool)));
connect(view, SIGNAL(MousePos(double, double)), this, SLOT(ReportMP(double, double)));
connect(view, SIGNAL(ItemRadius(double)), Mpal, SLOT(setRR(double)));
2921,8 → 2921,8
connect(view, SIGNAL(ToScrap(QString)), this, SLOT(PutScrap(QString)));
connect(view, SIGNAL(EditGuides()), this, SLOT(ManageGuides()));
connect(view, SIGNAL(LoadElem(QString, int ,int, bool, bool, ScribusDoc *, ScribusView*)), this, SLOT(slotElemRead(QString, int, int, bool, bool, ScribusDoc *, ScribusView*)));
/* connect(doc->ActPage, SIGNAL(AddBM(PageItem *)), this, SLOT(AddBookMark(PageItem *)));
connect(doc->ActPage, SIGNAL(DelBM(PageItem *)), this, SLOT(DelBookMark(PageItem *))); */
/* connect(doc->currentPage, SIGNAL(AddBM(PageItem *)), this, SLOT(AddBookMark(PageItem *)));
connect(doc->currentPage, SIGNAL(DelBM(PageItem *)), this, SLOT(DelBookMark(PageItem *))); */
connect(view, SIGNAL(RasterPic(bool)), this, SLOT(HaveRaster(bool)));
connect(view, SIGNAL(EditText()), this, SLOT(slotStoryEditor()));
connect(view, SIGNAL(DoGroup()), this, SLOT(GroupObj()));
2931,10 → 2931,10
connect(view, SIGNAL(LevelChanged(uint )), Mpal, SLOT(setLevel(uint)));
/* if (!doc->TemplateMode)
{
connect(doc->ActPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint)));
connect(doc->ActPage, SIGNAL(AddObj(uint, uint)), Tpal, SLOT(slotAddElement(uint, uint)));
connect(doc->ActPage, SIGNAL(UpdtObj(uint, uint)), Tpal, SLOT(slotUpdateElement(uint, uint)));
connect(doc->ActPage, SIGNAL(MoveObj(uint, uint, uint)), Tpal, SLOT(slotMoveElement(uint, uint, uint)));
connect(doc->currentPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint)));
connect(doc->currentPage, SIGNAL(AddObj(uint, uint)), Tpal, SLOT(slotAddElement(uint, uint)));
connect(doc->currentPage, SIGNAL(UpdtObj(uint, uint)), Tpal, SLOT(slotUpdateElement(uint, uint)));
connect(doc->currentPage, SIGNAL(MoveObj(uint, uint, uint)), Tpal, SLOT(slotMoveElement(uint, uint, uint)));
} */
doc->PDF_Optionen.BleedBottom = doc->PageM.Bottom;
doc->PDF_Optionen.BleedTop = doc->PageM.Top;
2978,7 → 2978,7
WerkTools->Textedit2->setEnabled(false);
WerkTools->Rotiere->setEnabled(false);
Mpal->Cpal->gradientQCombo->setCurrentItem(0);
// Tpal->slotShowSelect(doc->ActPage->PageNr, -1);
// Tpal->slotShowSelect(doc->currentPage->PageNr, -1);
break;
case 2:
importMenu->changeItem(fid2, tr("Get Picture..."));
3014,7 → 3014,7
editMenu->setItemEnabled(edid1, 1);
editMenu->setItemEnabled(edid2, 1);
editMenu->setItemEnabled(edid4, 0);
if (b->Ptext.count() == 0)
if (b->itemText.count() == 0)
editMenu->setItemEnabled(Sear, 0);
else
editMenu->setItemEnabled(Sear, 1);
3039,7 → 3039,7
if ((b->NextBox != 0) || (b->BackBox != 0))
{
WerkTools->KetteAus->setEnabled(true);
if ((b->BackBox != 0) && (b->Ptext.count() == 0))
if ((b->BackBox != 0) && (b->itemText.count() == 0))
WerkTools->Textedit->setEnabled(false);
else
WerkTools->Textedit->setEnabled(true);
3050,7 → 3050,7
WerkTools->KetteEin->setEnabled(true);
if (doc->MasterP)
WerkTools->KetteEin->setEnabled(false);
if (doc->AppMode == 7)
if (doc->appMode == EditMode)
{
setTBvals(b);
editMenu->setItemEnabled(edid5, 1);
3066,8 → 3066,8
view->HR->Cols = b->Cols;
view->HR->Extra = b->Extra;
view->HR->RExtra = b->RExtra;
view->HR->First = doc->Vorlagen[doc->CurrentABStil].First;
view->HR->Indent = doc->Vorlagen[doc->CurrentABStil].Indent;
view->HR->First = doc->docParagraphStyles[doc->currentParaStyle].First;
view->HR->Indent = doc->docParagraphStyles[doc->currentParaStyle].Indent;
if ((b->flippedH % 2 != 0) || (b->Reverse))
view->HR->Revers = true;
else
3074,10 → 3074,10
view->HR->Revers = false;
view->HR->ItemPosValid = true;
view->HR->repX = false;
if (doc->CurrentABStil < 5)
if (doc->currentParaStyle < 5)
view->HR->TabValues = b->TabValues;
else
view->HR->TabValues = doc->Vorlagen[doc->CurrentABStil].TabValues;
view->HR->TabValues = doc->docParagraphStyles[doc->currentParaStyle].TabValues;
view->HR->repaint();
}
else
3095,8 → 3095,8
emit TextScale(doc->CurrTextScale);
setStilvalue(doc->CurrentStyle);
}
doc->Vorlagen[0].LineSpa = b->LineSp;
doc->Vorlagen[0].Ausri = b->Ausrich;
doc->docParagraphStyles[0].LineSpa = b->LineSp;
doc->docParagraphStyles[0].textAlignment = b->textAlignment;
break;
case 8:
importMenu->changeItem(fid2, tr("Get Text..."));
3124,7 → 3124,7
WerkTools->Textedit2->setEnabled(true);
WerkTools->KetteEin->setEnabled(false);
WerkTools->KetteAus->setEnabled(false);
if (doc->AppMode == 7)
if (doc->appMode == EditMode)
setTBvals(b);
else
{
3288,7 → 3288,7
/* if ((reb) && (!doc->TemplateMode) && (view->SelItem.count() != 0))
{
for (uint upd = 0; upd < view->SelItem.count(); ++upd)
Tpal->slotUpdateElement(doc->ActPage->PageNr, view->SelItem.at(upd)->ItemNr);
Tpal->slotUpdateElement(doc->currentPage->PageNr, view->SelItem.at(upd)->ItemNr);
} */
if (!doc->isModified())
doc->setModified();
3403,7 → 3403,7
bool ScribusApp::slotDocMerge()
{
bool ret = false;
MergeDoc *dia = new MergeDoc(this, false, doc->PageC, doc->ActPage->PageNr + 1);
MergeDoc *dia = new MergeDoc(this, false, doc->PageC, doc->currentPage->PageNr + 1);
if (dia->exec())
{
FMess->setText(tr("Importing Pages..."));
3434,9 → 3434,9
}
else
{
startPage = doc->ActPage->PageNr + 1;
startPage = doc->currentPage->PageNr + 1;
nrToImport = pageNs.size();
if (pageNs.size() > (doc->PageC - doc->ActPage->PageNr))
if (pageNs.size() > (doc->PageC - doc->currentPage->PageNr))
{
qApp->setOverrideCursor(QCursor(arrowCursor), true);
QMessageBox mb( tr("Import Page(s)"),
3456,10 → 3456,10
switch( mb.exec() ) {
case QMessageBox::Yes:
nrToImport = pageNs.size();
addNewPages(doc->PageC, 2, pageNs.size() - (doc->PageC - doc->ActPage->PageNr));
addNewPages(doc->PageC, 2, pageNs.size() - (doc->PageC - doc->currentPage->PageNr));
break;
case QMessageBox::No:
nrToImport = doc->PageC - doc->ActPage->PageNr;
nrToImport = doc->PageC - doc->currentPage->PageNr;
break;
case QMessageBox::Cancel:
doIt = false;
3594,7 → 3594,7
}
Prefs.AvailFonts.AddScalableFonts(fi.dirPath(true)+"/", FName);
doc=new ScribusDoc(&Prefs);
doc->AppMode = 1;
doc->appMode = NormalMode;
doc->HasCMS = false;
doc->ActiveLayer = 0;
doc->OpenNodes.clear();
3639,7 → 3639,7
HaveDoc++;
if (doc->PDF_Optionen.LPISettings.count() == 0)
{
struct LPIset lpo;
struct LPIData lpo;
lpo.Frequency = 75;
lpo.SpotFunc = 2;
lpo.Angle = 105;
3937,8 → 3937,8
gtGetText* gt = new gtGetText();
gt->run(false);
delete gt;
if (doc->Trenner->AutoCheck)
doc->Trenner->slotHyphenate(b);
if (doc->docHyphenator->AutoCheck)
doc->docHyphenator->slotHyphenate(b);
view->DrawNew();
slotDocCh();
}
3960,8 → 3960,8
gtGetText* gt = new gtGetText();
gt->run(true);
delete gt;
if (doc->Trenner->AutoCheck)
doc->Trenner->slotHyphenate(view->SelItem.at(0));
if (doc->docHyphenator->AutoCheck)
doc->docHyphenator->slotHyphenate(view->SelItem.at(0));
view->DrawNew();
slotDocCh();
}
4101,7 → 4101,7
ActWin->muster->close();
qApp->processEvents();
}
setAppMode(1);
setAppMode(NormalMode);
doc->ASaveTimer->stop();
disconnect(doc->ASaveTimer, SIGNAL(timeout()), doc->WinHan, SLOT(slotAutoSave()));
disconnect(doc->WinHan, SIGNAL(AutoSaved()), this, SLOT(slotAutoSaved()));
4220,7 → 4220,7
}
options.copies = 1;
Druck *printer = new Druck(this, options.filename, options.printer, PDef.Command, Prefs.GCRMode);
printer->setMinMax(1, doc->Pages.count(), doc->ActPage->PageNr+1);
printer->setMinMax(1, doc->Pages.count(), doc->currentPage->PageNr+1);
if (printer->exec())
{
ReOrderText(doc, view);
4229,7 → 4229,7
options.filename = printer->outputFileName();
options.toFile = printer->outputToFile();
if (printer->CurrentPage->isChecked())
options.pageNumbers.push_back(doc->ActPage->PageNr+1);
options.pageNumbers.push_back(doc->currentPage->PageNr+1);
else
{
if (printer->RadioButton1->isChecked())
4365,9 → 4365,9
{
Buffer2 = "<SCRIBUSTEXT>";
PageItem *b = view->SelItem.at(0);
if (doc->AppMode == 7)
if (doc->appMode == EditMode)
{
if ((b->Ptext.count() == 0) || (!b->HasSel))
if ((b->itemText.count() == 0) || (!b->HasSel))
return;
PageItem *nb = b;
while (nb != 0)
4379,16 → 4379,16
}
while (nb != 0)
{
for (a = 0; a < nb->Ptext.count(); ++a)
for (a = 0; a < nb->itemText.count(); ++a)
{
if (nb->Ptext.at(a)->cselect)
if (nb->itemText.at(a)->cselect)
{
if (nb->Ptext.at(a)->ch == QChar(13))
if (nb->itemText.at(a)->ch == QChar(13))
{
Buffer2 += QChar(5);
BufferI += QChar(10);
}
else if (nb->Ptext.at(a)->ch == QChar(9))
else if (nb->itemText.at(a)->ch == QChar(9))
{
Buffer2 += QChar(4);
BufferI += QChar(9);
4395,20 → 4395,20
}
else
{
Buffer2 += nb->Ptext.at(a)->ch;
BufferI += nb->Ptext.at(a)->ch;
Buffer2 += nb->itemText.at(a)->ch;
BufferI += nb->itemText.at(a)->ch;
}
Buffer2 += "\t";
Buffer2 += nb->Ptext.at(a)->cfont+"\t";
Buffer2 += QString::number(nb->Ptext.at(a)->csize)+"\t";
Buffer2 += nb->Ptext.at(a)->ccolor+"\t";
Buffer2 += QString::number(nb->Ptext.at(a)->cextra)+"\t";
Buffer2 += QString::number(nb->Ptext.at(a)->cshade)+'\t';
Buffer2 += QString::number(nb->Ptext.at(a)->cstyle)+'\t';
Buffer2 += QString::number(nb->Ptext.at(a)->cab)+'\t';
Buffer2 += nb->Ptext.at(a)->cstroke+"\t";
Buffer2 += QString::number(nb->Ptext.at(a)->cshade2)+'\t';
Buffer2 += QString::number(nb->Ptext.at(a)->cscale)+'\n';
Buffer2 += nb->itemText.at(a)->cfont+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->csize)+"\t";
Buffer2 += nb->itemText.at(a)->ccolor+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->cextra)+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->cshade)+'\t';
Buffer2 += QString::number(nb->itemText.at(a)->cstyle)+'\t';
Buffer2 += QString::number(nb->itemText.at(a)->cab)+'\t';
Buffer2 += nb->itemText.at(a)->cstroke+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->cshade2)+'\t';
Buffer2 += QString::number(nb->itemText.at(a)->cscale)+'\n';
}
}
DeleteSel(nb);
4441,7 → 4441,7
{
Buffer2 = "<SCRIBUSTEXT>";
PageItem *b = view->SelItem.at(0);
if ((doc->AppMode == 7) && (b->HasSel))
if ((doc->appMode == EditMode) && (b->HasSel))
{
Buffer2 += "";
PageItem *nb = b;
4454,16 → 4454,16
}
while (nb != 0)
{
for (a = 0; a < nb->Ptext.count(); ++a)
for (a = 0; a < nb->itemText.count(); ++a)
{
if (nb->Ptext.at(a)->cselect)
if (nb->itemText.at(a)->cselect)
{
if (nb->Ptext.at(a)->ch == QChar(13))
if (nb->itemText.at(a)->ch == QChar(13))
{
Buffer2 += QChar(5);
BufferI += QChar(10);
}
else if (nb->Ptext.at(a)->ch == QChar(9))
else if (nb->itemText.at(a)->ch == QChar(9))
{
Buffer2 += QChar(4);
BufferI += QChar(9);
4470,20 → 4470,20
}
else
{
Buffer2 += nb->Ptext.at(a)->ch;
BufferI += nb->Ptext.at(a)->ch;
Buffer2 += nb->itemText.at(a)->ch;
BufferI += nb->itemText.at(a)->ch;
}
Buffer2 += "\t";
Buffer2 += nb->Ptext.at(a)->cfont+"\t";
Buffer2 += QString::number(nb->Ptext.at(a)->csize)+"\t";
Buffer2 += nb->Ptext.at(a)->ccolor+"\t";
Buffer2 += QString::number(nb->Ptext.at(a)->cextra)+"\t";
Buffer2 += QString::number(nb->Ptext.at(a)->cshade)+"\t";
Buffer2 += QString::number(nb->Ptext.at(a)->cstyle)+"\t";
Buffer2 += QString::number(nb->Ptext.at(a)->cab)+"\t";
Buffer2 += nb->Ptext.at(a)->cstroke+"\t";
Buffer2 += QString::number(nb->Ptext.at(a)->cshade2)+"\t";
Buffer2 += QString::number(nb->Ptext.at(a)->cscale)+"\n";
Buffer2 += nb->itemText.at(a)->cfont+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->csize)+"\t";
Buffer2 += nb->itemText.at(a)->ccolor+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->cextra)+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->cshade)+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->cstyle)+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->cab)+"\t";
Buffer2 += nb->itemText.at(a)->cstroke+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->cshade2)+"\t";
Buffer2 += QString::number(nb->itemText.at(a)->cscale)+"\n";
}
}
nb = nb->NextBox;
4506,13 → 4506,13
 
void ScribusApp::slotEditPaste()
{
struct Pti *hg;
struct ScText *hg;
NoFrameEdit();
if (HaveDoc)
{
if (Buffer2.isNull())
return;
if (doc->AppMode == 7)
if (doc->appMode == EditMode)
{
PageItem *b = view->SelItem.at(0);
if (b->HasSel)
4529,7 → 4529,7
QStringList::Iterator it;
wt = QStringList::split("\t", cc);
it = wt.begin();
hg = new Pti;
hg = new ScText;
hg->ch = (*it);
if (hg->ch == QChar(5))
hg->ch = QChar(13);
4565,7 → 4565,7
hg->cscale = 100;
else
hg->cscale = (*it).toInt();
b->Ptext.insert(b->CPos, hg);
b->itemText.insert(b->CPos, hg);
b->CPos += 1;
hg->PRot = 0;
hg->PtransX = 0;
4576,14 → 4576,14
{
Serializer *ss = new Serializer("");
ss->Objekt = Buffer2;
int st = doc->CurrentABStil;
int st = doc->currentParaStyle;
if (st > 5)
ss->GetText(b, st, doc->Vorlagen[st].Font, doc->Vorlagen[st].FontSize, true);
ss->GetText(b, st, doc->docParagraphStyles[st].Font, doc->docParagraphStyles[st].FontSize, true);
else
ss->GetText(b, st, b->IFont, b->ISize, true);
delete ss;
if (doc->Trenner->AutoCheck)
doc->Trenner->slotHyphenate(b);
if (doc->docHyphenator->AutoCheck)
doc->docHyphenator->slotHyphenate(b);
}
view->RefreshItem(b);
}
4606,7 → 4606,7
 
void ScribusApp::SelectAll()
{
if (doc->AppMode == 7)
if (doc->appMode == EditMode)
{
PageItem *b = view->SelItem.at(0);
PageItem *nb = b;
4619,9 → 4619,9
}
while (nb != 0)
{
for (uint a = 0; a < nb->Ptext.count(); ++a)
for (uint a = 0; a < nb->itemText.count(); ++a)
{
nb->Ptext.at(a)->cselect = true;
nb->itemText.at(a)->cselect = true;
nb->HasSel = true;
}
nb = nb->NextBox;
4685,12 → 4685,12
{
if (cc.startsWith("<SCRIBUSELEM"))
{
if (doc->AppMode != 7)
if (doc->appMode != EditMode)
editMenu->setItemEnabled(edid3, 1);
}
else
{
if (doc->AppMode == 7)
if (doc->appMode == EditMode)
editMenu->setItemEnabled(edid3, 1);
}
}
4710,7 → 4710,7
}
while (nb != 0)
{
for (uint a = 0; a < nb->Ptext.count(); ++a)
for (uint a = 0; a < nb->itemText.count(); ++a)
{
DeleteSel(nb);
nb->CPos = 0;
4806,7 → 4806,7
 
void ScribusApp::applyNewMaster(QString name)
{
Apply_Temp(name, doc->ActPage->PageNr);
Apply_Temp(name, doc->currentPage->PageNr);
view->DrawNew();
slotDocCh();
doc->UnDoValid = false;
4834,7 → 4834,7
{
NoFrameEdit();
view->Deselect(true);
InsPage *dia = new InsPage(this, doc, doc->ActPage->PageNr, doc->Pages.count(), doc->PageFP);
InsPage *dia = new InsPage(this, doc, doc->currentPage->PageNr, doc->Pages.count(), doc->PageFP);
if (dia->exec())
{
QString template2 = (doc->PageFP) ? dia->getTemplate2() : tr("Normal");
4863,13 → 4863,13
slotNewPage(wot);
if (doc->PageFP)
{
if ((doc->ActPage->PageNr % 2 == 0) && (doc->FirstPageLeft))
if ((doc->currentPage->PageNr % 2 == 0) && (doc->FirstPageLeft))
applyNewMaster(based1);
if ((doc->ActPage->PageNr % 2 == 1) && (doc->FirstPageLeft))
if ((doc->currentPage->PageNr % 2 == 1) && (doc->FirstPageLeft))
applyNewMaster(based2);
if ((doc->ActPage->PageNr % 2 == 0) && (!doc->FirstPageLeft))
if ((doc->currentPage->PageNr % 2 == 0) && (!doc->FirstPageLeft))
applyNewMaster(based2);
if ((doc->ActPage->PageNr % 2 == 1) && (!doc->FirstPageLeft))
if ((doc->currentPage->PageNr % 2 == 1) && (!doc->FirstPageLeft))
applyNewMaster(based1);
}
else
4883,13 → 4883,13
slotNewPage(wot);
if (doc->PageFP)
{
if ((doc->ActPage->PageNr % 2 == 0) && (doc->FirstPageLeft))
if ((doc->currentPage->PageNr % 2 == 0) && (doc->FirstPageLeft))
applyNewMaster(based1);
if ((doc->ActPage->PageNr % 2 == 1) && (doc->FirstPageLeft))
if ((doc->currentPage->PageNr % 2 == 1) && (doc->FirstPageLeft))
applyNewMaster(based2);
if ((doc->ActPage->PageNr % 2 == 0) && (!doc->FirstPageLeft))
if ((doc->currentPage->PageNr % 2 == 0) && (!doc->FirstPageLeft))
applyNewMaster(based2);
if ((doc->ActPage->PageNr % 2 == 1) && (!doc->FirstPageLeft))
if ((doc->currentPage->PageNr % 2 == 1) && (!doc->FirstPageLeft))
applyNewMaster(based1);
}
else
4903,13 → 4903,13
slotNewPage(doc->Pages.count());
if (doc->PageFP)
{
if ((doc->ActPage->PageNr % 2 == 0) && (doc->FirstPageLeft))
if ((doc->currentPage->PageNr % 2 == 0) && (doc->FirstPageLeft))
applyNewMaster(based1);
if ((doc->ActPage->PageNr % 2 == 1) && (doc->FirstPageLeft))
if ((doc->currentPage->PageNr % 2 == 1) && (doc->FirstPageLeft))
applyNewMaster(based2);
if ((doc->ActPage->PageNr % 2 == 0) && (!doc->FirstPageLeft))
if ((doc->currentPage->PageNr % 2 == 0) && (!doc->FirstPageLeft))
applyNewMaster(based2);
if ((doc->ActPage->PageNr % 2 == 1) && (!doc->FirstPageLeft))
if ((doc->currentPage->PageNr % 2 == 1) && (!doc->FirstPageLeft))
applyNewMaster(based1);
}
else
5349,6 → 5349,7
}
else
{
slotSelect();
Npal->setDoc(doc, view);
Npal->MoveN();
Npal->HaveNode(false, false);
5442,20 → 5443,20
WerkToolsP->PDFTool->setOn(false);
WerkToolsP->PDFaTool->setOn(false);
WerkTools->Measure->setOn(false);
setAppMode(1);
setAppMode(NormalMode);
}
 
void ScribusApp::ModeFromTB(int m)
{
if (m == 3)
if (m == StartStoryEditor)
{
slotStoryEditor();
slotSelect();
return;
}
if (m == 10)
if (m == LinkFrames)
doc->ElemToLink = view->SelItem.at(0);
if (doc->AppMode == 13)
if (doc->appMode == DrawBezierLine)
return;
setAppMode(m);
}
5470,11 → 5471,11
b = view->SelItem.at(0);
else
b = 0;
int oldMode = doc->AppMode;
doc->AppMode = mode;
if (oldMode == 24)
int oldMode = doc->appMode;
doc->appMode = mode;
if (oldMode == MeasurementTool)
disconnect(view, SIGNAL(MVals(double, double, double, double, double, double, int )), MaPal, SLOT(setValues(double, double, double, double, double, double, int )));
if (oldMode == 7)
if (oldMode == EditMode)
{
disconnect(doc->CurTimer, SIGNAL(timeout()), view, SLOT(BlinkCurs()));
doc->CurTimer->stop();
5496,7 → 5497,7
view->HR->repX = false;
view->HR->repaint();
}
if (mode == 7)
if (mode == EditMode)
{
view->LE->setFocusPolicy(QWidget::NoFocus);
view->PGS->PageCombo->setFocusPolicy(QWidget::NoFocus);
5504,7 → 5505,7
{
if ((b->PType == 6) || (b->PType == 7) || (b->PType == 8))
{
doc->AppMode = 1;
doc->appMode = 1;
ToggleFrameEdit();
return;
}
5548,24 → 5549,24
view->RefreshItem(b);
}
}
if (mode == 13)
if (mode == DrawBezierLine)
{
if (view->SelItem.count() != 0)
view->Deselect(true);
view->FirstPoly = true;
}
if (mode == 25)
if (mode == EditGradientVectors)
Mpal->Cpal->gradEditButton->setOn(true);
if (mode == 24)
if (mode == MeasurementTool)
{
MaPal->show();
connect(view, SIGNAL(MVals(double, double, double, double, double, double, int)), MaPal, SLOT(setValues(double, double, double, double, double, double, int )));
}
if (mode == 6)
if (mode == Magnifier)
qApp->setOverrideCursor(QCursor(loadIcon("LupeZ.xpm")), true);
else
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
if (mode == 2)
if (mode == DrawShapes)
{
doc->SubMode = WerkTools->SubMode;
doc->ShapeValues = WerkTools->ShapeVals;
5575,7 → 5576,7
}
else
doc->SubMode = -1;
if (mode == 1)
if (mode == NormalMode)
{
WerkTools->Select->setOn(true);
WerkTools->Rotiere->setOn(false);
5595,7 → 5596,7
WerkTools->Measure->setOn(false);
Mpal->Cpal->gradEditButton->setOn(false);
}
if ((mode == 10) || (mode == 11))
if ((mode == LinkFrames) || (mode == UnlinkFrames))
view->updateContents();
}
}
5709,7 → 5710,7
if (doc->Pages.count() == 1)
return;
/* if (!doc->TemplateMode)
disconnect(doc->ActPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint))); */
disconnect(doc->currentPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint))); */
view->SelItem.clear();
for (uint d = 0; d < doc->Items.count(); ++d)
{
5725,7 → 5726,7
view->delPage(pg);
// AdjustBM();
// if (!doc->TemplateMode)
// connect(doc->ActPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint)));
// connect(doc->currentPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint)));
view->DrawNew();
doc->OpenNodes.clear();
// Tpal->BuildTree(view);
5745,12 → 5746,12
PageItem* ite;
NoFrameEdit();
view->Deselect(true);
DelPages *dia = new DelPages(this, doc->ActPage->PageNr+1, doc->Pages.count());
DelPages *dia = new DelPages(this, doc->currentPage->PageNr+1, doc->Pages.count());
if (dia->exec())
{
view->SelItem.clear();
// if (!doc->TemplateMode)
// disconnect(doc->ActPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint)));
// disconnect(doc->currentPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint)));
for (int a = dia->getToPage()-1; a >= dia->getFromPage()-1; a--)
{
/* disconnect(view->Pages.at(pg), SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint))); */
5767,7 → 5768,7
// AdjustBM();
}
// if (!doc->TemplateMode)
// connect(doc->ActPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint)));
// connect(doc->currentPage, SIGNAL(DelObj(uint, uint)), Tpal, SLOT(slotRemoveElement(uint, uint)));
if (view->SelItem.count() != 0)
view->DeleteItem();
for (int a = dia->getToPage()-1; a >= dia->getFromPage()-1; a--)
5792,7 → 5793,7
void ScribusApp::MovePage()
{
// NoFrameEdit();
MovePages *dia = new MovePages(this, doc->ActPage->PageNr+1, doc->Pages.count(), true);
MovePages *dia = new MovePages(this, doc->currentPage->PageNr+1, doc->Pages.count(), true);
if (dia->exec())
{
// doc->OpenNodes = Tpal->buildReopenVals();
5817,7 → 5818,7
void ScribusApp::CopyPage()
{
NoFrameEdit();
MovePages *dia = new MovePages(this, doc->ActPage->PageNr+1, doc->Pages.count(), false);
MovePages *dia = new MovePages(this, doc->currentPage->PageNr+1, doc->Pages.count(), false);
if (dia->exec())
{
doc->loading = true;
5835,7 → 5836,7
slotNewPage(doc->Pages.count());
break;
}
Page* Ziel = doc->ActPage;
Page* Ziel = doc->currentPage;
QMap<int,int> TableID;
QPtrList<PageItem> TableItems;
TableID.clear();
6076,10 → 6077,10
b = view->SelItem.at(0);
if ((b->PType == 4) || (b->PType == 8))
{
if ((doc->AppMode == 7) && (b->Ptext.count() != 0))
if ((doc->appMode == EditMode) && (b->itemText.count() != 0))
{
la = b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->ccolor;
lb = b->Ptext.at(QMIN(b->CPos, static_cast<int>(b->Ptext.count()-1)))->cshade;
la = b->itemText.at(QMIN(b->CPos, static_cast<int>(b->itemText.count()-1)))->ccolor;
lb = b->itemText.at(QMIN(b->CPos, static_cast<int>(b->itemText.count()-1)))->cshade;
}
else
{
6185,10 → 6186,10
doc->MasterItems = doc->Items;
else
doc->DocItems = doc->Items;
for (uint a=5; a<doc->Vorlagen.count(); ++a)
for (uint a=5; a<doc->docParagraphStyles.count(); ++a)
{
ff = false;
nn = doc->Vorlagen[a].Vname;
nn = doc->docParagraphStyles[a].Vname;
for (uint b=0; b<dia->TempVorl.count(); ++b)
{
if (nn == dia->TempVorl[b].Vname)
6204,23 → 6205,23
{
for (uint b=0; b<dia->TempVorl.count(); ++b)
{
if ((doc->Vorlagen[a].LineSpa == dia->TempVorl[b].LineSpa) &&
(doc->Vorlagen[a].Indent == dia->TempVorl[b].Indent) &&
(doc->Vorlagen[a].First == dia->TempVorl[b].First) &&
(doc->Vorlagen[a].Ausri == dia->TempVorl[b].Ausri) &&
(doc->Vorlagen[a].Avor == dia->TempVorl[b].Avor) &&
(doc->Vorlagen[a].Anach == dia->TempVorl[b].Anach) &&
(doc->Vorlagen[a].Font == dia->TempVorl[b].Font) &&
(doc->Vorlagen[a].TabValues == dia->TempVorl[b].TabValues) &&
(doc->Vorlagen[a].Drop == dia->TempVorl[b].Drop) &&
(doc->Vorlagen[a].DropLin == dia->TempVorl[b].DropLin) &&
(doc->Vorlagen[a].FontEffect == dia->TempVorl[b].FontEffect) &&
(doc->Vorlagen[a].FColor == dia->TempVorl[b].FColor) &&
(doc->Vorlagen[a].FShade == dia->TempVorl[b].FShade) &&