Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 2309 → Rev 2308

/branches/Version13x/Scribus/scribus/pageitem.cpp
54,7 → 54,6
extern double RealCWidth(ScribusDoc *doc, Foi* name, QString ch, int Siz);
extern double RealCAscent(ScribusDoc *currentDoc, Foi* name, QString ch, int Size);
extern double RealCHeight(ScribusDoc *currentDoc, Foi* name, QString ch, int Size);
extern double RealFHeight(ScribusDoc *currentDoc, Foi* name, int Size);
extern QPointArray FlattenPath(FPointArray ina, QValueList<uint> &Segs);
extern double xy2Deg(double x, double y);
extern void BezierPoints(QPointArray *ar, QPoint n1, QPoint n2, QPoint n3, QPoint n4);
133,7 → 132,6
FrameType = 0;
IFont = Doc->toolSettings.defFont;
ISize = Doc->toolSettings.defSize;
LineSpMode = 0;
LineSp = ((Doc->toolSettings.defSize / 10.0) * static_cast<double>(Doc->typographicSetttings.autoLineSpacing) / 100) + (Doc->toolSettings.defSize / 10.0);
Doc->docParagraphStyles[0].LineSpa = LineSp;
CurX = 0;
608,11 → 606,6
for (int xxx=0; xxx<5; ++xxx)
{
Doc->docParagraphStyles[xxx].LineSpaMode = LineSpMode;
if (LineSpMode == 2)
Doc->docParagraphStyles[xxx].BaseAdj = true;
else
Doc->docParagraphStyles[xxx].BaseAdj = false;
Doc->docParagraphStyles[xxx].LineSpa = LineSp;
Doc->docParagraphStyles[xxx].FontSize = ISize;
Doc->docParagraphStyles[xxx].Indent = 0;
670,7 → 663,7
uint tabCc = 0;
for (a = 0; a < itemText.count(); ++a)
{
if (a >= MaxChars)
if (a > MaxChars)
break;
hl = itemText.at(a);
if (hl->cab < 5)
702,16 → 695,8
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
chs = qRound(10 * ((Doc->typographicSetttings.valueBaseGrid * (Doc->docParagraphStyles[hl->cab].DropLin-1)+(hl->cfont->numAscent * (Doc->docParagraphStyles[hl->cab].FontSize / 10.0))) / (RealCHeight(Doc, hl->cfont, chx, 10))));
else
{
if (Doc->docParagraphStyles[hl->cab].LineSpaMode == 0)
chs = qRound(10 * ((Doc->docParagraphStyles[hl->cab].LineSpa * (Doc->docParagraphStyles[hl->cab].DropLin-1)+(hl->cfont->numAscent * (Doc->docParagraphStyles[hl->cab].FontSize / 10.0))) / (RealCHeight(Doc, hl->cfont, chx, 10))));
else
{
double currasce = RealFHeight(Doc, hl->cfont, hl->csize);
chs = qRound(10 * ((currasce * (Doc->docParagraphStyles[hl->cab].DropLin-1)+(hl->cfont->numAscent * (Doc->docParagraphStyles[hl->cab].FontSize / 10.0))) / RealCHeight(Doc, hl->cfont, chx, 10)));
}
}
}
oldCurY = SetZeichAttr(hl, &chs, &chx);
if ((chx == QChar(9)) && (tTabValues.count() != 0) && (tabCc < tTabValues.count()) && (!tTabValues[tabCc].tabFillChar.isNull()))
{
1012,8 → 997,6
if (hl->ch == QChar(30))
chx = ExpandToken(a);
absa = hl->cab;
if (Doc->docParagraphStyles[absa].LineSpaMode == 1)
Doc->docParagraphStyles[absa].LineSpa = RealFHeight(Doc, hl->cfont, hl->csize);
if (a == 0)
{
if (BackBox != 0)
1074,15 → 1057,10
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
CurY += Doc->typographicSetttings.valueBaseGrid * (DropLines-1);
else
{
if (Doc->docParagraphStyles[absa].LineSpaMode == 0)
CurY += Doc->docParagraphStyles[absa].LineSpa * (DropLines-1);
else
CurY += RealFHeight(Doc, hl->cfont, hl->csize) * (DropLines-1);
}
}
}
}
if (DropCmode)
{
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
1092,18 → 1070,9
}
else
{
if (Doc->docParagraphStyles[absa].LineSpaMode == 0)
{
chsd = qRound(10 * ((Doc->docParagraphStyles[absa].LineSpa * (DropLines-1)+(hl->cfont->numAscent * (Doc->docParagraphStyles[hl->cab].FontSize / 10.0))) / (RealCHeight(Doc, hl->cfont, chx, 10))));
chs = qRound(10 * ((Doc->docParagraphStyles[absa].LineSpa * (DropLines-1)+(hl->cfont->numAscent * (Doc->docParagraphStyles[hl->cab].FontSize / 10.0))) / RealCAscent(Doc, hl->cfont, chx, 10)));
}
else
{
double currasce = RealFHeight(Doc, hl->cfont, hl->csize);
chsd = qRound(10 * ((currasce * (DropLines-1)+(hl->cfont->numAscent * (Doc->docParagraphStyles[hl->cab].FontSize / 10.0))) / (RealCHeight(Doc, hl->cfont, chx, 10))));
chs = qRound(10 * ((currasce * (DropLines-1)+(hl->cfont->numAscent * (Doc->docParagraphStyles[hl->cab].FontSize / 10.0))) / RealCAscent(Doc, hl->cfont, chx, 10)));
}
}
hl->cstyle |= 2048;
}
else
1454,20 → 1423,10
}
else
{
if (Doc->docParagraphStyles[absa].LineSpaMode == 0)
{
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)));
}
else
{
double currasce = RealFHeight(Doc, hl->cfont, hl->csize);
CurY -= currasce * (DropLines-1);
tcli.setPoint(0, QPoint(qRound(hl->xp), qRound(maxDY-DropLines*currasce)));
tcli.setPoint(1, QPoint(qRound(hl->xp+wide), qRound(maxDY-DropLines*currasce)));
}
}
tcli.setPoint(2, QPoint(qRound(hl->xp+wide), qRound(maxDY)));
tcli.setPoint(3, QPoint(qRound(hl->xp), qRound(maxDY)));
cm = QRegion(pf2.xForm(tcli));
1643,9 → 1602,6
if (CurX+RExtra+lineCorr > ColBound.y())
{
fromOut = false;
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
CurY += Doc->typographicSetttings.valueBaseGrid;
else
CurY += Doc->docParagraphStyles[hl->cab].LineSpa;
if ((CurY+desc+BExtra+lineCorr > Height) && (CurrCol+1 == Cols))
{
1695,9 → 1651,6
if (CurY < maxDY)
CurY = maxDY;
}
if (Doc->docParagraphStyles[hl->cab].BaseAdj)
CurY += Doc->typographicSetttings.valueBaseGrid;
else
CurY += Doc->docParagraphStyles[hl->cab].LineSpa;
if (AbsHasDrop)
{
1723,7 → 1676,7
hl->yp = CurY;
LiList.at(LiList.count()-1)->xco = hl->xp;
LiList.at(LiList.count()-1)->yco = hl->yp;
if ((!AbsHasDrop) && (StartOfCol) && (!Doc->docParagraphStyles[hl->cab].BaseAdj) && (LiList.count() != 0))
if ((!AbsHasDrop) && (StartOfCol) && (!Doc->docParagraphStyles[hl->cab].BaseAdj))
{
Zli2 = LiList.at(0);
double firstasce = Zli2->ZFo->numAscent * (Zli2->Siz / 10.0);
1731,8 → 1684,6
for (uint zc = 0; zc < LiList.count(); ++zc)
{
Zli2 = LiList.at(zc);
if ((Zli2->Zeich == QChar(13)) || (Zli2->Zeich == QChar(10)) || (Zli2->Zeich == QChar(28)) || (Zli2->Zeich == QChar(9)))
continue;
currasce = QMAX(currasce, RealCAscent(Doc, Zli2->ZFo, Zli2->Zeich, Zli2->Siz));
}
double adj = firstasce - currasce;
1742,25 → 1693,6
}
CurY -= adj;
}
if ((!StartOfCol) && (!Doc->docParagraphStyles[hl->cab].BaseAdj) && (Doc->docParagraphStyles[hl->cab].LineSpaMode == 1) && (LiList.count() != 0))
{
Zli2 = LiList.at(0);
double firstasce = Doc->docParagraphStyles[hl->cab].LineSpa;
double currasce = RealFHeight(Doc, Zli2->ZFo, Zli2->realSiz);
for (uint zc = 0; zc < LiList.count(); ++zc)
{
Zli2 = LiList.at(zc);
if ((Zli2->Zeich == QChar(13)) || (Zli2->Zeich == QChar(10)) || (Zli2->Zeich == QChar(28)) || (Zli2->Zeich == QChar(9)))
continue;
currasce = QMAX(currasce, RealFHeight(Doc, Zli2->ZFo, Zli2->realSiz));
}
double adj = firstasce - currasce;
for (uint zc = 0; zc < LiList.count(); ++zc)
{
LiList.at(zc)->yco -= adj;
}
CurY -= adj;
}
StartOfCol = false;
tabDist = ColBound.x();
uint tabCc = 0;
1908,7 → 1840,7
}
}
}
if ((!AbsHasDrop) && (StartOfCol) && (!Doc->docParagraphStyles[hl->cab].BaseAdj) && (LiList.count() != 0))
if ((!AbsHasDrop) && (StartOfCol) && (!Doc->docParagraphStyles[hl->cab].BaseAdj))
{
Zli2 = LiList.at(0);
double firstasce = Zli2->ZFo->numAscent * (Zli2->Siz / 10.0);
1916,8 → 1848,6
for (uint zc = 0; zc < LiList.count(); ++zc)
{
Zli2 = LiList.at(zc);
if ((Zli2->Zeich == QChar(13)) || (Zli2->Zeich == QChar(10)) || (Zli2->Zeich == QChar(28)) || (Zli2->Zeich == QChar(9)))
continue;
currasce = QMAX(currasce, RealCAscent(Doc, Zli2->ZFo, Zli2->Zeich, Zli2->Siz));
}
double adj = firstasce - currasce;
1927,25 → 1857,6
}
CurY -= adj;
}
if ((!StartOfCol) && (!Doc->docParagraphStyles[hl->cab].BaseAdj) && (Doc->docParagraphStyles[hl->cab].LineSpaMode == 1) && (LiList.count() != 0))
{
Zli2 = LiList.at(0);
double firstasce = Doc->docParagraphStyles[hl->cab].LineSpa;
double currasce = RealFHeight(Doc, Zli2->ZFo, Zli2->realSiz);
for (uint zc = 0; zc < LiList.count(); ++zc)
{
Zli2 = LiList.at(zc);
if ((Zli2->Zeich == QChar(13)) || (Zli2->Zeich == QChar(10)) || (Zli2->Zeich == QChar(28)) || (Zli2->Zeich == QChar(9)))
continue;
currasce = QMAX(currasce, RealFHeight(Doc, Zli2->ZFo, Zli2->realSiz));
}
double adj = firstasce - currasce;
for (uint zc = 0; zc < LiList.count(); ++zc)
{
LiList.at(zc)->yco -= adj;
}
CurY -= adj;
}
StartOfCol = false;
tabDist = ColBound.x();
uint tabCc = 0;
/branches/Version13x/Scribus/scribus/scribus.cpp
3840,7 → 3840,6
emit TextOutline(doc->CurrTextOutline);
setStilvalue(doc->CurrentStyle);
}
doc->docParagraphStyles[0].LineSpaMode = currItem->LineSpMode;
doc->docParagraphStyles[0].LineSpa = currItem->LineSp;
doc->docParagraphStyles[0].textAlignment = currItem->textAlignment;
break;
7199,7 → 7198,6
break;
}
if ((doc->docParagraphStyles[a].LineSpa == dia->TempVorl[b].LineSpa) &&
(doc->docParagraphStyles[a].LineSpaMode == dia->TempVorl[b].LineSpaMode) &&
(doc->docParagraphStyles[a].Indent == dia->TempVorl[b].Indent) &&
(doc->docParagraphStyles[a].First == dia->TempVorl[b].First) &&
(doc->docParagraphStyles[a].textAlignment == dia->TempVorl[b].textAlignment) &&
/branches/Version13x/Scribus/scribus/fileloader.cpp
543,7 → 543,6
if(pg.tagName()=="STYLE")
{
vg.Vname = pg.attribute("NAME");
vg.LineSpaMode = QStoInt(pg.attribute("LINESPMode","0"));
vg.LineSpa = QStodouble(pg.attribute("LINESP"));
vg.Indent = QStodouble(pg.attribute("INDENT","0"));
vg.First = QStodouble(pg.attribute("FIRST","0"));
1051,11 → 1050,6
}
Neu->Language = app->GetLang(pg.attribute("LANGUAGE", doc->Language));
Neu->isAutoText=static_cast<bool>(QStoInt(pg.attribute("AUTOTEXT")));
if (Neu->LineSpMode == 3)
{
doc->docParagraphStyles[0].BaseAdj = true;
Neu->LineSp = doc->typographicSetttings.valueBaseGrid-1;
}
if (Neu->isAutoText)
doc->LastAuto = Neu;
Neu->NextIt = QStoInt(pg.attribute("NEXTITEM"));
1359,7 → 1353,6
currItem->AspectRatio = QStoInt(obj->attribute("RATIO","0"));
}
currItem->LineSp = QStodouble(obj->attribute("LINESP"));
currItem->LineSpMode = QStoInt(obj->attribute("LINESPMode","0"));
currItem->convertTo(pt);
break;
case PageItem::Line:
/branches/Version13x/Scribus/scribus/scribusXml.cpp
352,7 → 352,6
ob->setAttribute("PLINEEND", item->PLineEnd);
ob->setAttribute("PLINEJOIN", item->PLineJoin);
ob->setAttribute("LINESP",item->LineSp);
ob->setAttribute("LINESPMode", item->LineSpMode);
ob->setAttribute("EXTRAV",item->ExtraV);
ob->setAttribute("LOCALSCX",item->LocalScX);
ob->setAttribute("LOCALSCY",item->LocalScY);
563,7 → 562,6
fou = false;
bool tabEQ = false;
vg->Vname = pg->attribute("NAME");
vg->LineSpaMode = QStoInt(pg->attribute("LINESPMode","0"));
vg->LineSpa = QStodouble(pg->attribute("LINESP"));
vg->Indent = QStodouble(pg->attribute("INDENT","0"));
vg->First = QStodouble(pg->attribute("FIRST","0"));
662,7 → 660,6
break;
}
if ((vg->LineSpa == docParagraphStyles[xx].LineSpa) &&
(vg->LineSpaMode == docParagraphStyles[xx].LineSpaMode) &&
(vg->Indent == docParagraphStyles[xx].Indent) &&
(vg->First == docParagraphStyles[xx].First) &&
(vg->textAlignment == docParagraphStyles[xx].textAlignment) &&
728,7 → 725,6
break;
}
if ((vg->LineSpa == docParagraphStyles[xx].LineSpa) &&
(vg->LineSpaMode == docParagraphStyles[xx].LineSpaMode) &&
(vg->Indent == docParagraphStyles[xx].Indent) &&
(vg->First == docParagraphStyles[xx].First) &&
(vg->textAlignment == docParagraphStyles[xx].textAlignment) &&
1406,7 → 1402,6
if(pg.tagName()=="STYLE")
{
vg.Vname = pg.attribute("NAME");
vg.LineSpaMode = QStoInt(pg.attribute("LINESPMode","0"));
vg.LineSpa = QStodouble(pg.attribute("LINESP"));
vg.Indent = QStodouble(pg.attribute("INDENT","0"));
vg.First = QStodouble(pg.attribute("FIRST","0"));
2245,7 → 2240,6
if (item->textAlignment > 4)
{
vg.Vname = doc->docParagraphStyles[item->textAlignment].Vname;
vg.LineSpaMode = doc->docParagraphStyles[item->textAlignment].LineSpaMode;
vg.LineSpa = doc->docParagraphStyles[item->textAlignment].LineSpa;
vg.textAlignment = doc->docParagraphStyles[item->textAlignment].textAlignment;
vg.Indent = doc->docParagraphStyles[item->textAlignment].Indent;
2279,7 → 2273,6
if (item->itemText.at(tx)->cab > 4)
{
vg.Vname = doc->docParagraphStyles[item->itemText.at(tx)->cab].Vname;
vg.LineSpaMode = doc->docParagraphStyles[item->itemText.at(tx)->cab].LineSpaMode;
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;
2319,7 → 2312,6
QDomElement fo=docu.createElement("STYLE");
fo.setAttribute("NAME",UsedStyles[actSt].Vname);
fo.setAttribute("ALIGN",UsedStyles[actSt].textAlignment);
fo.setAttribute("LINESPMode",UsedStyles[actSt].LineSpaMode);
fo.setAttribute("LINESP",UsedStyles[actSt].LineSpa);
fo.setAttribute("INDENT",UsedStyles[actSt].Indent);
fo.setAttribute("FIRST",UsedStyles[actSt].First);
3183,7 → 3175,6
QDomElement fo=docu.createElement("STYLE");
fo.setAttribute("NAME",doc->docParagraphStyles[ff].Vname);
fo.setAttribute("ALIGN",doc->docParagraphStyles[ff].textAlignment);
fo.setAttribute("LINESPMode",doc->docParagraphStyles[ff].LineSpaMode);
fo.setAttribute("LINESP",doc->docParagraphStyles[ff].LineSpa);
fo.setAttribute("INDENT",doc->docParagraphStyles[ff].Indent);
fo.setAttribute("FIRST",doc->docParagraphStyles[ff].First);
/branches/Version13x/Scribus/scribus/icons/linespacing.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/branches/Version13x/Scribus/scribus/util.cpp
129,7 → 129,6
double RealCWidth(ScribusDoc *currentDoc, Foi* name, QString ch, int Siz);
double RealCAscent(ScribusDoc *currentDoc, Foi* name, QString ch, int Size);
double RealCHeight(ScribusDoc *currentDoc, Foi* name, QString ch, int Size);
double RealFHeight(ScribusDoc *currentDoc, Foi* name, int Size);
double QStodouble(QString in);
int QStoInt(QString in);
QString GetAttr(QDomElement *el, QString at, QString def="0");
455,12 → 454,6
return static_cast<double>(Size / 10.0);
}
 
double RealFHeight(ScribusDoc *currentDoc, Foi* name, int Size)
{
FT_Face face = currentDoc->FFonts[name->SCName];
return face->height / name->uniEM * (Size / 10.0);
}
 
QPointArray RegularPolygon(double w, double h, uint c, bool star, double factor, double rota)
{
uint cx = star ? c * 2 : c;
1525,7 → 1518,6
OB->PLineEnd=Qt::PenCapStyle(QStoInt(obj->attribute("PLINEEND","0")));
OB->PLineJoin=Qt::PenJoinStyle(QStoInt(obj->attribute("PLINEJOIN","0")));
OB->LineSp=QStodouble(obj->attribute("LINESP"));
OB->LineSpMode = QStoInt(obj->attribute("LINESPMode","0"));
OB->ExtraV=QStodouble(obj->attribute("EXTRAV","0"));
OB->LocalScX=QStodouble(obj->attribute("LOCALSCX"));
OB->LocalScY=QStodouble(obj->attribute("LOCALSCY"));
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
149,7 → 149,6
docParagraphStyles.clear();
struct ParagraphStyle vg;
vg.Vname = "Normal Internal";
vg.LineSpaMode = 0;
vg.LineSpa = 15;
vg.textAlignment = 0;
vg.Indent = 0;
421,7 → 420,6
{
struct ParagraphStyle sty;
sty.Vname = ss->docParagraphStyles[xx].Vname;
sty.LineSpaMode = ss->docParagraphStyles[xx].LineSpaMode;
sty.LineSpa = ss->docParagraphStyles[xx].LineSpa;
sty.textAlignment = ss->docParagraphStyles[xx].textAlignment;
sty.Indent = ss->docParagraphStyles[xx].Indent;
/branches/Version13x/Scribus/scribus/scribusstructs.h
113,7 → 113,6
int PLineJoin;
int PLineEnd;
double LineSp;
int LineSpMode;
double ExtraV;
double LocalScX;
double LocalScY;
228,7 → 227,6
struct ParagraphStyle
{
QString Vname;
int LineSpaMode; // 0 = fixed; 1 = Automatic
double LineSpa;
int textAlignment;
double Indent;
/branches/Version13x/Scribus/scribus/mpalette.cpp
447,16 → 447,9
layout41->addWidget( ChBase, 1, 3 );
LineSp = new MSpinBox( page_3, 1 );
layout41->addWidget( LineSp, 2, 1 );
lineSpacingPop = new QPopupMenu();
lineSpacingPop->insertItem( tr("Fixed Linespacing"));
lineSpacingPop->insertItem( tr("Automatic Linespacing"));
lineSpacingPop->insertItem( tr("Align to Baseline Grid"));
linespacingLabel = new QToolButton(page_3, "linespacingLabel" );
linespacingLabel = new QLabel( "", page_3, "linespacingLabel" );
linespacingLabel->setText("");
linespacingLabel->setPixmap(loadIcon("linespacing.png"));
linespacingLabel->setPopup(lineSpacingPop);
linespacingLabel->setPopupDelay(400);
linespacingLabel->setAutoRaise(true);
layout41->addWidget( linespacingLabel, 2, 0 );
Extra = new MSpinBox( page_3, 1 );
layout41->addWidget( Extra, 2, 3 );
786,7 → 779,6
connect( Cpal, SIGNAL(editGradient()), this, SLOT(toggleGradientEdit()));
connect(startArrow, SIGNAL(activated(int)), this, SLOT(setStartArrow(int )));
connect(endArrow, SIGNAL(activated(int)), this, SLOT(setEndArrow(int )));
connect(lineSpacingPop, SIGNAL(activated(int)), this, SLOT(setLspMode(int )));
HaveItem = false;
Xpos->setValue(0);
Ypos->setValue(0);
1478,15 → 1470,6
HaveItem = tmp;
}
 
void Mpalette::setLspMode(int id)
{
if ((HaveDoc) && (HaveItem))
{
ScApp->view->ChLineSpaMode(lineSpacingPop->indexOf(id));
emit DocChanged();
}
}
 
void Mpalette::setLsp(double r)
{
if (ScApp->ScriptRunning)
1494,18 → 1477,6
bool tmp = HaveItem;
HaveItem = false;
LineSp->setValue(r);
if (tmp)
{
if (CurItem->LineSpMode > 0)
LineSp->setEnabled(false);
else
LineSp->setEnabled(true);
for (uint al = 0; al < lineSpacingPop->count(); ++al)
{
lineSpacingPop->setItemChecked(lineSpacingPop->idAt(al), false);
}
lineSpacingPop->setItemChecked(lineSpacingPop->idAt(CurItem->LineSpMode), true);
}
HaveItem = tmp;
}
 
3362,9 → 3333,6
Aspect->setText(tr("P&roportional"));
TextCms1->setText(tr("Input Profile:"));
TextCms2->setText(tr("Rendering Intent:"));
lineSpacingPop->changeItem(lineSpacingPop->idAt(0), tr("Fixed Linespacing"));
lineSpacingPop->changeItem(lineSpacingPop->idAt(1), tr("Automatic Linespacing"));
lineSpacingPop->changeItem(lineSpacingPop->idAt(2), tr("Align to Baseline Grid"));
int oldMonitorI=MonitorI->currentItem();
MonitorI->clear();
MonitorI->insertItem(tr("Perceptual"));
/branches/Version13x/Scribus/scribus/mpalette.h
21,7 → 21,6
#include <qlineedit.h>
#include <qtimer.h>
#include <qtoolbox.h>
#include <qpopupmenu.h>
#include "scrpalettebase.h"
#include "mspinbox.h"
#include "pageitem.h"
190,6 → 189,7
QLabel* leftLabel;
QLabel* rightLabel;
QLabel* trackingLabel;
QLabel* linespacingLabel;
QLabel* fontsizeLabel;
QLabel* yscaleLabel;
QLabel* xscaleLabel;
258,9 → 258,6
QFrame* Line5_2;
QFrame* Frame4;
 
QPopupMenu* lineSpacingPop;
 
QToolButton* linespacingLabel;
QToolButton* FlipH;
QToolButton* FlipV;
QToolButton* Locked;
283,7 → 280,6
void setR(double r);
void setRR(double r);
void setCols(int r, double g);
void setLspMode(int id);
void setLsp(double r);
void setSize(int s);
void setExtra(double e);
/branches/Version13x/Scribus/scribus/about.cpp
51,7 → 51,7
tabLayout1->addWidget( pixmapLabel1 );
buildID = new QLabel( tab, "BB" );
buildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1 %2 %3 ").arg("31").arg("May").arg("2005");
QString bu = tr("%1 %2 %3 ").arg("29").arg("May").arg("2005");
#ifdef HAVE_CMS
bu += "C";
#else
/branches/Version13x/Scribus/scribus/edit1format.h
47,7 → 47,7
QLabel* AligLabel;
AlignSelect* AligS;
QGroupBox* GroupBox10;
QButtonGroup* AbstandV;
QGroupBox* AbstandV;
QGroupBox* GroupFont;
QLabel* TextF1;
FontCombo* FontC;
60,9 → 60,7
QComboBox* TxFill;
ShadeButton *PM2;
QCheckBox* DropCaps;
QRadioButton* BaseGrid;
QRadioButton* FixedLsp;
QRadioButton* AutoLsp;
QCheckBox* BaseGrid;
QLabel* CapLabel;
QSpinBox* DropLines;
QPushButton* Cancel;
85,7 → 83,6
ApplicationPrefs *PrefsData;
 
private slots:
void toggleLsp();
void Verlassen();
void FontChange();
void ManageDrops();
/branches/Version13x/Scribus/scribus/gtaction.cpp
237,7 → 237,7
else
linesp = fstyle->getLineSpacing();
textFrame->LineSp = linesp;
textFrame->LineSpMode = 0;
 
gtFont* font = fstyle->getFont();
QString fontName = validateFont(font);
textFrame->IFont = fontName;
314,7 → 314,6
linesp = getLineSpacing(pstyle->getFont()->getSize());
else
linesp = pstyle->getLineSpacing();
vg.LineSpaMode = 0;
vg.LineSpa = linesp;
vg.textAlignment = pstyle->getAlignment();
vg.Indent = pstyle->getIndent();
379,7 → 378,6
linesp = getLineSpacing(pstyle->getFont()->getSize());
else
linesp = pstyle->getLineSpacing();
vg.LineSpaMode = 0;
vg.LineSpa = linesp;
vg.textAlignment = pstyle->getAlignment();
vg.Indent = pstyle->getIndent();
/branches/Version13x/Scribus/scribus/editformats.cpp
61,7 → 61,7
}
if ((vg.LineSpa == vg2.LineSpa) && (vg.Indent == vg2.Indent) && (vg.First == vg2.First) &&
(vg.textAlignment == vg2.textAlignment) && (vg.gapBefore == vg2.gapBefore) &&
(vg.LineSpaMode == vg2.LineSpaMode) && (vg.gapAfter == vg2.gapAfter) && (vg.Font == vg2.Font) && (tabEQ)
(vg.gapAfter == vg2.gapAfter) && (vg.Font == vg2.Font) && (tabEQ)
&& (vg.Drop == vg2.Drop) && (vg.DropLin == vg2.DropLin) && (vg.FontEffect == vg2.FontEffect) &&
(vg.FColor == vg2.FColor) && (vg.FShade == vg2.FShade) && (vg.SColor == vg2.SColor) &&
(vg.txtShadowX == vg2.txtShadowX) && (vg.txtShadowY == vg2.txtShadowY) &&
210,7 → 210,6
{
struct ParagraphStyle sty;
sty.Vname = tr("Copy of %1").arg(TempVorl[sFnumber].Vname);
sty.LineSpaMode = TempVorl[sFnumber].LineSpaMode;
sty.LineSpa = TempVorl[sFnumber].LineSpa;
sty.textAlignment = TempVorl[sFnumber].textAlignment;
sty.Indent = TempVorl[sFnumber].Indent;
249,7 → 248,6
{
struct ParagraphStyle sty;
sty.Vname = tr("New Style");
sty.LineSpaMode = 0;
sty.LineSpa = ((Docu->toolSettings.defSize / 10.0) * static_cast<double>(Docu->typographicSetttings.autoLineSpacing) / 100) + (Docu->toolSettings.defSize / 10.0);
sty.textAlignment = 0;
sty.Indent = 0;
/branches/Version13x/Scribus/scribus/edit1format.cpp
139,7 → 139,7
 
EditStyleLayout->addWidget( GroupFont, 2, 0 );
 
AbstandV = new QButtonGroup( tr("Vertical Spaces"), this, "AbstandV" );
AbstandV = new QGroupBox( tr("Vertical Spaces"), this, "AbstandV" );
AbstandV->setColumnLayout(0, Qt::Vertical );
AbstandV->layout()->setSpacing( 0 );
AbstandV->layout()->setMargin( 0 );
148,12 → 148,17
AbstandVLayout->setSpacing( 5 );
AbstandVLayout->setMargin( 10 );
 
BaseGrid = new QRadioButton( tr("Align to Baseline &Grid"), AbstandV, "BaseGrid" );
BaseGrid = new QCheckBox( tr("Align to Baseline &Grid"), AbstandV, "BaseGrid" );
BaseGrid->setChecked(vor->BaseAdj);
AbstandVLayout->addMultiCellWidget( BaseGrid, 0, 0, 0, 1 );
AutoLsp = new QRadioButton( tr("Automatic Linespacing"), AbstandV, "AutoLsp" );
AbstandVLayout->addMultiCellWidget( AutoLsp, 1, 1, 0, 1 );
FixedLsp = new QRadioButton( tr("Fixed Linespacing"), AbstandV, "FixedLsp" );
AbstandVLayout->addMultiCellWidget( FixedLsp, 2, 2, 0, 1 );
AboveV = new MSpinBox( 0, 300, AbstandV, 1 );
AboveV->setMinimumSize( QSize( 70, 22 ) );
AbstandVLayout->addWidget( AboveV, 1, 1 );
 
BelowV = new MSpinBox( 0, 300, AbstandV, 1 );
BelowV->setMinimumSize( QSize( 70, 22 ) );
AbstandVLayout->addWidget( BelowV, 2, 1 );
 
LineSpVal = new MSpinBox( 1, 300, AbstandV, 1 );
LineSpVal->setMinimumSize( QSize( 70, 22 ) );
LineSpVal->setSuffix( tr( " pt" ) );
160,14 → 165,6
LineSpVal->setValue(vor->LineSpa);
AbstandVLayout->addWidget( LineSpVal, 3, 1 );
 
AboveV = new MSpinBox( 0, 300, AbstandV, 1 );
AboveV->setMinimumSize( QSize( 70, 22 ) );
AbstandVLayout->addWidget( AboveV, 4, 1 );
 
BelowV = new MSpinBox( 0, 300, AbstandV, 1 );
BelowV->setMinimumSize( QSize( 70, 22 ) );
AbstandVLayout->addWidget( BelowV, 5, 1 );
 
TextLabel3 = new QLabel( LineSpVal, tr("Line &Spacing:"), AbstandV, "TextLabel3" );
TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
TextLabel3->sizePolicy().hasHeightForWidth() ) );
177,27 → 174,12
TextLabel1_2_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
TextLabel1_2_2->sizePolicy().hasHeightForWidth() ) );
TextLabel1_2_2->setMinimumSize( QSize( 90, 22 ) );
AbstandVLayout->addWidget( TextLabel1_2_2, 4, 0 );
AbstandVLayout->addWidget( TextLabel1_2_2, 1, 0 );
TextLabel1_2_3 = new QLabel( BelowV, tr("&Below:"), AbstandV, "TextLabel1_2_3" );
TextLabel1_2_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1,
TextLabel1_2_3->sizePolicy().hasHeightForWidth() ) );
TextLabel1_2_3->setMinimumSize( QSize( 90, 22 ) );
AbstandVLayout->addWidget( TextLabel1_2_3, 5, 0 );
if (vor->BaseAdj)
{
BaseGrid->setChecked(vor->BaseAdj);
LineSpVal->setEnabled(false);
}
else
{
if (vor->LineSpaMode == 0)
FixedLsp->setChecked(true);
else
{
LineSpVal->setEnabled(false);
AutoLsp->setChecked(true);
}
}
AbstandVLayout->addWidget( TextLabel1_2_3, 2, 0 );
EditStyleLayout->addWidget( AbstandV, 2, 1 );
 
GroupBox10 = new QGroupBox( tr("Tabulators and Indentation"), this, "GroupBox10" );
297,9 → 279,6
connect(BaseGrid, SIGNAL(stateChanged(int)), this, SLOT(updatePreview()));
connect(DropLines, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
connect(previewCaption, SIGNAL( clicked() ), this, SLOT( togglePreview() ) );
connect(BaseGrid, SIGNAL(clicked()), this, SLOT(toggleLsp()));
connect(FixedLsp, SIGNAL(clicked()), this, SLOT(toggleLsp()));
connect(AutoLsp, SIGNAL(clicked()), this, SLOT(toggleLsp()));
 
AboveV->setDecimals(10);
BelowV->setDecimals(10);
318,19 → 297,6
togglePreview();
}
 
void EditStyle::toggleLsp()
{
if (BaseGrid->isChecked())
LineSpVal->setEnabled(false);
else
{
if (FixedLsp->isChecked())
LineSpVal->setEnabled(true);
else
LineSpVal->setEnabled(false);
}
}
 
void EditStyle::togglePreview()
{
if (previewCaption->isChecked())
413,13 → 379,6
}
werte->FontEffect = EffeS->getStyle();
werte->textAlignment = AligS->getStyle();
if (!BaseGrid->isChecked())
{
if (FixedLsp->isChecked())
werte->LineSpaMode = 0;
else
werte->LineSpaMode = 1;
}
werte->LineSpa = LineSpVal->value();
werte->Indent = QMAX(TabList->getLeftIndent(), 0.0);
werte->First = TabList->getFirstLine();
462,13 → 421,6
tmpStyle.Vname = Name->text() + " (preview temporary)";
tmpStyle.FontEffect = EffeS->getStyle();
tmpStyle.textAlignment = AligS->getStyle();
if (!BaseGrid->isChecked())
{
if (FixedLsp->isChecked())
tmpStyle.LineSpaMode = 0;
else
tmpStyle.LineSpaMode = 1;
}
tmpStyle.LineSpa = LineSpVal->value();
tmpStyle.Indent = TabList->getLeftIndent();
tmpStyle.First = TabList->getFirstLine();
/branches/Version13x/Scribus/scribus/pageitem.h
286,7 → 286,6
double RExtra;
/** Linespacing */
double LineSp;
int LineSpMode;
/** Zeichen X-Position */
double CurX;
/** Zeichen Y-Position */
/branches/Version13x/Scribus/scribus/scribusview.cpp
78,7 → 78,6
 
extern void Level2Layer(ScribusDoc *doc, struct Layer *ll, int Level);
extern double Cwidth(ScribusDoc *doc, Foi* name, QString ch, int Siz, QString ch2 = " ");
extern double RealFHeight(ScribusDoc *currentDoc, Foi* name, int Size);
extern ScribusApp* ScApp;
extern QPointArray FlattenPath(FPointArray ina, QValueList<uint> &Segs);
extern QPixmap loadIcon(QString nam);
10546,40 → 10545,6
}
}
 
void ScribusView::ChLineSpaMode(int w)
{
if (Doc->appMode != EditMode)
{
if (SelItem.count() != 0)
{
for (uint a = 0; a < SelItem.count(); ++a)
{
PageItem* currItem = SelItem.at(a);
currItem->LineSpMode = w;
if (w == 0)
{
currItem->LineSp = ((currItem->ISize / 10.0) * static_cast<double>(Doc->typographicSetttings.autoLineSpacing) / 100) + (currItem->ISize / 10.0);
Doc->docParagraphStyles[0].BaseAdj = false;
}
else if (w == 1)
{
Doc->docParagraphStyles[0].BaseAdj = false;
currItem->LineSp = RealFHeight(Doc, (*Doc->AllFonts)[currItem->IFont], currItem->ISize);
}
else
{
Doc->docParagraphStyles[0].BaseAdj = true;
currItem->LineSp = Doc->typographicSetttings.valueBaseGrid-1;
}
Doc->docParagraphStyles[0].LineSpa = currItem->LineSp;
emit ItemTextAttr(currItem->LineSp);
RefreshItem(currItem);
}
Doc->docParagraphStyles[0].LineSpaMode = w;
}
}
}
 
void ScribusView::chFSize(int size)
{
if (SelItem.count() != 0)
10593,23 → 10558,9
Doc->CurrFontSize = size;
if (Doc->appMode != EditMode)
{
if (currItem->LineSpMode == 0)
{
currItem->LineSp = ((size / 10.0) * static_cast<double>(Doc->typographicSetttings.autoLineSpacing) / 100) + (size / 10.0);
Doc->docParagraphStyles[0].LineSpa = currItem->LineSp;
emit ItemTextAttr(currItem->LineSp);
}
else if (currItem->LineSpMode == 1)
{
currItem->LineSp = RealFHeight(Doc, (*Doc->AllFonts)[currItem->IFont], currItem->ISize);
Doc->docParagraphStyles[0].LineSpa = currItem->LineSp;
emit ItemTextAttr(currItem->LineSp);
}
else
{
currItem->LineSp = Doc->typographicSetttings.valueBaseGrid-1;
emit ItemTextAttr(currItem->LineSp);
}
currItem->setFontSize(size);
emit ItemTextSize(currItem->ISize);
emit ItemTextCols(currItem->Cols, currItem->ColGap);
11182,12 → 11133,6
break;
}
PageItem *currItem = Doc->Items.at(z);
currItem->LineSpMode = Buffer->LineSpMode;
if (currItem->LineSpMode == 3)
{
Doc->docParagraphStyles[0].BaseAdj = true;
currItem->LineSp = Doc->typographicSetttings.valueBaseGrid-1;
}
currItem->setImageFlippedH(Buffer->flippedH);
currItem->setImageFlippedV(Buffer->flippedV);
currItem->RadRect = Buffer->RadRect;
/branches/Version13x/Scribus/scribus/scribusview.h
231,7 → 231,6
void ChLineJoin(PenJoinStyle w);
void ChLineEnd(PenCapStyle w);
void ChLineSpa(double w);
void ChLineSpaMode(int w);
void ChLocalXY(double x, double y);
void ChLocalSc(double x, double y);
void ItemFont(QString fon);