Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 6804 → Rev 6805

/branches/Version13x/Scribus/scribus/pageitem_textframe.cpp
165,7 → 165,7
// QString newShadow = m_Doc->masterPageMode() ? QString::number(OwnPage) : OnMasterPage;
// QString newShadow = QString::number(OwnPage);
QString newShadow = m_Doc->masterPageMode() ? OnMasterPage : QString::number(OwnPage);
// qDebug(QString("Pageitem_Textframe: shadow %1 ... %2").arg(currentShadow).arg(newShadow));
qDebug(QString("Pageitem_Textframe: shadow %1 ... %2").arg(currentShadow).arg(newShadow));
if (newShadow != currentShadow) {
if (currentShadow == OnMasterPage) {
// masterpage was edited, clear all shadows
192,13 → 192,16
 
static void dumpIt(const ParagraphStyle& pstyle, QString indent = QString("->"))
{
qDebug(QString("%6%1/%2 @ %3: %4--%5")
qDebug(QString("%6%1/%2 @ %3: %4--%5 linespa%6: %7 align%8")
.arg(pstyle.name())
.arg(pstyle.parent())
.arg( (unsigned long int) &pstyle)
.arg(pstyle.leftMargin())
.arg(pstyle.rightMargin())
.arg(indent));
.arg(indent)
.arg(pstyle.lineSpacingMode())
.arg(pstyle.lineSpacing())
.arg(pstyle.alignment()));
static QString more(" ");
if (pstyle.hasParent())
dumpIt(*dynamic_cast<const ParagraphStyle*>(pstyle.parentStyle()), more + indent);
213,8 → 216,6
 
void PageItem_TextFrame::layout()
{
itemText.invalidateAll(); // HACK, remove soon - av
 
if (BackBox != NULL && BackBox->invalid) {
// qDebug("textframe: len=%d, going back", itemText.length());
dynamic_cast<PageItem_TextFrame*>(BackBox)->layout();
238,8 → 239,7
double oldCurY, LastXp, EndX, OFs, OFs2, wide, ColWidth, kernVal, RTabX;
QString chstr, chstr2, chstr3;
ScText *hl;
ParagraphStyle lastStyle;
double lineSpacing;
ParagraphStyle style;
bool outs = false;
bool fBorder = false;
270,7 → 270,7
}
qDebug(QString("default:"));
dumpIt(itemText.defaultStyle());
*/
*/
pf2.begin(view->viewport());
pf2.translate(Xpos, Ypos);
307,20 → 307,20
// find start of first line
if (itemText.length() > 0)
{
const ParagraphStyle& firstStyle(itemText.paragraphStyle(0));
hl = itemText.item(0);
if (firstStyle.rightMargin() < 0) {
style = itemText.paragraphStyle(0);
if (style.rightMargin() < 0) {
qDebug(QString("style pos 0:"));
dumpIt(firstStyle);
dumpIt(style);
}
// qDebug(QString("style @0: %1 -- %2, %4/%5 char: %3").arg(style.leftMargin()).arg(style.rightMargin())
// .arg(style.charStyle().asString()).arg(style.name()).arg(style.parent()?style.parent()->name():""));
if (firstStyle.hasDropCap())
if (style.hasDropCap())
{
if (firstStyle.useBaselineGrid())
chs = qRound(m_Doc->typographicSettings.valueBaseGrid * firstStyle.dropCapLines() * 10);
if (style.useBaselineGrid())
chs = qRound(m_Doc->typographicSettings.valueBaseGrid * style.dropCapLines() * 10);
else
chs = qRound(firstStyle.lineSpacing() * firstStyle.dropCapLines() * 10);
chs = qRound(style.lineSpacing() * style.dropCapLines() * 10);
}
else
chs = hl->fontSize();
349,13 → 349,15
for (int a = firstInFrame(); a < itemText.length(); ++a)
{
hl = itemText.item(a);
const ParagraphStyle& style(itemText.paragraphStyle(a));
const CharStyle& charStyle(itemText.charStyle(a));
style = itemText.paragraphStyle(a);
const CharStyle& charStyle = itemText.charStyle(a);
// qDebug(QString("charstyle pos %1: %2 (%3)").arg(a).arg(charStyle.asString()).arg(charStyle.fontSize()));
if (style.rightMargin() < 0) {
if (style.rightMargin() < 0)
// if (itemsInLine == 0)
{
qDebug(QString("style pos %1:").arg(a));
dumpIt(style);
dumpIt(itemText.paragraphStyle(a));
//dumpIt(itemText.paragraphStyle(a));
}
// qDebug(QString("style @%6: %1 -- %2, %4/%5 char: %3").arg(style.leftMargin()).arg(style.rightMargin())
// .arg(style.charStyle().asString()).arg(style.name()).arg(style.parent()?style.parent()->name():"")
367,12 → 369,8
// qDebug(QString("expanded token: '%1'").arg(chstr));
if (chstr.isEmpty())
continue;
if (style.lineSpacingMode() == ParagraphStyle::AutomaticLineSpacing)
lineSpacing = charStyle.font().height(charStyle.fontSize() / 10.0);
else
lineSpacing = style.lineSpacing();
style.setLineSpacing(charStyle.font().height(charStyle.fontSize() / 10.0));
// find out about par gap and dropcap
if (a == firstInFrame())
{
453,7 → 451,7
else
{
if (style.lineSpacingMode() == ParagraphStyle::FixedLineSpacing)
DropCapDrop = lineSpacing * (DropLines-1);
DropCapDrop = style.lineSpacing() * (DropLines-1);
else
DropCapDrop = charStyle.font().height(style.charStyle().fontSize() / 10.0) * (DropLines-1);
}
470,7 → 468,7
else
{
if (style.lineSpacingMode() == ParagraphStyle::FixedLineSpacing)
DropCapDrop = lineSpacing * (DropLines-1);
DropCapDrop = style.lineSpacing() * (DropLines-1);
else
DropCapDrop = charStyle.font().height(style.charStyle().fontSize() / 10.0) * (DropLines-1);
}
484,8 → 482,8
{
if (style.lineSpacingMode() == ParagraphStyle::FixedLineSpacing)
{
chsd = (10 * ((lineSpacing * (DropLines-1)+(charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / (charStyle.font().realCharHeight(chstr[0], 1))));
chs = (10 * ((lineSpacing * (DropLines-1)+(charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / charStyle.font().realCharAscent(chstr[0], 1)));
chsd = (10 * ((style.lineSpacing() * (DropLines-1)+(charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / (charStyle.font().realCharHeight(chstr[0], 1))));
chs = (10 * ((style.lineSpacing() * (DropLines-1)+(charStyle.font().ascent(style.charStyle().fontSize() / 10.0))) / charStyle.font().realCharAscent(chstr[0], 1)));
}
else
{
551,7 → 549,7
else
{
if (style.lineSpacingMode() == ParagraphStyle::FixedLineSpacing)
asce = lineSpacing * DropLines;
asce = style.lineSpacing() * DropLines;
else
asce = charStyle.font().height(style.charStyle().fontSize() / 10.0) * DropLines;
}
616,7 → 614,7
if (style.useBaselineGrid())
desc2 = -charStyle.font().descent() * m_Doc->typographicSettings.valueBaseGrid * style.dropCapLines();
else
desc2 = -charStyle.font().descent() * lineSpacing * style.dropCapLines();
desc2 = -charStyle.font().descent() * style.lineSpacing() * style.dropCapLines();
}
if (DropCmode)
DropLines = style.dropCapLines();
696,7 → 694,7
}
else
{
CurY += lineSpacing;
CurY += style.lineSpacing();
CurX = ColBound.x();
}
if (style.useBaselineGrid())
731,7 → 729,7
if (style.useBaselineGrid())
desc2 = -charStyle.font().descent() * m_Doc->typographicSettings.valueBaseGrid * style.dropCapLines();
else
desc2 = -charStyle.font().descent() * lineSpacing * style.dropCapLines();
desc2 = -charStyle.font().descent() * style.lineSpacing() * style.dropCapLines();
}
if (DropCmode)
DropLines = style.dropCapLines();
1009,9 → 1007,9
{
if (style.lineSpacingMode() == ParagraphStyle::FixedLineSpacing)
{
CurY -= lineSpacing * (DropLines-1);
tcli.setPoint(0, QPoint(qRound(hl->glyph.xoffset), qRound(maxDY - DropLines * lineSpacing)));
tcli.setPoint(1, QPoint(qRound(maxDX), qRound(maxDY-DropLines*lineSpacing)));
CurY -= style.lineSpacing() * (DropLines-1);
tcli.setPoint(0, QPoint(qRound(hl->glyph.xoffset), qRound(maxDY - DropLines * style.lineSpacing())));
tcli.setPoint(1, QPoint(qRound(maxDX), qRound(maxDY-DropLines*style.lineSpacing())));
}
else
{
1126,13 → 1124,13
assert( a >= 0 );
assert( a < itemText.length() );
hl = itemText.item(a);
lastStyle = itemText.paragraphStyle(a);
if (lastStyle.rightMargin() < 0) {
style = itemText.paragraphStyle(a);
if (style.rightMargin() < 0) {
qDebug(QString("style pos < %1:").arg(a));
dumpIt(style);
}
// qDebug(QString("style <@%6: %1 -- %2, %4/%5 char: %3").arg(lastStyle.leftMargin()).arg(lastStyle.rightMargin())
// .arg(lastStyle.charStyle().asString()).arg(lastStyle.name()).arg(lastStyle.parent()?lastStyle.parent()->name():"")
// qDebug(QString("style <@%6: %1 -- %2, %4/%5 char: %3").arg(style.leftMargin()).arg(style.rightMargin())
// .arg(style.charStyle().asString()).arg(style.name()).arg(style.parent()?style.parent()->name():"")
// .arg(a));
//not needed any more: a++;
// Fix incorrect right flush for full lines: ? -AV
1162,7 → 1160,7
}
BuPos = LastSP;
// Justification
if (lastStyle.alignment() != 0)
if (style.alignment() != 0)
{
// find end of line
EndX = floor(QMAX(curLine.x, LastXp - 10));
1173,7 → 1171,7
pt2 = QPoint(qRound(EndX+RExtra), static_cast<int>(ceil(CurY-asce)));
} while ((cl.contains(pf2.xForm(pt1)))
&& (cl.contains(pf2.xForm(pt2)))
&& (EndX+RExtra+lineCorr < ColBound.y() - lastStyle.rightMargin()));
&& (EndX+RExtra+lineCorr < ColBound.y() - style.rightMargin()));
// end do
// qDebug(QString("endx @ %1").arg(EndX));
1212,12 → 1210,12
}
curLine.naturalWidth = LastXp - curLine.x;
curLine.width = EndX - curLine.x;
if (lastStyle.alignment() == 2)
if (style.alignment() == 2)
OFs = EndX - LastXp;
if (lastStyle.alignment() == 1)
if (style.alignment() == 1)
OFs = (EndX - LastXp) / 2;
if ((lastStyle.alignment() == 3)
|| (lastStyle.alignment() == 4))
if ((style.alignment() == 3)
|| (style.alignment() == 4))
{
// count available spaces
aSpa = 0;
1266,21 → 1264,18
assert( a >= 0 );
assert( a < itemText.length() );
hl = itemText.item(a);
lastStyle = itemText.paragraphStyle(a);
if (lastStyle.rightMargin() < 0) {
style = itemText.paragraphStyle(a);
if (style.rightMargin() < 0) {
qDebug(QString("style nb pos %1:").arg(a));
dumpIt(style);
}
// qDebug(QString("style nb @%6: %1 -- %2, %4/%5 char: %3").arg(lastStyle.leftMargin()).arg(lastStyle.rightMargin())
// .arg(lastStyle.charStyle().asString()).arg(lastStyle.name()).arg(lastStyle.parent()?lastStyle.parent()->name():"")
// qDebug(QString("style nb @%6: %1 -- %2, %4/%5 char: %3").arg(style.leftMargin()).arg(style.rightMargin())
// .arg(style.charStyle().asString()).arg(style.name()).arg(style.parent()?style.parent()->name():"")
// .arg(a));
curLine.naturalWidth = CurX - curLine.x;
curLine.width = CurX - curLine.x;
BuPos--;
}
else {
lastStyle = style;
}
}
uint BuPos3 = BuPos;
if ((outs)
1289,7 → 1284,7
|| (hl->ch == SpecialChars::FRAMEBREAK)
|| ((hl->ch == SpecialChars::COLBREAK) && (Cols > 1)))
{
if ((outs) && (CurX+RExtra+lineCorr < ColBound.y() - lastStyle.rightMargin()))
if ((outs) && (CurX+RExtra+lineCorr < ColBound.y() - style.rightMargin()))
{
if (( hl->ch == SpecialChars::PARSEP || hl->ch == SpecialChars::LINEBREAK)
&& AbsHasDrop)
1302,16 → 1297,16
double BotOffset = desc+BExtra+lineCorr;
pt1 = QPoint(qRound(CurX+RExtra), static_cast<int>(CurY+BotOffset));
pt2 = QPoint(qRound(CurX+RExtra), static_cast<int>(ceil(CurY-asce)));
while (CurX+RExtra+lineCorr < ColBound.y() - lastStyle.rightMargin())
while (CurX+RExtra+lineCorr < ColBound.y() - style.rightMargin())
{
CurX++;
if (CurX+RExtra+lineCorr > ColBound.y() - lastStyle.rightMargin())
if (CurX+RExtra+lineCorr > ColBound.y() - style.rightMargin())
{
fromOut = false;
if (lastStyle.useBaselineGrid())
if (style.useBaselineGrid())
CurY += m_Doc->typographicSettings.valueBaseGrid;
else
CurY += lastStyle.lineSpacing();
CurY += style.lineSpacing();
if ((CurY+desc+BExtra+lineCorr > Height) && (CurrCol+1 == Cols))
{
goNoRoom = true;
1336,7 → 1331,7
|| (hl->ch == SpecialChars::COLBREAK))
{
if (hl->ch == SpecialChars::PARSEP)
CurY += lastStyle.gapAfter();
CurY += style.gapAfter();
if (BuPos3 > 0)
BuPos3 -= 1;
HyphenCount = 0;
1369,7 → 1364,7
if (CurY < maxDY)
CurY = maxDY;
}
if (lastStyle.useBaselineGrid())
if (style.useBaselineGrid())
CurY += m_Doc->typographicSettings.valueBaseGrid;
else
{
1376,7 → 1371,7
if (a < lastInFrame())
CurY += itemText.paragraphStyle(a+1).lineSpacing();
else
CurY += lastStyle.lineSpacing();
CurY += style.lineSpacing();
}
if (AbsHasDrop)
{
1396,7 → 1391,7
|| hl->ch == SpecialChars::COLBREAK )
{
if (hl->ch == SpecialChars::PARSEP)
CurY += lastStyle.gapAfter();
CurY += style.gapAfter();
if (BuPos3 > 0)
BuPos3 -= 1;
HyphenCount = 0;
1408,7 → 1403,7
// calc. needed vertical space
if (itemsInLine != 0)
{
if ((!AbsHasDrop) && (StartOfCol) && (!lastStyle.useBaselineGrid()))
if ((!AbsHasDrop) && (StartOfCol) && (!style.useBaselineGrid()))
{
double firstasce = itemText.charStyle(curLine.firstItem).font().ascent(itemText.charStyle(curLine.firstItem).fontSize() / 10.0);
double currasce = 0;
1437,10 → 1432,10
curLine.y -= adj;
CurY -= adj;
}
else if ((!StartOfCol) && (!lastStyle.useBaselineGrid()) && (lastStyle.lineSpacingMode() == ParagraphStyle::AutomaticLineSpacing))
else if ((!StartOfCol) && (!style.useBaselineGrid()) && (style.lineSpacingMode() == ParagraphStyle::AutomaticLineSpacing))
{
QChar ch = itemText.text(curLine.firstItem);
double firstasce = lastStyle.lineSpacing();
double firstasce = style.lineSpacing();
double currasce = 0;
if (itemText.object(curLine.firstItem) != 0)
currasce = QMAX(currasce, (itemText.object(curLine.firstItem)->gHeight + itemText.object(curLine.firstItem)->lineWidth()) * (itemText.charStyle(curLine.firstItem).scaleV() / 1000.0));
1550,7 → 1545,7
// end of itemText
uint a = itemText.length()-1;
curLine.lastItem = a;
if (lastStyle.alignment() != 0)
if (style.alignment() != 0)
{
EndX = floor(QMAX(curLine.x, CurX - 10));
do {
1559,7 → 1554,7
pt2 = QPoint(qRound(EndX+RExtra), static_cast<int>(ceil(CurY-asce)));
} while ((cl.contains(pf2.xForm(pt1)))
&& (cl.contains(pf2.xForm(pt2)))
&& (EndX+RExtra+lineCorr < ColBound.y() - lastStyle.rightMargin()));
&& (EndX+RExtra+lineCorr < ColBound.y() - style.rightMargin()));
if (opticalMargins && itemsInLine > 0) {
double chs = itemText.charStyle(a).fontSize() * (itemText.charStyle(a).scaleH() / 1000.0);
1595,13 → 1590,13
}
curLine.naturalWidth = CurX - curLine.x;
curLine.width = EndX - curLine.x;
if (lastStyle.alignment() == 2)
if (style.alignment() == 2)
OFs = EndX - CurX;
if (lastStyle.alignment() == 1)
if (style.alignment() == 1)
OFs = (EndX - CurX) / 2;
if (lastStyle.alignment() == 3)
if (style.alignment() == 3)
OFs = 0;
if (lastStyle.alignment() == 4)
if (style.alignment() == 4)
{
aSpa = 0;
for (int sof = 0; sof < itemsInLine; ++sof)
1640,7 → 1635,7
}
if (itemsInLine != 0)
{
if ((!AbsHasDrop) && (StartOfCol) && (!lastStyle.useBaselineGrid()))
if ((!AbsHasDrop) && (StartOfCol) && (!style.useBaselineGrid()))
{
double firstasce = itemText.charStyle(curLine.firstItem).font().ascent(itemText.charStyle(curLine.firstItem).fontSize() / 10.0);
double currasce = 0;
1667,9 → 1662,9
curLine.y -= adj;
CurY -= adj;
}
else if ((!StartOfCol) && (!lastStyle.useBaselineGrid()) && (lastStyle.lineSpacingMode() == ParagraphStyle::AutomaticLineSpacing))
else if ((!StartOfCol) && (!style.useBaselineGrid()) && (style.lineSpacingMode() == ParagraphStyle::AutomaticLineSpacing))
{
double firstasce = lastStyle.lineSpacing();
double firstasce = style.lineSpacing();
double currasce = 0;
if (itemText.object(curLine.firstItem) != 0)
currasce = QMAX(currasce, (itemText.object(curLine.firstItem)->gHeight + itemText.object(curLine.firstItem)->lineWidth()) * (itemText.charStyle(curLine.firstItem).scaleV() / 1000.0));
/branches/Version13x/Scribus/scribus/styles/charstyle.cpp
52,6 → 52,7
 
void CharStyle::applyCharStyle(const CharStyle & other)
{
other.validate();
Style::applyStyle(other);
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
if (! other.inh_##attr_NAME) \
63,6 → 64,7
 
void CharStyle::eraseCharStyle(const CharStyle & other)
{
other.validate();
Style::eraseStyle(other);
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
if (!inh_##attr_NAME && m_##attr_NAME == other.attr_GETTER()) \
73,6 → 75,7
 
bool CharStyle::equiv(const Style & other) const
{
other.validate();
const CharStyle * oth = dynamic_cast<const CharStyle*> ( & other );
return oth &&
parent() == oth->parent()
128,7 → 131,7
}
 
 
void CharStyle::update(StyleBase* base)
void CharStyle::update(const StyleBase* base)
{
Style::update(base);
const CharStyle * oth = dynamic_cast<const CharStyle*> ( parentStyle() );
/branches/Version13x/Scribus/scribus/styles/charstyle.h
82,7 → 82,7
QString displayName() const;
 
void update(StyleBase * b);
void update(const StyleBase * b);
bool equiv(const Style& other) const;
123,7 → 123,7
/** isDefined: returns true if the attribute is defined in this style or any parent */
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
bool isDef##attr_NAME() const { \
if (inh_##attr_NAME) return true; \
if ( !inh_##attr_NAME ) return true; \
const CharStyle * par = dynamic_cast<const CharStyle*>(parentStyle()); \
return par && par->isDef##attr_NAME(); \
}
145,6 → 145,7
 
inline CharStyle & CharStyle::operator=(const CharStyle & other)
{
other.validate();
static_cast<Style&>(*this) = static_cast<const Style&>(other);
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
m_##attr_NAME = other.m_##attr_NAME; \
156,6 → 157,7
 
inline CharStyle::CharStyle(const CharStyle & other) : Style(other)
{
other.validate();
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
m_##attr_NAME = other.m_##attr_NAME; \
inh_##attr_NAME = other.inh_##attr_NAME;
/branches/Version13x/Scribus/scribus/styles/paragraphstyle.cpp
20,6 → 20,7
 
ParagraphStyle::ParagraphStyle() : Style(), cstyleBase(StyleBase::PAR_LEVEL, NULL), cstyle()
{
setParent("");
cstyleBase.setDefaultStyle( &cstyle );
// qDebug(QString("ParagraphStyle() %1 pbase %2 cbase %3").arg(reinterpret_cast<uint>(this)).arg(reinterpret_cast<uint>(base())).arg(reinterpret_cast<uint>(defaultStyle()->base())));
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
32,6 → 33,7
 
ParagraphStyle::ParagraphStyle(const ParagraphStyle& other) : Style(other), cstyleBase(StyleBase::PAR_LEVEL, NULL), cstyle(other.charStyle())
{
other.validate();
cstyleBase.setDefaultStyle( &cstyle );
// qDebug(QString("ParagraphStyle(%2) %1").arg(reinterpret_cast<uint>(&other)).arg(reinterpret_cast<uint>(this)));
 
95,6 → 97,7
 
bool ParagraphStyle::equiv(const Style& other) const
{
other.validate();
const ParagraphStyle* oth = dynamic_cast<const ParagraphStyle*> ( & other );
return oth &&
parent() == oth->parent()
110,6 → 113,7
 
ParagraphStyle& ParagraphStyle::operator=(const ParagraphStyle& other)
{
other.validate();
static_cast<Style&>(*this) = static_cast<const Style&>(other);
cstyle = other.charStyle();
cstyleBase = other.cstyleBase;
126,10 → 130,11
 
 
 
void ParagraphStyle::update(StyleBase* base)
void ParagraphStyle::update(const StyleBase* base)
{
Style::update(base);
const ParagraphStyle * oth = dynamic_cast<const ParagraphStyle*> ( parentStyle() );
// qDebug(QString("ParagraphStyle::update(%1) parent=%2").arg((unsigned long int)base).arg((unsigned long int)oth));
if (oth) {
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
if (inh_##attr_NAME) \
136,6 → 141,7
m_##attr_NAME = oth->attr_GETTER();
#include "paragraphstyle.attrdefs.cxx"
#undef ATTRDEF
cstyleBase.invalidate();
}
}
 
143,8 → 149,10
 
void ParagraphStyle::applyStyle(const ParagraphStyle& other)
{
other.validate();
Style::applyStyle(other);
cstyle.applyCharStyle(other.charStyle());
cstyleBase.invalidate();
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
if (! other.inh_##attr_NAME) \
set##attr_NAME(other.m_##attr_NAME);
155,8 → 163,10
 
void ParagraphStyle::eraseStyle(const ParagraphStyle& other)
{
other.validate();
Style::eraseStyle(other);
cstyle.eraseCharStyle(other.charStyle());
cstyleBase.invalidate();
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
if (!inh_##attr_NAME && m_##attr_NAME == other.attr_GETTER()) \
reset##attr_NAME();
/branches/Version13x/Scribus/scribus/styles/paragraphstyle.h
52,7 → 52,7
 
QString displayName() const;
 
void update(StyleBase*);
void update(const StyleBase*);
bool equiv(const Style& other) const;
96,7 → 96,7
/** isDefined: returns true if the attribute is defined in this style or any parent */
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
bool isDef##attr_NAME() const { \
if (inh_##attr_NAME) return true; \
if ( !inh_##attr_NAME ) return true; \
const ParagraphStyle * par = dynamic_cast<const ParagraphStyle*>(parentStyle()); \
return par && par->isDef##attr_NAME(); \
}
/branches/Version13x/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
1570,7 → 1570,7
}
if (calign >= 0)
pstyle.setAlignment(static_cast<ParagraphStyle::AlignmentType>(calign));
qDebug(QString("par style at %1: %2/%3 (%4) calign %5").arg(pos).arg(pstyle.name()).arg(pstyle.parent()).arg(last->ParaStyle).arg(calign));
// qDebug(QString("par style at %1: %2/%3 (%4) calign %5").arg(pos).arg(pstyle.name()).arg(pstyle.parent()).arg(last->ParaStyle).arg(calign));
obj->itemText.applyStyle(pos, pstyle);
}
}