Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 13084 → Rev 13085

/trunk/Scribus/scribus/fileloader.cpp
101,7 → 101,7
{
if ((*it).nameMatch.indexIn("."+ext)!=-1)
{
// qDebug(QString("Match :%1: :.%2: on %3").arg((*it).nameMatch.pattern()).arg(ext).arg((*it).trName));
// qDebug() << QString("Match :%1: :.%2: on %3").arg((*it).nameMatch.pattern()).arg(ext).arg((*it).trName);
if ((*it).plug!=0)
{
if ((*it).plug->fileSupported(0, FileName))
113,7 → 113,7
}
}
// else
// qDebug(QString("No Match :%1: :.%2: on %3").arg((*it).nameMatch.pattern()).arg(ext).arg((*it).trName));
// qDebug() << QString("No Match :%1: :.%2: on %3").arg((*it).nameMatch.pattern()).arg(ext).arg((*it).trName);
}
// if (ret==-1)
/trunk/Scribus/scribus/util.cpp
955,7 → 955,7
else
name = mName;
QString bts ( "[ScBT] %1. %2" );
qDebug ( bts.arg( i ).arg( name ).toUtf8() );
qDebug ("%s", bts.arg( i ).arg( name ).toUtf8().data() );
}
free ( messages );
}
/trunk/Scribus/scribus/stylemanager.cpp
801,7 → 801,7
continue;
else
{
qDebug(QString("stylemanager: unknown parent '%1' of %2 style '%3'").arg(styles[i].second).arg(m_item->typeName()).arg(styles[i].first).toLatin1().constData());
qDebug() << QString("stylemanager: unknown parent '%1' of %2 style '%3'").arg(styles[i].second).arg(m_item->typeName()).arg(styles[i].first);
sitem = new StyleViewItem(rootItem, styles[i].first, m_item->typeName());
}
}
1175,7 → 1175,7
 
void StyleManager::slotDocStylesChanged()
{
qDebug("slotDocStylesChanged()");
qDebug() << "slotDocStylesChanged()";
}
 
// QPair.first == QString::null if nothing is selected or if
/trunk/Scribus/scribus/serializer.cpp
72,7 → 72,7
void end (const Xml_string& tagname)
{
// qDebug(QString("collect %1").arg(tagname));
// qDebug() << QString("collect %1").arg(tagname);
Collection* coll = this->dig->lookup<Collection>("<collection>");
ScColor* color = this->dig->top<ScColor>();
coll->collectColor(m_name, *color);
93,7 → 93,7
void end (const Xml_string& tagname)
{
// qDebug(QString("collect %1").arg(tagname));
// qDebug() << QString("collect %1").arg(tagname);
Collection* coll = this->dig->lookup<Collection>("<collection>");
multiLine* mline = this->dig->top<multiLine>();
coll->collectLineStyle(m_name, *mline);
113,7 → 113,7
void end (const Xml_string& tagname)
{
// qDebug(QString("collect %1").arg(tagname));
// qDebug() << QString("collect %1").arg(tagname);
// Collection* coll = this->dig->lookup<Collection>("<collection>");
multiLine* mline = this->dig->lookup<multiLine>("<multiline>");
SingleLine* sline = this->dig->top<SingleLine>();
305,9 → 305,9
{
Collection* coll = lookup<Collection>("<collection>");
Selection result( &m_Doc, false);
// qDebug(QString("deserialize: collection %1 doc %2").arg((ulong)coll).arg((ulong)&m_Doc));
// qDebug() << QString("deserialize: collection %1 doc %2").arg((ulong)coll).arg((ulong)&m_Doc);
if (coll == NULL)
qDebug("deserialize: no objects collected");
qDebug() << "deserialize: no objects collected";
else
{
QMap<QString,QString> newNames;
343,10 → 343,10
{
QString oldName = coll->pstyles[i].name();
int oldIndex = m_Doc.paragraphStyles().find(oldName);
// qDebug(QString("comparing %1 (old %2 new %3): parent '%4'='%5' cstyle %6 equiv %7").arg(oldName).arg(oldIndex).arg(i)
// qDebug() << QString("comparing %1 (old %2 new %3): parent '%4'='%5' cstyle %6 equiv %7").arg(oldName).arg(oldIndex).arg(i)
// .arg(oldIndex>=0? m_Doc.paragraphStyle(oldName).parent() : "?").arg(coll->pstyles[i].parent())
// .arg(oldIndex>=0? m_Doc.paragraphStyle(oldName).charStyle() == coll->pstyles[i].charStyle() : false)
// .arg(oldIndex>=0? m_Doc.paragraphStyle(oldName).equiv(coll->pstyles[i]) : false));
// .arg(oldIndex>=0? m_Doc.paragraphStyle(oldName).equiv(coll->pstyles[i]) : false);
if (oldIndex >= 0 && coll->pstyles[i] == m_Doc.paragraphStyle(oldName) )
continue;
/trunk/Scribus/scribus/fonts/scfontmetrics.cpp
474,7 → 474,7
for (uint i=0; table[i]; ++i) {
if (pattern.indexIn(table[i]) >= 0) {
FT_ULong unicode = pattern.cap(2).toULong(0, 16);
qDebug(QString("reading glyph name %1 for unicode %2(%3)").arg(pattern.cap(1)).arg(unicode).arg(pattern.cap(2)).toLocal8Bit());
qDebug() << QString("reading glyph name %1 for unicode %2(%3)").arg(pattern.cap(1)).arg(unicode).arg(pattern.cap(2));
adobeGlyphNames.insert(unicode, pattern.cap(1));
}
}
527,7 → 527,7
uint cr = FT_Get_Char_Index(face, c2);
FT_Error error = FT_Get_Kerning(face, cl, cr, FT_KERNING_UNSCALED, &delta);
if (error) {
qDebug(QString("Error %2 when accessing kerning pair for font %1").arg(scFace->scName()).arg(error));
qDebug() << QString("Error %2 when accessing kerning pair for font %1").arg(scFace->scName()).arg(error);
}
else {
double uniEM = static_cast<double>(face->units_per_EM);
535,7 → 535,7
}
}
else {
qDebug(QString("Font %1 has no kerning pairs (according to Freetype)").arg(scFace->scName()));
qDebug() << QString("Font %1 has no kerning pairs (according to Freetype)").arg(scFace->scName());
}
return width;
}
/trunk/Scribus/scribus/fonts/scface.cpp
296,7 → 296,7
double width = glyphWidth(gl1, size);
if (gl2 != 0)
width += glyphKerning(gl1, gl2, size);
// qDebug(QString("scface::glyphkerning: %1_%2 = %3 (%4, %5)").arg(ch).arg(ch2).arg(glyphKerning(gl1, gl2,size)).arg(gl1).arg(gl2));
// qDebug() << QString("scface::glyphkerning: %1_%2 = %3 (%4, %5)").arg(ch).arg(ch2).arg(glyphKerning(gl1, gl2,size)).arg(gl1).arg(gl2);
return width;
}
}
/trunk/Scribus/scribus/fonts/scface_ps.cpp
4,6 → 4,7
a copyright and/or license notice that predates the release of Scribus 1.3.2
for which a new license (GPL+exception) is in place.
*/
#include <QDebug>
#include <QDir>
#include <QFileInfo>
 
95,13 → 96,13
metricsFile = fontMetrics.at(i);
if (FT_Attach_File(face, metricsFile.toLocal8Bit().constData()))
{
qDebug(QObject::tr("Font %1 has broken metrics in file %2, ignoring metrics").arg(fontPath).arg(metricsFile).toLatin1().constData());
qDebug() << QObject::tr("Font %1 has broken metrics in file %2, ignoring metrics").arg(fontPath).arg(metricsFile);
brokenMetric = true;
}
else
{
if (brokenMetric)
qDebug(QObject::tr("Valid metrics were found for font %1, using metrics in file %2").arg(fontFile).arg(metricsFile).toLatin1().constData());
qDebug() << QObject::tr("Valid metrics were found for font %1, using metrics in file %2").arg(fontFile).arg(metricsFile);
metricsFound = true;
break;
}
108,6 → 109,6
}
}
else
qDebug(QObject::tr("No metrics found for font %1, ignoring font").arg(fontPath).toLatin1().constData());
qDebug() << QObject::tr("No metrics found for font %1, ignoring font").arg(fontPath);
return metricsFound;
}
/trunk/Scribus/scribus/fonts/ftface.cpp
184,10 → 184,10
double height = double(face->glyph->metrics.height) / m_uniEM;
GRec.bbox_ascent = double(face->glyph->metrics.horiBearingY) / m_uniEM;
GRec.bbox_descent = height - GRec.bbox_ascent;
// qDebug(QString("glyphmetrics %1: EM %2 bearing (%3,%4) size (%5,%6) advance %7 bbox (%8,%9)")
// qDebug() << QString("glyphmetrics %1: EM %2 bearing (%3,%4) size (%5,%6) advance %7 bbox (%8,%9)")
// .arg(gl).arg(m_uniEM).arg(face->glyph->metrics.horiBearingX).arg(face->glyph->metrics.horiBearingY)
// .arg(face->glyph->metrics.width).arg(face->glyph->metrics.height).arg(face->glyph->metrics.horiAdvance)
// .arg(w).arg(height));
// .arg(w).arg(height);
 
double x, y;
bool error = false;
/trunk/Scribus/scribus/fonts/scface_ps.h
183,7 → 183,7
}
else
{
qDebug(QObject::tr("Font %1 cannot be read, no embedding").arg(fontFile).toLatin1().constData());
qDebug("%s", QObject::tr("Font %1 cannot be read, no embedding").arg(fontFile).toLatin1().constData());
return false;
}
}
213,7 → 213,7
str.append(bb);
return true;
}
qDebug(QObject::tr("Font %1 cannot be read, no embedding").arg(fontFile).toLatin1().constData());
qDebug("%s", QObject::tr("Font %1 cannot be read, no embedding").arg(fontFile).toLatin1().constData());
return false;
}
};
/trunk/Scribus/scribus/scpageoutput.cpp
532,7 → 532,6
{
QMatrix chma, chma2, chma3, chma4, chma5, chma6;
chma.scale(glyphs.scaleH * style.fontSize() / 100.00, glyphs.scaleV * style.fontSize() / 100.0);
// qDebug(QString("glyphscale: %1 %2").arg(glyphs.scaleH).arg(glyphs.scaleV));
FPointArray gly = style.font().glyphOutline(glyph);
// Do underlining first so you can get typographically correct
// underlines when drawing a white outline
/trunk/Scribus/scribus/storyeditor.cpp
629,7 → 629,7
SelCharStart = currItem->CPos;
SelCharStart -= currItem->itemText.startOfParagraph(SelParaStart);
StoredSel = false;
//qDebug("SE::loadItemText: cursor");
//qDebug() << "SE::loadItemText: cursor";
// setCursorPosition(SelParaStart, SelCharStart);
emit setProps(SelParaStart, SelCharStart);
SelParaStart = 0;
645,7 → 645,7
updateAll();
if (StyledText.length() != 0)
emit setProps(0, 0);
//qDebug("SE::loadText: cursor");
//qDebug() << "SE::loadText: cursor";
textCursor().setPosition(0);
}
 
960,7 → 960,7
}
}
setUpdatesEnabled(false);
//qDebug("SE::paste: cursor");
//qDebug() << "SE::paste: cursor";
// setCursorPosition(currentPara, currentCharPos);
QTextCursor tCursor = textCursor();
tCursor.setPosition(pos + advanceLen);
2701,7 → 2701,7
Editor->clear();
Editor->setUndoRedoEnabled(false);
Editor->setUndoRedoEnabled(true);
//qDebug("SE::Do_new: cursor");
//qDebug() << "SE::Do_new: cursor";
Editor->textCursor().setPosition(0);
seActions["fileRevert"]->setEnabled(false);
seActions["editCopy"]->setEnabled(false);
2930,11 → 2930,11
int cursorPos = Editor->textCursor().position();
int scrollPos = Editor->verticalScrollBar()->value();
 
/* qDebug(QString("changeStyleSB: pa=%2, start=%2, new=%3 %4")
/* qDebug() << QString("changeStyleSB: pa=%2, start=%2, new=%3 %4")
.arg(pa)
.arg(Editor->StyledText.startOfParagraph(pa))
.arg(newStyle.parent())
.arg(newStyle.hasParent()));
.arg(newStyle.hasParent());
*/
int paraStart= Editor->StyledText.startOfParagraph(pa);
if (name.isEmpty()) // erase parent style
2986,7 → 2986,7
StrokeTools->TxStroke->setEnabled(false);
StrokeTools->PM1->setEnabled(false);
}
//qDebug("SE::changeStyleSB: cursor");
//qDebug() << "SE::changeStyleSB: cursor";
Editor->textCursor().setPosition(0);
updateProps(0, 0);
}
/trunk/Scribus/scribus/pageitem.cpp
957,7 → 957,7
*/
void PageItem::DrawObj(ScPainter *p, QRectF cullingArea)
{
// qDebug("PageItem::DrawObj");
// qDebug << "PageItem::DrawObj";
double sc;
if (!m_Doc->DoDrawing)
{
1936,7 → 1936,7
glyph = style.font().char2CMap(QChar('-'));
if (glyph >= ScFace::CONTROL_GLYPHS || (style.effects() & ScStyle_SuppressSpace)) {
// qDebug(QString("drawGlyphs: skipping %1").arg(glyph));
// qDebug("drawGlyphs: skipping %d", glyph);
// all those are empty
if (glyphs.more)
{
1984,7 → 1984,7
{
if (glyph == 0)
{
// qDebug(QString("glyph 0: (%1,%2) * %3 %4 + %5").arg(glyphs.xoffset).arg(glyphs.yoffset).arg(glyphs.scaleH).arg(glyphs.scaleV).arg(glyphs.xadvance));
// qDebug() << QString("glyph 0: (%1,%2) * %3 %4 + %5").arg(glyphs.xoffset).arg(glyphs.yoffset).arg(glyphs.scaleH).arg(glyphs.scaleV).arg(glyphs.xadvance));
}
p->save();
p->translate(glyphs.xoffset, glyphs.yoffset - ((style.fontSize() / 10.0) * glyphs.scaleV));
2005,9 → 2005,9
// double b = gly.point(0).y();
// double c = gly.point(3).x();
// double d = gly.point(3).y();
// qDebug(QString("drawglyphs: %1 (%2,%3) (%4,%5) scaled %6,%7 trans %8,%9")
// qDebug() << QString("drawglyphs: %1 (%2,%3) (%4,%5) scaled %6,%7 trans %8,%9")
// .arg(gly.size()).arg(a).arg(b).arg(c).arg(d)
// .arg(p->worldMatrix().m11()).arg(p->worldMatrix().m22()).arg(p->worldMatrix().dx()).arg(p->worldMatrix().dy()));
// .arg(p->worldMatrix().m11()).arg(p->worldMatrix().m22()).arg(p->worldMatrix().dx()).arg(p->worldMatrix().dy());
p->setupPolygon(&gly, true);
if (m_Doc->layerOutline(LayerNr))
{
2066,7 → 2066,7
p->restore();
}
else {
// qDebug(QString("drawGlyphs: empty glyph %1").arg(glyph));
// qDebug() << "drawGlyphs: empty glyph" << glyph;
}
if ((style.effects() & ScStyle_Strikethrough) && (style.strokeColor() != CommonStrings::None))
{
/trunk/Scribus/scribus/scribusview.cpp
2281,7 → 2281,7
 
void ScribusView::resizeEvent ( QResizeEvent * event )
{
// qDebug("ScribusView::resizeEvent");
// qDebug() << "ScribusView::resizeEvent";
QScrollArea::resizeEvent(event);
horizRuler->setGeometry(m_vhRulerHW, 1, width()-m_vhRulerHW-1, m_vhRulerHW);
vertRuler->setGeometry(1, m_vhRulerHW, m_vhRulerHW, height()-m_vhRulerHW-1);
/trunk/Scribus/scribus/pageitem_textframe.cpp
209,19 → 209,19
if (!shadows.contains(OnMasterPage)) {
shadows[OnMasterPage] = itemText;
// const ParagraphStyle& pstyle(shadows[OnMasterPage].paragraphStyle(0));
// qDebug(QString("Pageitem_Textframe: style of master: %1 align=%2").arg(pstyle.parent()).arg(pstyle.alignment()));
// qDebug(QString("Pageitem_Textframe: shadow itemText->%1").arg(OnMasterPage));
// qDebug() << QString("Pageitem_Textframe: style of master: %1 align=%2").arg(pstyle.parent()).arg(pstyle.alignment());
// qDebug() << QString("Pageitem_Textframe: shadow itemText->%1").arg(OnMasterPage);
}
if (newShadow != OnMasterPage) {
shadows[newShadow] = shadows[OnMasterPage].copy();
// const ParagraphStyle& pstyle(shadows[newShadow].paragraphStyle(0));
// qDebug(QString("Pageitem_Textframe: style of shadow copy: %1 align=%2").arg(pstyle.parent()).arg(pstyle.alignment()));
// qDebug() << QString("Pageitem_Textframe: style of shadow copy: %1 align=%2").arg(pstyle.parent()).arg(pstyle.alignment());
}
// qDebug(QString("Pageitem_Textframe: shadow %1<-%2").arg(newShadow).arg(OnMasterPage));
// qDebug() << QString("Pageitem_Textframe: shadow %1<-%2").arg(newShadow).arg(OnMasterPage);
}
itemText = shadows[newShadow];
// const ParagraphStyle& pstyle(itemText.paragraphStyle(0));
// qDebug(QString("Pageitem_Textframe: style of shadow: %1 align=%2").arg(pstyle.parent()).arg(pstyle.alignment()));
// qDebug() << QString("Pageitem_Textframe: style of shadow: %1 align=%2").arg(pstyle.parent()).arg(pstyle.alignment());
invalid = true;
currentShadow = newShadow;
}
243,7 → 243,7
.arg(pstyle.lineSpacingMode())
.arg(pstyle.lineSpacing())
.arg(pstyle.alignment());
qDebug(db.toLatin1().constData());
qDebug() << db;
static QString more(" ");
if (pstyle.hasParent())
dumpIt(*dynamic_cast<const ParagraphStyle*>(pstyle.parentStyle()), more + indent);
281,7 → 281,7
int count = static_cast<int>(len / wt);
double sPos = -len;
tglyph->xoffset = sPos;
// qDebug(QString("tab leaders: %1 %2 width=%3 count=%4").arg(sPos).arg(curLine.y).arg(wt).arg(count));
// qDebug() << QString("tab leaders: %1 %2 width=%3 count=%4").arg(sPos).arg(curLine.y).arg(wt).arg(count);
for (int cx = 1; cx < count; ++cx)
{
// clone fillchar
490,7 → 490,7
{
double EndX = floor(qMax(line.x, qMin(colRight,breakXPos) - 1));
QPoint pt1, pt2;
// qDebug(QString("endx start=%1, hl is '%2'").arg(EndX).arg(hl->ch));
// qDebug() << QString("endx start=%1, hl is '%2'").arg(EndX).arg(hl->ch);
do {
EndX += 0.125;
pt1 = QPoint(qRound(ceil(EndX + insets.Right)), static_cast<int>(yPos+descent));
530,7 → 530,7
asce = itemText.object(line.firstItem + zc)->gHeight + itemText.object(line.firstItem + zc)->lineWidth() * (cStyle.scaleV() / 1000.0);
else //if (itemText.charStyle(current.line.firstItem + zc).effects() & ScStyle_DropCap == 0)
asce = cStyle.font().realCharAscent(ch, cStyle.fontSize() / 10.0);
// qDebug(QString("checking char 'x%2' with ascender %1 > %3").arg(asce).arg(ch.unicode()).arg(result));
// qDebug() << QString("checking char 'x%2' with ascender %1 > %3").arg(asce).arg(ch.unicode()).arg(result);
result = qMax(result, asce);
}
return result;
556,7 → 556,7
asce = (itemText.object(line.firstItem+zc)->gHeight + itemText.object(line.firstItem+zc)->lineWidth()) * (itemText.charStyle(line.firstItem+zc).scaleV() / 1000.0);
else //if (itemText.charStyle(current.line.firstItem+zc).effects() & ScStyle_DropCap == 0)
asce = itemText.charStyle(line.firstItem+zc).font().height(itemText.charStyle(line.firstItem+zc).fontSize() / 10.0);
// qDebug(QString("checking char 'x%2' with ascender %1 > %3").arg(asce).arg(ch.unicode()).arg(result));
// qDebug() << QString("checking char 'x%2' with ascender %1 > %3").arg(asce).arg(ch.unicode()).arg(result);
result = qMax(result, asce);
}
return result;
620,10 → 620,10
double glyphScale = 1 + glyphExtension;
/*
qDebug(QString("justify: line = %7 natural = %1 + %2 = %3 (%4); spaces + %5%%; min=%8; glyphs + %6%%; min=%9")
qDebug() << QString("justify: line = %7 natural = %1 + %2 = %3 (%4); spaces + %5%%; min=%8; glyphs + %6%%; min=%9")
.arg(spaceNatural).arg(glyphNatural).arg(spaceNatural+glyphNatural).arg(line.naturalWidth)
.arg(spaceExtension).arg(glyphExtension).arg(line.width)
.arg(style.minWordTracking()).arg(style.minGlyphExtension()));
.arg(style.minWordTracking()).arg(style.minGlyphExtension());
*/
// distribute whitespace on spaces and glyphs
760,19 → 760,19
invalid = false;
PageItem_TextFrame* prevInChain = dynamic_cast<PageItem_TextFrame*>(BackBox);
if (!prevInChain)
qDebug(QString("layout(): backBox=%1 is no textframe!!").arg((ulong)BackBox).toLatin1().constData());
qDebug() << QString("layout(): backBox=%1 is no textframe!!").arg((ulong)BackBox);
else
BackBox->layout();
return;
}
else if (!invalid && OnMasterPage.isEmpty()) {
// qDebug(QString("textframe: len=%1, invalid=%2 OnMasterPage=%3: no relayout").arg(itemText.length()).arg(invalid).arg(OnMasterPage));
// qDebug() << QString("textframe: len=%1, invalid=%2 OnMasterPage=%3: no relayout").arg(itemText.length()).arg(invalid).arg(OnMasterPage);
return;
}
if (invalid && BackBox == NULL)
firstChar = 0;
// qDebug(QString("textframe(%1,%2): len=%3, start relayout at %4").arg(Xpos).arg(Ypos).arg(itemText.length()).arg(firstInFrame()));
// qDebug() << QString("textframe(%1,%2): len=%3, start relayout at %4").arg(Xpos).arg(Ypos).arg(itemText.length()).arg(firstInFrame());
// ScribusView* view = m_Doc->view();
QMatrix pf2;
QPoint pt1, pt2;
828,10 → 828,10
/*
for (int i=0; i < itemText.nrOfParagraphs(); ++i) {
const ParagraphStyle& pstyle(itemText.paragraphStyle(itemText.endOfParagraph(i)));
qDebug(QString("par %1:").arg(i));
qDebug("par %d:", i);
dumpIt(pstyle);
}
qDebug(QString("default:"));
qDebug() << "default:";
dumpIt(itemText.defaultStyle());
*/
866,13 → 866,13
if (style.lineSpacingMode() == ParagraphStyle::AutomaticLineSpacing)
{
style.setLineSpacing(style.charStyle().font().height(style.charStyle().fontSize() / 10.0));
// qDebug(QString("auto linespacing: %1").arg(style.lineSpacing()));
// qDebug() << QString("auto linespacing: %1").arg(style.lineSpacing());
}
else if (style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing)
style.setLineSpacing(m_Doc->typographicSettings.valueBaseGrid);
 
// 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():""));
// 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 (style.hasDropCap())
{
if (style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing)
884,7 → 884,7
chs = hl->fontSize();
desc2 = -hl->font().descent(chs / 10.0);
current.yPos = extra.Top + lineCorr;
// qDebug(QString("first line at y=%1").arg(current.yPos));
// qDebug() << QString("first line at y=%1").arg(current.yPos);
}
else // empty itemText:
{
903,21 → 903,21
if (current.itemsInLine == 0)
opticalMargins = style.opticalMargins();
// qDebug(QString("style pos %1: %2 (%3)").arg(a).arg(style.alignment()).arg(style.parent()));
// qDebug() << QString("style pos %1: %2 (%3)").arg(a).arg(style.alignment()).arg(style.parent());
const CharStyle& charStyle = (hl->ch != SpecialChars::PARSEP? itemText.charStyle(a) : itemText.paragraphStyle(a).charStyle());
if (!charStyle.parent().isEmpty())
{
// qDebug(QString("charstyle pos %1: %2 (%3 %4 %5 %6 %7 %8 %9)").arg(a).arg(charStyle.parent())
// qDebug() << QString("charstyle pos %1: %2 (%3 %4 %5 %6 %7 %8 %9)").arg(a).arg(charStyle.parent())
// .arg((uint)charStyle.parentStyle()).arg(charStyle.font().scName()).arg(charStyle.fontSize())
// .arg(charStyle.fillColor()).arg(charStyle.strokeColor()).arg(charStyle.parentStyle()->name()).arg((uint)charStyle.parentStyle()->parentStyle()));
// .arg(charStyle.fillColor()).arg(charStyle.strokeColor()).arg(charStyle.parentStyle()->name()).arg((uint)charStyle.parentStyle()->parentStyle());
}
// qDebug(QString("charstyle pos %1: %2 (%3)").arg(a).arg(charStyle.asString()).arg(charStyle.fontSize()));
// qDebug(QString("style @%6: %1 -- %2, %4/%5 char: %3").arg(style.leftMargin()).arg(style.rightMargin())
// qDebug() << QString("charstyle pos %1: %2 (%3)").arg(a).arg(charStyle.asString()).arg(charStyle.fontSize());
// 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())
// .arg(a));
// .arg(a);
 
chstr = ExpandToken(a);
// qDebug(QString("expanded token: '%1'").arg(chstr));
// qDebug() << QString("expanded token: '%1'").arg(chstr);
if (chstr.isEmpty())
chstr = SpecialChars::ZWNBSPACE;
if (style.lineSpacingMode() == ParagraphStyle::AutomaticLineSpacing)
977,14 → 977,14
else
hl->setEffects(hl->effects() & ~ScStyle_SuppressSpace);
}
// qDebug(QString("textframe(%1,%2): len=%3, fontsize=%4, ascent=%5").arg(Xpos).arg(Ypos).arg(itemText.length())
// .arg(charStyle.fontSize()).arg(charStyle.font().ascent()));
// qDebug() << QString("textframe(%1,%2): len=%3, fontsize=%4, ascent=%5").arg(Xpos).arg(Ypos).arg(itemText.length())
// .arg(charStyle.fontSize()).arg(charStyle.font().ascent());
if (current.itemsInLine == 0)
{
// more about par gap and dropcaps
if ((a > firstInFrame() && itemText.text(a-1) == SpecialChars::PARSEP) || (a == 0 && BackBox == 0 && !current.startOfCol)) // after || always evaluates to false? FIXME
{
// qDebug(QString("gap before2: y=%1+%2").arg(current.yPos).arg(style.gapBefore()));
// qDebug() << QString("gap before2: y=%1+%2").arg(current.yPos).arg(style.gapBefore());
current.yPos += style.gapBefore();
DropCapDrop = 0;
if (chstr[0] != SpecialChars::PARSEP)
1003,7 → 1003,7
else
DropCapDrop = charStyle.font().height(style.charStyle().fontSize() / 10.0) * (DropLines-1);
}
// qDebug(QString("dropcapdrop: y=%1+%2").arg(current.yPos).arg(DropCapDrop));
// qDebug() << QString("dropcapdrop: y=%1+%2").arg(current.yPos).arg(DropCapDrop);
current.yPos += DropCapDrop;
}
}
1108,7 → 1108,7
{
wide = charStyle.font().realCharWidth(chstr[0], chsd / 10.0);
asce = charStyle.font().realCharHeight(chstr[0], chsd / 10.0);
// qDebug(QString("dropcaps pre: chsd=%1 realCharHeight = %2 chstr=%3").arg(chsd).arg(asce).arg(chstr2[0]));
// qDebug() QString("dropcaps pre: chsd=%1 realCharHeight = %2 chstr=%3").arg(chsd).arg(asce).arg(chstr2[0]);
hl->glyph.scaleH /= hl->glyph.scaleV;
hl->glyph.scaleV = (asce / charStyle.font().realCharHeight(chstr[0], charStyle.fontSize() / 10.0));
hl->glyph.scaleH *= hl->glyph.scaleV;
1119,8 → 1119,8
}
else // !DropCMode
{
// qDebug(QString("textframe ascent/descent: fontsize=%1, ascent=%2, descent=%3")
// .arg(charStyle.fontSize()).arg(charStyle.font().ascent()).arg(charStyle.font().descent()));
// qDebug( ) << QString("textframe ascent/descent: fontsize=%1, ascent=%2, descent=%3")
// .arg(charStyle.fontSize()).arg(charStyle.font().ascent()).arg(charStyle.font().descent());
 
if (SpecialChars::isExpandingSpace(hl->ch))
{
1145,7 → 1145,7
}
fBorder = false;
// end of col reached?
// qDebug(QString("eocol? %1 + %2 + %3 > %4 -- asce=%5").arg(current.yPos).arg(extra.Bottom).arg(lineCorr).arg(Height).arg(asce));
// qDebug() << QString("eocol? %1 + %2 + %3 > %4 -- asce=%5").arg(current.yPos).arg(extra.Bottom).arg(lineCorr).arg(Height).arg(asce);
if (current.isEndOfCol())
{
current.column++;
1170,7 → 1170,7
if (DropCmode)
DropLines = style.dropCapLines();
}
// qDebug(QString("layout: nextcol grid=%1 x %2").arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(m_Doc->typographicSettings.valueBaseGrid));
// qDebug() << QString("layout: nextcol grid=%1 x %2").arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(m_Doc->typographicSettings.valueBaseGrid);
if (style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing)
{
double by = Ypos;
1178,7 → 1178,7
by = Ypos - m_Doc->Pages->at(OwnPage)->yOffset();
int ol1 = qRound((by + current.yPos - m_Doc->typographicSettings.offsetBaseGrid) * 10000.0);
int ol2 = static_cast<int>(ol1 / m_Doc->typographicSettings.valueBaseGrid);
// qDebug(QString("baseline adjust: y=%1->%2").arg(current.yPos).arg(ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by));
// qDebug() << QString("baseline adjust: y=%1->%2").arg(current.yPos).arg(ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by);
 
current.yPos = ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by;
}
1186,7 → 1186,7
else
{
MaxChars = a;
// qDebug(QString("no room A: %1").arg(a));
// qDebug() << QString("no room A: %1").arg(a);
goto NoRoom;
}
}
1193,7 → 1193,7
// ok, there's more room in col
if (current.itemsInLine == 0)
{
// qDebug(QString("newline: '%1' %2 %3").arg(a).arg(current.yPos).arg(asce));
// qDebug() << QString("newline: '%1' %2 %3").arg(a).arg(current.yPos).arg(asce);
// start a new line
double TopOffset = asce;
double BotOffset = desc2;
1200,12 → 1200,12
goNoRoom = false;
if (current.startOfCol)
{
// qDebug(QString("current.startOfCol: %1 + %2 + %3 + 1 =%4").arg(asce).arg(extra.Top).arg(lineCorr).arg(asce + extra.Top + lineCorr + 1));
// qDebug() << QString("current.startOfCol: %1 + %2 + %3 + 1 =%4").arg(asce).arg(extra.Top).arg(lineCorr).arg(asce + extra.Top + lineCorr + 1);
current.yPos = asce + extra.Top + lineCorr + 1;
// if (((a > 0) && (itemText.at(a-1)->ch == QChar(13))) || ((a == 0) && (BackBox == 0)))
// current.yPos += m_Doc->docParagraphStyles[hl->cab].gapBefore;
}
// qDebug(QString("layout: nextline grid=%1 x %2").arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(m_Doc->typographicSettings.valueBaseGrid));
// qDebug() << QString("layout: nextline grid=%1 x %2").arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(m_Doc->typographicSettings.valueBaseGrid);
if (style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing)
{
double by = Ypos;
1213,14 → 1213,14
by = Ypos - m_Doc->Pages->at(OwnPage)->yOffset();
int ol1 = qRound((by + current.yPos - m_Doc->typographicSettings.offsetBaseGrid) * 10000.0);
int ol2 = static_cast<int>(ol1 / m_Doc->typographicSettings.valueBaseGrid);
// qDebug(QString("useBaselIneGrid: %1 * %2 + %3 - %4").arg(ol2 / 10000.0).arg(m_Doc->typographicSettings.valueBaseGrid).arg(m_Doc->typographicSettings.offsetBaseGrid).arg(by));
// qDebug(QString("baseline adjust: y=%1->%2").arg(current.yPos).arg(ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by));
// qDebug() << QString("useBaselIneGrid: %1 * %2 + %3 - %4").arg(ol2 / 10000.0).arg(m_Doc->typographicSettings.valueBaseGrid).arg(m_Doc->typographicSettings.offsetBaseGrid).arg(by);
// qDebug() << QString("baseline adjust: y=%1->%2").arg(current.yPos).arg(ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by);
current.yPos = ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by;
}
/* this causes different spacing for first line:
if (current.yPos-TopOffset < 0.0)
{
qDebug(QString("current.yPos - Ascender < 0 (%1 - %2 < 0)").arg(current.yPos).arg(TopOffset));
qDebug(= << QString("current.yPos - Ascender < 0 (%1 - %2 < 0)").arg(current.yPos).arg(TopOffset);
current.yPos = TopOffset+1;
}
*/
1228,7 → 1228,7
pt1 = QPoint(static_cast<int>(ceil(current.xPos)), static_cast<int>(current.yPos+BotOffset));
pt2 = QPoint(static_cast<int>(ceil(current.xPos)), static_cast<int>(ceil(current.yPos-TopOffset)));
// increase pt1/pt2 until i-beam reaches end of line
// qDebug(QString("linestart: %1 + %2 + %3 < %4").arg(current.xPos).arg(wide).arg(style.rightMargin()).arg(current.colRight));
// qDebug() << QString("linestart: %1 + %2 + %3 < %4").arg(current.xPos).arg(wide).arg(style.rightMargin()).arg(current.colRight);
double leftIndent = 0;
double xStep = legacy? 1 : 0.125;
while (!cl.contains(pf2.map(pt1)) || !cl.contains(pf2.map(pt2)) || current.isEndOfLine(wide + leftIndent + style.rightMargin()))
1237,7 → 1237,7
current.xPos += xStep;
if (current.isEndOfLine(wide + leftIndent + style.rightMargin()))
{
// qDebug(QString("eocol %5? %1 + %2 + %3 + %4").arg(current.yPos).arg(current.startOfCol).arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(style.lineSpacing()).arg(current.column));
// qDebug() << QString("eocol %5? %1 + %2 + %3 + %4").arg(current.yPos).arg(current.startOfCol).arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(style.lineSpacing()).arg(current.column);
// new line
fBorder = false;
current.xPos = current.colLeft;
1250,7 → 1250,7
current.yPos++;
else
current.yPos += qMax(style.lineSpacing(), 1.0);
// qDebug(QString("layout: next lower line grid=%1 x %2").arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(m_Doc->typographicSettings.valueBaseGrid));
// qDebug() << QString("layout: next lower line grid=%1 x %2").arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(m_Doc->typographicSettings.valueBaseGrid);
if (style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing)
{
double by = Ypos;
1258,7 → 1258,7
by = Ypos - m_Doc->Pages->at(OwnPage)->yOffset();
int ol1 = qRound((by + current.yPos - m_Doc->typographicSettings.offsetBaseGrid) * 10000.0);
int ol2 = static_cast<int>(ol1 / m_Doc->typographicSettings.valueBaseGrid);
// qDebug(QString("baseline adjust: y=%1->%2").arg(current.yPos).arg(ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by));
// qDebug() << QString("baseline adjust: y=%1->%2").arg(current.yPos).arg(ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by);
current.yPos = ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by;
}
if (current.isEndOfCol())
1284,7 → 1284,7
if (DropCmode)
DropLines = style.dropCapLines();
}
// qDebug(QString("layout: nextcol2 grid=%1 x %2").arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(m_Doc->typographicSettings.valueBaseGrid));
// qDebug() << QString("layout: nextcol2 grid=%1 x %2").arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(m_Doc->typographicSettings.valueBaseGrid);
if (style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing)
{
double by = Ypos;
1292,7 → 1292,7
by = Ypos - m_Doc->Pages->at(OwnPage)->yOffset();
int ol1 = qRound((by + current.yPos - m_Doc->typographicSettings.offsetBaseGrid) * 10000.0);
int ol2 = static_cast<int>(ol1 / m_Doc->typographicSettings.valueBaseGrid);
// qDebug(QString("baseline adjust: y=%1->%2").arg(current.yPos).arg(ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by));
// qDebug() << QString("baseline adjust: y=%1->%2").arg(current.yPos).arg(ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by);
current.yPos = ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by;
}
}
1299,7 → 1299,7
else
{
MaxChars = a;
// qDebug(QString("no room B: %1").arg(a));
// qDebug() << QString("no room B: %1").arg(a);
goto NoRoom;
}
}
1327,13 → 1327,13
if (opticalMargins & ParagraphStyle::OM_LeftHangingPunct) {
current.xPos += opticalLeftMargin(itemText, current.line);
}
// qDebug(QString("store line: (%1,%2)").arg(current.xPos).arg(current.yPos));
// qDebug() << QString("store line: (%1,%2)").arg(current.xPos).arg(current.yPos);
current.line.x = current.xPos;
current.line.y = current.yPos;
fBorder = false;
}
else {
// qDebug(QString("cont.' line: '%1'").arg(a));
// qDebug() << QString("cont.' line: '%1'").arg(a);
}
// right tab stuff
if (tabs.active)
1388,7 → 1388,7
current.xPos = current.colLeft + tCurX;
// remember fill char
// qDebug(QString("tab: %1 '%2'").arg(tCurX).arg(tabs.fillChar));
// qDebug() << QString("tab: %1 '%2'").arg(tCurX).arg(tabs.fillChar);
if (!tabs.fillChar.isNull()) {
hl->glyph.grow();
GlyphLayout * tglyph = hl->glyph.more;
1526,7 → 1526,7
maxDY = current.yPos;
current.xPos += style.dropCapOffset();
hl->glyph.xadvance += style.dropCapOffset();
// qDebug(QString("dropcapoffset: %1 -> %2").arg(current.xPos-style.dropCapOffset()).arg(current.xPos));
// qDebug() << QString("dropcapoffset: %1 -> %2").arg(current.xPos-style.dropCapOffset()).arg(current.xPos);
current.xPos = qMax(current.xPos, current.colLeft);
maxDX = current.xPos;
QPolygon tcli(4);
1538,7 → 1538,7
by = Ypos - m_Doc->Pages->at(OwnPage)->yOffset();
int ol1 = qRound((by + current.yPos - m_Doc->typographicSettings.offsetBaseGrid) * 10000.0);
int ol2 = static_cast<int>(ol1 / m_Doc->typographicSettings.valueBaseGrid);
// qDebug(QString("baseline adjust after dropcaps: y=%1->%2").arg(current.yPos).arg(ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by));
// qDebug() << QString("baseline adjust after dropcaps: y=%1->%2").arg(current.yPos).arg(ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by);
current.yPos = ceil( ol2 / 10000.0 ) * m_Doc->typographicSettings.valueBaseGrid + m_Doc->typographicSettings.offsetBaseGrid - by;
//FIXME: use current.colLeft instead of xOffset?
tcli.setPoint(0, QPoint(qRound(hl->glyph.xoffset), qRound(maxDY-DropLines*m_Doc->typographicSettings.valueBaseGrid)));
1549,7 → 1549,7
if (style.lineSpacingMode() == ParagraphStyle::FixedLineSpacing)
{
current.yPos -= style.lineSpacing() * (DropLines-1);
// qDebug(QString("after dropcaps: y=%1").arg(current.yPos));
// qDebug() << QString("after dropcaps: y=%1").arg(current.yPos);
tcli.setPoint(0, QPoint(qRound(hl->glyph.xoffset), qRound(maxDY - DropLines * style.lineSpacing())));
tcli.setPoint(1, QPoint(qRound(maxDX), qRound(maxDY-DropLines*style.lineSpacing())));
}
1557,7 → 1557,7
{
double currasce = charStyle.font().height(style.charStyle().fontSize() / 10.0);
current.yPos -= currasce * (DropLines-1);
// qDebug(QString("after dropcaps: y=%1").arg(current.yPos));
// qDebug() << QString("after dropcaps: y=%1").arg(current.yPos);
tcli.setPoint(0, QPoint(qRound(hl->glyph.xoffset), qRound(maxDY-DropLines*currasce)));
tcli.setPoint(1, QPoint(qRound(maxDX), qRound(maxDY-DropLines*currasce)));
}
1622,7 → 1622,7
if (current.breakIndex >= 0) // Hier koenen auch andere Trennungen eingebaut werden
{
// go back to last break position
// qDebug(QString("new break pos a=%1 BuPos=%2 current.breakIndex=%3").arg(a).arg(BuPos).arg(current.breakIndex));
// qDebug() << QString("new break pos a=%1 BuPos=%2 current.breakIndex=%3").arg(a).arg(BuPos).arg(current.breakIndex);
a = current.breakIndex;
assert( a >= 0 );
assert( a < itemText.length() );
1631,15 → 1631,15
if (style.lineSpacingMode() == ParagraphStyle::AutomaticLineSpacing)
{
style.setLineSpacing(style.charStyle().font().height(style.charStyle().fontSize() / 10.0));
// qDebug(QString("auto linespacing: %1").arg(style.lineSpacing()));
// qDebug() << QString("auto linespacing: %1").arg(style.lineSpacing());
}
else if (style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing)
style.setLineSpacing(m_Doc->typographicSettings.valueBaseGrid);
current.itemsInLine = a - current.line.firstItem + 1;
// qDebug(QString("style outs pos %1: %2 (%3)").arg(a).arg(style.alignment()).arg(style.parent()));
// qDebug(QString("style <@%6: %1 -- %2, %4/%5 char: %3").arg(style.leftMargin()).arg(style.rightMargin())
// qDebug() << QString("style outs pos %1: %2 (%3)").arg(a).arg(style.alignment()).arg(style.parent());
// 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));
// .arg(a);
 
if (hl->ch == ' ') {
hl->setEffects(hl->effects() | ScStyle_SuppressSpace);
1693,7 → 1693,7
current.line.naturalWidth += opticalRightMargin(itemText, current.line);
indentLine(itemText, current.line, OFs);
}
// qDebug(QString("line: endx=%1 next pos=(%2,%3").arg(EndX).arg(current.line.x + current.line.width).arg(current.yPos));
// qDebug() << QString("line: endx=%1 next pos=(%2,%3").arg(EndX).arg(current.line.x + current.line.width).arg(current.yPos);
current.xPos = current.line.x + current.line.width;
}
}
1719,21 → 1719,21
if (style.lineSpacingMode() == ParagraphStyle::AutomaticLineSpacing)
{
style.setLineSpacing(style.charStyle().font().height(style.charStyle().fontSize() / 10.0));
// qDebug(QString("auto linespacing: %1").arg(style.lineSpacing()));
// qDebug() << QString("auto linespacing: %1").arg(style.lineSpacing());
}
else if (style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing)
style.setLineSpacing(m_Doc->typographicSettings.valueBaseGrid);
}
current.breakLine(itemText, a);
// qDebug(QString("style no break pos %1: %2 (%3)").arg(a).arg(style.alignment()).arg(style.parent()));
// qDebug(QString("style nb @%6: %1 -- %2, %4/%5 char: %3").arg(style.leftMargin()).arg(style.rightMargin())
// qDebug() << QString("style no break pos %1: %2 (%3)").arg(a).arg(style.alignment()).arg(style.parent());
// 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())
// .arg(a));
// .arg(a);
EndX = current.endOfLine(cl, pf2, asce, desc, style.rightMargin());
current.finishLine(EndX);
// qDebug(QString("no break pos: %1-%2 @ %3 wid %4 nat %5 endX %6")
// qDebug() << QString("no break pos: %1-%2 @ %3 wid %4 nat %5 endX %6")
// .arg(current.line.firstItem).arg(current.line.firstItem)
// .arg(current.line.x).arg(current.line.width).arg(current.line.naturalWidth).arg(EndX));
// .arg(current.line.x).arg(current.line.width).arg(current.line.naturalWidth).arg(EndX);
indentLine(itemText, current.line, 0);
}
}
1747,7 → 1747,7
AbsHasDrop = false;
if (current.yPos < maxDY)
current.yPos = maxDY;
// qDebug(QString("after dropcaps: y=%1 maxDY=%2").arg(current.yPos).arg(maxDY));
// qDebug() << QString("after dropcaps: y=%1 maxDY=%2").arg(current.yPos).arg(maxDY);
}
bool fromOut = true;
double BotOffset = desc+extra.Bottom+lineCorr;
1759,8 → 1759,8
if (current.isEndOfLine(style.rightMargin()))
{
fromOut = false;
// qDebug(QString("layout: next lower2 grid=%1 x %2").arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(m_Doc->typographicSettings.valueBaseGrid));
// qDebug(QString("nextline: y=%1+%2").arg(current.yPos).arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing? m_Doc->typographicSettings.valueBaseGrid : style.lineSpacing()));
// qDebug() << QString("layout: next lower2 grid=%1 x %2").arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(m_Doc->typographicSettings.valueBaseGrid);
// qDebug() << QString("nextline: y=%1+%2").arg(current.yPos).arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing? m_Doc->typographicSettings.valueBaseGrid : style.lineSpacing());
 
if (style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing)
current.yPos += m_Doc->typographicSettings.valueBaseGrid;
1770,7 → 1770,7
{
goNoRoom = true;
MaxChars = a + 1;
// qDebug(QString("go no room 1: %1").arg(a));
// qDebug() << QString("go no room 1: %1").arg(a));
break;
}
if (AbsHasDrop)
1790,7 → 1790,7
{
if (hl->ch == SpecialChars::PARSEP)
{
// qDebug(QString("gap after: y=%1+%2").arg(current.yPos).arg(style.gapAfter()));
// qDebug() << QString("gap after: y=%1+%2").arg(current.yPos).arg(style.gapAfter());
current.yPos += style.gapAfter();
}
current.hyphenCount = 0;
1802,7 → 1802,7
if (cl.contains(pf2.map(pt1)) && cl.contains(pf2.map(pt2)))
break;
// else
// qDebug(QString("looking for start of line at %1,%2").arg(current.xPos).arg(current.yPos));
// qDebug() << QString("looking for start of line at %1,%2").arg(current.xPos).arg(current.yPos);
}
if (fromOut)
{
1810,7 → 1810,7
{
goNoRoom = true;
MaxChars = a + 1;
// qDebug(QString("go no room 2: %1").arg(a));
// qDebug() << QString("go no room 2: %1").arg(a);
break;
}
current.xPos--;
1825,20 → 1825,20
AbsHasDrop = false;
if (current.yPos < maxDY)
current.yPos = maxDY;
// qDebug(QString("after dropcap2: y=%1+%2").arg(current.yPos).arg(maxDY));
// qDebug() << QString("after dropcap2: y=%1+%2").arg(current.yPos).arg(maxDY);
}
// qDebug(QString("layout: next lower3 grid=%1 x %2").arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(m_Doc->typographicSettings.valueBaseGrid));
// qDebug() << QString("layout: next lower3 grid=%1 x %2").arg(style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing).arg(m_Doc->typographicSettings.valueBaseGrid);
 
 
if (style.lineSpacingMode() == ParagraphStyle::BaselineGridLineSpacing)
{
// qDebug(QString("next line (grid): y=%1+%2").arg(current.yPos).arg(m_Doc->typographicSettings.valueBaseGrid));
// qDebug() << QString("next line (grid): y=%1+%2").arg(current.yPos).arg(m_Doc->typographicSettings.valueBaseGrid);
 
current.yPos += m_Doc->typographicSettings.valueBaseGrid;
}
else
{
// qDebug(QString("next line (auto): y=%1+%2").arg(current.yPos).arg(style.lineSpacing()));
// qDebug() << QString("next line (auto): y=%1+%2").arg(current.yPos).arg(style.lineSpacing());
//#5845 : use next paragraph line spacing for switching to next paragraph instead of current one
//current.yPos += style.lineSpacing();
const ParagraphStyle& pStyle = itemText.paragraphStyle(a+1);
1866,7 → 1866,7
{
if (hl->ch == SpecialChars::PARSEP)
{
// qDebug(QString("gap after: y=%1+%2").arg(current.yPos).arg(style.gapAfter()));
// qDebug() << QString("gap after: y=%1+%2").arg(current.yPos).arg(style.gapAfter());
current.yPos += style.gapAfter();
}
current.hyphenCount = 0;
1897,7 → 1897,7
{
adj = firstasce - style.lineSpacing();
}
// qDebug(QString("firstLineOffsetP ADJ FASC CASC %1 %2 %3 %4").arg(firstLineOffsetP).arg(adj).arg(firstasce).arg(currasce).toAscii());
// qDebug() << QString("firstLineOffsetP ADJ FASC CASC %1 %2 %3 %4").arg(firstLineOffsetP).arg(adj).arg(firstasce).arg(currasce).toAscii();
/*0;
if ((itemText.text(current.line.firstItem) == SpecialChars::PARSEP) || (itemText.text(current.line.firstItem) == SpecialChars::LINEBREAK))
currasce = itemText.charStyle(current.line.firstItem).font().ascent(itemText.charStyle(current.line.firstItem).fontSize() / 10.0);
1921,10 → 1921,10
asce = (itemText.object(current.line.firstItem + zc)->gHeight + itemText.object(current.line.firstItem + zc)->lineWidth()) * (cStyle.scaleV() / 1000.0);
else //if (itemText.charStyle(current.line.firstItem + zc).effects() & ScStyle_DropCap == 0)
asce = cStyle.font().realCharAscent(ch, cStyle.fontSize() / 10.0);
// qDebug(QString("checking char 'x%2' with ascender %1 > %3").arg(asce).arg(ch.unicode()).arg(currasce));
// qDebug() << QString("checking char 'x%2' with ascender %1 > %3").arg(asce).arg(ch.unicode()).arg(currasce);
currasce = qMax(currasce, asce);
}*/
// qDebug(QString("move1 line %1.. down by %2").arg(current.line.firstItem).arg(-adj));
// qDebug() << QString("move1 line %1.. down by %2").arg(current.line.firstItem).arg(-adj);
current.line.ascent = currasce;
current.line.y -= adj;
current.yPos -= adj;
1952,12 → 1952,12
asce = (itemText.object(current.line.firstItem + zc)->gHeight + itemText.object(current.line.firstItem + zc)->lineWidth()) * (itemText.charStyle(current.line.firstItem + zc).scaleV() / 1000.0);
else //if (itemText.charStyle(current.line.firstItem + zc).effects() & ScStyle_DropCap == 0)
asce = itemText.charStyle(current.line.firstItem + zc).font().height(itemText.charStyle(current.line.firstItem + zc).fontSize() / 10.0);
// qDebug(QString("checking char 'x%2' with ascender %1 > %3").arg(asce).arg(ch.unicode()).arg(currasce));
// qDebug() << QString("checking char 'x%2' with ascender %1 > %3").arg(asce).arg(ch.unicode()).arg(currasce);
currasce = qMax(currasce, asce);
}
*/
double adj = firstasce - currasce;
// qDebug(QString("move2 line %1.. down by %2").arg(current.line.firstItem).arg(-adj));
// qDebug() << QString("move2 line %1.. down by %2").arg(current.line.firstItem).arg(-adj);
current.line.ascent = currasce;
current.line.y -= adj;
current.yPos -= adj;
2009,10 → 2009,10
}
}
*/
// qDebug(QString("layout: line %1 - %2 @ (%3,%4) wd %5/%6").arg(current.line.firstItem).arg(current.line.lastItem)
// .arg(current.line.x).arg(current.line.y).arg(current.line.naturalWidth).arg(current.line.width));
// qDebug() << QString("layout: line %1 - %2 @ (%3,%4) wd %5/%6").arg(current.line.firstItem).arg(current.line.lastItem)
// .arg(current.line.x).arg(current.line.y).arg(current.line.naturalWidth).arg(current.line.width);
if (current.line.firstItem > current.line.lastItem)
; //qDebug(QString("layout: empty line %1 - %2").arg(current.line.firstItem).arg(current.line.lastItem));
; //qDebug() << QString("layout: empty line %1 - %2").arg(current.line.firstItem).arg(current.line.lastItem);
else if (current.itemsInLine > 0)
itemText.appendLine(current.line);
current.startLine(a+1);
2021,7 → 2021,7
{
goNoRoom = false;
MaxChars = a+1;
// qDebug(QString("no room C: %1").arg(a+1));
// qDebug() << QString("no room C: %1").arg(a+1);
goto NoRoom;
}
if (goNextColumn)
2035,7 → 2035,7
else
{
MaxChars = a;
// qDebug(QString("no room D: %1").arg(a));
// qDebug() << QString("no room D: %1").arg(a);
goto NoRoom;
}
}
2111,7 → 2111,7
asce = (itemText.object(current.line.firstItem)->gHeight + itemText.object(current.line.firstItem)->lineWidth()) * (itemText.charStyle(current.line.firstItem).scaleV() / 1000.0));
else //if (itemText.charStyle(current.line.firstItem).effects() & ScStyle_DropCap == 0)
asce = itemText.charStyle(current.line.firstItem).font().realCharAscent(itemText.text(current.line.firstItem), itemText.charStyle(current.line.firstItem).fontSize() / 10.0);
qDebug(QString("starting with ascender %1 (firstasce=%2)").arg(asce).arg(firstasce));
qDebug() << QString("starting with ascender %1 (firstasce=%2)").arg(asce).arg(firstasce);
currasce = asce;
for (int zc = 0; zc < current.itemsInLine; ++zc)
{
2127,11 → 2127,11
asce = (itemText.object(current.line.firstItem+zc)->gHeight + itemText.object(current.line.firstItem+zc)->lineWidth()) * itemText.charStyle(current.line.firstItem+zc).scaleV() / 1000.0);
else //if (itemText.charStyle(current.line.firstItem+zc).effects() & ScStyle_DropCap == 0)
asce = itemText.charStyle(current.line.firstItem+zc).font().realCharAscent(itemText.text(current.line.firstItem+zc), itemText.charStyle(current.line.firstItem+zc).fontSize() / 10.0));
// qDebug(QString("checking char 'x%2' with ascender %1 > %3").arg(asce).arg(ch.unicode()).arg(currasce));
// qDebug() << QString("checking char 'x%2' with ascender %1 > %3").arg(asce).arg(ch.unicode()).arg(currasce);
currasce = qMax(currasce, asce);
}
*/
// qDebug(QString("move3 line %1.. down by %2 current ascender=%3").arg(current.line.firstItem).arg(-adj).arg(currasce));
// qDebug() << QString("move3 line %1.. down by %2 current ascender=%3").arg(current.line.firstItem).arg(-adj).arg(currasce);
 
current.line.ascent = currasce;
current.line.y -= adj;
2161,12 → 2161,12
asce = (itemText.object(current.line.firstItem+zc)->gHeight + itemText.object(current.line.firstItem+zc)->lineWidth()) * (itemText.charStyle(current.line.firstItem+zc).scaleV() / 1000.0);
else //if (itemText.charStyle(current.line.firstItem+zc).effects() & ScStyle_DropCap == 0)
asce = itemText.charStyle(current.line.firstItem+zc).font().height(itemText.charStyle(current.line.firstItem+zc).fontSize() / 10.0);
// qDebug(QString("checking char 'x%2' with ascender %1 > %3").arg(asce).arg(ch.unicode()).arg(currasce));
// qDebug() << QString("checking char 'x%2' with ascender %1 > %3").arg(asce).arg(ch.unicode()).arg(currasce);
currasce = qMax(currasce, asce);
}
*/
double adj = firstasce - currasce;
// qDebug(QString("move4 line %1.. down by %2").arg(current.line.firstItem).arg(-adj));
// qDebug() << QString(QString("move4 line %1.. down by %2").arg(current.line.firstItem).arg(-adj);
 
current.line.ascent = currasce;
current.line.y -= adj;
2183,8 → 2183,8
current.startOfCol = false;
goNextColumn = false;
 
// qDebug(QString("layout: last line %1 - %2 @ (%3,%4) wd %5/%6").arg(current.line.firstItem).arg(current.line.lastItem)
// .arg(current.line.x).arg(current.line.y).arg(current.line.naturalWidth).arg(current.line.width));
// qDebug() << QString("layout: last line %1 - %2 @ (%3,%4) wd %5/%6").arg(current.line.firstItem).arg(current.line.lastItem)
// .arg(current.line.x).arg(current.line.y).arg(current.line.naturalWidth).arg(current.line.width);
if (current.itemsInLine > 0) {
itemText.appendLine(current.line);
/trunk/Scribus/scribus/styles/style.cpp
29,7 → 29,7
m_contextversion = -1;
assert( !m_context || m_context->checkConsistency() );
}
//qDebug(QString("setContext of %2 context %1").arg(reinterpret_cast<uint>(m_context),16).arg(reinterpret_cast<uint>(this),16));
//qDebug() << QString("setContext of %2 context %1").arg(reinterpret_cast<uint>(m_context),16).arg(reinterpret_cast<uint>(this),16);
}
 
void Style::setDefaultStyle(bool ids)
70,7 → 70,7
 
const Style* Style::parentStyle() const
{
//qDebug(QString("follow %1").arg(reinterpret_cast<uint>(m_context),16));
//qDebug() << QString("follow %1").arg(reinterpret_cast<uint>(m_context),16);
if (m_isDefaultStyle)
return NULL;
const Style * par = m_context ? m_context->resolve(m_parent) : NULL;
/trunk/Scribus/scribus/styles/stylecontextproxy.cpp
13,17 → 13,18
* *
***************************************************************************/
 
//#include <QDebug>
 
#include "style.h"
#include "stylecontextproxy.h"
 
 
const Style* StyleContextProxy::resolve(const QString& name) const
{
const StyleContext* context = m_default->context();
// if (!name.isEmpty())
// qDebug(QString("resolve %4 %3 -%1- %2").arg(name)
// qDebug() << QString("resolve %4 %3 -%1- %2").arg(name)
// .arg(reinterpret_cast<uint>(context),16).arg(reinterpret_cast<uint>(this),16)
// .arg(m_default->name()));
// .arg(m_default->name());
if (name.isEmpty() || ! context)
return m_default;
/trunk/Scribus/scribus/styles/stylecontext.h
38,13 → 38,13
StyleContext()
: m_version(0), m_cnt(0)
{
// qDebug(QString("constr. %1 /%2").arg(reinterpret_cast<uint>(this),16).arg(m_level));
// qDebug() << QString("constr. %1 /%2").arg(reinterpret_cast<uint>(this),16).arg(m_level);
}
 
StyleContext(const StyleContext& o)
: m_version(o.m_version), m_cnt(0)
{
// qDebug(QString("constr. cp %1 /%2").arg(reinterpret_cast<uint>(this),16).arg(m_level));
// qDebug() << QString("constr. cp %1 /%2").arg(reinterpret_cast<uint>(this),16).arg(m_level);
}
 
 
/trunk/Scribus/scribus/styles/paragraphstyle.cpp
25,7 → 25,7
{
setParent("");
cstyleContext.setDefaultStyle( &cstyle );
// qDebug(QString("ParagraphStyle() %1 pcontext %2 ccontext %3").arg(reinterpret_cast<uint>(this)).arg(reinterpret_cast<uint>(context())).arg(reinterpret_cast<uint>(defaultStyle()->context())));
// qDebug() << QString("ParagraphStyle() %1 pcontext %2 ccontext %3").arg(reinterpret_cast<uint>(this)).arg(reinterpret_cast<uint>(context())).arg(reinterpret_cast<uint>(defaultStyle()->context()));
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
m_##attr_NAME = attr_DEFAULT; \
inh_##attr_NAME = true;
43,7 → 43,7
else
cstyle.setContext(other.charStyle().context());
cstyleContext.setDefaultStyle( &cstyle );
// qDebug(QString("ParagraphStyle(%2) %1").arg(reinterpret_cast<uint>(&other)).arg(reinterpret_cast<uint>(this)));
// qDebug() << QString("ParagraphStyle(%2) %1").arg(reinterpret_cast<uint>(&other)).arg(reinterpret_cast<uint>(this));
other.validate();
 
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
55,7 → 55,7
 
ParagraphStyle::~ParagraphStyle()
{
// qDebug(QString("~ParagraphStyle %1").arg(reinterpret_cast<uint>(this)));
// qDebug() << QString("~ParagraphStyle %1").arg(reinterpret_cast<uint>(this));
}
 
137,7 → 137,7
void ParagraphStyle::setContext(const StyleContext* context)
{
Style::setContext(context);
// qDebug(QString("ParagraphStyle::setContext(%1) parent=%2").arg((unsigned long int)context).arg((unsigned long int)oth));
// qDebug() << QString("ParagraphStyle::setContext(%1) parent=%2").arg((unsigned long int)context).arg((unsigned long int)oth);
repairImplicitCharStyleInheritance();
}
 
167,7 → 167,7
cstyleContext.invalidate();
 
const ParagraphStyle * oth = dynamic_cast<const ParagraphStyle*> ( parentStyle() );
// qDebug(QString("ParagraphStyle::update(%1) parent=%2").arg((unsigned long int)context).arg((unsigned long int)oth));
// qDebug() << QString("ParagraphStyle::update(%1) parent=%2").arg((unsigned long int)context).arg((unsigned long int)oth);
if (oth) {
#define ATTRDEF(attr_TYPE, attr_GETTER, attr_NAME, attr_DEFAULT) \
if (inh_##attr_NAME) \
/trunk/Scribus/scribus/text/sctext_shared.cpp
18,7 → 18,7
defaultStyle.setContext( pstyles );
trailingStyle.setContext( &pstyleContext );
// defaultStyle.charStyle().setContext( cstyles );
// qDebug(QString("ScText_Shared() %1 %2 %3 %4").arg(reinterpret_cast<uint>(this)).arg(reinterpret_cast<uint>(&defaultStyle)).arg(reinterpret_cast<uint>(pstyles)).arg(reinterpret_cast<uint>(cstyles)));
// qDebug() << QString("ScText_Shared() %1 %2 %3 %4").arg(reinterpret_cast<uint>(this)).arg(reinterpret_cast<uint>(&defaultStyle)).arg(reinterpret_cast<uint>(pstyles)).arg(reinterpret_cast<uint>(cstyles));
}
 
43,7 → 43,7
}
len = count();
replaceCharStyleContextInParagraph(len, trailingStyle.charStyleContext() );
// qDebug(QString("ScText_Shared(%2) %1").arg(reinterpret_cast<uint>(this)).arg(reinterpret_cast<uint>(&other)));
// qDebug() << QString("ScText_Shared(%2) %1").arg(reinterpret_cast<uint>(this)).arg(reinterpret_cast<uint>(&other));
}
 
void ScText_Shared::clear()
72,26 → 72,26
append(elem2);
if (elem2->parstyle) {
elem2->parstyle->setContext( & pstyleContext );
// qDebug(QString("StoryText::copy: * %1 align=%2").arg(elem2->parstyle->parent())
// qDebug() << QString("StoryText::copy: * %1 align=%2").arg(elem2->parstyle->parent())
// .arg(elem2->parstyle->alignment())
// .arg((uint)elem2->parstyle->context()));
// elem2->parstyle->charStyle().setContext( defaultStyle.charStyleContext() );
// elem2->parstyle->charStyle().setContext( defaultStyle.charStyleContext());
replaceCharStyleContextInParagraph(count()-1, elem2->parstyle->charStyleContext());
}
}
len = count();
pstyleContext.invalidate();
// qDebug(QString("StoryText::copy: %1 align=%2 %3").arg(trailingStyle.parentStyle()->name())
// .arg(trailingStyle.alignment()).arg((uint)trailingStyle.context()));
// qDebug() << QString("StoryText::copy: %1 align=%2 %3").arg(trailingStyle.parentStyle()->name())
// .arg(trailingStyle.alignment()).arg((uint)trailingStyle.context());
replaceCharStyleContextInParagraph(len, trailingStyle.charStyleContext());
}
// qDebug(QString("ScText_Shared: %1 = %2").arg(reinterpret_cast<uint>(this)).arg(reinterpret_cast<uint>(&other)));
// qDebug() << QString("ScText_Shared: %1 = %2").arg(reinterpret_cast<uint>(this)).arg(reinterpret_cast<uint>(&other));
return *this;
}
 
ScText_Shared::~ScText_Shared()
{
// qDebug(QString("~ScText_Shared() %1").arg(reinterpret_cast<uint>(this)));
// qDebug() << QString("~ScText_Shared() %1").arg(reinterpret_cast<uint>(this));
while(!this->isEmpty())
delete this->takeFirst();
}
/trunk/Scribus/scribus/text/storytext.cpp
21,7 → 21,7
* *
***************************************************************************/
 
 
//#include <QDebug>
//FIXME: this include must go to sctextstruct.h !
#include <QList>
#include <cassert> //added to make Fedora-5 happy
118,12 → 118,12
StoryText result(doc);
*(result.d) = *d;
return result;
// qDebug(QString("StoryText::copy:"));
// qDebug() << QString("StoryText::copy:");
QListIterator<ScText*> it( *(result.d) );
ScText* elem;
while ( it.hasNext() ) {
elem = it.next();
// qDebug(QString("\tchar '%1' size %2 (orig %3)").arg(elem->ch).arg(elem->fontSize()).arg(charStyle(i++).fontSize()));
// qDebug() << QString("\tchar '%1' size %2 (orig %3)").arg(elem->ch).arg(elem->fontSize()).arg(charStyle(i++).fontSize());
}
return result;
342,7 → 342,7
d->insert(pos + i, item);
d->len++;
if (item->ch == SpecialChars::PARSEP) {
// qDebug(QString("new PARSEP %2 at %1").arg(pos).arg(paragraphStyle(pos).name()));
// qDebug() << QString("new PARSEP %2 at %1").arg(pos).arg(paragraphStyle(pos).name());
insertParSep(pos + i);
}
}
447,7 → 447,7
d->at(i)->setEffects(d->at(i)->effects() & ~ScStyle_HyphenationPossible);
}
}
// qDebug(QString("st: %1").arg(dump));
// qDebug() << QString("st: %1").arg(dump);
invalidate(pos, pos + len);
}
 
539,11 → 539,11
assert(pos <= length());
 
if (length() == 0) {
// qDebug("storytext::charstyle: default");
// qDebug() << "storytext::charstyle: default";
return defaultStyle().charStyle();
}
else if (pos == length()) {
qDebug("storytext::charstyle: access at end of text %i", pos);
qDebug() << "storytext::charstyle: access at end of text %i", pos;
--pos;
}
if (text(pos) == SpecialChars::PARSEP)
584,7 → 584,7
// current->parstyle->charStyle().setContext( d->defaultStyle.charStyleContext());
}
else {
// qDebug(QString("using parstyle at %1").arg(pos));
// qDebug() << QString("using parstyle at %1").arg(pos);
}
assert (that->d->at(pos)->parstyle);
return *that->d->at(pos)->parstyle;
605,10 → 605,10
d->defaultStyle.setContext( oldPContext );
// d->defaultStyle.setName( "storydefault" ); // DONT TRANSLATE
// d->defaultStyle.charStyle().setName( "cstorydefault" ); // DONT TRANSLATE
// qDebug(QString("defstyle %1 context %2 defcstyle %3 ccontext %4 newcontext %5")
// qDebug() << QString("defstyle %1 context %2 defcstyle %3 ccontext %4 newcontext %5")
// .arg((uint)&d->defaultStyle,16).arg((uint)oldPContext,16)
// .arg((uint)&d->defaultStyle.charStyle(),16).arg((uint)oldCContext,16)
// .arg((uint)d->defaultStyle.charStyle().context(),16));
// .arg((uint)d->defaultStyle.charStyle().context(),16);
// d->defaultStyle.charStyle().setContext( oldCContext );
invalidateAll();
}
688,12 → 688,12
// d->at(i)->parstyle->charStyle().setName( "cpara(applyStyle)" ); // DONT TRANSLATE
// d->at(i)->parstyle->charStyle().setContext( d->defaultStyle.charStyleContext() );
}
// qDebug(QString("applying parstyle %2 at %1 for %3").arg(i).arg(paragraphStyle(pos).name()).arg(pos));
// qDebug() << QString("applying parstyle %2 at %1 for %3").arg(i).arg(paragraphStyle(pos).name()).arg(pos);
d->at(i)->parstyle->applyStyle(style);
}
else {
// not happy about this but inserting a new PARSEP makes more trouble
// qDebug(QString("applying parstyle %1 as defaultstyle for %2").arg(paragraphStyle(pos).name()).arg(pos));
// qDebug() << QString("applying parstyle %1 as defaultstyle for %2").arg(paragraphStyle(pos).name()).arg(pos);
d->trailingStyle.applyStyle(style);
}
invalidate(pos, qMin(i, length()));
720,12 → 720,12
// d->at(i)->parstyle->charStyle().setName( "cpara(eraseStyle)" ); // DONT TRANSLATE
// d->at(i)->parstyle->charStyle().setContext( d->defaultStyle.charStyleContext());
}
// qDebug(QString("applying parstyle %2 at %1 for %3").arg(i).arg(paragraphStyle(pos).name()).arg(pos));
// qDebug() << QString("applying parstyle %2 at %1 for %3").arg(i).arg(paragraphStyle(pos).name()).arg(pos);
d->at(i)->parstyle->eraseStyle(style);
}
else {
// not happy about this but inserting a new PARSEP makes more trouble
// qDebug(QString("applying parstyle %1 as defaultstyle for %2").arg(paragraphStyle(pos).name()).arg(pos));
// qDebug() << QString("applying parstyle %1 as defaultstyle for %2").arg(paragraphStyle(pos).name()).arg(pos);
d->trailingStyle.eraseStyle(style);
}
invalidate(pos, qMin(i, length()));
1257,12 → 1257,12
for (unsigned int i=0; i < lines(); ++i)
{
LineSpec ls = line(i);
// qDebug(QString("screenToPosition: (%1,%2) -> y %3 - %4 + %5").arg(coord.x()).arg(coord.y()).arg(ls.y).arg(ls.ascent).arg(ls.descent));
// qDebug() << QString("screenToPosition: (%1,%2) -> y %3 - %4 + %5").arg(coord.x()).arg(coord.y()).arg(ls.y).arg(ls.ascent).arg(ls.descent);
if (ls.y + ls.descent < coord.y())
continue;
double xpos = ls.x;
for (int j = ls.firstItem; j <= ls.lastItem; ++j) {
// qDebug(QString("screenToPosition: (%1,%2) -> x %3 + %4").arg(coord.x()).arg(coord.y()).arg(xpos).arg(item(j)->glyph.wide()));
// qDebug() << QString("screenToPosition: (%1,%2) -> x %3 + %4").arg(coord.x()).arg(coord.y()).arg(xpos).arg(item(j)->glyph.wide());
double width = item(j)->glyph.wide();
xpos += width;
if (xpos >= coord.x())
1616,7 → 1616,7
public:
void end(const Xml_string& tag)
{
qDebug("storytext desaxe: apply style");
qDebug() << "storytext desaxe: apply style";
StoryText* story = this->dig->top<StoryText>(1);
ParagraphStyle* obj = this->dig->top<ParagraphStyle>(0);
story->applyStyle(-1, *obj);
1637,7 → 1637,7
void end(const Xml_string& tag)
{
qDebug("storytext desaxe: apply charstyle");
qDebug() << "storytext desaxe: apply charstyle";
if (tag == CharStyle::saxxDefaultElem)
{
StoryText* story = this->dig->top<StoryText>(1);
1691,7 → 1691,7
if (tag == "p")
{
StoryText* story = this->dig->top<StoryText>();
// qDebug(QString("startpar: %1->%2 %3->NULL").arg(lastPos).arg(story->length()).arg((ulong)lastStyle));
// qDebug() << QString("startpar: %1->%2 %3->NULL").arg(lastPos).arg(story->length()).arg((ulong)lastStyle);
lastPos = story->length();
if (lastPos > 0) {
story->insertChars(-1, SpecialChars::PARSEP);
1710,13 → 1710,13
if (lastStyle)
delete lastStyle;
lastStyle = this->dig->top<ParagraphStyle>(0);
// qDebug(QString("endstyle: %1 %2 %3").arg("?").arg(lastPos).arg((ulong)lastStyle));
// qDebug() << QString("endstyle: %1 %2 %3").arg("?").arg(lastPos).arg((ulong)lastStyle);
}
else if (tag == "p")
{
StoryText* story = this->dig->top<StoryText>();
int len = story->length();
// qDebug(QString("endpar: %1 %2 %3 %4").arg(len).arg(lastPos).arg((ulong)lastStyle).arg(lastStyle? lastStyle->parent() : QString()));
// qDebug() << QString("endpar: %1 %2 %3 %4").arg(len).arg(lastPos).arg((ulong)lastStyle).arg(lastStyle? lastStyle->parent() : QString());
if (len > lastPos && lastStyle)
{
story->applyStyle(lastPos, *lastStyle);
1748,7 → 1748,7
void begin(const Xml_string& tag, Xml_attr attr)
{
// qDebug(QString("spanaction: begin %1").arg(tag));
// qDebug() << QString("spanaction: begin %1").arg(tag);
if (tag == "span")
{
StoryText* story = this->dig->top<StoryText>();
1762,7 → 1762,7
void end(const Xml_string& tag)
{
if (tag == CharStyle::saxxDefaultElem)
// qDebug(QString("spanaction: end %1").arg(tag));
// qDebug() << QString("spanaction: end %1").arg(tag);
{
if (lastStyle)
delete lastStyle;
/trunk/Scribus/scribus/scribus.cpp
442,8 → 442,8
prefsManager->setKeyEntry(it.key(), it.value()->cleanMenuText(), accelerator,0);
}
//else
// qDebug(it.key());
//qDebug(QString("|-\n|%1||%2||%3").arg(it.key()).arg(it.value()->cleanMenuText()).arg(QString(it.data()->accel())));
// qDebug() << it.key();
//qDebug() << QString("|-\n|%1||%2||%3").arg(it.key()).arg(it.value()->cleanMenuText()).arg(QString(it.data()->accel()));
}
}
 
4023,7 → 4023,7
// TODO fix that for Groups on Masterpages
// if (ite->Groups.count() != 0)
// view->GroupOnPage(ite);
// qDebug(QString("load M: %1 %2 %3").arg(azz).arg((uint)ite).arg(ite->itemType()));
// qDebug() << QString("load M: %1 %2 %3").arg(azz).arg((uint)ite).arg(ite->itemType());
ite->layout();
}
// RestoreBookMarks();
4040,7 → 4040,7
ite->OwnPage = doc->OnPage(ite);
*/
//view->setRedrawBounding(ite);
// qDebug(QString("load D: %1 %2 %3").arg(azz).arg((uint)ite).arg(ite->itemType()));
// qDebug() << QString("load D: %1 %2 %3").arg(azz).arg((uint)ite).arg(ite->itemType());
if(ite->nextInChain() == NULL)
ite->layout();
/* if (doc->OldBM)
4057,7 → 4057,7
for (int azz=0; azz<doc->FrameItems.count(); ++azz)
{
PageItem *ite = doc->FrameItems.at(azz);
// qDebug(QString("load F: %1 %2 %3").arg(azz).arg((uint)ite).arg(ite->itemType()));
// qDebug() << QString("load F: %1 %2 %3").arg(azz).arg((uint)ite).arg(ite->itemType());
if(ite->nextInChain() == NULL)
ite->layout();
}
4872,7 → 4872,7
// new version:
std::ostringstream xmlString;
SaxXML xmlStream(xmlString);
// qDebug(QString("call serializer: %1").arg((ulong) & (doc->m_Selection)));
// qDebug() << QString("call serializer: %1").arg((ulong) & (doc->m_Selection));
Serializer::serializeObjects(*doc->m_Selection, xmlStream);
std::string xml(xmlString.str());
BufferI = QString::fromUtf8(xml.c_str(), xml.length());
5144,7 → 5144,7
// pg = doc->Pages->at(doc->Pages->count() - 1);
// if (pg)
// pastedObjects.itemAt(i)->moveBy(x - pg->xOffset(), y - pg->yOffset(), true);
qDebug(QString("move pasted: %1 %2,%3 + %4,%5").arg((ulong)pastedObjects.itemAt(i)).arg(x).arg(y).arg(pastedObjects.itemAt(i)->xPos()).arg(pastedObjects.itemAt(i)->yPos()));
qDebug() << QString("move pasted: %1 %2,%3 + %4,%5").arg((ulong)pastedObjects.itemAt(i)).arg(x).arg(y).arg(pastedObjects.itemAt(i)->xPos()).arg(pastedObjects.itemAt(i)->yPos());
pastedObjects.itemAt(i)->moveBy(x, y, true);
}
*/
/trunk/Scribus/scribus/propertiespalette.cpp
4858,13 → 4858,13
 
void PropertiesPalette::spinboxStartUserAction()
{
// qDebug("sniffer: spinbox start action");
// qDebug("%s", "sniffer: spinbox start action");
_userActionOn = true;
}
 
void PropertiesPalette::spinboxFinishUserAction()
{
// qDebug("sniffer: spinbox finish action");
// qDebug("%s", "sniffer: spinbox finish action");
_userActionOn = false;
 
for (int i = 0; i < doc->m_Selection->count(); ++i)
5507,7 → 5507,7
{
if (!m_ScMW || m_ScMW->ScriptRunning || !HaveDoc || !HaveItem)
return;
// qDebug(QString("rF %1").arg(radioFlop).toAscii());
// qDebug("%s", QString("rF %1").arg(radioFlop).toAscii());
if( radioFlop == 0)
CurItem->setFirstLineOffset(FLOPRealGlyphHeight);
else if( radioFlop == 1)
/trunk/Scribus/scribus/pageitem_desaxe.cpp
207,7 → 207,7
{
Xml_attr att(PageItemXMLAttributes(this));
Xml_attr empty;
// qDebug(QString("PageItem::saxx %1 %2").arg((ulong) &handler));
// qDebug() << QString("PageItem::saxx %1 %2").arg((ulong) &handler);
handler.begin(elemtag, att);
 
if (effectsInUse.count() != 0)
332,7 → 332,7
int nr = doc->itemAdd(type, frametype, xpos, ypos, width, height, linewidth, fillC, lineC, true);
result = doc->Items->at(nr);
this->dig->push(result);
// qDebug(QString("pushed item: %1,%2 params %3,%4").arg(result->xPos()).arg(result->yPos()).arg(xpos).arg(ypos));
// qDebug() << QString("pushed item: %1,%2 params %3,%4").arg(result->xPos()).arg(result->yPos()).arg(xpos).arg(ypos);
}
};
 
363,7 → 363,7
{
void begin (const Xml_string& tagName, Xml_attr attr)
{
// qDebug(QString("pageitem_desaxe: gradient %1").arg(tagName));
// qDebug() << QString("pageitem_desaxe: gradient %1").arg(tagName);
if (tagName=="CStop")
{
// ScribusDoc* doc = this->dig->lookup<ScribusDoc>("<scribusdoc>");
406,7 → 406,7
double patternOffsetX = parseDouble(attr["pOffsetX"]);
double patternOffsetY = parseDouble(attr["pOffsetY"]);
double patternRotation = parseDouble(attr["pRotation"]);
// qDebug(QString("pageitem_desaxe: pattern %6: *(%1,%2) +(%3,%4) °%5").arg(patternScaleX).arg(patternScaleY).arg(patternOffsetX).arg(patternOffsetY).arg(patternRotation).arg(attr["pattern"]));
// qDebug() << QString("pageitem_desaxe: pattern %6: *(%1,%2) +(%3,%4) °%5").arg(patternScaleX).arg(patternScaleY).arg(patternOffsetX).arg(patternOffsetY).arg(patternRotation).arg(attr["pattern"]);
 
item->setPattern(attr["pattern"]);
item->setPatternTransform(patternScaleX, patternScaleY, patternOffsetX, patternOffsetY, patternRotation);
422,7 → 422,7
{
void begin (const Xml_string& tagName, Xml_attr attr)
{
// qDebug(QString("pageitem_desaxe: effects/layers %1").arg(tagName));
// qDebug() << QString("pageitem_desaxe: effects/layers %1").arg(tagName);
if (tagName=="ImageEffect")
{
PageItem* obj = this->dig->top<PageItem>();
493,7 → 493,7
int newGroup = minGroup + item->groups()[i];
if (newGroup > maxGroup)
maxGroup = newGroup;
// qDebug(QString("group id %1 -> %2").arg(item->groups()[i]).arg(newGroup));
// qDebug() << QString("group id %1 -> %2").arg(item->groups()[i]).arg(newGroup);
groups.append(newGroup);
}
item->setGroups(groups);
/trunk/Scribus/scribus/desaxe/simple_actions.h
582,7 → 582,7
void begin(const Xml_string& tag, Xml_attr attr)
{
Obj_Type* obj = this->dig->template top<Obj_Type>();
// qDebug(QString("Store: %1 <- %2").arg(tag).arg(typeid(obj).name()));
// qDebug() << QString("Store: %1 <- %2").arg(tag).arg(typeid(obj).name());
this->dig->template store<Obj_Type>(m_name, obj);
}
 
/trunk/Scribus/scribus/pdflib_core.cpp
1323,7 → 1323,7
int len = fon.length();
if (Options.Compress)
fon = CompressStr(&fon);
//qDebug(QString("sfnt data: size=%1 before=%2 compressed=%3").arg(bb.size()).arg(len).arg(fon.length()));
//qDebug() << QString("sfnt data: size=%1 before=%2 compressed=%3").arg(bb.size()).arg(len).arg(fon.length());
PutDoc("<<\n/Length "+QString::number(fon.length()+1)+"\n");
PutDoc("/Length1 "+QString::number(len)+"\n");
if (Options.Compress)
1409,7 → 1409,7
nglyphs = gli.key();
}
++nglyphs;
// qDebug(QString("pdflib: nglyphs %1 max %2").arg(nglyphs).arg(AllFonts[it.key()].maxGlyph()));
// qDebug() << QString("pdflib: nglyphs %1 max %2").arg(nglyphs).arg(AllFonts[it.key()].maxGlyph());
uint FontDes = fontDescriptor;
uint Fcc = nglyphs / 224;
if ((nglyphs % 224) != 0)
3312,14 → 3312,14
output.resize(0);
if (!pattern)
{
// qDebug(QString("pdflib process item: pagename=%1 ownpage=%2 pagenr=%3 changedMP=%4").arg(pag->pageName()).arg(ite->OwnPage).arg(pag->pageNr()).arg(ite->ChangedMasterItem));
// qDebug(QString("pdflib process item: x=%1 x2=%2 y=%3 y2=%4 w=%5 w2=%6 h1=%7 h2=%8 ilw=%9").arg(x).arg(x2).arg(y).arg(y2).arg(w).arg(w2).arg(h1).arg(h2).arg(ilw));
// qDebug() << QString("pdflib process item: pagename=%1 ownpage=%2 pagenr=%3 changedMP=%4").arg(pag->pageName()).arg(ite->OwnPage).arg(pag->pageNr()).arg(ite->ChangedMasterItem);
// qDebug() << QString("pdflib process item: x=%1 x2=%2 y=%3 y2=%4 w=%5 w2=%6 h1=%7 h2=%8 ilw=%9").arg(x).arg(x2).arg(y).arg(y2).arg(w).arg(w2).arg(h1).arg(h2).arg(ilw);
if (!( qMax( x, x2 ) <= qMin( x+w, x2+w2 ) && qMax( y, y2 ) <= qMin( y+h1, y2+h2 )))
{
output = tmp;
return true;
}
// qDebug("bb test done");
// qDebug() << "bb test done";
if (ite->ChangedMasterItem)
{
output = tmp;
3350,7 → 3350,7
{
if (!ite->printEnabled() || ((ite->itemType() == PageItem::TextFrame) && (!pag->pageName().isEmpty())))
{
// qDebug("Q exit");
// qDebug() << "Q exit";
tmp += "Q\n";
output = tmp;
return true;
3487,10 → 3487,10
}
break;
case PageItem::TextFrame:
// qDebug("case TextFrame");
// qDebug() << "case TextFrame";
if ((ite->isAnnotation()) && (Options.Version != PDFOptions::PDFVersion_X3))
{
// qDebug("Annotation");
// qDebug() << "Annotation";
if (!PDF_Annotation(ite, PNr))
return false;
break;
6541,7 → 6541,7
}
catch(PoDoFo::PdfError& e)
{
qDebug("PoDoFo error!");
qDebug() << "PoDoFo error!";
e.PrintErrorMsg();
assert (false);
return false;
6709,7 → 6709,7
isEmbeddedPDF = true;
}
if(!imageLoaded && extensionIndicatesPDF(ext) && c->effectsInUse.count() == 0 && Options.embedPDF)
qDebug()<< "Failed to embed the PDF file";
qDebug() << "Failed to embed the PDF file";
// no embedded PDF:
if (!imageLoaded)
{
7689,7 → 7689,7
{
ErrorMessage = errorMsg;
if (!ScCore->usingGUI())
qDebug(errorMsg.toLocal8Bit().data());
qDebug("%s", errorMsg.toLocal8Bit().data());
}
 
void PDFLibCore::PDF_Error_WriteFailure(void)
/trunk/Scribus/scribus/smcstylewidget.cpp
271,7 → 271,7
// }
}
 
// qDebug(QString("SMCStyleWidget::show(): deflan='%1'->'%2'").arg(defLang).arg(langMap_[defLang]));
// qDebug() << QString("SMCStyleWidget::show(): deflan='%1'->'%2'").arg(defLang).arg(langMap_[defLang]);
Q_ASSERT(di != -1);
 
if (hasParent)
/trunk/Scribus/scribus/util_text.cpp
14,6 → 14,7
* *
***************************************************************************/
 
//#include <QDebug>
 
#include "scribusdoc.h"
#include "util_text.h"
21,11 → 22,11
int findParagraphStyle(ScribusDoc* doc, const ParagraphStyle& parStyle)
{
bool named = !parStyle.name().isEmpty();
//qDebug(QString("looking up %1/ %2").arg(parStyle.name()).arg(parStyle.alignment()));
//qDebug() << QString("looking up %1/ %2").arg(parStyle.name()).arg(parStyle.alignment());
if (named) {
for (int i=0; i < doc->paragraphStyles().count(); ++i)
{
//qDebug(QString("%1 %2").arg(i).arg(doc->paragraphStyles()[i].name()));
//qDebug() << QString("%1 %2").arg(i).arg(doc->paragraphStyles()[i].name());
if (parStyle.name() == doc->paragraphStyles()[i].name()) {
return i;
}
/trunk/Scribus/scribus/scribusdoc.cpp
3459,7 → 3459,7
Q_ASSERT(frameType==PageItem::Rectangle || frameType==PageItem::Unspecified);
break;
default:
// qDebug("unknown item type");
// qDebug() << "unknown item type";
assert (false);
}
Q_CHECK_PTR(newItem);
9400,7 → 9400,7
double gx, gy, gh, gw;
m_Selection->setGroupRect();
m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
// qDebug("doc, emit w&h, when was this used?");
// qDebug() << "doc, emit w&h, when was this used?";
emit widthAndHeight(gw, gh);
}
}
9424,7 → 9424,7
double newRot=xy2Deg(mx - currItem->xPos(), my - currItem->yPos());
//CB Hmm should work, doesnt. (constraining on the first point of a line) FIXME
//if (constrainRotation)
// qDebug(QString("%1").arg(constrainAngle(newRot)));
// qDebug() << QString("%1").arg(constrainAngle(newRot)));
currItem->setRotation(newRot);
currItem->setWidthHeight(sqrt(pow(mx - currItem->xPos(),2)+pow(my - currItem->yPos(),2)), 1.0);
currItem->updateClip();
/trunk/Scribus/scribus/scrpalettebase.cpp
201,8 → 201,8
vwidth = qMax( gStrut.width(), scr.width() - vleft );
if ( vheight >= scr.height() )
vheight = qMax( gStrut.height(), scr.height() - vtop );
// qDebug(QString("root %1x%2 %7 palette %3x%4 @ (%5,%6)").arg(d->width()).arg(d->height())
// .arg(vwidth).arg(vheight).arg(vleft).arg(vtop).arg(name()));
// qDebug() << QString("root %1x%2 %7 palette %3x%4 @ (%5,%6)").arg(d->width()).arg(d->height())
// .arg(vwidth).arg(vheight).arg(vleft).arg(vtop).arg(name());
// setGeometry(vleft, vtop, vwidth, vheight);
resize(vwidth, vheight);
move(vleft, vtop);
/trunk/Scribus/scribus/smlinestyle.cpp
329,7 → 329,7
{
if (selection_.count() != 1)
{
qDebug(QString("SMLineStyle::nameChanged #selection=%1").arg(selection_.count()).toLatin1().constData());
qDebug() << QString("SMLineStyle::nameChanged #selection=%1").arg(selection_.count());
return;
}
QString oldName = selection_.begin().key();
/trunk/Scribus/scribus/scimage.cpp
2025,7 → 2025,7
else if (pDataLoader->issuedErrorMsg())
{
QString msg = pDataLoader->getMessage();
qWarning( msg.toLocal8Bit().data() );
qWarning("%s", msg.toLocal8Bit().data() );
}
return false;
}
2438,7 → 2438,7
else if (pDataLoader->issuedErrorMsg())
{
QString msg = pDataLoader->getMessage();
qWarning( msg.toLocal8Bit().data() );
qWarning("%s", msg.toLocal8Bit().data() );
}
return true;
}
/trunk/Scribus/scribus/plugins/aiimplugin/importai.cpp
1880,13 → 1880,13
Cdata = da[da.count()-1];
QTextStream gVals(&Cdata, QIODevice::ReadOnly);
gVals >> m1 >> m2 >> m3 >> m4 >> m5 >> m6 >> x1 >> y1 >> x2 >> y2 >> w >> h >> bits >> type >> alpha >> dummy >> bin;
// qDebug(QString("Matrix: %1 %2 %3 %4 %5 %6").arg(m1).arg(m2).arg(m3).arg(m4).arg(m5).arg(m6));
// qDebug(QString("Bounds: %1 %2 %3 %4").arg(x1).arg(y1).arg(x2).arg(y2));
// qDebug(QString("Size: %1 %2").arg(w).arg(h));
// qDebug(QString("Bits: %1").arg(bits));
// qDebug(QString("Typ: %1").arg(type));
// qDebug(QString("Alpha-Channels: %1").arg(alpha));
// qDebug(QString("Encoding: %1").arg(bin));
// qDebug() << QString("Matrix: %1 %2 %3 %4 %5 %6").arg(m1).arg(m2).arg(m3).arg(m4).arg(m5).arg(m6);
// qDebug() << QString("Bounds: %1 %2 %3 %4").arg(x1).arg(y1).arg(x2).arg(y2);
// qDebug() << QString("Size: %1 %2").arg(w).arg(h);
// qDebug() << QString("Bits: %1").arg(bits);
// qDebug() << QString("Typ: %1").arg(type);
// qDebug() << QString("Alpha-Channels: %1").arg(alpha);
// qDebug() << QString("Encoding: %1").arg(bin);
uint dataSize = w * h * (type + alpha);
uint alphaData = w * h * type;
bool cmyk = false;
/trunk/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
6,6 → 6,7
*/
 
#include <QCursor>
#include <QDebug>
#include <QDrag>
#include <QFile>
#include <QList>
14,7 → 15,6
#include <QRegExp>
#include <QTemporaryFile>
#include <cmath>
#include <QDebug>
#include "color.h"
#include "commonstrings.h"
#include "customfdialog.h"
1134,7 → 1134,7
else if(!isIgnorableNodeName(STag) )
{
// warn if unsupported SVG feature are encountered
qDebug(QString("unsupported SVG feature: %1").arg(STag).toLocal8Bit().constData());
qDebug() << QString("unsupported SVG feature: %1").arg(STag);
unsupported = true;
}
return GElements;
2168,7 → 2168,7
}
else if( !isIgnorableNodeName(command) )
{
qDebug(QString("unsupported SVG feature: %1").arg(command).toLocal8Bit().constData());
qDebug() << QString("unsupported SVG feature: %1").arg(command);
unsupported = true;
}
}
/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
467,7 → 467,7
if (!m_Doc->masterPageMode())
{
const long long itemID = scribus12itemID(pageItem++, pageNo);
// qDebug(QString("1.2 remap: %1 -> %2 [%3 on page %4]").arg(itemID).arg(m_Doc->Items->count()).arg(pageItem-1).arg(pageNo));
// qDebug() << QString("1.2 remap: %1 -> %2 [%3 on page %4]").arg(itemID).arg(m_Doc->Items->count()).arg(pageItem-1).arg(pageNo);
itemRemap[itemID] = m_Doc->Items->count();
if (obj.tagName()=="PAGEOBJECT")
{
717,7 → 717,7
QMap<int,long long>::Iterator lc;
for (lc = itemNext.begin(); lc != itemNext.end(); ++lc)
{
// qDebug(QString("1.2 textframe links: %1->%2[%3]").arg(lc.key()).arg(itemRemap[lc.data()]).arg(lc.data()));
// qDebug() << QString("1.2 textframe links: %1->%2[%3]").arg(lc.key()).arg(itemRemap[lc.data()]).arg(lc.data());
PageItem *Its = m_Doc->Items->at(lc.key());
PageItem *Itn = m_Doc->Items->at(itemRemap[lc.value()]);
assert(Its && Its->asTextFrame());
1087,7 → 1087,7
obj->itemText.insertChars(pos, QString(ch));
 
if (style != last->Style) {
// qDebug(QString("new style at %1: %2 -> %3").arg(pos).arg(last->Style.asString()).arg(newStyle.asString()));
// qDebug() << QString("new style at %1: %2 -> %3").arg(pos).arg(last->Style.asString()).arg(newStyle.asString());
obj->itemText.applyCharStyle(last->StyleStart, pos-last->StyleStart, last->Style);
last->Style = style;
last->StyleStart = pos;
1094,9 → 1094,9
}
 
if (ch == SpecialChars::PARSEP || cxx+1 == tmp2.length()) {
// qDebug(QString("scribus12 para: %1 %2 %3 %4").arg(ab)
// qDebug() << QString("scribus12 para: %1 %2 %3 %4").arg(ab)
// .arg(ab < signed(DoVorl.size())? DoVorl[ab] : QString("./."))
// .arg(VorLFound).arg(DoVorl.size()));
// .arg(VorLFound).arg(DoVorl.size());
ParagraphStyle pstyle;
if (ab < 5) {
pstyle.setAlignment(static_cast<ParagraphStyle::AlignmentType>(ab));
1113,7 → 1113,7
 
bool Scribus12Format::loadPage(const QString & fileName, int pageNumber, bool Mpage, QString /*renamedPageName*/)
{
// qDebug(QString("loading page %2 from file '%1' from 1.2.x plugin").arg(fileName).arg(pageNumber));
// qDebug() << QString("loading page %2 from file '%1' from 1.2.x plugin").arg(fileName).arg(pageNumber);
if (m_Doc==0 || m_View==0 || m_AvailableFonts==0)
{
Q_ASSERT(m_Doc==0 || m_View==0 || m_AvailableFonts==0);
/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
1842,7 → 1842,7
obj->itemText.insertChars(pos, QString(ch));
}
if (newStyle != last->Style) {
// qDebug(QString("new style at %1: %2 -> %3").arg(pos).arg(last->Style.asString()).arg(newStyle.asString()));
// qDebug() << QString("new style at %1: %2 -> %3").arg(pos).arg(last->Style.asString()).arg(newStyle.asString();
obj->itemText.applyCharStyle(last->StyleStart, pos-last->StyleStart, last->Style);
last->Style = newStyle;
last->StyleStart = pos;
1852,7 → 1852,7
pstyle.setParent( last->ParaStyle );
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);
}
}
1861,7 → 1861,7
pstyle.setParent( last->ParaStyle );
if (calign >= 0)
pstyle.setAlignment(static_cast<ParagraphStyle::AlignmentType>(calign));
// qDebug(QString("par style at end: %1/%2 (%3) calign %4").arg(pstyle.name()).arg(pstyle.parent()).arg(last->ParaStyle).arg(calign));
// qDebug() << QString("par style at end: %1/%2 (%3) calign %4").arg(pstyle.name()).arg(pstyle.parent()).arg(last->ParaStyle).arg(calign);
obj->itemText.applyStyle(obj->itemText.length()-1, pstyle);
//last->StyleStart = obj->itemText.length();
}
2144,7 → 2144,7
int startArrowIndex = obj->attribute("startArrowIndex", "0").toInt();
if ((startArrowIndex < 0) || (startArrowIndex > static_cast<int>(doc->arrowStyles.size())))
{
qDebug(QString("scribus13format: invalid arrow index: %").arg(startArrowIndex).toAscii().constData());
qDebug() << QString("scribus13format: invalid arrow index: %").arg(startArrowIndex);
startArrowIndex = 0;
}
currItem->setStartArrowIndex(startArrowIndex);
2151,7 → 2151,7
int endArrowIndex = obj->attribute("endArrowIndex", "0").toInt();
if ((endArrowIndex < 0) || (endArrowIndex > static_cast<int>(doc->arrowStyles.size())))
{
qDebug(QString("scribus13format: invalid arrow index: %").arg(endArrowIndex).toAscii().constData());
qDebug() << QString("scribus13format: invalid arrow index: %").arg(endArrowIndex);
endArrowIndex = 0;
}
currItem->setEndArrowIndex(endArrowIndex);
2478,7 → 2478,7
 
bool Scribus13Format::loadPage(const QString & fileName, int pageNumber, bool Mpage, QString renamedPageName)
{
// qDebug(QString("loading page %2 from file '%1' from 1.3.3.x plugin").arg(fileName).arg(pageNumber).toAscii().constData());
// qDebug() << QString("loading page %2 from file '%1' from 1.3.3.x plugin").arg(fileName).arg(pageNumber);
if (m_Doc==0 || m_AvailableFonts==0)
{
Q_ASSERT(m_Doc==0 || m_AvailableFonts==0);
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
1488,7 → 1488,7
PageItem * Itn = m_Doc->DocItems.at(lc.value());
if (Itn->prevInChain() || Its->nextInChain())
{
qDebug("scribus134format: corruption in linked textframes detected");
qDebug() << "scribus134format: corruption in linked textframes detected";
continue;
}
Its->link(Itn);
1507,7 → 1507,7
PageItem * Itn = m_Doc->MasterItems.at(lc.value());
if (Itn->prevInChain() || Its->nextInChain())
{
qDebug("scribus134format: corruption in linked textframes detected");
qDebug() << "scribus134format: corruption in linked textframes detected";
continue;
}
Its->link(Itn);
1825,7 → 1825,7
}
else if (ch == SpecialChars::SHYPHEN && pos > 0)
{
// qDebug(QString("scribus134format: SHYPHEN at %1").arg(pos));
// qDebug() << QString("scribus134format: SHYPHEN at %1").arg(pos);
ScText* lastItem = obj->itemText.item(pos-1);
// double SHY means user provided SHY, single SHY is automatic one
if (lastItem->effects() & ScStyle_HyphenationPossible)
1841,10 → 1841,10
else {
obj->itemText.insertChars(pos, QString(ch));
}
// qDebug(QString("style at %1: %2 ^ %3 = %4 (%5)").arg(pos).arg((uint)newStyle.effects()).arg((uint)last->Style.effects()).arg((uint)(newStyle.effects() ^ last->Style.effects())).arg(newStyle != last->Style));
// qDebug() << QString("style at %1: %2 ^ %3 = %4 (%5)").arg(pos).arg((uint)newStyle.effects()).arg((uint)last->Style.effects()).arg((uint)(newStyle.effects() ^ last->Style.effects())).arg(newStyle != last->Style);
if (newStyle != last->Style) // || (newStyle.effects() ^ last->Style.effects()) == ScStyle_HyphenationPossible)
{ // FIXME StyleFlag operator== ignores hyphen flag
// qDebug(QString("new style at %1: %2 -> %3").arg(pos).arg(last->Style.asString()).arg(newStyle.asString()));
// qDebug() << QString("new style at %1: %2 -> %3").arg(pos).arg(last->Style.asString()).arg(newStyle.asString());
obj->itemText.setCharStyle(last->StyleStart, pos-last->StyleStart, last->Style);
last->Style = newStyle;
last->StyleStart = pos;
1857,7 → 1857,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);
}
}
2234,7 → 2234,7
int startArrowIndex = obj->attribute("startArrowIndex", "0").toInt();
if ((startArrowIndex < 0) || (startArrowIndex > static_cast<int>(doc->arrowStyles.size())))
{
qDebug(QString("scribus134format: invalid arrow index: %").arg(startArrowIndex).toAscii().constData());
qDebug() << QString("scribus134format: invalid arrow index: %").arg(startArrowIndex);
startArrowIndex = 0;
}
currItem->setStartArrowIndex(startArrowIndex);
2241,7 → 2241,7
int endArrowIndex = obj->attribute("endArrowIndex", "0").toInt();
if ((endArrowIndex < 0) || (endArrowIndex > static_cast<int>(doc->arrowStyles.size())))
{
qDebug(QString("scribus134format: invalid arrow index: %").arg(endArrowIndex).toAscii().constData());
qDebug() << QString("scribus134format: invalid arrow index: %").arg(endArrowIndex);
endArrowIndex = 0;
}
currItem->setEndArrowIndex(endArrowIndex);
3254,7 → 3254,7
PageItem * Itn = m_Doc->DocItems.at(itemRemap[lc.value()]);
if (Itn->prevInChain() || Its->nextInChain())
{
qDebug("scribus134format: corruption in linked textframes detected");
qDebug() << "scribus134format: corruption in linked textframes detected";
continue;
}
Its->link(Itn);
3275,7 → 3275,7
PageItem * Itn = m_Doc->MasterItems.at(itemRemapM[lc.value()]);
if (Itn->prevInChain() || Its->nextInChain())
{
qDebug("scribus134format: corruption in linked textframes detected");
qDebug() << "scribus134format: corruption in linked textframes detected";
continue;
}
Its->link(Itn);
/trunk/Scribus/scribus/plugins/psimport/importps.cpp
7,6 → 7,7
 
#include <QByteArray>
#include <QCursor>
#include <QDebug>
#include <QDrag>
#include <QFile>
#include <QList>
165,7 → 166,7
}
catch(PoDoFo::PdfError& e)
{
qDebug("PoDoFo error while reading page size!");
qDebug("%s", "PoDoFo error while reading page size!");
e.PrintErrorMsg();
}
}
329,7 → 330,7
// see #2196
m_Doc->itemSelection_DeleteItem(tmpSel);
/*#else
qDebug("psimport: leaving items on page");
qDebug() << "psimport: leaving items on page";
#endif*/
m_Doc->view()->updatesOn(true);
m_Doc->m_Selection->delaySignalsOff();
442,7 → 443,7
docDir = docContext->get("docsopen", ".");
exportFi.setFile(docDir + "/" + exportFi.baseName());
}
//qDebug(QString("using export path %1").arg(exportFi.absFilePath()));
//qDebug() << QString("using export path %1").arg(exportFi.absFilePath());
args.append( QString("-sExportFiles=%1").arg(QDir::convertSeparators(exportFi.absoluteFilePath())) );
args.append( pfad2 );
args.append( QDir::convertSeparators(fn) );
456,7 → 457,7
if (ret != 0 && !cancel)
{
qDebug("PostScript import failed when calling gs as: \n%s\n", finalCmd.data());
qDebug("Ghostscript diagnostics:\n");
qDebug("%s", "Ghostscript diagnostics:\n");
QFile diag(errFile);
if (diag.open(QIODevice::ReadOnly) && !diag.atEnd() ) {
char buf[121];
466,7 → 467,7
diag.close();
}
else {
qDebug("-- no output --");
qDebug("%s", "-- no output --");
}
if (progressDialog)
progressDialog->close();
926,9 → 927,9
diag.close();
}
else {
qDebug("-- no output --");
qDebug("%s", "-- no output --");
}
qDebug("Failed file was:\n");
qDebug("%s", "Failed file was:\n");
QFile dat(rawfile);
if (dat.open(QIODevice::ReadOnly)) {
char buf[121];
941,7 → 942,7
dat.close();
}
else {
qDebug("-- empty --");
qDebug("%s", "-- empty --");
}
}
QFile::remove(rawfile);
/trunk/Scribus/scribus/pslib.cpp
26,6 → 26,7
#include <QFileInfo>
#include <QImage>
#include <QColor>
//#include <QDebug>
#include <QFontInfo>
#include <QList>
#include <QByteArray>
1718,7 → 1719,7
{
ErrorMessage = message;
if (!ScCore->usingGUI())
qDebug(message.toLocal8Bit().data());
qDebug("%s", message.toLocal8Bit().data());
}
 
void PSLib::PS_Error_ImageDataWriteFailure(void)
3448,7 → 3449,7
 
void PSLib::setTextSt(ScribusDoc* Doc, PageItem* ite, bool gcr, uint argh, Page* pg, bool sep, bool farb, bool ic, bool master)
{
// qDebug(QString("pslib setTextSt: ownPage=%1 pageNr=%2 OnMasterPage=%3;").arg(ite->OwnPage).arg(pg->pageNr()).arg(ite->OnMasterPage));
// qDebug() << QString("pslib setTextSt: ownPage=%1 pageNr=%2 OnMasterPage=%3;").arg(ite->OwnPage).arg(pg->pageNr()).arg(ite->OnMasterPage);
int tabCc = 0;
int savedOwnPage = ite->OwnPage;
double tabDist = ite->textToFrameDistLeft();