Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 4594 → Rev 4595

/branches/Version13x/Scribus/scribus/fileloader.cpp
593,10 → 593,10
Apage->setHeight(pg.attribute("PAGEHEIGHT").toDouble());
Apage->setInitialHeight(Apage->height());
Apage->setInitialWidth(Apage->width());
Apage->initialMargins.Top = pg.attribute("BORDERTOP").toDouble();
Apage->initialMargins.Bottom = pg.attribute("BORDERBOTTOM").toDouble();
Apage->initialMargins.Left = pg.attribute("BORDERLEFT").toDouble();
Apage->initialMargins.Right = pg.attribute("BORDERRIGHT").toDouble();
Apage->initialMargins.Top = QMAX(0.0, pg.attribute("BORDERTOP").toDouble());
Apage->initialMargins.Bottom = QMAX(0.0, pg.attribute("BORDERBOTTOM").toDouble());
Apage->initialMargins.Left = QMAX(0.0, pg.attribute("BORDERLEFT").toDouble());
Apage->initialMargins.Right = QMAX(0.0, pg.attribute("BORDERRIGHT").toDouble());
Apage->Margins.Top = Apage->initialMargins.Top;
Apage->Margins.Bottom = Apage->initialMargins.Bottom;
pageX = pg.attribute("PAGEXPOS").toDouble();
943,10 → 943,10
else
doc->pageWidth=dc.attribute("PAGEWITH").toDouble();
doc->pageHeight=dc.attribute("PAGEHEIGHT").toDouble();
doc->pageMargins.Left=dc.attribute("BORDERLEFT").toDouble();
doc->pageMargins.Right=dc.attribute("BORDERRIGHT").toDouble();
doc->pageMargins.Top=dc.attribute("BORDERTOP").toDouble();
doc->pageMargins.Bottom=dc.attribute("BORDERBOTTOM").toDouble();
doc->pageMargins.Left=QMAX(0.0, dc.attribute("BORDERLEFT").toDouble());
doc->pageMargins.Right=QMAX(0.0, dc.attribute("BORDERRIGHT").toDouble());
doc->pageMargins.Top=QMAX(0.0, dc.attribute("BORDERTOP").toDouble());
doc->pageMargins.Bottom=QMAX(0.0, dc.attribute("BORDERBOTTOM").toDouble());
doc->Automatic = static_cast<bool>(dc.attribute("AUTOMATIC", "1").toInt());
doc->AutoCheck = static_cast<bool>(dc.attribute("AUTOCHECK", "0").toInt());
doc->GuideLock = static_cast<bool>(dc.attribute("GUIDELOCK", "0").toInt());
1506,10 → 1506,10
Apage->setHeight(pg.attribute("PAGEHEIGHT").toDouble());
Apage->setInitialHeight(Apage->height());
Apage->setInitialWidth(Apage->width());
Apage->initialMargins.Top = pg.attribute("BORDERTOP").toDouble();
Apage->initialMargins.Bottom = pg.attribute("BORDERBOTTOM").toDouble();
Apage->initialMargins.Left = pg.attribute("BORDERLEFT").toDouble();
Apage->initialMargins.Right = pg.attribute("BORDERRIGHT").toDouble();
Apage->initialMargins.Top = QMAX(0.0, pg.attribute("BORDERTOP").toDouble());
Apage->initialMargins.Bottom = QMAX(0.0, pg.attribute("BORDERBOTTOM").toDouble());
Apage->initialMargins.Left = QMAX(0.0, pg.attribute("BORDERLEFT").toDouble());
Apage->initialMargins.Right = QMAX(0.0, pg.attribute("BORDERRIGHT").toDouble());
Apage->Margins.Top = Apage->initialMargins.Top;
Apage->Margins.Bottom = Apage->initialMargins.Bottom;
doc->setMasterPageMode(false);
/branches/Version13x/Scribus/scribus/marginWidget.cpp
122,8 → 122,8
 
void MarginWidget::setPageWidth(double width)
{
rightR->setMaxValue(width * m_unitRatio - leftR->value());
leftR->setMaxValue(width * m_unitRatio - rightR->value());
rightR->setMaxValue(QMAX(0.0, width * m_unitRatio - leftR->value()));
leftR->setMaxValue(QMAX(0.0,width * m_unitRatio - rightR->value()));
pageWidth = width;
setPreset();
}
130,8 → 130,8
 
void MarginWidget::setPageHeight(double height)
{
topR->setMaxValue(height * m_unitRatio - bottomR->value());
bottomR->setMaxValue(height * m_unitRatio - topR->value());
topR->setMaxValue(QMAX(0.0, height * m_unitRatio - bottomR->value()));
bottomR->setMaxValue(QMAX(0.0,height * m_unitRatio - topR->value()));
pageHeight = height;
setPreset();
}
139,7 → 139,7
void MarginWidget::setTop()
{
RandT = topR->value() / m_unitRatio;
bottomR->setMaxValue(pageHeight * m_unitRatio - topR->value());
bottomR->setMaxValue(QMAX(0.0, pageHeight * m_unitRatio - topR->value()));
setPreset();
}
 
146,7 → 146,7
void MarginWidget::setBottom()
{
RandB = bottomR->value() / m_unitRatio;
topR->setMaxValue(pageHeight * m_unitRatio - bottomR->value());
topR->setMaxValue(QMAX(0.0, pageHeight * m_unitRatio - bottomR->value()));
setPreset();
}
 
153,7 → 153,7
void MarginWidget::setLeft()
{
RandL = leftR->value() / m_unitRatio;
rightR->setMaxValue(pageWidth * m_unitRatio - leftR->value());
rightR->setMaxValue(QMAX(0.0, pageWidth * m_unitRatio - leftR->value()));
setPreset();
}
 
160,7 → 160,7
void MarginWidget::setRight()
{
RandR = rightR->value() / m_unitRatio;
leftR->setMaxValue(pageWidth * m_unitRatio - rightR->value());
leftR->setMaxValue(QMAX(0.0, pageWidth * m_unitRatio - rightR->value()));
setPreset();
}
 
204,18 → 204,18
MarginStruct marg = presetCombo->getMargins(item, pageWidth * m_unitRatio, pageHeight * m_unitRatio, leftR->value());
if (presetCombo->needUpdate())
{
leftR->setValue(marg.Left);
rightR->setValue(marg.Right);
topR->setValue(marg.Top);
bottomR->setValue(marg.Bottom);
leftR->setValue(QMAX(0.0, marg.Left));
rightR->setValue(QMAX(0.0, marg.Right));
topR->setValue(QMAX(0.0, marg.Top));
bottomR->setValue(QMAX(0.0, marg.Bottom));
RandT = topR->value() / m_unitRatio;
RandB = bottomR->value() / m_unitRatio;
RandL = leftR->value() / m_unitRatio;
RandR = rightR->value() / m_unitRatio;
bottomR->setMaxValue(pageHeight * m_unitRatio - topR->value());
topR->setMaxValue(pageHeight * m_unitRatio - bottomR->value());
rightR->setMaxValue(pageWidth * m_unitRatio - leftR->value());
leftR->setMaxValue(pageWidth * m_unitRatio - rightR->value());
bottomR->setMaxValue(QMAX(0.0, pageHeight * m_unitRatio - topR->value()));
topR->setMaxValue(QMAX(0.0, pageHeight * m_unitRatio - bottomR->value()));
rightR->setMaxValue(QMAX(0.0, pageWidth * m_unitRatio - leftR->value()));
leftR->setMaxValue(QMAX(0.0, pageWidth * m_unitRatio - rightR->value()));
rightR->setEnabled(false);
topR->setEnabled(false);
bottomR->setEnabled(false);
255,10 → 255,10
RandL = l;
RandR = r;
bottomR->setMaxValue((pageHeight - t) * m_unitRatio);
topR->setMaxValue((pageHeight - b) * m_unitRatio);
rightR->setMaxValue((pageWidth - l) * m_unitRatio);
leftR->setMaxValue((pageWidth - r) * m_unitRatio);
bottomR->setMaxValue((QMAX(0.0, pageHeight - t) * m_unitRatio));
topR->setMaxValue((QMAX(0.0, pageHeight - b) * m_unitRatio));
rightR->setMaxValue((QMAX(0.0, pageWidth - l) * m_unitRatio));
leftR->setMaxValue((QMAX(0.0, pageWidth - r) * m_unitRatio));
rightR->setEnabled(true);
topR->setEnabled(true);
/branches/Version13x/Scribus/scribus/scribusXml.cpp
1235,10 → 1235,10
else
doc->pageWidth=dc.attribute("PAGEWITH").toDouble();
doc->pageHeight=dc.attribute("PAGEHEIGHT").toDouble();
doc->pageMargins.Left=dc.attribute("BORDERLEFT").toDouble();
doc->pageMargins.Right=dc.attribute("BORDERRIGHT").toDouble();
doc->pageMargins.Top=dc.attribute("BORDERTOP").toDouble();
doc->pageMargins.Bottom=dc.attribute("BORDERBOTTOM").toDouble();
doc->pageMargins.Left=QMAX(0.0, dc.attribute("BORDERLEFT").toDouble());
doc->pageMargins.Right=QMAX(0.0, dc.attribute("BORDERRIGHT").toDouble());
doc->pageMargins.Top=QMAX(0.0, dc.attribute("BORDERTOP").toDouble());
doc->pageMargins.Bottom=QMAX(0.0, dc.attribute("BORDERBOTTOM").toDouble());
doc->PageOri = dc.attribute("ORIENTATION", "0").toInt();
doc->PageSize = dc.attribute("PAGESIZE");
doc->FirstPnum = dc.attribute("FIRSTNUM", "1").toInt();