Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 24103 → Rev 24104

/trunk/Scribus/scribus/pageitem_textframe.cpp
1835,7 → 1835,12
if (firstLineOffset() == FLOPRealGlyphHeight)
addAsce = realAsce;
else if (firstLineOffset() == FLOPLineSpacing)
addAsce = style.lineSpacing();
{
if (DropCmode)
addAsce = DropCapDrop + style.lineSpacing();
else
addAsce = style.lineSpacing();
}
}
maxYAsc = current.yPos - addAsce;
}
1844,18 → 1849,15
//fix for glyphs with negative realAsce value
maxYAsc = qMax(maxYAsc, 0.0);
maxYDesc = current.yPos + realDesc;
 
if (style.lineSpacingMode() == ParagraphStyle::AutomaticLineSpacing)
if (style.lineSpacingMode() != ParagraphStyle::AutomaticLineSpacing)
{
regionMinY = static_cast<int>(floor(maxYAsc));
regionMaxY = static_cast<int>(floor(maxYDesc));
maxYAsc = qMin(maxYAsc, qMax(0.0, current.yPos - asce));
maxYDesc = current.yPos + desc;
}
else // #11727, #11628, etc.
{
regionMinY = static_cast<int>(qMax(0.0, floor(current.yPos - (asce + offset))));
regionMaxY = static_cast<int>(floor(current.yPos + desc));
}
 
regionMinY = static_cast<int>(floor(maxYAsc));
regionMaxY = static_cast<int>(floor(maxYDesc));
 
if (current.isEmpty && !current.afterOverflow)
{
//start a new line
1923,37 → 1925,22
else
current.yPos += (current.startOfCol ? 1 : style.lineSpacing());
lastLineY = maxYAsc;
 
if (current.startOfCol)
{
// double addAsce;
// if (DropCmode)
// addAsce = qMax(realAsce, asce + offset);
// else
// addAsce = asce + offset;
// if (style.lineSpacingMode() != ParagraphStyle::BaselineGridLineSpacing)
// {
// if (firstLineOffset() == FLOPRealGlyphHeight)
// addAsce = realAsce;
// else if (firstLineOffset() == FLOPLineSpacing)
// addAsce = style.lineSpacing() + offset;
// }
maxYAsc = current.yPos - addAsce;
}
else
maxYAsc = current.yPos - realAsce;
maxYAsc = qMax(maxYAsc, 0.0);
maxYDesc = current.yPos + realDesc;
 
if (style.lineSpacingMode() == ParagraphStyle::AutomaticLineSpacing)
if (style.lineSpacingMode() != ParagraphStyle::AutomaticLineSpacing)
{
regionMinY = static_cast<int>(floor(maxYAsc));
regionMaxY = static_cast<int>(floor(maxYDesc));
maxYAsc = qMin(maxYAsc, qMax(0.0, current.yPos - asce));
maxYDesc = current.yPos + desc;
}
else // #11727, #11628, etc.
{
regionMinY = static_cast<int>(qMax(0.0, floor(current.yPos - (asce + offset))));
regionMaxY = static_cast<int>(floor(current.yPos + desc));
}
 
regionMinY = static_cast<int>(floor(maxYAsc));
regionMaxY = static_cast<int>(floor(maxYDesc));
 
pt.moveTopLeft(QPoint(static_cast<int>(floor(current.xPos)), regionMinY));
done = false;
}