Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 25199 → Rev 25200

/branches/Version15x/Scribus/scribus/imagedataloaders/scimgdataloader_tiff.cpp
134,7 → 134,7
{
char *layerName = nullptr;
TIFFGetField(tif, TIFFTAG_PAGENAME, &layerName);
QString name = QString(layerName);
QString name(layerName);
if (name.isEmpty())
lay.layerName = QString("Layer #%1").arg(layerNum);
else
304,7 → 304,6
{
uint32_t columns, rows;
uint32_t *tile_buf;
uint32_t xt, yt;
TIFFGetField(tif, TIFFTAG_TILEWIDTH, &columns);
TIFFGetField(tif, TIFFTAG_TILELENGTH, &rows);
tile_buf = (uint32_t*) _TIFFmalloc(columns * rows * sizeof(uint32_t));
313,8 → 312,9
TIFFClose(tif);
return false;
}
uint32_t tileW = columns, tileH = rows;
for (yt = 0; yt < (uint32_t) image->height(); yt += rows)
uint32_t tileW = columns;
uint32_t tileH = rows;
for (uint32_t yt = 0; yt < (uint32_t) image->height(); yt += rows)
{
if (yt > (uint) image->height())
break;
321,12 → 321,11
if (image->height() - yt < rows)
tileH = image->height() - yt;
tileW = columns;
uint32_t yi;
int chans = image->channels();
for (xt = 0; xt < (uint) image->width(); xt += columns)
for (uint32_t xt = 0; xt < (uint) image->width(); xt += columns)
{
TIFFReadTile(tif, tile_buf, xt, yt, 0, 0);
for (yi = 0; yi < tileH; yi++)
for (uint32_t yi = 0; yi < tileH; yi++)
{
_TIFFmemcpy(image->scanLine(yt + (tileH - 1 - yi)) + xt, tile_buf + tileW * yi, tileW * chans);
}
1131,7 → 1130,7
{
uint count = 0;
uchar *ptr = tmpImg.scanLine(hh);
uchar *ptr2 = ptr+tmpImg.width() * tmpImg.channels();
uchar *ptr2 = ptr + tmpImg.width() * tmpImg.channels();
ptr += component;
while (count < pixel_count)
{
/branches/Version15x/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
180,7 → 180,7
 
for (QDomNode spn = elem.firstChild(); !spn.isNull(); spn = spn.nextSibling())
{
QString txt = "";
QString txt;
QDomElement spEl = spn.toElement();
if (spn.nodeName() == "#text")
txt = spn.nodeValue();
220,7 → 220,7
{
for (QDomNode spn = elem.firstChild(); !spn.isNull(); spn = spn.nextSibling())
{
QString txt = "";
QString txt;
QDomElement spEl = spn.toElement();
if (spn.nodeName() == "#text")
txt = spn.nodeValue();
387,8 → 387,8
{
if (spt.tagName() == "style:tab-stops")
{
QString tabDists = "";
QString tabTypes = "";
QString tabDists;
QString tabTypes;
for (QDomElement spte = spt.firstChildElement(); !spte.isNull(); spte = spte.nextSiblingElement() )
{
if (spte.tagName() == "style:tab-stop")
467,8 → 467,8
{
if (spt.tagName() == "style:tab-stops")
{
QString tabDists = "";
QString tabTypes = "";
QString tabDists;
QString tabTypes;
for (QDomElement spte = spt.firstChildElement(); !spte.isNull(); spte = spte.nextSiblingElement() )
{
if (spte.tagName() == "style:tab-stop")
650,7 → 650,7
 
for (QDomNode spn = elem.firstChild(); !spn.isNull(); spn = spn.nextSibling())
{
QString txt = "";
QString txt;
QDomElement spEl = spn.toElement();
if (spn.nodeName() == "#text")
txt = spn.nodeValue();
691,7 → 691,7
ParagraphStyle tmpStyle = newStyle;
CharStyle tmpCStyle = tmpStyle.charStyle();
ObjStyleODT pStyle = tmpOStyle;
QString parStyleName = "";
QString parStyleName;
 
QString pStyleName = elem.toElement().attribute("text:style-name");
if (pStyleName.length() > 0)
747,7 → 747,7
tmpCStyle = tmpStyle.charStyle();
applyCharacterStyle(tmpCStyle, pStyle);
}
QString txt = "";
QString txt;
ObjStyleODT cStyle = pStyle;
QDomElement spEl = spn.toElement();
if (spn.nodeName() == "#text")
872,7 → 872,7
item->itemText.applyStyle(posC, tmpStyle);
item->itemText.applyCharStyle(posC, txt.length(), tmpCStyle);
posC = item->itemText.length();
txt = "";
txt.clear();
}
}
 
1263,7 → 1263,7
{
QColor c;
QString ret = CommonStrings::None;
if ((s == "") || s.isEmpty())
if (s.isEmpty())
return ret;
if (s.startsWith( "rgb(" ))
{
1275,17 → 1275,17
if (r.contains( "%" ))
{
r.chop(1);
r = QString::number( static_cast<int>( ( static_cast<double>( 255 * ScCLocale::toDoubleC(r) ) / 100.0 ) ) );
r = QString::number( static_cast<int>( ( 255.0 * ScCLocale::toDoubleC(r) ) / 100.0 ) );
}
if (g.contains( "%" ))
{
g.chop(1);
g = QString::number( static_cast<int>( ( static_cast<double>( 255 * ScCLocale::toDoubleC(g) ) / 100.0 ) ) );
g = QString::number( static_cast<int>( ( 255.0 * ScCLocale::toDoubleC(g)) / 100.0 ) );
}
if (b.contains( "%" ))
{
b.chop(1);
b = QString::number( static_cast<int>( ( static_cast<double>( 255 * ScCLocale::toDoubleC(b) ) / 100.0 ) ) );
b = QString::number( static_cast<int>( ( 255.0 * ScCLocale::toDoubleC(b)) / 100.0 ) );
}
c = QColor(r.toInt(), g.toInt(), b.toInt());
}
1343,7 → 1343,7
return fontName;
}
 
qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
QApplication::changeOverrideCursor(QCursor(Qt::ArrowCursor));
QScopedPointer<MissingFont> dia(new MissingFont(nullptr, family, m_Doc));
if (dia->exec())
fontName = dia->getReplacementFont();
1350,7 → 1350,7
else
fontName = m_Doc->itemToolPrefs().textFont;
PrefsManager::instance().appPrefs.fontPrefs.GFontSub[family] = fontName;
qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
QApplication::changeOverrideCursor(QCursor(Qt::WaitCursor));
 
return fontName;
}