Subversion Repositories Scribus

Compare Revisions

Regard whitespace Rev 18874 → Rev 18875

/trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
438,6 → 438,7
double pgGap = m_Doc->PageSpa;
papersize = "Custom";
QString paperOrien = "portrait";
bool hasPageSize = false;
for (QDomNode n = grNode.firstChild(); !n.isNull(); n = n.nextSibling() )
{
QDomElement e = n.toElement();
459,8 → 460,25
papersize = e.text();
else if (e.tagName() == "vd:pageOrientation")
paperOrien = e.text();
else if (e.tagName() == "vd:pageSize")
{
docWidth = parseUnit(e.attribute("vd:width", "0"));
docHeight = parseUnit(e.attribute("vd:height", "0"));
hasPageSize = true;
}
}
PageSize ps(papersize);
if (hasPageSize)
{
if (!paperOrien.startsWith("portrait"))
{
double tmp = docWidth;
docWidth = docHeight;
docHeight = tmp;
}
}
else
{
if (paperOrien.startsWith("portrait"))
{
docWidth = ps.width();
471,6 → 489,7
docHeight = ps.width();
docWidth = ps.height();
}
}
m_Doc->setPage(docWidth, docHeight, topMargin, leftMargin, rightMargin, bottomMargin, pgCols, pgGap, false, facingPages);
m_Doc->setPageSize(papersize);
m_Doc->currentPage()->m_pageSize = papersize;