r19831 by craig - Restructure margins code in preparation for moving to Qt 5.3's QMarginsF
scribus-commit
scribus-commit at lists.scribus.net
Thu Feb 19 13:59:32 UTC 2015
Author: craig
Date: Thu Feb 19 13:59:32 2015
New Revision: 19831
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19831
Log:
Restructure margins code in preparation for moving to Qt 5.3's QMarginsF
Modified:
trunk/Scribus/scribus/canvas.cpp
trunk/Scribus/scribus/canvasmode.cpp
trunk/Scribus/scribus/canvasmode_copyproperties.cpp
trunk/Scribus/scribus/canvasmode_edit.cpp
trunk/Scribus/scribus/canvasmode_framelinks.cpp
trunk/Scribus/scribus/canvasmode_normal.cpp
trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp
trunk/Scribus/scribus/guidemanagercore.cpp
trunk/Scribus/scribus/guidesdelegate.cpp
trunk/Scribus/scribus/margins.h
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/pageitem.h
trunk/Scribus/scribus/pageitem_noteframe.cpp
trunk/Scribus/scribus/pageitem_pathtext.cpp
trunk/Scribus/scribus/pageitem_textframe.cpp
trunk/Scribus/scribus/pdflib_core.cpp
trunk/Scribus/scribus/pdfoptionsio.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
trunk/Scribus/scribus/plugins/import/pages/importpages.cpp
trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
trunk/Scribus/scribus/prefsmanager.cpp
trunk/Scribus/scribus/pslib.cpp
trunk/Scribus/scribus/scpage.cpp
trunk/Scribus/scribus/scpage.h
trunk/Scribus/scribus/scpageoutput.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusview.cpp
trunk/Scribus/scribus/ui/marginpresetlayout.cpp
trunk/Scribus/scribus/ui/marginwidget.cpp
trunk/Scribus/scribus/ui/newmarginwidget.cpp
trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
trunk/Scribus/scribus/ui/pdfopts.cpp
trunk/Scribus/scribus/ui/prefs_display.cpp
trunk/Scribus/scribus/ui/prefs_itemtools.cpp
trunk/Scribus/scribus/ui/prefs_printer.cpp
trunk/Scribus/scribus/ui/preview.cpp
trunk/Scribus/scribus/ui/printdialog.cpp
trunk/Scribus/scribus/ui/tabpdfoptions.cpp
Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp (original)
+++ trunk/Scribus/scribus/canvas.cpp Thu Feb 19 13:59:32 2015
@@ -1581,8 +1581,8 @@
*/
void Canvas::drawBackgroundMasterpage(ScPainter* painter, int clipx, int clipy, int clipw, int cliph)
{
- double x = m_doc->scratch()->Left * m_viewMode.scale;
- double y = m_doc->scratch()->Top * m_viewMode.scale;
+ double x = m_doc->scratch()->left() * m_viewMode.scale;
+ double y = m_doc->scratch()->top() * m_viewMode.scale;
double w = m_doc->currentPage()->width() * m_viewMode.scale;
double h = m_doc->currentPage()->height() * m_viewMode.scale;
QRectF drawRect = QRectF(x, y, w+5, h+5);
@@ -1595,19 +1595,19 @@
m_doc->getBleeds(m_doc->currentPage(), pageBleeds);
painter->setAntialiasing(false);
painter->setPen(Qt::black, 1 / m_viewMode.scale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
- if (m_doc->bleeds()->hasNonZeroValue() && m_doc->guidesPrefs().showBleed)
+ if (!m_doc->bleeds()->isNull() && m_doc->guidesPrefs().showBleed)
{
if (PrefsManager::instance()->appPrefs.displayPrefs.showPageShadow)
- painter->drawRect(m_doc->scratch()->Left - pageBleeds.Left+5, m_doc->scratch()->Top - pageBleeds.Top+5, m_doc->currentPage()->width() + pageBleeds.Left + pageBleeds.Right, m_doc->currentPage()->height() + pageBleeds.Bottom + pageBleeds.Top);
+ painter->drawRect(m_doc->scratch()->left() - pageBleeds.left()+5, m_doc->scratch()->top() - pageBleeds.top()+5, m_doc->currentPage()->width() + pageBleeds.left() + pageBleeds.right(), m_doc->currentPage()->height() + pageBleeds.bottom() + pageBleeds.top());
painter->setBrush(m_doc->paperColor());
- painter->drawRect(m_doc->scratch()->Left - pageBleeds.Left, m_doc->scratch()->Top - pageBleeds.Top, m_doc->currentPage()->width() + pageBleeds.Left + pageBleeds.Right, m_doc->currentPage()->height() + pageBleeds.Bottom + pageBleeds.Top);
+ painter->drawRect(m_doc->scratch()->left() - pageBleeds.left(), m_doc->scratch()->top() - pageBleeds.top(), m_doc->currentPage()->width() + pageBleeds.left() + pageBleeds.right(), m_doc->currentPage()->height() + pageBleeds.bottom() + pageBleeds.top());
}
else
{
if (PrefsManager::instance()->appPrefs.displayPrefs.showPageShadow)
- painter->drawRect(m_doc->scratch()->Left+5, m_doc->scratch()->Top+5, m_doc->currentPage()->width(), m_doc->currentPage()->height());
+ painter->drawRect(m_doc->scratch()->left()+5, m_doc->scratch()->top()+5, m_doc->currentPage()->width(), m_doc->currentPage()->height());
painter->setBrush(m_doc->paperColor());
- painter->drawRect(m_doc->scratch()->Left, m_doc->scratch()->Top, m_doc->currentPage()->width(), m_doc->currentPage()->height());
+ painter->drawRect(m_doc->scratch()->left(), m_doc->scratch()->top(), m_doc->currentPage()->width(), m_doc->currentPage()->height());
}
painter->setAntialiasing(true);
}
@@ -1634,10 +1634,10 @@
m_doc->getBleeds(actPg, pageBleeds);
if (m_viewMode.viewAsPreview)
pageBleeds.resetToZero();
- double blx = (actPg->xOffset() - pageBleeds.Left) * m_viewMode.scale;
- double bly = (actPg->yOffset() - pageBleeds.Top) * m_viewMode.scale;
- double blw = (actPg->width() + pageBleeds.Left + pageBleeds.Right) * m_viewMode.scale;
- double blh = (actPg->height() + pageBleeds.Bottom + pageBleeds.Top) * m_viewMode.scale;
+ double blx = (actPg->xOffset() - pageBleeds.left()) * m_viewMode.scale;
+ double bly = (actPg->yOffset() - pageBleeds.top()) * m_viewMode.scale;
+ double blw = (actPg->width() + pageBleeds.left() + pageBleeds.right()) * m_viewMode.scale;
+ double blh = (actPg->height() + pageBleeds.bottom() + pageBleeds.top()) * m_viewMode.scale;
QRectF drawRect = QRectF(blx-1, bly-1, blw+6, blh+6);
drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
@@ -1650,13 +1650,13 @@
double blh2 = actPg->height();
if (m_doc->guidesPrefs().showBleed)
{
- blx2 -= pageBleeds.Left;
- bly2 -= pageBleeds.Top;
- blw2 += pageBleeds.Left + pageBleeds.Right;
- blh2 += pageBleeds.Bottom + pageBleeds.Top;
+ blx2 -= pageBleeds.left();
+ bly2 -= pageBleeds.top();
+ blw2 += pageBleeds.left() + pageBleeds.right();
+ blh2 += pageBleeds.bottom() + pageBleeds.top();
}
painter->drawRect(blx2 + 5, bly2 + 5, blw2, blh2);
- if (m_doc->bleeds()->hasNonZeroValue() && m_doc->guidesPrefs().showBleed)
+ if (!m_doc->bleeds()->isNull() && m_doc->guidesPrefs().showBleed)
{
painter->setFillMode(ScPainter::None);
painter->setPen(Qt::black, 1.0 / m_viewMode.scale, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
@@ -1677,17 +1677,17 @@
double w = actPg->width();
double h = actPg->height();
bool drawBleed = false;
- if (((m_doc->bleeds()->Bottom != 0.0) || (m_doc->bleeds()->Top != 0.0) || (m_doc->bleeds()->Left != 0.0) || (m_doc->bleeds()->Right != 0.0)) && (m_doc->guidesPrefs().showBleed))
+ if (((m_doc->bleeds()->bottom() != 0.0) || (m_doc->bleeds()->top() != 0.0) || (m_doc->bleeds()->left() != 0.0) || (m_doc->bleeds()->right() != 0.0)) && (m_doc->guidesPrefs().showBleed))
{
drawBleed = true;
m_doc->getBleeds(a, pageBleeds);
}
else
pageBleeds.resetToZero();
- double blx = (actPg->xOffset() - pageBleeds.Left) * m_viewMode.scale;
- double bly = (actPg->yOffset() - pageBleeds.Top) * m_viewMode.scale;
- double blw = (actPg->width() + pageBleeds.Left + pageBleeds.Right) * m_viewMode.scale;
- double blh = (actPg->height() + pageBleeds.Bottom + pageBleeds.Top) * m_viewMode.scale;
+ double blx = (actPg->xOffset() - pageBleeds.left()) * m_viewMode.scale;
+ double bly = (actPg->yOffset() - pageBleeds.top()) * m_viewMode.scale;
+ double blw = (actPg->width() + pageBleeds.left() + pageBleeds.right()) * m_viewMode.scale;
+ double blh = (actPg->height() + pageBleeds.bottom() + pageBleeds.top()) * m_viewMode.scale;
QRectF drawRect = QRectF(blx, bly, blw+5, blh+5);
drawRect.translate(-m_doc->minCanvasCoordinate.x() * m_viewMode.scale, -m_doc->minCanvasCoordinate.y() * m_viewMode.scale);
@@ -1700,10 +1700,10 @@
painter->setBrush(m_doc->paperColor());
if (!m_viewMode.viewAsPreview)
{
- double blx2 = actPg->xOffset() - pageBleeds.Left;
- double bly2 = actPg->yOffset() - pageBleeds.Top;
- double blw2 = actPg->width() + pageBleeds.Left + pageBleeds.Right;
- double blh2 = actPg->height() + pageBleeds.Bottom + pageBleeds.Top;
+ double blx2 = actPg->xOffset() - pageBleeds.left();
+ double bly2 = actPg->yOffset() - pageBleeds.top();
+ double blw2 = actPg->width() + pageBleeds.left() + pageBleeds.right();
+ double blh2 = actPg->height() + pageBleeds.bottom() + pageBleeds.top();
painter->drawRect(blx2, bly2, blw2, blh2);
if (drawBleed)
painter->drawRect(x, y, w, h);
@@ -1769,8 +1769,8 @@
if (master)
{
ScPage *page = m_doc->currentPage();
- double x = m_doc->scratch()->Left * m_viewMode.scale;
- double y = m_doc->scratch()->Top * m_viewMode.scale;
+ double x = m_doc->scratch()->left() * m_viewMode.scale;
+ double y = m_doc->scratch()->top() * m_viewMode.scale;
double w = page->width() * m_viewMode.scale;
double h = page->height() * m_viewMode.scale;
QRectF drawRect = QRectF(x, y, w+5, h+5);
@@ -1813,14 +1813,14 @@
{
p->setFillMode(ScPainter::Solid);
p->setBrush(m_doc->guidesPrefs().marginColor);
- p->drawRect(0, 0, pageWidth, page->Margins.Top);
- p->drawRect(0, page->Margins.Top, page->Margins.Left, pageHeight - page->Margins.Top);
- p->drawRect(page->Margins.Left, pageHeight - page->Margins.Bottom, pageWidth - page->Margins.Right - page->Margins.Left, page->Margins.Bottom);
- p->drawRect(pageWidth - page->Margins.Right, page->Margins.Top, page->Margins.Right, pageHeight-page->Margins.Top);
+ p->drawRect(0, 0, pageWidth, page->Margins.top());
+ p->drawRect(0, page->Margins.top(), page->Margins.left(), pageHeight - page->Margins.top());
+ p->drawRect(page->Margins.left(), pageHeight - page->Margins.bottom(), pageWidth - page->Margins.right() - page->Margins.left(), page->Margins.bottom());
+ p->drawRect(pageWidth - page->Margins.right(), page->Margins.top(), page->Margins.right(), pageHeight-page->Margins.top());
p->setFillMode(ScPainter::None);
}
p->setFillMode(ScPainter::None);
- p->drawRect(page->Margins.Left, page->Margins.Top, pageWidth - page->Margins.Left - page->Margins.Right, pageHeight - page->Margins.Top - page->Margins.Bottom);
+ p->drawRect(page->Margins.left(), page->Margins.top(), pageWidth - page->Margins.left() - page->Margins.right(), pageHeight - page->Margins.top() - page->Margins.bottom());
}
p->setAntialiasing(true);
p->restore();
@@ -1831,8 +1831,8 @@
if (master)
{
ScPage *page = m_doc->currentPage();
- double x = m_doc->scratch()->Left * m_viewMode.scale;
- double y = m_doc->scratch()->Top * m_viewMode.scale;
+ double x = m_doc->scratch()->left() * m_viewMode.scale;
+ double y = m_doc->scratch()->top() * m_viewMode.scale;
double w = page->width() * m_viewMode.scale;
double h = page->height() * m_viewMode.scale;
QRectF drawRect = QRectF(x, y, w+5, h+5);
@@ -1883,8 +1883,8 @@
if (master)
{
ScPage *page = m_doc->currentPage();
- double x = m_doc->scratch()->Left * m_viewMode.scale;
- double y = m_doc->scratch()->Top * m_viewMode.scale;
+ double x = m_doc->scratch()->left() * m_viewMode.scale;
+ double y = m_doc->scratch()->top() * m_viewMode.scale;
double w = page->width() * m_viewMode.scale;
double h = page->height() * m_viewMode.scale;
QRectF drawRect = QRectF(x, y, w+5, h+5);
@@ -2006,8 +2006,8 @@
if (master)
{
ScPage *page = m_doc->currentPage();
- double x = m_doc->scratch()->Left * m_viewMode.scale;
- double y = m_doc->scratch()->Top * m_viewMode.scale;
+ double x = m_doc->scratch()->left() * m_viewMode.scale;
+ double y = m_doc->scratch()->top() * m_viewMode.scale;
double w = page->width() * m_viewMode.scale;
double h = page->height() * m_viewMode.scale;
QRectF drawRect = QRectF(x, y, w+5, h+5);
@@ -2052,8 +2052,8 @@
if (master)
{
ScPage *page = m_doc->currentPage();
- double x = m_doc->scratch()->Left * m_viewMode.scale;
- double y = m_doc->scratch()->Top * m_viewMode.scale;
+ double x = m_doc->scratch()->left() * m_viewMode.scale;
+ double y = m_doc->scratch()->top() * m_viewMode.scale;
double w = page->width() * m_viewMode.scale;
double h = page->height() * m_viewMode.scale;
QRectF drawRect = QRectF(x, y, w+5, h+5);
@@ -2100,8 +2100,8 @@
if (master)
{
ScPage *page = m_doc->currentPage();
- double x = m_doc->scratch()->Left * m_viewMode.scale;
- double y = m_doc->scratch()->Top * m_viewMode.scale;
+ double x = m_doc->scratch()->left() * m_viewMode.scale;
+ double y = m_doc->scratch()->top() * m_viewMode.scale;
double w = page->width() * m_viewMode.scale;
double h = page->height() * m_viewMode.scale;
QRectF drawRect = QRectF(x, y, w+5, h+5);
Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Thu Feb 19 13:59:32 2015
@@ -931,14 +931,14 @@
if (!dragToPage)
return;
m_doc->getBleeds(dragToPage, bleedValues);
- double xOffset = dragToPage->xOffset() - bleedValues.Left;
- double yOffset = dragToPage->yOffset() - bleedValues.Top;
+ double xOffset = dragToPage->xOffset() - bleedValues.left();
+ double yOffset = dragToPage->yOffset() - bleedValues.top();
QPoint pageOrigin = m_canvas->canvasToLocal(QPointF(xOffset, yOffset));
if (ySnap)
{
p->setPen(Qt::green);
QPoint pt = m_canvas->canvasToLocal(QPointF(xOffset, ySnap));
- double w = (dragToPage->width() + bleedValues.Left + bleedValues.Right) * m_canvas->scale();
+ double w = (dragToPage->width() + bleedValues.left() + bleedValues.right()) * m_canvas->scale();
p->drawLine(pageOrigin.x(), pt.y(), pageOrigin.x() + w, pt.y());
ySnap = 0;
}
@@ -946,7 +946,7 @@
{
p->setPen(Qt::green);
QPoint pt = m_canvas->canvasToLocal(QPointF(xSnap, yOffset));
- double h = (dragToPage->height() + bleedValues.Bottom + bleedValues.Top) * m_canvas->scale();
+ double h = (dragToPage->height() + bleedValues.bottom() + bleedValues.top()) * m_canvas->scale();
p->drawLine(pt.x(), pageOrigin.y(), pt.x(), pageOrigin.y() + h);
xSnap = 0;
}
Modified: trunk/Scribus/scribus/canvasmode_copyproperties.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/canvasmode_copyproperties.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_copyproperties.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_copyproperties.cpp Thu Feb 19 13:59:32 2015
@@ -246,16 +246,16 @@
int docPageCount = static_cast<int>(m_doc->Pages->count() - 1);
MarginStruct pageBleeds;
bool drawBleed = false;
- if (m_doc->bleeds()->hasNonZeroValue() && m_doc->guidesPrefs().showBleed)
+ if (!m_doc->bleeds()->isNull() && m_doc->guidesPrefs().showBleed)
drawBleed = true;
for (int a = docPageCount; a > -1; a--)
{
if (drawBleed)
m_doc->getBleeds(a, pageBleeds);
- int x = static_cast<int>(m_doc->Pages->at(a)->xOffset() - pageBleeds.Left);
- int y = static_cast<int>(m_doc->Pages->at(a)->yOffset() - pageBleeds.Top);
- int w = static_cast<int>(m_doc->Pages->at(a)->width() + pageBleeds.Left + pageBleeds.Right);
- int h = static_cast<int>(m_doc->Pages->at(a)->height() + pageBleeds.Bottom + pageBleeds.Top);
+ int x = static_cast<int>(m_doc->Pages->at(a)->xOffset() - pageBleeds.left());
+ int y = static_cast<int>(m_doc->Pages->at(a)->yOffset() - pageBleeds.top());
+ int w = static_cast<int>(m_doc->Pages->at(a)->width() + pageBleeds.left() + pageBleeds.right());
+ int h = static_cast<int>(m_doc->Pages->at(a)->height() + pageBleeds.bottom() + pageBleeds.top());
if (QRect(x, y, w, h).contains(MxpS, MypS))
{
pgNum = static_cast<int>(a);
Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp Thu Feb 19 13:59:32 2015
@@ -824,8 +824,8 @@
{
double gx, gy, gh, gw;
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
- FPoint maxSize(gx+gw+m_doc->scratch()->Right, gy+gh+m_doc->scratch()->Bottom);
- FPoint minSize(gx-m_doc->scratch()->Left, gy-m_doc->scratch()->Top);
+ FPoint maxSize(gx+gw+m_doc->scratch()->right(), gy+gh+m_doc->scratch()->bottom());
+ FPoint minSize(gx-m_doc->scratch()->left(), gy-m_doc->scratch()->top());
m_doc->adjustCanvas(minSize, maxSize);
}
m_doc->setRedrawBounding(currItem);
@@ -968,16 +968,16 @@
int docPageCount = static_cast<int>(m_doc->Pages->count() - 1);
MarginStruct pageBleeds;
bool drawBleed = false;
- if (m_doc->bleeds()->hasNonZeroValue() && m_doc->guidesPrefs().showBleed)
+ if (!m_doc->bleeds()->isNull() && m_doc->guidesPrefs().showBleed)
drawBleed = true;
for (int a = docPageCount; a > -1; a--)
{
if (drawBleed)
m_doc->getBleeds(a, pageBleeds);
- int x = static_cast<int>(m_doc->Pages->at(a)->xOffset() - pageBleeds.Left);
- int y = static_cast<int>(m_doc->Pages->at(a)->yOffset() - pageBleeds.Top);
- int w = static_cast<int>(m_doc->Pages->at(a)->width() + pageBleeds.Left + pageBleeds.Right);
- int h = static_cast<int>(m_doc->Pages->at(a)->height() + pageBleeds.Bottom + pageBleeds.Top);
+ int x = static_cast<int>(m_doc->Pages->at(a)->xOffset() - pageBleeds.left());
+ int y = static_cast<int>(m_doc->Pages->at(a)->yOffset() - pageBleeds.top());
+ int w = static_cast<int>(m_doc->Pages->at(a)->width() + pageBleeds.left() + pageBleeds.right());
+ int h = static_cast<int>(m_doc->Pages->at(a)->height() + pageBleeds.bottom() + pageBleeds.top());
if (QRect(x, y, w, h).contains(MxpS, MypS))
{
pgNum = static_cast<int>(a);
Modified: trunk/Scribus/scribus/canvasmode_framelinks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/canvasmode_framelinks.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.cpp Thu Feb 19 13:59:32 2015
@@ -363,16 +363,16 @@
int docPageCount = static_cast<int>(m_doc->Pages->count() - 1);
MarginStruct pageBleeds;
bool drawBleed = false;
- if (m_doc->bleeds()->hasNonZeroValue() && m_doc->guidesPrefs().showBleed)
+ if (!m_doc->bleeds()->isNull() && m_doc->guidesPrefs().showBleed)
drawBleed = true;
for (int a = docPageCount; a > -1; a--)
{
if (drawBleed)
m_doc->getBleeds(a, pageBleeds);
- int x = static_cast<int>(m_doc->Pages->at(a)->xOffset() - pageBleeds.Left);
- int y = static_cast<int>(m_doc->Pages->at(a)->yOffset() - pageBleeds.Top);
- int w = static_cast<int>(m_doc->Pages->at(a)->width() + pageBleeds.Left + pageBleeds.Right);
- int h = static_cast<int>(m_doc->Pages->at(a)->height() + pageBleeds.Bottom + pageBleeds.Top);
+ int x = static_cast<int>(m_doc->Pages->at(a)->xOffset() - pageBleeds.left());
+ int y = static_cast<int>(m_doc->Pages->at(a)->yOffset() - pageBleeds.top());
+ int w = static_cast<int>(m_doc->Pages->at(a)->width() + pageBleeds.left() + pageBleeds.right());
+ int h = static_cast<int>(m_doc->Pages->at(a)->height() + pageBleeds.bottom() + pageBleeds.top());
if (QRect(x, y, w, h).contains(MxpS, MypS))
{
pgNum = static_cast<int>(a);
Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Thu Feb 19 13:59:32 2015
@@ -1152,8 +1152,8 @@
{
double gx, gy, gh, gw;
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
- FPoint maxSize(gx+gw+m_doc->scratch()->Right, gy+gh+m_doc->scratch()->Bottom);
- FPoint minSize(gx-m_doc->scratch()->Left, gy-m_doc->scratch()->Top);
+ FPoint maxSize(gx+gw+m_doc->scratch()->right(), gy+gh+m_doc->scratch()->bottom());
+ FPoint minSize(gx-m_doc->scratch()->left(), gy-m_doc->scratch()->top());
m_doc->adjustCanvas(minSize, maxSize);
}
m_doc->setRedrawBounding(currItem);
@@ -1661,16 +1661,16 @@
int docPageCount = static_cast<int>(m_doc->Pages->count() - 1);
MarginStruct pageBleeds;
bool drawBleed = false;
- if (m_doc->bleeds()->hasNonZeroValue() && m_doc->guidesPrefs().showBleed)
+ if (!m_doc->bleeds()->isNull() && m_doc->guidesPrefs().showBleed)
drawBleed = true;
for (int a = docPageCount; a > -1; a--)
{
if (drawBleed)
m_doc->getBleeds(a, pageBleeds);
- int x = static_cast<int>(m_doc->Pages->at(a)->xOffset() - pageBleeds.Left);
- int y = static_cast<int>(m_doc->Pages->at(a)->yOffset() - pageBleeds.Top);
- int w = static_cast<int>(m_doc->Pages->at(a)->width() + pageBleeds.Left + pageBleeds.Right);
- int h = static_cast<int>(m_doc->Pages->at(a)->height() + pageBleeds.Bottom + pageBleeds.Top);
+ int x = static_cast<int>(m_doc->Pages->at(a)->xOffset() - pageBleeds.left());
+ int y = static_cast<int>(m_doc->Pages->at(a)->yOffset() - pageBleeds.top());
+ int w = static_cast<int>(m_doc->Pages->at(a)->width() + pageBleeds.left() + pageBleeds.right());
+ int h = static_cast<int>(m_doc->Pages->at(a)->height() + pageBleeds.bottom() + pageBleeds.top());
if (QRect(x, y, w, h).contains(MxpS, MypS))
{
pgNum = static_cast<int>(a);
Modified: trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp
==============================================================================
--- trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp (original)
+++ trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp Thu Feb 19 13:59:32 2015
@@ -164,55 +164,5 @@
break;
}
}
-
- /*
- QStringList allFileList;
- foreach(DictData d, fileList)
- {
- allFileList += d.files.split(";", QString::SkipEmptyParts);
- }
- // Move downloaded files to destination
- foreach(DictData d, fileList)
- {
- QString basename = QFileInfo(d.url).fileName();
- QString filename = downloadLocation+basename;
- QStringList files = d.files.split(";", QString::SkipEmptyParts);
- QString affixFile = affixFileName(files);
- QString dictFile = dictFileName(files);
- //qDebug()<<filename;
- if (d.filetype=="zip")
- {
- //qDebug()<<"zip data found"<<filename;
- ScZipHandler* fun = new ScZipHandler();
- if (fun->open(filename))
- {
- foreach (QString s, files)
- {
- //qDebug()<<"Unzipping"<<userDictDir+s;
- fun->extract(s, userDictDir);
- allFileList.removeOne(s);
- }
- }
- delete fun;
- }
- if (d.filetype=="plain")
- {
- foreach (QString s, files)
- {
- //qDebug()<<"plain data found"<<downloadLocation<<userDictDir<<s;
- QString dstName = s;
- if (dstName == affixFile)
- dstName = QFileInfo(downloadLocation+dictFile).baseName() + ".aff";
- allFileList.removeOne(s);
- if (allFileList.contains(s))
- {
- copyFile(downloadLocation+s, userDictDir+dstName);
- continue;
- }
- moveFile(downloadLocation+s, userDictDir+dstName);
- }
- }
- }
- */
emit finished();
}
Modified: trunk/Scribus/scribus/guidemanagercore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/guidemanagercore.cpp
==============================================================================
--- trunk/Scribus/scribus/guidemanagercore.cpp (original)
+++ trunk/Scribus/scribus/guidemanagercore.cpp Thu Feb 19 13:59:32 2015
@@ -255,8 +255,8 @@
if (m_horizontalAutoRefer == 1)
{
- newPageHeight = newPageHeight - page->Margins.Top - page->Margins.Bottom;
- offset = page->Margins.Top;
+ newPageHeight = newPageHeight - page->Margins.top() - page->Margins.bottom();
+ offset = page->Margins.top();
}
else if (m_horizontalAutoRefer == 2)
{
@@ -305,8 +305,8 @@
if (m_verticalAutoRefer == 1)
{
- newPageWidth = newPageWidth - page->Margins.Left - page->Margins.Right;
- offset = page->Margins.Left;
+ newPageWidth = newPageWidth - page->Margins.left() - page->Margins.right();
+ offset = page->Margins.left();
}
else if (m_verticalAutoRefer == 2)
{
@@ -483,10 +483,10 @@
return;
// real painting margins including bleeds
- double verticalFrom = 0.0 - doc->bleeds()->Top;
- double verticalTo = m_page->height() + doc->bleeds()->Bottom;
- double horizontalFrom = 0.0 - doc->bleeds()->Left;
- double horizontalTo = m_page->width() + doc->bleeds()->Right;
+ double verticalFrom = 0.0 - doc->bleeds()->top();
+ double verticalTo = m_page->height() + doc->bleeds()->bottom();
+ double horizontalFrom = 0.0 - doc->bleeds()->left();
+ double horizontalTo = m_page->width() + doc->bleeds()->right();
// all standard
p->setPen(color, lineWidth, Qt::DashDotLine, Qt::FlatCap, Qt::MiterJoin);
@@ -612,10 +612,10 @@
closest = horizontalAutoG[i];
}
- if (m_page->Margins.Top < y && m_page->Margins.Top > closest)
- closest = m_page->Margins.Top;
- if (m_page->height() - m_page->Margins.Bottom < y && m_page->height() - m_page->Margins.Bottom > closest)
- closest = m_page->height() - m_page->Margins.Bottom;
+ if (m_page->Margins.top() < y && m_page->Margins.top() > closest)
+ closest = m_page->Margins.top();
+ if (m_page->height() - m_page->Margins.bottom() < y && m_page->height() - m_page->Margins.bottom() > closest)
+ closest = m_page->height() - m_page->Margins.bottom();
return closest;
}
@@ -635,10 +635,10 @@
closest = horizontalAutoG[i];
}
- if (m_page->Margins.Top > y && m_page->Margins.Top < closest)
- closest = m_page->Margins.Top;
- if (m_page->height() - m_page->Margins.Bottom > y && m_page->height() - m_page->Margins.Bottom < closest)
- closest = m_page->height() - m_page->Margins.Bottom;
+ if (m_page->Margins.top() > y && m_page->Margins.top() < closest)
+ closest = m_page->Margins.top();
+ if (m_page->height() - m_page->Margins.bottom() > y && m_page->height() - m_page->Margins.bottom() < closest)
+ closest = m_page->height() - m_page->Margins.bottom();
return closest;
}
@@ -658,10 +658,10 @@
closest = verticalAutoG[i];
}
- if (m_page->Margins.Left < x && m_page->Margins.Left > closest)
- closest = m_page->Margins.Left;
- if (m_page->width() - m_page->Margins.Right < x && m_page->width() - m_page->Margins.Right > closest)
- closest = m_page->width() - m_page->Margins.Right;
+ if (m_page->Margins.left() < x && m_page->Margins.left() > closest)
+ closest = m_page->Margins.left();
+ if (m_page->width() - m_page->Margins.right() < x && m_page->width() - m_page->Margins.right() > closest)
+ closest = m_page->width() - m_page->Margins.right();
return closest;
}
@@ -681,10 +681,10 @@
closest = verticalAutoG[i];
}
- if (m_page->Margins.Left > x && m_page->Margins.Left < closest)
- closest = m_page->Margins.Left;
- if (m_page->width() - m_page->Margins.Right > x && m_page->width() - m_page->Margins.Right < closest)
- closest = m_page->width() - m_page->Margins.Right;
+ if (m_page->Margins.left() > x && m_page->Margins.left() < closest)
+ closest = m_page->Margins.left();
+ if (m_page->width() - m_page->Margins.right() > x && m_page->width() - m_page->Margins.right() < closest)
+ closest = m_page->width() - m_page->Margins.right();
return closest;
}
Modified: trunk/Scribus/scribus/guidesdelegate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/guidesdelegate.cpp
==============================================================================
--- trunk/Scribus/scribus/guidesdelegate.cpp (original)
+++ trunk/Scribus/scribus/guidesdelegate.cpp Thu Feb 19 13:59:32 2015
@@ -75,9 +75,9 @@
Q_ASSERT_X(m_doc != 0, "GuidesHDelegate::createEditor",
"No reference to the doc");
double uix = unitGetRatioFromIndex(m_doc->unitIndex());
- double min = 0.0 - (m_doc->bleeds()->Top * uix);
+ double min = 0.0 - (m_doc->bleeds()->top() * uix);
double max = (m_doc->currentPage()->height() * uix)
- + (m_doc->bleeds()->Bottom * uix);
+ + (m_doc->bleeds()->bottom() * uix);
ScrSpinBox *editor =
new ScrSpinBox(min,
max,
@@ -99,9 +99,9 @@
Q_ASSERT_X(m_doc != 0, "GuidesVDelegate::createEditor",
"No reference to the doc");
double uix = unitGetRatioFromIndex(m_doc->unitIndex());
- double min = 0.0 - (m_doc->bleeds()->Left * uix);
+ double min = 0.0 - (m_doc->bleeds()->left() * uix);
double max = (m_doc->currentPage()->width() * uix)
- + (m_doc->bleeds()->Right * uix);
+ + (m_doc->bleeds()->right() * uix);
ScrSpinBox *editor =
new ScrSpinBox(min,
max,
Modified: trunk/Scribus/scribus/margins.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/margins.h
==============================================================================
--- trunk/Scribus/scribus/margins.h (original)
+++ trunk/Scribus/scribus/margins.h Thu Feb 19 13:59:32 2015
@@ -18,27 +18,52 @@
#define MARGINS_H
#include <QDebug>
+#include <QMarginsF>
/** \brief Pagemargins and bleeds*/
class MarginStruct
{
public:
- MarginStruct() : Top(0), Left(0), Bottom(0), Right(0) {}
+ MarginStruct() : m_top(0), m_left(0), m_bottom(0), m_right(0) {}
MarginStruct(double top, double left, double bottom, double right) :
- Top(top), Left(left), Bottom(bottom), Right(right) {}
- MarginStruct(const MarginStruct& rhs) {Top=rhs.Top;Bottom=rhs.Bottom;Left=rhs.Left;Right=rhs.Right;}
- void set(double top, double left, double bottom, double right) {Top=top;Bottom=bottom;Left=left;Right=right;}
- void resetToZero() {Top=0.0;Bottom=0.0;Left=0.0;Right=0.0;}
- bool hasNonZeroValue() const { return Top!=0.0 || Bottom!=0.0 || Left!=0.0 || Right!=0.0;}
- void print() const {qDebug() << Top << Left << Bottom << Right;}
- double leftMargin() const { return Left; }
- double topMargin() const { return Top; }
- double bottomMargin() const { return Bottom; }
- double rightMargin() const { return Right; }
- double Top;
- double Left;
- double Bottom;
- double Right;
+ m_top(top), m_left(left), m_bottom(bottom), m_right(right) {}
+ MarginStruct(const MarginStruct& rhs) {m_top=rhs.m_top;m_bottom=rhs.m_bottom;m_left=rhs.m_left;m_right=rhs.m_right;}
+ void set(double top, double left, double bottom, double right) {m_top=top;m_bottom=bottom;m_left=left;m_right=right;}
+ void resetToZero() {m_top=0.0;m_bottom=0.0;m_left=0.0;m_right=0.0;}
+ bool isNull() const {return qFuzzyIsNull(m_left) && qFuzzyIsNull(m_top) && qFuzzyIsNull(m_right) && qFuzzyIsNull(m_bottom);}
+ //bool hasNonZeroValue() const { return m_top!=0.0 || m_bottom!=0.0 || m_left!=0.0 || m_right!=0.0;}
+ void print() const {qDebug() << m_top << m_left << m_bottom << m_right;}
+ inline double left() const { return m_left; }
+ inline double top() const { return m_top; }
+ inline double bottom() const { return m_bottom; }
+ inline double right() const { return m_right; }
+
+ inline void setLeft(double aleft) { m_left = aleft; }
+ inline void setTop(double atop) { m_top = atop; }
+ inline void setRight(double aright) { m_right = aright; }
+ inline void setBottom(double abottom) { m_bottom = abottom; }
+
+
+ protected:
+ double m_top;
+ double m_left;
+ double m_bottom;
+ double m_right;
};
+#if QT_VERSION >= 0x050300
+class ScMargins : public QMarginsF
+{
+ public:
+ ScMargins(qreal left, qreal top, qreal right, qreal bottom) : QMarginsF(left, top, right, bottom) {};
+ void set(qreal left, qreal top, qreal right, qreal bottom)
+ {
+ setTop(top);
+ setBottom(bottom);
+ setLeft(left);
+ setRight(right);
+ }
+};
+#endf
+
#endif // MARGINS_H
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Thu Feb 19 13:59:32 2015
@@ -1544,65 +1544,65 @@
void PageItem::setTextToFrameDistLeft(double newLeft)
{
- if (m_textDistanceMargins.Left==newLeft)
+ if (m_textDistanceMargins.left()==newLeft)
return;
if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::TextFrameDist, "", Um::ITextFrame);
ss->set("LEFT_TEXTFRAMEDIST", "left_textframedist");
- ss->set("OLD_DIST",m_textDistanceMargins.Left);
+ ss->set("OLD_DIST",m_textDistanceMargins.left());
ss->set("NEW_DIST",newLeft);
undoManager->action(this, ss);
}
- m_textDistanceMargins.Left=newLeft;
+ m_textDistanceMargins.setLeft(newLeft);
//emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
}
void PageItem::setTextToFrameDistRight(double newRight)
{
- if (m_textDistanceMargins.Right==newRight)
+ if (m_textDistanceMargins.right()==newRight)
return;
if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::TextFrameDist, "", Um::ITextFrame);
ss->set("RIGHT_TEXTFRAMEDIST", "right_textframedist");
- ss->set("OLD_DIST",m_textDistanceMargins.Right);
+ ss->set("OLD_DIST",m_textDistanceMargins.right());
ss->set("NEW_DIST",newRight);
undoManager->action(this, ss);
}
- m_textDistanceMargins.Right=newRight;
+ m_textDistanceMargins.setRight(newRight);
//emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
}
void PageItem::setTextToFrameDistTop(double newTop)
{
- if (m_textDistanceMargins.Top==newTop)
+ if (m_textDistanceMargins.top()==newTop)
return;
if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::TextFrameDist, "", Um::ITextFrame);
ss->set("TOP_TEXTFRAMEDIST", "top_textframedist");
- ss->set("OLD_DIST",m_textDistanceMargins.Top);
+ ss->set("OLD_DIST",m_textDistanceMargins.top());
ss->set("NEW_DIST",newTop);
undoManager->action(this, ss);
}
- m_textDistanceMargins.Top=newTop;
+ m_textDistanceMargins.setTop(newTop);
//emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
}
void PageItem::setTextToFrameDistBottom(double newBottom)
{
- if (m_textDistanceMargins.Bottom==newBottom)
+ if (m_textDistanceMargins.bottom()==newBottom)
return;
if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::TextFrameDist, "", Um::ITextFrame);
ss->set("BOTTOM_TEXTFRAMEDIST", "bottom_textframedist");
- ss->set("OLD_DIST",m_textDistanceMargins.Bottom);
+ ss->set("OLD_DIST",m_textDistanceMargins.bottom());
ss->set("NEW_DIST",newBottom);
undoManager->action(this, ss);
}
- m_textDistanceMargins.Bottom=newBottom;
+ m_textDistanceMargins.setBottom(newBottom);
//emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
}
@@ -6709,36 +6709,36 @@
void PageItem::restoreLeftTextFrameDist(SimpleState *ss, bool isUndo)
{
if (isUndo)
- m_textDistanceMargins.Left = ss->getDouble("OLD_DIST");
- else
- m_textDistanceMargins.Left = ss->getDouble("NEW_DIST");
+ m_textDistanceMargins.setLeft(ss->getDouble("OLD_DIST"));
+ else
+ m_textDistanceMargins.setLeft(ss->getDouble("NEW_DIST"));
update();
}
void PageItem::restoreRightTextFrameDist(SimpleState *ss, bool isUndo)
{
if (isUndo)
- m_textDistanceMargins.Right = ss->getDouble("OLD_DIST");
- else
- m_textDistanceMargins.Right = ss->getDouble("NEW_DIST");
+ m_textDistanceMargins.setRight(ss->getDouble("OLD_DIST"));
+ else
+ m_textDistanceMargins.setRight(ss->getDouble("NEW_DIST"));
update();
}
void PageItem::restoreTopTextFrameDist(SimpleState *ss, bool isUndo)
{
if (isUndo)
- m_textDistanceMargins.Top = ss->getDouble("OLD_DIST");
- else
- m_textDistanceMargins.Top = ss->getDouble("NEW_DIST");
+ m_textDistanceMargins.setTop(ss->getDouble("OLD_DIST"));
+ else
+ m_textDistanceMargins.setTop(ss->getDouble("NEW_DIST"));
update();
}
void PageItem::restoreBottomTextFrameDist(SimpleState *ss, bool isUndo)
{
if (isUndo)
- m_textDistanceMargins.Bottom = ss->getDouble("OLD_DIST");
- else
- m_textDistanceMargins.Bottom = ss->getDouble("NEW_DIST");
+ m_textDistanceMargins.setBottom(ss->getDouble("OLD_DIST"));
+ else
+ m_textDistanceMargins.setBottom(ss->getDouble("NEW_DIST"));
update();
}
Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Thu Feb 19 13:59:32 2015
@@ -712,10 +712,10 @@
void makeImageExternal(QString path);
//Text Data - Move to PageItem_TextFrame at some point? --- no, to FrameStyle, av
- double textToFrameDistLeft() const { return m_textDistanceMargins.Left; }
- double textToFrameDistRight() const { return m_textDistanceMargins.Right; }
- double textToFrameDistTop() const { return m_textDistanceMargins.Top; }
- double textToFrameDistBottom() const { return m_textDistanceMargins.Bottom; }
+ double textToFrameDistLeft() const { return m_textDistanceMargins.left(); }
+ double textToFrameDistRight() const { return m_textDistanceMargins.right(); }
+ double textToFrameDistTop() const { return m_textDistanceMargins.top(); }
+ double textToFrameDistBottom() const { return m_textDistanceMargins.bottom(); }
int columns() const { return Cols; }
double columnGap() const { return ColGap; }
double gridOffset() const;
Modified: trunk/Scribus/scribus/pageitem_noteframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/pageitem_noteframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_noteframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_noteframe.cpp Thu Feb 19 13:59:32 2015
@@ -222,7 +222,7 @@
}
}
double hackValue = 0.5;
- oldHeight = m_height = ceil(maxY) + m_textDistanceMargins.Bottom + hackValue;
+ oldHeight = m_height = ceil(maxY) + m_textDistanceMargins.bottom() + hackValue;
updateConstants();
updateClip();
invalid = true;
Modified: trunk/Scribus/scribus/pageitem_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/pageitem_pathtext.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_pathtext.cpp (original)
+++ trunk/Scribus/scribus/pageitem_pathtext.cpp Thu Feb 19 13:59:32 2015
@@ -80,7 +80,7 @@
FPoint point = FPoint(0, 0);
FPoint tangent = FPoint(0, 0);
QColor tmp;
- CurX = m_textDistanceMargins.Left;
+ CurX = m_textDistanceMargins.left();
QString cachedStroke = "";
QString cachedFill = "";
double cachedFillShade = -1;
@@ -223,12 +223,12 @@
{
totalCurveLen += PoLine.lenPathSeg(segs);
}
- if ((itemRenderText.paragraphStyle(0).alignment() != 0) && (totalCurveLen >= totalTextLen + m_textDistanceMargins.Left))
+ if ((itemRenderText.paragraphStyle(0).alignment() != 0) && (totalCurveLen >= totalTextLen + m_textDistanceMargins.left()))
{
if (itemRenderText.paragraphStyle(0).alignment() == 2)
{
CurX = totalCurveLen - totalTextLen;
- CurX -= m_textDistanceMargins.Left;
+ CurX -= m_textDistanceMargins.left();
}
if (itemRenderText.paragraphStyle(0).alignment() == 1)
CurX = (totalCurveLen - totalTextLen) / 2.0;
@@ -237,16 +237,16 @@
if (spaceCount != 0)
{
extraOffset = 0;
- wordExtra = (totalCurveLen - m_textDistanceMargins.Left - totalTextLen) / static_cast<double>(spaceCount);
+ wordExtra = (totalCurveLen - m_textDistanceMargins.left() - totalTextLen) / static_cast<double>(spaceCount);
}
else
{
- extraOffset = (totalCurveLen - m_textDistanceMargins.Left - totalTextLen) / static_cast<double>(itemRenderText.length());
+ extraOffset = (totalCurveLen - m_textDistanceMargins.left() - totalTextLen) / static_cast<double>(itemRenderText.length());
wordExtra = 0;
}
}
if (itemRenderText.paragraphStyle(0).alignment() == 4)
- extraOffset = (totalCurveLen - m_textDistanceMargins.Left - totalTextLen) / static_cast<double>(itemRenderText.length());
+ extraOffset = (totalCurveLen - m_textDistanceMargins.left() - totalTextLen) / static_cast<double>(itemRenderText.length());
}
QPainterPath guidePath = PoLine.toQPainterPath(false);
QList<QPainterPath> pathList = decomposePath(guidePath);
Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Thu Feb 19 13:59:32 2015
@@ -509,18 +509,18 @@
void nextColumn(double asce = 0.0)
{
startOfCol = true;
- colLeft = (colWidth + colGap) * column + insets.Left + lineCorr;
+ colLeft = (colWidth + colGap) * column + insets.left() + lineCorr;
//now colRight is REAL column right edge
colRight = colLeft + colWidth;
if (legacy)
colRight += lineCorr;
xPos = colLeft;
- yPos = asce + insets.Top + lineCorr;
+ yPos = asce + insets.top() + lineCorr;
}
bool isEndOfCol(double morespace = 0)
{
- return yPos + morespace + insets.Bottom + lineCorr > frameHeight;
+ return yPos + morespace + insets.bottom() + lineCorr > frameHeight;
}
/**
@@ -1447,7 +1447,7 @@
}
current.nextColumn();
- lastLineY = m_textDistanceMargins.Top;
+ lastLineY = m_textDistanceMargins.top();
//automatic line spacing factor (calculated once)
double autoLS = static_cast<double>(m_Doc->typographicPrefs().autoLineSpacing) / 100.0;
@@ -1468,13 +1468,13 @@
else
chs = cstyle.fontSize();
desc = -cstyle.font().descent(chs / 10.0);
- current.yPos = m_textDistanceMargins.Top + lineCorr;
+ current.yPos = m_textDistanceMargins.top() + lineCorr;
// qDebug() << QString("first line at y=%1").arg(current.yPos);
}
else // empty itemText:
{
desc = -itemText.defaultStyle().charStyle().font().descent(itemText.defaultStyle().charStyle().fontSize() / 10.0);
- current.yPos = itemText.defaultStyle().lineSpacing() + m_textDistanceMargins.Top + lineCorr - desc;
+ current.yPos = itemText.defaultStyle().lineSpacing() + m_textDistanceMargins.top() + lineCorr - desc;
}
current.startLine(firstInFrame());
@@ -1718,7 +1718,7 @@
}
current.breakIndex = -1;
if (current.startOfCol && !current.afterOverflow && current.recalculateY)
- current.yPos = qMax(current.yPos, m_textDistanceMargins.Top);
+ current.yPos = qMax(current.yPos, m_textDistanceMargins.top());
// more about par gap and dropcaps
if ((a > firstInFrame() && itemText.text(a-1) == SpecialChars::PARSEP) || (a == 0 && BackBox == 0 && current.startOfCol))
{
@@ -1972,7 +1972,7 @@
//if top of column Y position depends on first line offset
if (current.startOfCol)
{
- lastLineY = qMax(lastLineY, m_textDistanceMargins.Top + lineCorr);
+ lastLineY = qMax(lastLineY, m_textDistanceMargins.top() + lineCorr);
//fix for proper rendering first empty line (only with PARSEP)
if (chstr[0] == SpecialChars::PARSEP)
current.yPos += style.lineSpacing();
@@ -2917,7 +2917,7 @@
current.nextColumn();
current.mustLineEnd = current.colRight;
current.addLeftIndent = true;
- lastLineY = m_textDistanceMargins.Top;
+ lastLineY = m_textDistanceMargins.top();
current.rowDesc = 0;
current.recalculateY = true;
}
@@ -3047,18 +3047,18 @@
if ((verticalAlign > 0) && (NextBox == NULL))
{
int vertAlign = verticalAlign;
- double topDist = m_textDistanceMargins.Top;
+ double topDist = m_textDistanceMargins.top();
double hAdjust = 0;
if (verticalAlign == 1)
- hAdjust = (height() - (m_textDistanceMargins.Bottom + lineCorr) - maxY) / 2.0;
+ hAdjust = (height() - (m_textDistanceMargins.bottom() + lineCorr) - maxY) / 2.0;
else if (verticalAlign == 2)
- hAdjust = (height() - (m_textDistanceMargins.Bottom + lineCorr) - maxY);
+ hAdjust = (height() - (m_textDistanceMargins.bottom() + lineCorr) - maxY);
if (hAdjust > 0)
{
- m_textDistanceMargins.Top += hAdjust;
+ m_textDistanceMargins.setTop(topDist + hAdjust);
verticalAlign = 0;
layout();
- m_textDistanceMargins.Top = topDist;
+ m_textDistanceMargins.setTop(topDist);
verticalAlign = vertAlign;
}
}
@@ -5107,8 +5107,8 @@
lineCorr = m_lineWidth / 2.0;
else
lineCorr = 0;
- return (m_width - (ColGap * (Cols - 1)) - m_textDistanceMargins.Left - m_textDistanceMargins.Right - 2 * lineCorr) / Cols;
-// return (Width - (ColGap * (Cols - 1)) - m_textDistanceMargins.Left - m_textDistanceMargins.Right - lineCorr) / Cols;
+ return (m_width - (ColGap * (Cols - 1)) - m_textDistanceMargins.left() - m_textDistanceMargins.right() - 2 * lineCorr) / Cols;
+// return (Width - (ColGap * (Cols - 1)) - m_textDistanceMargins.left() - m_textDistanceMargins.right() - lineCorr) / Cols;
}
/*
@@ -5156,17 +5156,17 @@
double lineCorr=0;
if (lineColor() != CommonStrings::None)
lineCorr = m_lineWidth / 2.0;
- if (m_textDistanceMargins.Top + lineCorr!=0.0)
- p->drawSharpLine(FPoint(m_textDistanceMargins.Left + lineCorr, m_textDistanceMargins.Top + lineCorr), FPoint(m_width - m_textDistanceMargins.Right - lineCorr, m_textDistanceMargins.Top + lineCorr));
- if (m_textDistanceMargins.Bottom + lineCorr!=0.0)
- p->drawSharpLine(FPoint(m_textDistanceMargins.Left + lineCorr, m_height - m_textDistanceMargins.Bottom - lineCorr), FPoint(m_width - m_textDistanceMargins.Right - lineCorr, m_height - m_textDistanceMargins.Bottom - lineCorr));
+ if (m_textDistanceMargins.top() + lineCorr!=0.0)
+ p->drawSharpLine(FPoint(m_textDistanceMargins.left() + lineCorr, m_textDistanceMargins.top() + lineCorr), FPoint(m_width - m_textDistanceMargins.right() - lineCorr, m_textDistanceMargins.top() + lineCorr));
+ if (m_textDistanceMargins.bottom() + lineCorr!=0.0)
+ p->drawSharpLine(FPoint(m_textDistanceMargins.left() + lineCorr, m_height - m_textDistanceMargins.bottom() - lineCorr), FPoint(m_width - m_textDistanceMargins.right() - lineCorr, m_height - m_textDistanceMargins.bottom() - lineCorr));
while(curCol < Cols)
{
- colLeft=(colWidth + ColGap) * curCol + m_textDistanceMargins.Left + lineCorr;
+ colLeft=(colWidth + ColGap) * curCol + m_textDistanceMargins.left() + lineCorr;
if (colLeft != 0.0)
- p->drawSharpLine(FPoint(colLeft, m_textDistanceMargins.Top + lineCorr), FPoint(colLeft, m_height - m_textDistanceMargins.Bottom - lineCorr));
+ p->drawSharpLine(FPoint(colLeft, m_textDistanceMargins.top() + lineCorr), FPoint(colLeft, m_height - m_textDistanceMargins.bottom() - lineCorr));
if (colLeft + colWidth != m_width)
- p->drawSharpLine(FPoint(colLeft + colWidth, m_textDistanceMargins.Top + lineCorr), FPoint(colLeft + colWidth, m_height - m_textDistanceMargins.Bottom - lineCorr));
+ p->drawSharpLine(FPoint(colLeft + colWidth, m_textDistanceMargins.top() + lineCorr), FPoint(colLeft + colWidth, m_height - m_textDistanceMargins.bottom() - lineCorr));
++curCol;
}
@@ -5855,9 +5855,9 @@
//create new endnotes frame
double x,y,w,h;
const ScPage* scP = m_Doc->page4EndNotes(NS, this);
- x = scP->Margins.Left + m_Doc->rulerXoffset + scP->xOffset();
- y = scP->Margins.Top + m_Doc->rulerYoffset + scP->yOffset();
- w = scP->width() - scP->Margins.Left - scP->Margins.Right;
+ x = scP->Margins.left() + m_Doc->rulerXoffset + scP->xOffset();
+ y = scP->Margins.top() + m_Doc->rulerYoffset + scP->yOffset();
+ w = scP->width() - scP->Margins.left() - scP->Margins.right();
h = calculateLineSpacing(itemText.defaultStyle(), this);
nF = m_Doc->createNoteFrame(note->notesStyle(), x, y, w, h, m_Doc->itemToolPrefs().shapeLineWidth, CommonStrings::None, m_Doc->itemToolPrefs().textFont);
switch (NS->range())
@@ -5892,8 +5892,8 @@
if (scP->pageNr() != nF->OwnPage)
{
double x,y;
- x = scP->Margins.Left + m_Doc->rulerXoffset + scP->xOffset();
- y = scP->Margins.Top + m_Doc->rulerYoffset + scP->yOffset();
+ x = scP->Margins.left() + m_Doc->rulerXoffset + scP->xOffset();
+ y = scP->Margins.top() + m_Doc->rulerYoffset + scP->yOffset();
if ((scP->pageNr() != nF->OwnPage) || (nF->xPos() > (x + scP->width())) || nF->yPos() > (y + scP->height()))
{
undoManager->setUndoEnabled(false);
@@ -6071,7 +6071,7 @@
//ugly hack increasing min frame`s haeight against strange glyph painting if it is too close of bottom
double hackValue = 0.5;
- setHeight(ceil(maxY) + m_textDistanceMargins.Bottom + hackValue);
+ setHeight(ceil(maxY) + m_textDistanceMargins.bottom() + hackValue);
updateClip();
invalid = true;
m_Doc->changed();
Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Thu Feb 19 13:59:32 2015
@@ -2639,8 +2639,8 @@
double bleedLeft = 0.0;
getBleeds(ActPageP, bleedLeft, bleedRight);
double maxBoxX = ActPageP->width()+bleedRight+bleedLeft;
- double maxBoxY = ActPageP->height()+Options.bleeds.Top+Options.bleeds.Bottom;
- PutDoc("/BBox [ "+FToStr(-bleedLeft)+" "+FToStr(-Options.bleeds.Bottom)+" "+FToStr(maxBoxX)+" "+FToStr(maxBoxY)+" ]\n");
+ double maxBoxY = ActPageP->height()+Options.bleeds.top()+Options.bleeds.bottom();
+ PutDoc("/BBox [ "+FToStr(-bleedLeft)+" "+FToStr(-Options.bleeds.bottom())+" "+FToStr(maxBoxX)+" "+FToStr(maxBoxY)+" ]\n");
// PutDoc("/BBox [ 0 0 "+FToStr(ActPageP->width())+" "+FToStr(ActPageP->height())+" ]\n");
PutDoc("/Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]\n");
if ((Seite.ImgObjects.count() != 0) || (Seite.XObjects.count() != 0))
@@ -2772,7 +2772,7 @@
double bleedRight, bleedLeft;
getBleeds(ActPageP, bleedLeft, bleedRight);
double maxBoxX = ActPageP->width()+bleedLeft+bleedRight+markOffs*2.0;
- double maxBoxY = ActPageP->height()+Options.bleeds.Bottom+Options.bleeds.Top+markOffs*2.0;
+ double maxBoxY = ActPageP->height()+Options.bleeds.bottom()+Options.bleeds.top()+markOffs*2.0;
// (JG) Fix #5977 and #6075 (invalid restore)
//PutPage("Q\n");
if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks))
@@ -2782,29 +2782,29 @@
if (Options.cropMarks)
{
// Bottom Left
- PutPage(FToStr(markDelta)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
- PutPage(FToStr(markDelta+Options.markLength)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
+ PutPage(FToStr(markDelta)+" "+FToStr(markOffs+Options.bleeds.bottom())+" m\n");
+ PutPage(FToStr(markDelta+Options.markLength)+" "+FToStr(markOffs+Options.bleeds.bottom())+" l\n");
PutPage("S\n");
PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(markDelta)+" m\n");
PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(markDelta+Options.markLength)+" l\n");
PutPage("S\n");
// Top Left
- PutPage(FToStr(markDelta)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
- PutPage(FToStr(markDelta+Options.markLength)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
+ PutPage(FToStr(markDelta)+" "+FToStr(maxBoxY-Options.bleeds.top()-markOffs)+" m\n");
+ PutPage(FToStr(markDelta+Options.markLength)+" "+FToStr(maxBoxY-Options.bleeds.top()-markOffs)+" l\n");
PutPage("S\n");
PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY-markDelta)+" m\n");
PutPage(FToStr(markOffs+bleedLeft)+" "+FToStr(maxBoxY-markDelta-Options.markLength) +" l\n");
PutPage("S\n");
// Bottom Right
- PutPage(FToStr(maxBoxX-markDelta)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" m\n");
- PutPage(FToStr(maxBoxX-markDelta-Options.markLength)+" "+FToStr(markOffs+Options.bleeds.Bottom)+" l\n");
+ PutPage(FToStr(maxBoxX-markDelta)+" "+FToStr(markOffs+Options.bleeds.bottom())+" m\n");
+ PutPage(FToStr(maxBoxX-markDelta-Options.markLength)+" "+FToStr(markOffs+Options.bleeds.bottom())+" l\n");
PutPage("S\n");
PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(markDelta)+" m\n");
PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(markDelta+Options.markLength) +" l\n");
PutPage("S\n");
// Top Right
- PutPage(FToStr(maxBoxX-markDelta)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
- PutPage(FToStr(maxBoxX-markDelta-Options.markLength)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+" l\n");
+ PutPage(FToStr(maxBoxX-markDelta)+" "+FToStr(maxBoxY-Options.bleeds.top()-markOffs)+" m\n");
+ PutPage(FToStr(maxBoxX-markDelta-Options.markLength)+" "+FToStr(maxBoxY-Options.bleeds.top()-markOffs)+" l\n");
PutPage("S\n");
PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(maxBoxY-markDelta)+" m\n");
PutPage(FToStr(maxBoxX-bleedRight-markOffs)+" "+ FToStr(maxBoxY-markDelta-Options.markLength) +" l\n");
@@ -2981,9 +2981,9 @@
PutDoc("/MediaBox [0 0 "+FToStr(maxBoxX)+" "+FToStr(maxBoxY)+"]\n");
PutDoc("/BleedBox ["+FToStr(markOffs)+" "+FToStr(markOffs)+" "+FToStr(maxBoxX-markOffs)+" "+FToStr(maxBoxY-markOffs)+"]\n");
PutDoc("/CropBox [0 0 "+FToStr(maxBoxX)+" "+FToStr(maxBoxY)+"]\n");
- PutDoc("/TrimBox ["+FToStr(bleedLeft+markOffs)+" "+FToStr(Options.bleeds.Bottom+markOffs)+" "+FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+"]\n");
+ PutDoc("/TrimBox ["+FToStr(bleedLeft+markOffs)+" "+FToStr(Options.bleeds.bottom()+markOffs)+" "+FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY-Options.bleeds.top()-markOffs)+"]\n");
if (Options.Version >= PDFOptions::PDFVersion_13) // PDF/X forbids having both art and trim box!
- PutDoc("/ArtBox ["+FToStr(bleedLeft+markOffs)+" "+FToStr(Options.bleeds.Bottom+markOffs)+" "+FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY-Options.bleeds.Top-markOffs)+"]\n");
+ PutDoc("/ArtBox ["+FToStr(bleedLeft+markOffs)+" "+FToStr(Options.bleeds.bottom()+markOffs)+" "+FToStr(maxBoxX-bleedRight-markOffs)+" "+FToStr(maxBoxY-Options.bleeds.top()-markOffs)+"]\n");
PutDoc("/Rotate "+QString::number(Options.RotateDeg)+"\n");
PutDoc("/Contents "+QString::number(Seite.ObjNum)+" 0 R\n");
if ((Options.Version >= PDFOptions::PDFVersion_14) || (Options.Version == PDFOptions::PDFVersion_X4)) // && (Transpar.count() != 0))
@@ -3195,9 +3195,9 @@
/*if (!pag->MPageNam.isEmpty())
{*/
getBleeds(ActPageP, bleedLeft, bleedRight, bleedBottom, bleedTop);
- PutPage("1 0 0 1 "+FToStr(bleedLeft+markOffs)+" "+FToStr(Options.bleeds.Bottom+markOffs)+" cm\n");
+ PutPage("1 0 0 1 "+FToStr(bleedLeft+markOffs)+" "+FToStr(Options.bleeds.bottom()+markOffs)+" cm\n");
bleedDisplacementX = bleedLeft+markOffs;
- bleedDisplacementY = Options.bleeds.Bottom+markOffs;
+ bleedDisplacementY = Options.bleeds.bottom()+markOffs;
/*}*/
//#9385 : clip to BleedBox
if ((Options.cropMarks) || (Options.bleedMarks) || (Options.registrationMarks) || (Options.colorMarks) || (Options.docInfoMarks))
@@ -3212,9 +3212,9 @@
PutPage("1 0 0 -1 0 "+FToStr(ActPageP->height())+" cm\n");
if (clip)
{
- double maxBoxX = ActPageP->width() - ActPageP->Margins.Right - ActPageP->Margins.Left;
- double maxBoxY = ActPageP->height() - ActPageP->Margins.Top - ActPageP->Margins.Bottom;
- PutPage(FToStr(ActPageP->Margins.Left)+" "+FToStr(ActPageP->Margins.Bottom)+" "+FToStr(maxBoxX)+" "+FToStr(maxBoxY)+" re W n\n");
+ double maxBoxX = ActPageP->width() - ActPageP->Margins.right() - ActPageP->Margins.left();
+ double maxBoxY = ActPageP->height() - ActPageP->Margins.top() - ActPageP->Margins.bottom();
+ PutPage(FToStr(ActPageP->Margins.left())+" "+FToStr(ActPageP->Margins.bottom())+" "+FToStr(maxBoxX)+" "+FToStr(maxBoxY)+" re W n\n");
// PutPage("0 0 "+FToStr(ActPageP->width())+" "+FToStr(ActPageP->height())+" re W n\n");
}
//CB *2 because the Pitems count loop runs twice.. y.. dunno.
@@ -3338,8 +3338,8 @@
double bleedLeft = 0.0;
getBleeds(ActPageP, bleedLeft, bleedRight);
double maxBoxX = ActPageP->width()+bleedRight+bleedLeft;
- double maxBoxY = ActPageP->height()+Options.bleeds.Top+Options.bleeds.Bottom;
- PutDoc("/BBox [ "+FToStr(-bleedLeft)+" "+FToStr(-Options.bleeds.Bottom)+" "+FToStr(maxBoxX)+" "+FToStr(maxBoxY)+" ]\n");
+ double maxBoxY = ActPageP->height()+Options.bleeds.top()+Options.bleeds.bottom();
+ PutDoc("/BBox [ "+FToStr(-bleedLeft)+" "+FToStr(-Options.bleeds.bottom())+" "+FToStr(maxBoxX)+" "+FToStr(maxBoxY)+" ]\n");
PutDoc("/Group "+QString::number(Gobj)+" 0 R\n");
if (Options.Compress)
inh = CompressStr(&inh);
@@ -3394,7 +3394,7 @@
double bleedLeft = 0.0;
getBleeds(ActPageP, bleedLeft, bleedRight);
double maxBoxX = ActPageP->width()+bleedRight+bleedLeft;
- double maxBoxY = ActPageP->height()+Options.bleeds.Top+Options.bleeds.Bottom;
+ double maxBoxY = ActPageP->height()+Options.bleeds.top()+Options.bleeds.bottom();
if (controlItem != NULL)
{
double scaleW, scaleH;
@@ -3426,7 +3426,7 @@
}
}
else
- PutDoc("/BBox [ "+FToStr(-bleedLeft)+" "+FToStr(-Options.bleeds.Bottom)+" "+FToStr(maxBoxX)+" "+FToStr(maxBoxY)+" ]\n");
+ PutDoc("/BBox [ "+FToStr(-bleedLeft)+" "+FToStr(-Options.bleeds.bottom())+" "+FToStr(maxBoxX)+" "+FToStr(maxBoxY)+" ]\n");
PutDoc("/Group "+QString::number(Gobj)+" 0 R\n");
PutDoc("/Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI]\n");
if ((Seite.ImgObjects.count() != 0) || (Seite.XObjects.count() != 0))
@@ -6108,18 +6108,18 @@
{
MarginStruct values;
doc.getBleeds(page, Options.bleeds, values);
- left = values.Left;
- right = values.Right;
+ left = values.left();
+ right = values.right();
}
void PDFLibCore::getBleeds(const ScPage* page, double &left, double &right, double &bottom, double& top)
{
MarginStruct values;
doc.getBleeds(page, Options.bleeds, values);
- left = values.Left;
- right = values.Right;
- bottom = values.Bottom;
- top = values.Top;
+ left = values.left();
+ right = values.right();
+ bottom = values.bottom();
+ top = values.top();
}
QString PDFLibCore::PDF_TransparenzFill(PageItem *currItem)
Modified: trunk/Scribus/scribus/pdfoptionsio.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/pdfoptionsio.cpp
==============================================================================
--- trunk/Scribus/scribus/pdfoptionsio.cpp (original)
+++ trunk/Scribus/scribus/pdfoptionsio.cpp Thu Feb 19 13:59:32 2015
@@ -153,10 +153,10 @@
addElem(m_root, "printProf", m_opts->PrintProf);
addElem(m_root, "info", m_opts->Info);
addElem(m_root, "intent", m_opts->Intent);
- addElem(m_root, "bleedTop", m_opts->bleeds.Top);
- addElem(m_root, "bleedLeft", m_opts->bleeds.Left);
- addElem(m_root, "bleedRight", m_opts->bleeds.Right);
- addElem(m_root, "bleedBottom", m_opts->bleeds.Bottom);
+ addElem(m_root, "bleedTop", m_opts->bleeds.top());
+ addElem(m_root, "bleedLeft", m_opts->bleeds.left());
+ addElem(m_root, "bleedRight", m_opts->bleeds.right());
+ addElem(m_root, "bleedBottom", m_opts->bleeds.bottom());
addElem(m_root, "encrypt", m_opts->Encrypt);
addElem(m_root, "passOwner", m_includePasswords ? m_opts->PassOwner : "");
addElem(m_root, "passUser", m_includePasswords ? m_opts->PassUser : "");
@@ -399,14 +399,26 @@
return false;
if (!readElem(m_root, "intent", &m_opts->Intent))
return false;
- if (!readElem(m_root, "bleedTop", &m_opts->bleeds.Top))
- return false;
- if (!readElem(m_root, "bleedLeft", &m_opts->bleeds.Left))
- return false;
- if (!readElem(m_root, "bleedRight", &m_opts->bleeds.Right))
- return false;
- if (!readElem(m_root, "bleedBottom", &m_opts->bleeds.Bottom))
- return false;
+ double d=0.0;
+ if (!readElem(m_root, "bleedTop", &d))
+ return false;
+ else
+ m_opts->bleeds.setTop(d);
+ d=0.0;
+ if (!readElem(m_root, "bleedLeft", &d))
+ return false;
+ else
+ m_opts->bleeds.setLeft(d);
+ d=0.0;
+ if (!readElem(m_root, "bleedBottom", &d))
+ return false;
+ else
+ m_opts->bleeds.setBottom(d);
+ d=0.0;
+ if (!readElem(m_root, "bleedRight", &d))
+ return false;
+ else
+ m_opts->bleeds.setRight(d);
if (!readElem(m_root, "encrypt", &m_opts->Encrypt))
return false;
if (!readElem(m_root, "passOwner", &m_opts->PassOwner))
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Thu Feb 19 13:59:32 2015
@@ -777,10 +777,10 @@
else
m_Doc->setPageWidth(ScCLocale::toDoubleC(dc.attribute("PAGEWITH")));
m_Doc->setPageHeight(ScCLocale::toDoubleC(dc.attribute("PAGEHEIGHT")));
- m_Doc->margins()->Left=qMax(0.0, ScCLocale::toDoubleC(dc.attribute("BORDERLEFT")));
- m_Doc->margins()->Right=qMax(0.0, ScCLocale::toDoubleC(dc.attribute("BORDERRIGHT")));
- m_Doc->margins()->Top=qMax(0.0, ScCLocale::toDoubleC(dc.attribute("BORDERTOP")));
- m_Doc->margins()->Bottom=qMax(0.0, ScCLocale::toDoubleC(dc.attribute("BORDERBOTTOM")));
+ m_Doc->margins()->setLeft(qMax(0.0, ScCLocale::toDoubleC(dc.attribute("BORDERLEFT"))));
+ m_Doc->margins()->setRight(qMax(0.0, ScCLocale::toDoubleC(dc.attribute("BORDERRIGHT"))));
+ m_Doc->margins()->setTop(qMax(0.0, ScCLocale::toDoubleC(dc.attribute("BORDERTOP"))));
+ m_Doc->margins()->setBottom(qMax(0.0, ScCLocale::toDoubleC(dc.attribute("BORDERBOTTOM"))));
m_Doc->setMarginPreset(dc.attribute("PRESET", "0").toInt());
m_Doc->setPageOrientation(dc.attribute("ORIENTATION", "0").toInt());
m_Doc->setPageSize(dc.attribute("PAGESIZE"));
@@ -1193,10 +1193,10 @@
m_Doc->pdfOptions().ImageProf = pg.attribute("ImageP", "");
m_Doc->pdfOptions().PrintProf = pg.attribute("PrintP", "");
m_Doc->pdfOptions().Info = pg.attribute("InfoString", "");
- m_Doc->pdfOptions().bleeds.Top = ScCLocale::toDoubleC(pg.attribute("BTop"), 0.0);
- m_Doc->pdfOptions().bleeds.Left = ScCLocale::toDoubleC(pg.attribute("BLeft"), 0.0);
- m_Doc->pdfOptions().bleeds.Right = ScCLocale::toDoubleC(pg.attribute("BRight"), 0.0);
- m_Doc->pdfOptions().bleeds.Bottom = ScCLocale::toDoubleC(pg.attribute("BBottom"), 0.0);
+ m_Doc->pdfOptions().bleeds.setTop(ScCLocale::toDoubleC(pg.attribute("BTop"), 0.0));
+ m_Doc->pdfOptions().bleeds.setLeft(ScCLocale::toDoubleC(pg.attribute("BLeft"), 0.0));
+ m_Doc->pdfOptions().bleeds.setRight(ScCLocale::toDoubleC(pg.attribute("BRight"), 0.0));
+ m_Doc->pdfOptions().bleeds.setBottom(ScCLocale::toDoubleC(pg.attribute("BBottom"), 0.0));
m_Doc->pdfOptions().EmbeddedI = static_cast<bool>(pg.attribute("ImagePr", "0").toInt());
m_Doc->pdfOptions().PassOwner = pg.attribute("PassOwner", "");
m_Doc->pdfOptions().PassUser = pg.attribute("PassUser", "");
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Thu Feb 19 13:59:32 2015
@@ -859,15 +859,15 @@
else
m_Doc->setPageWidth(attrs.valueAsDouble("PAGEWITH"));
m_Doc->setPageHeight(attrs.valueAsDouble("PAGEHEIGHT"));
- m_Doc->margins()->Left = qMax(0.0, attrs.valueAsDouble("BORDERLEFT"));
- m_Doc->margins()->Right = qMax(0.0, attrs.valueAsDouble("BORDERRIGHT"));
- m_Doc->margins()->Top = qMax(0.0, attrs.valueAsDouble("BORDERTOP"));
- m_Doc->margins()->Bottom= qMax(0.0, attrs.valueAsDouble("BORDERBOTTOM"));
+ m_Doc->margins()->setLeft(qMax(0.0, attrs.valueAsDouble("BORDERLEFT")));
+ m_Doc->margins()->setRight(qMax(0.0, attrs.valueAsDouble("BORDERRIGHT")));
+ m_Doc->margins()->setTop(qMax(0.0, attrs.valueAsDouble("BORDERTOP")));
+ m_Doc->margins()->setBottom(qMax(0.0, attrs.valueAsDouble("BORDERBOTTOM")));
m_Doc->setMarginPreset(attrs.valueAsInt("PRESET", 0));
- m_Doc->bleeds()->Top = attrs.valueAsDouble("BleedTop", 0.0);
- m_Doc->bleeds()->Left = attrs.valueAsDouble("BleedLeft", 0.0);
- m_Doc->bleeds()->Right = attrs.valueAsDouble("BleedRight", 0.0);
- m_Doc->bleeds()->Bottom = attrs.valueAsDouble("BleedBottom", 0.0);
+ m_Doc->bleeds()->setTop(attrs.valueAsDouble("BleedTop", 0.0));
+ m_Doc->bleeds()->setLeft(attrs.valueAsDouble("BleedLeft", 0.0));
+ m_Doc->bleeds()->setRight(attrs.valueAsDouble("BleedRight", 0.0));
+ m_Doc->bleeds()->setBottom(attrs.valueAsDouble("BleedBottom", 0.0));
m_Doc->setHyphAutomatic(attrs.valueAsBool("AUTOMATIC", true));
m_Doc->setHyphAutoCheck(attrs.valueAsBool("AUTOCHECK", false));
m_Doc->GuideLock = attrs.valueAsBool("GUIDELOCK", false);
@@ -1546,10 +1546,10 @@
doc->pdfOptions().ImageProf = attrs.valueAsString("ImageP", "");
doc->pdfOptions().PrintProf = attrs.valueAsString("PrintP", "");
doc->pdfOptions().Info = attrs.valueAsString("InfoString", "");
- doc->pdfOptions().bleeds.Top = attrs.valueAsDouble("BTop", 0.0);
- doc->pdfOptions().bleeds.Left = attrs.valueAsDouble("BLeft", 0.0);
- doc->pdfOptions().bleeds.Right = attrs.valueAsDouble("BRight", 0.0);
- doc->pdfOptions().bleeds.Bottom = attrs.valueAsDouble("BBottom", 0.0);
+ doc->pdfOptions().bleeds.setTop(attrs.valueAsDouble("BTop", 0.0));
+ doc->pdfOptions().bleeds.setLeft(attrs.valueAsDouble("BLeft", 0.0));
+ doc->pdfOptions().bleeds.setRight(attrs.valueAsDouble("BRight", 0.0));
+ doc->pdfOptions().bleeds.setBottom(attrs.valueAsDouble("BBottom", 0.0));
doc->pdfOptions().useDocBleeds = attrs.valueAsBool("useDocBleeds", true);
doc->pdfOptions().cropMarks = attrs.valueAsBool("cropMarks", false);
doc->pdfOptions().bleedMarks = attrs.valueAsBool("bleedMarks", false);
@@ -1649,10 +1649,10 @@
doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PSLevel", 3);
doc->Print_Options.markLength = attrs.valueAsDouble("markLength");
doc->Print_Options.markOffset = attrs.valueAsDouble("markOffset");
- doc->Print_Options.bleeds.Top = attrs.valueAsDouble("BleedTop");
- doc->Print_Options.bleeds.Left = attrs.valueAsDouble("BleedLeft");
- doc->Print_Options.bleeds.Right = attrs.valueAsDouble("BleedRight");
- doc->Print_Options.bleeds.Bottom = attrs.valueAsDouble("BleedBottom");
+ doc->Print_Options.bleeds.setTop(attrs.valueAsDouble("BleedTop"));
+ doc->Print_Options.bleeds.setLeft(attrs.valueAsDouble("BleedLeft"));
+ doc->Print_Options.bleeds.setRight(attrs.valueAsDouble("BleedRight"));
+ doc->Print_Options.bleeds.setBottom(attrs.valueAsDouble("BleedBottom"));
doc->Print_Options.printer = attrs.valueAsString("printer");
doc->Print_Options.filename = attrs.valueAsString("filename");
doc->Print_Options.separationName = attrs.valueAsString("separationName");
@@ -1824,13 +1824,13 @@
newPage->setHeight(attrs.valueAsDouble("PAGEHEIGHT"));
newPage->setInitialHeight(newPage->height());
newPage->setInitialWidth(newPage->width());
- newPage->initialMargins.Top = qMax(0.0, attrs.valueAsDouble("BORDERTOP"));
- newPage->initialMargins.Bottom = qMax(0.0, attrs.valueAsDouble("BORDERBOTTOM"));
- newPage->initialMargins.Left = qMax(0.0, attrs.valueAsDouble("BORDERLEFT"));
- newPage->initialMargins.Right = qMax(0.0, attrs.valueAsDouble("BORDERRIGHT"));
+ newPage->initialMargins.setTop(qMax(0.0, attrs.valueAsDouble("BORDERTOP")));
+ newPage->initialMargins.setBottom(qMax(0.0, attrs.valueAsDouble("BORDERBOTTOM")));
+ newPage->initialMargins.setLeft(qMax(0.0, attrs.valueAsDouble("BORDERLEFT")));
+ newPage->initialMargins.setRight(qMax(0.0, attrs.valueAsDouble("BORDERRIGHT")));
newPage->marginPreset = attrs.valueAsInt("PRESET", 0);
- newPage->Margins.Top = newPage->initialMargins.Top;
- newPage->Margins.Bottom = newPage->initialMargins.Bottom;
+ newPage->Margins.setTop(newPage->initialMargins.top());
+ newPage->Margins.setBottom(newPage->initialMargins.bottom());
m_Doc->setMasterPageMode(false);
//m_Doc->Pages=&m_Doc->DocPages;
// guides reading
@@ -3247,13 +3247,13 @@
newPage->setHeight( attrs.valueAsDouble("PAGEHEIGHT") );
newPage->setInitialHeight(newPage->height());
newPage->setInitialWidth(newPage->width());
- newPage->initialMargins.Top = qMax(0.0, attrs.valueAsDouble("BORDERTOP"));
- newPage->initialMargins.Bottom = qMax(0.0, attrs.valueAsDouble("BORDERBOTTOM"));
- newPage->initialMargins.Left = qMax(0.0, attrs.valueAsDouble("BORDERLEFT"));
- newPage->initialMargins.Right = qMax(0.0, attrs.valueAsDouble("BORDERRIGHT"));
+ newPage->initialMargins.setTop(qMax(0.0, attrs.valueAsDouble("BORDERTOP")));
+ newPage->initialMargins.setBottom(qMax(0.0, attrs.valueAsDouble("BORDERBOTTOM")));
+ newPage->initialMargins.setLeft(qMax(0.0, attrs.valueAsDouble("BORDERLEFT")));
+ newPage->initialMargins.setRight(qMax(0.0, attrs.valueAsDouble("BORDERRIGHT")));
newPage->marginPreset = attrs.valueAsInt("PRESET", 0);
- newPage->Margins.Top = newPage->initialMargins.Top;
- newPage->Margins.Bottom = newPage->initialMargins.Bottom;
+ newPage->Margins.setTop(newPage->initialMargins.top());
+ newPage->Margins.setBottom(newPage->initialMargins.bottom());
pageX = attrs.valueAsDouble("PAGEXPOS");
pageY = attrs.valueAsDouble("PAGEYPOS");
// guides reading
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp Thu Feb 19 13:59:32 2015
@@ -348,10 +348,10 @@
else
m_Doc->setPageWidth(ScCLocale::toDoubleC(dc.attribute("PAGEWITH")));
m_Doc->setPageHeight(ScCLocale::toDoubleC(dc.attribute("PAGEHEIGHT")));
- m_Doc->margins()->Left = qMax(0.0, ScCLocale::toDoubleC("BORDERLEFT"));
- m_Doc->margins()->Right = qMax(0.0, ScCLocale::toDoubleC("BORDERRIGHT"));
- m_Doc->margins()->Top = qMax(0.0, ScCLocale::toDoubleC("BORDERTOP"));
- m_Doc->margins()->Bottom= qMax(0.0, ScCLocale::toDoubleC("BORDERBOTTOM"));
+ m_Doc->margins()->setLeft(qMax(0.0, ScCLocale::toDoubleC("BORDERLEFT")));
+ m_Doc->margins()->setRight(qMax(0.0, ScCLocale::toDoubleC("BORDERRIGHT")));
+ m_Doc->margins()->setTop(qMax(0.0, ScCLocale::toDoubleC("BORDERTOP")));
+ m_Doc->margins()->setBottom(qMax(0.0, ScCLocale::toDoubleC("BORDERBOTTOM")));
m_Doc->setMarginPreset(dc.attribute("PRESET", "0").toInt());
m_Doc->setHyphAutomatic(static_cast<bool>(dc.attribute("AUTOMATIC", "1").toInt()));
m_Doc->setHyphAutoCheck(static_cast<bool>(dc.attribute("AUTOCHECK", "0").toInt()));
@@ -651,10 +651,10 @@
m_Doc->pdfOptions().ImageProf = pg.attribute("ImageP", "");
m_Doc->pdfOptions().PrintProf = pg.attribute("PrintP", "");
m_Doc->pdfOptions().Info = pg.attribute("InfoString", "");
- m_Doc->pdfOptions().bleeds.Top = ScCLocale::toDoubleC(pg.attribute("BTop"), 0.0);
- m_Doc->pdfOptions().bleeds.Left = ScCLocale::toDoubleC(pg.attribute("BLeft"), 0.0);
- m_Doc->pdfOptions().bleeds.Right = ScCLocale::toDoubleC(pg.attribute("BRight"), 0.0);
- m_Doc->pdfOptions().bleeds.Bottom = ScCLocale::toDoubleC(pg.attribute("BBottom"), 0.0);
+ m_Doc->pdfOptions().bleeds.setTop(ScCLocale::toDoubleC(pg.attribute("BTop"), 0.0));
+ m_Doc->pdfOptions().bleeds.setLeft(ScCLocale::toDoubleC(pg.attribute("BLeft"), 0.0));
+ m_Doc->pdfOptions().bleeds.setRight(ScCLocale::toDoubleC(pg.attribute("BRight"), 0.0));
+ m_Doc->pdfOptions().bleeds.setBottom(ScCLocale::toDoubleC(pg.attribute("BBottom"), 0.0));
m_Doc->pdfOptions().EmbeddedI = static_cast<bool>(pg.attribute("ImagePr", "0").toInt());
m_Doc->pdfOptions().PassOwner = pg.attribute("PassOwner", "");
m_Doc->pdfOptions().PassUser = pg.attribute("PassUser", "");
@@ -829,13 +829,13 @@
Apage->setHeight( ScCLocale::toDoubleC(pg.attribute("PAGEHEIGHT")) );
Apage->setInitialHeight(Apage->height());
Apage->setInitialWidth(Apage->width());
- Apage->initialMargins.Top = qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERTOP")));
- Apage->initialMargins.Bottom = qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERBOTTOM")));
- Apage->initialMargins.Left = qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERLEFT")));
- Apage->initialMargins.Right = qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERRIGHT")));
+ Apage->initialMargins.setTop(qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERTOP"))));
+ Apage->initialMargins.setBottom(qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERBOTTOM"))));
+ Apage->initialMargins.setLeft(qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERLEFT"))));
+ Apage->initialMargins.setRight(qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERRIGHT"))));
Apage->marginPreset = pg.attribute("PRESET", "0").toInt();
- Apage->Margins.Top = Apage->initialMargins.Top;
- Apage->Margins.Bottom = Apage->initialMargins.Bottom;
+ Apage->Margins.setTop(Apage->initialMargins.top());
+ Apage->Margins.setBottom(Apage->initialMargins.bottom());
m_Doc->setMasterPageMode(false);
// guides reading
tmp = "";
@@ -2203,13 +2203,13 @@
Apage->setHeight(ScCLocale::toDoubleC(pg.attribute("PAGEHEIGHT")));
Apage->setInitialHeight(Apage->height());
Apage->setInitialWidth(Apage->width());
- Apage->initialMargins.Top = qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERTOP")));
- Apage->initialMargins.Bottom = qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERBOTTOM")));
- Apage->initialMargins.Left = qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERLEFT")));
- Apage->initialMargins.Right = qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERRIGHT")));
+ Apage->initialMargins.setTop(qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERTOP"))));
+ Apage->initialMargins.setBottom(qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERBOTTOM"))));
+ Apage->initialMargins.setLeft(qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERLEFT"))));
+ Apage->initialMargins.setRight(qMax(0.0, ScCLocale::toDoubleC(pg.attribute("BORDERRIGHT"))));
Apage->marginPreset = pg.attribute("PRESET", "0").toInt();
- Apage->Margins.Top = Apage->initialMargins.Top;
- Apage->Margins.Bottom = Apage->initialMargins.Bottom;
+ Apage->Margins.setTop(Apage->initialMargins.top());
+ Apage->Margins.setBottom(Apage->initialMargins.bottom());
pageX = ScCLocale::toDoubleC(pg.attribute("PAGEXPOS"));
pageY = ScCLocale::toDoubleC(pg.attribute("PAGEYPOS"));
// guides reading
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Thu Feb 19 13:59:32 2015
@@ -2059,15 +2059,15 @@
else
m_Doc->setPageWidth(attrs.valueAsDouble("PAGEWITH"));
m_Doc->setPageHeight(attrs.valueAsDouble("PAGEHEIGHT"));
- m_Doc->margins()->Left = qMax(0.0, attrs.valueAsDouble("BORDERLEFT"));
- m_Doc->margins()->Right = qMax(0.0, attrs.valueAsDouble("BORDERRIGHT"));
- m_Doc->margins()->Top = qMax(0.0, attrs.valueAsDouble("BORDERTOP"));
- m_Doc->margins()->Bottom= qMax(0.0, attrs.valueAsDouble("BORDERBOTTOM"));
+ m_Doc->margins()->setLeft(qMax(0.0, attrs.valueAsDouble("BORDERLEFT")));
+ m_Doc->margins()->setRight(qMax(0.0, attrs.valueAsDouble("BORDERRIGHT")));
+ m_Doc->margins()->setTop(qMax(0.0, attrs.valueAsDouble("BORDERTOP")));
+ m_Doc->margins()->setBottom(qMax(0.0, attrs.valueAsDouble("BORDERBOTTOM")));
m_Doc->setMarginPreset(attrs.valueAsInt("PRESET", 0));
- m_Doc->bleeds()->Top = attrs.valueAsDouble("BleedTop", 0.0);
- m_Doc->bleeds()->Left = attrs.valueAsDouble("BleedLeft", 0.0);
- m_Doc->bleeds()->Right = attrs.valueAsDouble("BleedRight", 0.0);
- m_Doc->bleeds()->Bottom = attrs.valueAsDouble("BleedBottom", 0.0);
+ m_Doc->bleeds()->setTop(attrs.valueAsDouble("BleedTop", 0.0));
+ m_Doc->bleeds()->setLeft(attrs.valueAsDouble("BleedLeft", 0.0));
+ m_Doc->bleeds()->setRight(attrs.valueAsDouble("BleedRight", 0.0));
+ m_Doc->bleeds()->setBottom(attrs.valueAsDouble("BleedBottom", 0.0));
m_Doc->setHyphAutomatic(attrs.valueAsBool("AUTOMATIC", true));
m_Doc->setHyphAutoCheck(attrs.valueAsBool("AUTOCHECK", false));
m_Doc->GuideLock = attrs.valueAsBool("GUIDELOCK", false);
@@ -3101,10 +3101,10 @@
doc->pdfOptions().ImageProf = attrs.valueAsString("ImageP", "");
doc->pdfOptions().PrintProf = attrs.valueAsString("PrintP", "");
doc->pdfOptions().Info = attrs.valueAsString("InfoString", "");
- doc->pdfOptions().bleeds.Top = attrs.valueAsDouble("BTop", 0.0);
- doc->pdfOptions().bleeds.Left = attrs.valueAsDouble("BLeft", 0.0);
- doc->pdfOptions().bleeds.Right = attrs.valueAsDouble("BRight", 0.0);
- doc->pdfOptions().bleeds.Bottom = attrs.valueAsDouble("BBottom", 0.0);
+ doc->pdfOptions().bleeds.setTop(attrs.valueAsDouble("BTop", 0.0));
+ doc->pdfOptions().bleeds.setLeft(attrs.valueAsDouble("BLeft", 0.0));
+ doc->pdfOptions().bleeds.setRight(attrs.valueAsDouble("BRight", 0.0));
+ doc->pdfOptions().bleeds.setBottom(attrs.valueAsDouble("BBottom", 0.0));
doc->pdfOptions().useDocBleeds = attrs.valueAsBool("useDocBleeds", true);
doc->pdfOptions().cropMarks = attrs.valueAsBool("cropMarks", false);
doc->pdfOptions().bleedMarks = attrs.valueAsBool("bleedMarks", false);
@@ -3205,10 +3205,10 @@
doc->Print_Options.prnEngine = (PrintEngine) attrs.valueAsInt("PSLevel", 3);
doc->Print_Options.markLength = attrs.valueAsDouble("markLength");
doc->Print_Options.markOffset = attrs.valueAsDouble("markOffset");
- doc->Print_Options.bleeds.Top = attrs.valueAsDouble("BleedTop");
- doc->Print_Options.bleeds.Left = attrs.valueAsDouble("BleedLeft");
- doc->Print_Options.bleeds.Right = attrs.valueAsDouble("BleedRight");
- doc->Print_Options.bleeds.Bottom = attrs.valueAsDouble("BleedBottom");
+ doc->Print_Options.bleeds.setTop(attrs.valueAsDouble("BleedTop"));
+ doc->Print_Options.bleeds.setLeft(attrs.valueAsDouble("BleedLeft"));
+ doc->Print_Options.bleeds.setRight(attrs.valueAsDouble("BleedRight"));
+ doc->Print_Options.bleeds.setBottom(attrs.valueAsDouble("BleedBottom"));
doc->Print_Options.printer = attrs.valueAsString("printer");
doc->Print_Options.filename = attrs.valueAsString("filename");
doc->Print_Options.separationName = attrs.valueAsString("separationName");
@@ -3552,13 +3552,13 @@
newPage->setHeight(attrs.valueAsDouble("PAGEHEIGHT"));
newPage->setInitialHeight(newPage->height());
newPage->setInitialWidth(newPage->width());
- newPage->initialMargins.Top = qMax(0.0, attrs.valueAsDouble("BORDERTOP"));
- newPage->initialMargins.Bottom = qMax(0.0, attrs.valueAsDouble("BORDERBOTTOM"));
- newPage->initialMargins.Left = qMax(0.0, attrs.valueAsDouble("BORDERLEFT"));
- newPage->initialMargins.Right = qMax(0.0, attrs.valueAsDouble("BORDERRIGHT"));
+ newPage->initialMargins.setTop(qMax(0.0, attrs.valueAsDouble("BORDERTOP")));
+ newPage->initialMargins.setBottom(qMax(0.0, attrs.valueAsDouble("BORDERBOTTOM")));
+ newPage->initialMargins.setLeft(qMax(0.0, attrs.valueAsDouble("BORDERLEFT")));
+ newPage->initialMargins.setRight(qMax(0.0, attrs.valueAsDouble("BORDERRIGHT")));
newPage->marginPreset = attrs.valueAsInt("PRESET", 0);
- newPage->Margins.Top = newPage->initialMargins.Top;
- newPage->Margins.Bottom = newPage->initialMargins.Bottom;
+ newPage->Margins.setTop(newPage->initialMargins.top());
+ newPage->Margins.setBottom(newPage->initialMargins.bottom());
m_Doc->setMasterPageMode(false);
//m_Doc->Pages=&m_Doc->DocPages;
// guides reading
@@ -5973,12 +5973,12 @@
ss->set("HEIGHT_OLD", newPage->height());
ss->set("INIT_HEIGHT_OLD", newPage->initialHeight());
ss->set("INIT_WIDTH_OLD", newPage->initialWidth());
- ss->set("INIT_MARGINTOP_OLD", newPage->initialMargins.Top);
- ss->set("INIT_MARGINBOTTOM_OLD", newPage->initialMargins.Bottom);
- ss->set("INIT_MARGINRIGHT_OLD", newPage->initialMargins.Right);
- ss->set("INIT_MARGINLEFT_OLD", newPage->initialMargins.Left);
- ss->set("MARGINTOP_OLD", newPage->Margins.Top);
- ss->set("MARGINBOTTOM_OLD", newPage->Margins.Bottom);
+ ss->set("INIT_MARGINTOP_OLD", newPage->initialMargins.top());
+ ss->set("INIT_MARGINBOTTOM_OLD", newPage->initialMargins.bottom());
+ ss->set("INIT_MARGINRIGHT_OLD", newPage->initialMargins.right());
+ ss->set("INIT_MARGINLEFT_OLD", newPage->initialMargins.left());
+ ss->set("MARGINTOP_OLD", newPage->Margins.top());
+ ss->set("MARGINBOTTOM_OLD", newPage->Margins.bottom());
ss->set("MARGINPRESET_OLD", newPage->marginPreset);
ss->set("HORIZONTAL_AUTOGAP_OLD", newPage->guides.horizontalAutoGap());
ss->set("VERTICAL_AUTOGAP_OLD", newPage->guides.verticalAutoGap());
@@ -6007,13 +6007,13 @@
newPage->setHeight( attrs.valueAsDouble("PAGEHEIGHT") );
newPage->setInitialHeight(newPage->height());
newPage->setInitialWidth(newPage->width());
- newPage->initialMargins.Top = qMax(0.0, attrs.valueAsDouble("BORDERTOP"));
- newPage->initialMargins.Bottom = qMax(0.0, attrs.valueAsDouble("BORDERBOTTOM"));
- newPage->initialMargins.Left = qMax(0.0, attrs.valueAsDouble("BORDERLEFT"));
- newPage->initialMargins.Right = qMax(0.0, attrs.valueAsDouble("BORDERRIGHT"));
+ newPage->initialMargins.setTop(qMax(0.0, attrs.valueAsDouble("BORDERTOP")));
+ newPage->initialMargins.setBottom(qMax(0.0, attrs.valueAsDouble("BORDERBOTTOM")));
+ newPage->initialMargins.setLeft(qMax(0.0, attrs.valueAsDouble("BORDERLEFT")));
+ newPage->initialMargins.setRight(qMax(0.0, attrs.valueAsDouble("BORDERRIGHT")));
newPage->marginPreset = attrs.valueAsInt("PRESET", 0);
- newPage->Margins.Top = newPage->initialMargins.Top;
- newPage->Margins.Bottom = newPage->initialMargins.Bottom;
+ newPage->Margins.setTop(newPage->initialMargins.top());
+ newPage->Margins.setBottom(newPage->initialMargins.bottom());
pageX = attrs.valueAsDouble("PAGEXPOS");
pageY = attrs.valueAsDouble("PAGEYPOS");
@@ -6046,12 +6046,12 @@
ss->set("HEIGHT", newPage->height());
ss->set("INIT_HEIGHT", newPage->initialHeight());
ss->set("INIT_WIDTH", newPage->initialWidth());
- ss->set("INIT_MARGINTOP", newPage->initialMargins.Top);
- ss->set("INIT_MARGINBOTTOM", newPage->initialMargins.Bottom);
- ss->set("INIT_MARGINRIGHT", newPage->initialMargins.Right);
- ss->set("INIT_MARGINLEFT", newPage->initialMargins.Left);
- ss->set("MARGINTOP", newPage->Margins.Top);
- ss->set("MARGINBOTTOM", newPage->Margins.Bottom);
+ ss->set("INIT_MARGINTOP", newPage->initialMargins.top());
+ ss->set("INIT_MARGINBOTTOM", newPage->initialMargins.bottom());
+ ss->set("INIT_MARGINRIGHT", newPage->initialMargins.right());
+ ss->set("INIT_MARGINLEFT", newPage->initialMargins.left());
+ ss->set("MARGINTOP", newPage->Margins.top());
+ ss->set("MARGINBOTTOM", newPage->Margins.bottom());
ss->set("MARGINPRESET", newPage->marginPreset);
ss->set("HORIZONTAL_AUTOGAP", newPage->guides.horizontalAutoGap());
ss->set("VERTICAL_AUTOGAP", newPage->guides.verticalAutoGap());
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Thu Feb 19 13:59:32 2015
@@ -206,15 +206,15 @@
docu.writeAttribute("ANZPAGES" , m_Doc->DocPages.count());
docu.writeAttribute("PAGEWIDTH" , m_Doc->pageWidth());
docu.writeAttribute("PAGEHEIGHT" , m_Doc->pageHeight());
- docu.writeAttribute("BORDERLEFT" , m_Doc->margins()->Left);
- docu.writeAttribute("BORDERRIGHT" , m_Doc->margins()->Right);
- docu.writeAttribute("BORDERTOP" , m_Doc->margins()->Top);
- docu.writeAttribute("BORDERBOTTOM", m_Doc->margins()->Bottom);
+ docu.writeAttribute("BORDERLEFT" , m_Doc->margins()->left());
+ docu.writeAttribute("BORDERRIGHT" , m_Doc->margins()->right());
+ docu.writeAttribute("BORDERTOP" , m_Doc->margins()->top());
+ docu.writeAttribute("BORDERBOTTOM", m_Doc->margins()->bottom());
docu.writeAttribute("PRESET" , m_Doc->marginPreset());
- docu.writeAttribute("BleedTop" , m_Doc->bleeds()->Top);
- docu.writeAttribute("BleedLeft" , m_Doc->bleeds()->Left);
- docu.writeAttribute("BleedRight" , m_Doc->bleeds()->Right);
- docu.writeAttribute("BleedBottom" , m_Doc->bleeds()->Bottom);
+ docu.writeAttribute("BleedTop" , m_Doc->bleeds()->top());
+ docu.writeAttribute("BleedLeft" , m_Doc->bleeds()->left());
+ docu.writeAttribute("BleedRight" , m_Doc->bleeds()->right());
+ docu.writeAttribute("BleedBottom" , m_Doc->bleeds()->bottom());
docu.writeAttribute("ORIENTATION" , m_Doc->pageOrientation());
docu.writeAttribute("PAGESIZE" , m_Doc->pageSize());
docu.writeAttribute("FIRSTNUM" , m_Doc->FirstPnum);
@@ -326,10 +326,10 @@
docu.writeAttribute("spiralFactor", m_Doc->itemToolPrefs().spiralFactor);
docu.writeAttribute("AutoSave", static_cast<int>(m_Doc->autoSave()));
docu.writeAttribute("AutoSaveTime", m_Doc->autoSaveTime());
- docu.writeAttribute("ScratchBottom", m_Doc->scratch()->Bottom);
- docu.writeAttribute("ScratchLeft", m_Doc->scratch()->Left);
- docu.writeAttribute("ScratchRight", m_Doc->scratch()->Right);
- docu.writeAttribute("ScratchTop", m_Doc->scratch()->Top);
+ docu.writeAttribute("ScratchBottom", m_Doc->scratch()->bottom());
+ docu.writeAttribute("ScratchLeft", m_Doc->scratch()->left());
+ docu.writeAttribute("ScratchRight", m_Doc->scratch()->right());
+ docu.writeAttribute("ScratchTop", m_Doc->scratch()->top());
docu.writeAttribute("GapHorizontal", m_Doc->pageGapHorizontal());
docu.writeAttribute("GapVertical", m_Doc->pageGapVertical());
docu.writeAttribute("StartArrow", m_Doc->itemToolPrefs().lineStartArrow);
@@ -1038,10 +1038,10 @@
docu.writeAttribute("PDLanguage" , m_Doc->Print_Options.prnEngine);
docu.writeAttribute("markLength" , m_Doc->Print_Options.markLength);
docu.writeAttribute("markOffset" , m_Doc->Print_Options.markOffset);
- docu.writeAttribute("BleedTop" , m_Doc->Print_Options.bleeds.Top);
- docu.writeAttribute("BleedLeft" , m_Doc->Print_Options.bleeds.Left);
- docu.writeAttribute("BleedRight" , m_Doc->Print_Options.bleeds.Right);
- docu.writeAttribute("BleedBottom", m_Doc->Print_Options.bleeds.Bottom);
+ docu.writeAttribute("BleedTop" , m_Doc->Print_Options.bleeds.top());
+ docu.writeAttribute("BleedLeft" , m_Doc->Print_Options.bleeds.left());
+ docu.writeAttribute("BleedRight" , m_Doc->Print_Options.bleeds.right());
+ docu.writeAttribute("BleedBottom", m_Doc->Print_Options.bleeds.bottom());
docu.writeAttribute("printer" , m_Doc->Print_Options.printer);
docu.writeAttribute("filename", m_Doc->Print_Options.filename);
docu.writeAttribute("separationName", m_Doc->Print_Options.separationName);
@@ -1087,10 +1087,10 @@
docu.writeAttribute("ImageP", m_Doc->pdfOptions().ImageProf);
docu.writeAttribute("PrintP", m_Doc->pdfOptions().PrintProf);
docu.writeAttribute("InfoString", m_Doc->pdfOptions().Info);
- docu.writeAttribute("BTop", m_Doc->pdfOptions().bleeds.Top);
- docu.writeAttribute("BLeft", m_Doc->pdfOptions().bleeds.Left);
- docu.writeAttribute("BRight", m_Doc->pdfOptions().bleeds.Right);
- docu.writeAttribute("BBottom", m_Doc->pdfOptions().bleeds.Bottom);
+ docu.writeAttribute("BTop", m_Doc->pdfOptions().bleeds.top());
+ docu.writeAttribute("BLeft", m_Doc->pdfOptions().bleeds.left());
+ docu.writeAttribute("BRight", m_Doc->pdfOptions().bleeds.right());
+ docu.writeAttribute("BBottom", m_Doc->pdfOptions().bleeds.bottom());
docu.writeAttribute("useDocBleeds", static_cast<int>(m_Doc->pdfOptions().useDocBleeds));
docu.writeAttribute("cropMarks", static_cast<int>(m_Doc->pdfOptions().cropMarks));
docu.writeAttribute("bleedMarks", static_cast<int>(m_Doc->pdfOptions().bleedMarks));
@@ -1477,10 +1477,10 @@
docu.writeAttribute("PAGEYPOS",page->yOffset());
docu.writeAttribute("PAGEWIDTH",page->width());
docu.writeAttribute("PAGEHEIGHT",page->height());
- docu.writeAttribute("BORDERLEFT",page->initialMargins.Left);
- docu.writeAttribute("BORDERRIGHT",page->initialMargins.Right);
- docu.writeAttribute("BORDERTOP",page->initialMargins.Top);
- docu.writeAttribute("BORDERBOTTOM",page->initialMargins.Bottom);
+ docu.writeAttribute("BORDERLEFT",page->initialMargins.left());
+ docu.writeAttribute("BORDERRIGHT",page->initialMargins.right());
+ docu.writeAttribute("BORDERTOP",page->initialMargins.top());
+ docu.writeAttribute("BORDERBOTTOM",page->initialMargins.bottom());
docu.writeAttribute("NUM",page->pageNr());
docu.writeAttribute("NAM",page->pageName());
docu.writeAttribute("MNAM",page->MPageNam);
Modified: trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/import/idml/importidml.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/idml/importidml.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/idml/importidml.cpp Thu Feb 19 13:59:32 2015
@@ -1316,16 +1316,16 @@
void IdmlPlug::parsePreferencesXMLNode(const QDomElement& prNode)
{
- double topMargin = m_Doc->marginsVal().Top;
- double leftMargin = m_Doc->marginsVal().Left;
- double rightMargin = m_Doc->marginsVal().Right;
- double bottomMargin = m_Doc->marginsVal().Bottom;
+ double topMargin = m_Doc->marginsVal().top();
+ double leftMargin = m_Doc->marginsVal().left();
+ double rightMargin = m_Doc->marginsVal().right();
+ double bottomMargin = m_Doc->marginsVal().bottom();
double pgCols = m_Doc->PageSp;
double pgGap = m_Doc->PageSpa;
- double bleedTop = m_Doc->bleeds()->Top;
- double bleedLeft = m_Doc->bleeds()->Left;
- double bleedRight = m_Doc->bleeds()->Right;
- double bleedBottom = m_Doc->bleeds()->Bottom;
+ double bleedTop = m_Doc->bleeds()->top();
+ double bleedLeft = m_Doc->bleeds()->left();
+ double bleedRight = m_Doc->bleeds()->right();
+ double bleedBottom = m_Doc->bleeds()->bottom();
facingPages = false;
for (QDomNode n = prNode.firstChild(); !n.isNull(); n = n.nextSibling() )
{
@@ -1492,10 +1492,10 @@
m_Doc->currentPage()->setInitialWidth(docWidth);
m_Doc->currentPage()->setHeight(docHeight);
m_Doc->currentPage()->setWidth(docWidth);
- m_Doc->currentPage()->initialMargins.Top = topMargin;
- m_Doc->currentPage()->initialMargins.Bottom = bottomMargin;
- m_Doc->currentPage()->initialMargins.Left = leftMargin;
- m_Doc->currentPage()->initialMargins.Right = rightMargin;
+ m_Doc->currentPage()->initialMargins.setTop(topMargin);
+ m_Doc->currentPage()->initialMargins.setBottom(bottomMargin);
+ m_Doc->currentPage()->initialMargins.setLeft(leftMargin);
+ m_Doc->currentPage()->initialMargins.setRight(rightMargin);
m_Doc->reformPages(true);
baseX = m_Doc->currentPage()->xOffset();
baseY = m_Doc->currentPage()->yOffset() + m_Doc->currentPage()->height() / 2.0;
Modified: trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/import/odg/importodg.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/odg/importodg.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/odg/importodg.cpp Thu Feb 19 13:59:32 2015
@@ -469,10 +469,10 @@
m_Doc->currentPage()->setInitialWidth(tmpOStyle.page_width);
m_Doc->currentPage()->setHeight(tmpOStyle.page_height);
m_Doc->currentPage()->setWidth(tmpOStyle.page_width);
- m_Doc->currentPage()->initialMargins.Top = tmpOStyle.margin_top;
- m_Doc->currentPage()->initialMargins.Bottom = tmpOStyle.margin_bottom;
- m_Doc->currentPage()->initialMargins.Left = tmpOStyle.margin_left;
- m_Doc->currentPage()->initialMargins.Right = tmpOStyle.margin_right;
+ m_Doc->currentPage()->initialMargins.setTop(tmpOStyle.margin_top);
+ m_Doc->currentPage()->initialMargins.setBottom(tmpOStyle.margin_bottom);
+ m_Doc->currentPage()->initialMargins.setLeft(tmpOStyle.margin_left);
+ m_Doc->currentPage()->initialMargins.setRight(tmpOStyle.margin_right);
if (!backGroundStyle.isEmpty())
{
ObjStyle tmpBStyle;
@@ -595,10 +595,10 @@
m_Doc->currentPage()->setInitialWidth(tmpOStyle.page_width);
m_Doc->currentPage()->setHeight(tmpOStyle.page_height);
m_Doc->currentPage()->setWidth(tmpOStyle.page_width);
- m_Doc->currentPage()->initialMargins.Top = tmpOStyle.margin_top;
- m_Doc->currentPage()->initialMargins.Bottom = tmpOStyle.margin_bottom;
- m_Doc->currentPage()->initialMargins.Left = tmpOStyle.margin_left;
- m_Doc->currentPage()->initialMargins.Right = tmpOStyle.margin_right;
+ m_Doc->currentPage()->initialMargins.setTop(tmpOStyle.margin_top);
+ m_Doc->currentPage()->initialMargins.setBottom(tmpOStyle.margin_bottom);
+ m_Doc->currentPage()->initialMargins.setLeft(tmpOStyle.margin_left);
+ m_Doc->currentPage()->initialMargins.setRight(tmpOStyle.margin_right);
if (!currStyle.page_layout_name.value.isEmpty())
{
ObjStyle tmpBStyle;
@@ -680,10 +680,10 @@
m_Doc->currentPage()->setInitialWidth(docWidth);
m_Doc->currentPage()->setHeight(docHeight);
m_Doc->currentPage()->setWidth(docWidth);
- m_Doc->currentPage()->initialMargins.Top = topMargin;
- m_Doc->currentPage()->initialMargins.Bottom = bottomMargin;
- m_Doc->currentPage()->initialMargins.Left = leftMargin;
- m_Doc->currentPage()->initialMargins.Right = rightMargin;
+ m_Doc->currentPage()->initialMargins.setTop(topMargin);
+ m_Doc->currentPage()->initialMargins.setBottom(bottomMargin);
+ m_Doc->currentPage()->initialMargins.setLeft(leftMargin);
+ m_Doc->currentPage()->initialMargins.setRight(rightMargin);
m_Doc->reformPages(true);
}
else
@@ -694,10 +694,10 @@
m_Doc->currentPage()->setInitialWidth(docWidth);
m_Doc->currentPage()->setHeight(docHeight);
m_Doc->currentPage()->setWidth(docWidth);
- m_Doc->currentPage()->initialMargins.Top = topMargin;
- m_Doc->currentPage()->initialMargins.Bottom = bottomMargin;
- m_Doc->currentPage()->initialMargins.Left = leftMargin;
- m_Doc->currentPage()->initialMargins.Right = rightMargin;
+ m_Doc->currentPage()->initialMargins.setTop(topMargin);
+ m_Doc->currentPage()->initialMargins.setBottom(bottomMargin);
+ m_Doc->currentPage()->initialMargins.setLeft(leftMargin);
+ m_Doc->currentPage()->initialMargins.setRight(rightMargin);
m_Doc->currentPage()->MPageNam = CommonStrings::trMasterPageNormal;
m_Doc->view()->addPage(pagecount, true);
pagecount++;
Modified: trunk/Scribus/scribus/plugins/import/pages/importpages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/import/pages/importpages.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pages/importpages.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pages/importpages.cpp Thu Feb 19 13:59:32 2015
@@ -486,10 +486,10 @@
m_Doc->currentPage()->setInitialWidth(docWidth);
m_Doc->currentPage()->setHeight(docHeight);
m_Doc->currentPage()->setWidth(docWidth);
- m_Doc->currentPage()->initialMargins.Top = topMargin;
- m_Doc->currentPage()->initialMargins.Bottom = bottomMargin;
- m_Doc->currentPage()->initialMargins.Left = leftMargin;
- m_Doc->currentPage()->initialMargins.Right = rightMargin;
+ m_Doc->currentPage()->initialMargins.setTop(topMargin);
+ m_Doc->currentPage()->initialMargins.setBottom(bottomMargin);
+ m_Doc->currentPage()->initialMargins.setLeft(leftMargin);
+ m_Doc->currentPage()->initialMargins.setRight(rightMargin);
m_Doc->reformPages(true);
}
baseX = m_Doc->currentPage()->xOffset();
@@ -554,10 +554,10 @@
{
if (firstPage)
{
- topMargin = m_Doc->marginsVal().Top;
- leftMargin = m_Doc->marginsVal().Left;
- rightMargin = m_Doc->marginsVal().Right;
- bottomMargin = m_Doc->marginsVal().Bottom;
+ topMargin = m_Doc->marginsVal().top();
+ leftMargin = m_Doc->marginsVal().left();
+ rightMargin = m_Doc->marginsVal().right();
+ bottomMargin = m_Doc->marginsVal().bottom();
m_Doc->setPage(docWidth, docHeight, topMargin, leftMargin, rightMargin, bottomMargin, m_Doc->PageSp, m_Doc->PageSpa, false, false);
m_Doc->setPageSize("Custom");
m_Doc->currentPage()->m_pageSize = "Custom";
@@ -565,10 +565,10 @@
m_Doc->currentPage()->setInitialWidth(docWidth);
m_Doc->currentPage()->setHeight(docHeight);
m_Doc->currentPage()->setWidth(docWidth);
- m_Doc->currentPage()->initialMargins.Top = topMargin;
- m_Doc->currentPage()->initialMargins.Bottom = bottomMargin;
- m_Doc->currentPage()->initialMargins.Left = leftMargin;
- m_Doc->currentPage()->initialMargins.Right = rightMargin;
+ m_Doc->currentPage()->initialMargins.setTop(topMargin);
+ m_Doc->currentPage()->initialMargins.setBottom(bottomMargin);
+ m_Doc->currentPage()->initialMargins.setLeft(leftMargin);
+ m_Doc->currentPage()->initialMargins.setRight(rightMargin);
m_Doc->reformPages(true);
}
else
@@ -579,10 +579,10 @@
m_Doc->currentPage()->setInitialWidth(docWidth);
m_Doc->currentPage()->setHeight(docHeight);
m_Doc->currentPage()->setWidth(docWidth);
- m_Doc->currentPage()->initialMargins.Top = topMargin;
- m_Doc->currentPage()->initialMargins.Bottom = bottomMargin;
- m_Doc->currentPage()->initialMargins.Left = leftMargin;
- m_Doc->currentPage()->initialMargins.Right = rightMargin;
+ m_Doc->currentPage()->initialMargins.setTop(topMargin);
+ m_Doc->currentPage()->initialMargins.setBottom(bottomMargin);
+ m_Doc->currentPage()->initialMargins.setLeft(leftMargin);
+ m_Doc->currentPage()->initialMargins.setRight(rightMargin);
m_Doc->currentPage()->MPageNam = CommonStrings::trMasterPageNormal;
m_Doc->view()->addPage(pagecount, true);
pagecount++;
Modified: trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/import/viva/importviva.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/viva/importviva.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/viva/importviva.cpp Thu Feb 19 13:59:32 2015
@@ -434,10 +434,10 @@
{
if (importerFlags & LoadSavePlugin::lfCreateDoc)
{
- topMargin = m_Doc->marginsVal().Top;
- leftMargin = m_Doc->marginsVal().Left;
- rightMargin = m_Doc->marginsVal().Right;
- bottomMargin = m_Doc->marginsVal().Bottom;
+ topMargin = m_Doc->marginsVal().top();
+ leftMargin = m_Doc->marginsVal().left();
+ rightMargin = m_Doc->marginsVal().right();
+ bottomMargin = m_Doc->marginsVal().bottom();
double pgCols = m_Doc->PageSp;
double pgGap = m_Doc->PageSpa;
papersize = "Custom";
@@ -501,10 +501,10 @@
m_Doc->currentPage()->setInitialWidth(docWidth);
m_Doc->currentPage()->setHeight(docHeight);
m_Doc->currentPage()->setWidth(docWidth);
- m_Doc->currentPage()->initialMargins.Top = topMargin;
- m_Doc->currentPage()->initialMargins.Bottom = bottomMargin;
- m_Doc->currentPage()->initialMargins.Left = leftMargin;
- m_Doc->currentPage()->initialMargins.Right = rightMargin;
+ m_Doc->currentPage()->initialMargins.setTop(topMargin);
+ m_Doc->currentPage()->initialMargins.setBottom(bottomMargin);
+ m_Doc->currentPage()->initialMargins.setLeft(leftMargin);
+ m_Doc->currentPage()->initialMargins.setRight(rightMargin);
m_Doc->reformPages(true);
}
}
@@ -779,10 +779,10 @@
m_Doc->currentPage()->setInitialWidth(docWidth);
m_Doc->currentPage()->setHeight(docHeight);
m_Doc->currentPage()->setWidth(docWidth);
- m_Doc->currentPage()->initialMargins.Top = topMargin;
- m_Doc->currentPage()->initialMargins.Bottom = bottomMargin;
- m_Doc->currentPage()->initialMargins.Left = leftMargin;
- m_Doc->currentPage()->initialMargins.Right = rightMargin;
+ m_Doc->currentPage()->initialMargins.setTop(topMargin);
+ m_Doc->currentPage()->initialMargins.setBottom(bottomMargin);
+ m_Doc->currentPage()->initialMargins.setLeft(leftMargin);
+ m_Doc->currentPage()->initialMargins.setRight(rightMargin);
m_Doc->currentPage()->MPageNam = CommonStrings::trMasterPageNormal;
m_Doc->view()->addPage(pagecount, true);
pagecount++;
Modified: trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xar/importxar.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xar/importxar.cpp Thu Feb 19 13:59:32 2015
@@ -3361,10 +3361,7 @@
m_Doc->currentPage()->setInitialWidth(docWidth);
m_Doc->currentPage()->setHeight(docHeight);
m_Doc->currentPage()->setWidth(docWidth);
- m_Doc->currentPage()->initialMargins.Top = 0;
- m_Doc->currentPage()->initialMargins.Bottom = 0;
- m_Doc->currentPage()->initialMargins.Left = 0;
- m_Doc->currentPage()->initialMargins.Right = 0;
+ m_Doc->currentPage()->initialMargins.set(0, 0, 0, 0);
m_Doc->reformPages(true);
}
}
@@ -3384,10 +3381,7 @@
m_Doc->currentPage()->setInitialWidth(docWidth);
m_Doc->currentPage()->setHeight(docHeight);
m_Doc->currentPage()->setWidth(docWidth);
- m_Doc->currentPage()->initialMargins.Top = 0;
- m_Doc->currentPage()->initialMargins.Bottom = 0;
- m_Doc->currentPage()->initialMargins.Left = 0;
- m_Doc->currentPage()->initialMargins.Right = 0;
+ m_Doc->currentPage()->initialMargins.set(0, 0, 0, 0);
m_Doc->currentPage()->MPageNam = CommonStrings::trMasterPageNormal;
m_Doc->view()->addPage(pagecount, true);
pagecount++;
Modified: trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/import/xps/importxps.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/xps/importxps.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/xps/importxps.cpp Thu Feb 19 13:59:32 2015
@@ -587,10 +587,10 @@
{
if (firstPage)
{
- topMargin = m_Doc->marginsVal().Top;
- leftMargin = m_Doc->marginsVal().Left;
- rightMargin = m_Doc->marginsVal().Right;
- bottomMargin = m_Doc->marginsVal().Bottom;
+ topMargin = m_Doc->marginsVal().top();
+ leftMargin = m_Doc->marginsVal().left();
+ rightMargin = m_Doc->marginsVal().right();
+ bottomMargin = m_Doc->marginsVal().bottom();
double pgCols = m_Doc->PageSp;
double pgGap = m_Doc->PageSpa;
m_Doc->setPage(docWidth, docHeight, topMargin, leftMargin, rightMargin, bottomMargin, pgCols, pgGap, false, false);
@@ -600,10 +600,10 @@
m_Doc->currentPage()->setInitialWidth(docWidth);
m_Doc->currentPage()->setHeight(docHeight);
m_Doc->currentPage()->setWidth(docWidth);
- m_Doc->currentPage()->initialMargins.Top = topMargin;
- m_Doc->currentPage()->initialMargins.Bottom = bottomMargin;
- m_Doc->currentPage()->initialMargins.Left = leftMargin;
- m_Doc->currentPage()->initialMargins.Right = rightMargin;
+ m_Doc->currentPage()->initialMargins.setTop(topMargin);
+ m_Doc->currentPage()->initialMargins.setBottom(bottomMargin);
+ m_Doc->currentPage()->initialMargins.setLeft(leftMargin);
+ m_Doc->currentPage()->initialMargins.setRight(rightMargin);
m_Doc->reformPages(true);
}
else
@@ -614,10 +614,10 @@
m_Doc->currentPage()->setInitialWidth(docWidth);
m_Doc->currentPage()->setHeight(docHeight);
m_Doc->currentPage()->setWidth(docWidth);
- m_Doc->currentPage()->initialMargins.Top = topMargin;
- m_Doc->currentPage()->initialMargins.Bottom = bottomMargin;
- m_Doc->currentPage()->initialMargins.Left = leftMargin;
- m_Doc->currentPage()->initialMargins.Right = rightMargin;
+ m_Doc->currentPage()->initialMargins.setTop(topMargin);
+ m_Doc->currentPage()->initialMargins.setBottom(bottomMargin);
+ m_Doc->currentPage()->initialMargins.setLeft(leftMargin);
+ m_Doc->currentPage()->initialMargins.setRight(rightMargin);
m_Doc->currentPage()->MPageNam = CommonStrings::trMasterPageNormal;
m_Doc->view()->addPage(pagecount, true);
pagecount++;
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp Thu Feb 19 13:59:32 2015
@@ -216,10 +216,10 @@
return NULL;
}
PyObject *margins = NULL;
- margins = Py_BuildValue("ffff", PointToValue(ScCore->primaryMainWindow()->doc->Pages->at(e)->Margins.Top),
- PointToValue(ScCore->primaryMainWindow()->doc->Pages->at(e)->Margins.Left),
- PointToValue(ScCore->primaryMainWindow()->doc->Pages->at(e)->Margins.Right),
- PointToValue(ScCore->primaryMainWindow()->doc->Pages->at(e)->Margins.Bottom));
+ margins = Py_BuildValue("ffff", PointToValue(ScCore->primaryMainWindow()->doc->Pages->at(e)->Margins.top()),
+ PointToValue(ScCore->primaryMainWindow()->doc->Pages->at(e)->Margins.left()),
+ PointToValue(ScCore->primaryMainWindow()->doc->Pages->at(e)->Margins.right()),
+ PointToValue(ScCore->primaryMainWindow()->doc->Pages->at(e)->Margins.bottom()));
return margins;
}
@@ -362,10 +362,10 @@
PyObject *margins = NULL;
if(!checkHaveDocument())
return NULL;
- margins = Py_BuildValue("ffff", PointToValue(ScCore->primaryMainWindow()->doc->margins()->Top),
- PointToValue(ScCore->primaryMainWindow()->doc->margins()->Left),
- PointToValue(ScCore->primaryMainWindow()->doc->margins()->Right),
- PointToValue(ScCore->primaryMainWindow()->doc->margins()->Bottom));
+ margins = Py_BuildValue("ffff", PointToValue(ScCore->primaryMainWindow()->doc->margins()->top()),
+ PointToValue(ScCore->primaryMainWindow()->doc->margins()->left()),
+ PointToValue(ScCore->primaryMainWindow()->doc->margins()->right()),
+ PointToValue(ScCore->primaryMainWindow()->doc->margins()->bottom()));
return margins;
}
Modified: trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objpdffile.cpp Thu Feb 19 13:59:32 2015
@@ -618,10 +618,10 @@
PyErr_SetString(PyExc_SystemError, "Can not initialize 'info' attribute");
return -1;
}
- self->bleedt = pdfOptions.bleeds.Top * currentDoc->unitRatio(); // double -
- self->bleedl = pdfOptions.bleeds.Left * currentDoc->unitRatio(); // double -
- self->bleedr = pdfOptions.bleeds.Right * currentDoc->unitRatio(); // double -
- self->bleedb = pdfOptions.bleeds.Bottom * currentDoc->unitRatio(); // double -
+ self->bleedt = pdfOptions.bleeds.top() * currentDoc->unitRatio(); // double -
+ self->bleedl = pdfOptions.bleeds.left() * currentDoc->unitRatio(); // double -
+ self->bleedr = pdfOptions.bleeds.right() * currentDoc->unitRatio(); // double -
+ self->bleedb = pdfOptions.bleeds.bottom() * currentDoc->unitRatio(); // double -
self->usedocbleeds = pdfOptions.useDocBleeds; // bool
self->useLayers = pdfOptions.useLayers; // bool
self->embedPDF = pdfOptions.embedPDF; // bool
@@ -1426,13 +1426,13 @@
pdfOptions.bleeds = ScCore->primaryMainWindow()->doc->bleedsVal();
else {
self->bleedt = minmaxd(self->bleedt, 0, currentDoc->pageHeight() * currentDoc->unitRatio());
- pdfOptions.bleeds.Top = self->bleedt / currentDoc->unitRatio();
+ pdfOptions.bleeds.setTop(self->bleedt / currentDoc->unitRatio());
self->bleedl = minmaxd(self->bleedl, 0, currentDoc->pageWidth() * currentDoc->unitRatio());
- pdfOptions.bleeds.Left = self->bleedl / currentDoc->unitRatio();
+ pdfOptions.bleeds.setLeft(self->bleedl / currentDoc->unitRatio());
self->bleedr = minmaxd(self->bleedr, 0, currentDoc->pageWidth() * currentDoc->unitRatio());
- pdfOptions.bleeds.Right = self->bleedr / currentDoc->unitRatio();
+ pdfOptions.bleeds.setRight(self->bleedr / currentDoc->unitRatio());
self->bleedb = minmaxd(self->bleedb, 0, currentDoc->pageHeight() * currentDoc->unitRatio());
- pdfOptions.bleeds.Bottom = self->bleedb / currentDoc->unitRatio();
+ pdfOptions.bleeds.setBottom(self->bleedb / currentDoc->unitRatio());
}
pdfOptions.useLayers = self->useLayers;
pdfOptions.embedPDF = self->embedPDF;
Modified: trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/objprinter.cpp Thu Feb 19 13:59:32 2015
@@ -432,10 +432,7 @@
options.registrationMarks = false;
options.colorMarks = false;
options.markOffset = 0.0;
- options.bleeds.Top = 0.0;
- options.bleeds.Left = 0.0;
- options.bleeds.Right = 0.0;
- options.bleeds.Bottom = 0.0;
+ options.bleeds.set(0, 0, 0, 0);
if (!PrinterUtil::checkPrintEngineSupport(options.printer, options.prnEngine, options.toFile))
options.prnEngine = PrinterUtil::getDefaultPrintEngine(options.printer, options.toFile);
printcomm = QString(PyString_AsString(self->cmd));
Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Thu Feb 19 13:59:32 2015
@@ -309,15 +309,9 @@
PageSize defaultPageSize(appPrefs.docSetupPrefs.pageSize);
appPrefs.docSetupPrefs.pageWidth = defaultPageSize.width();
appPrefs.docSetupPrefs.pageHeight = defaultPageSize.height();
- appPrefs.docSetupPrefs.margins.Top = 40;
- appPrefs.docSetupPrefs.margins.Bottom = 40;
- appPrefs.docSetupPrefs.margins.Left = 40;
- appPrefs.docSetupPrefs.margins.Right = 40;
+ appPrefs.docSetupPrefs.margins.set(40, 40, 40, 40);
appPrefs.docSetupPrefs.marginPreset = 0;
- appPrefs.docSetupPrefs.bleeds.Top = 0;
- appPrefs.docSetupPrefs.bleeds.Left = 0;
- appPrefs.docSetupPrefs.bleeds.Right = 0;
- appPrefs.docSetupPrefs.bleeds.Bottom = 0;
+ appPrefs.docSetupPrefs.bleeds.set(0, 0, 0, 0);
appPrefs.hyphPrefs.MinWordLen = 3;
appPrefs.hyphPrefs.HyCount = 2;
appPrefs.hyphPrefs.Language = "en_GB";
@@ -375,10 +369,10 @@
appPrefs.colorPrefs.DCMSset.DefaultIntentColors = Intent_Relative_Colorimetric;
appPrefs.colorPrefs.DCMSset.DefaultIntentImages = Intent_Perceptual;
appPrefs.fontPrefs.GFontSub.clear();
- appPrefs.displayPrefs.scratch.Left = 100;
- appPrefs.displayPrefs.scratch.Right = 100;
- appPrefs.displayPrefs.scratch.Top = 20;
- appPrefs.displayPrefs.scratch.Bottom = 20;
+ appPrefs.displayPrefs.scratch.setLeft(100);
+ appPrefs.displayPrefs.scratch.setRight(100);
+ appPrefs.displayPrefs.scratch.setTop(20);
+ appPrefs.displayPrefs.scratch.setBottom(20);
appPrefs.displayPrefs.pageGapHorizontal = 0.0;
appPrefs.displayPrefs.pageGapVertical = 40.0;
struct PageSet pageS;
@@ -456,10 +450,7 @@
appPrefs.pdfPrefs.Info = "";
appPrefs.pdfPrefs.Intent = 0;
appPrefs.pdfPrefs.Intent2 = 0;
- appPrefs.pdfPrefs.bleeds.Top = 0;
- appPrefs.pdfPrefs.bleeds.Left = 0;
- appPrefs.pdfPrefs.bleeds.Right = 0;
- appPrefs.pdfPrefs.bleeds.Bottom = 0;
+ appPrefs.pdfPrefs.bleeds.set(0, 0, 0, 0);
appPrefs.pdfPrefs.useDocBleeds = true;
appPrefs.pdfPrefs.cropMarks = false;
appPrefs.pdfPrefs.bleedMarks = false;
@@ -1324,19 +1315,19 @@
deDocumentSetup.setAttribute("PageOrientation",appPrefs.docSetupPrefs.pageOrientation);
deDocumentSetup.setAttribute("PageWidth",ScCLocale::toQStringC(appPrefs.docSetupPrefs.pageWidth));
deDocumentSetup.setAttribute("PageHeight",ScCLocale::toQStringC(appPrefs.docSetupPrefs.pageHeight));
- deDocumentSetup.setAttribute("MarginTop",ScCLocale::toQStringC(appPrefs.docSetupPrefs.margins.Top));
- deDocumentSetup.setAttribute("MarginBottom",ScCLocale::toQStringC(appPrefs.docSetupPrefs.margins.Bottom));
- deDocumentSetup.setAttribute("MarginLeft",ScCLocale::toQStringC(appPrefs.docSetupPrefs.margins.Left));
- deDocumentSetup.setAttribute("MarginRight",ScCLocale::toQStringC(appPrefs.docSetupPrefs.margins.Right));
+ deDocumentSetup.setAttribute("MarginTop",ScCLocale::toQStringC(appPrefs.docSetupPrefs.margins.top()));
+ deDocumentSetup.setAttribute("MarginBottom",ScCLocale::toQStringC(appPrefs.docSetupPrefs.margins.bottom()));
+ deDocumentSetup.setAttribute("MarginLeft",ScCLocale::toQStringC(appPrefs.docSetupPrefs.margins.left()));
+ deDocumentSetup.setAttribute("MarginRight",ScCLocale::toQStringC(appPrefs.docSetupPrefs.margins.right()));
deDocumentSetup.setAttribute("MarginPreset",appPrefs.docSetupPrefs.marginPreset);
deDocumentSetup.setAttribute("PagePositioning", appPrefs.docSetupPrefs.pagePositioning);
deDocumentSetup.setAttribute("AutoSave", static_cast<int>(appPrefs.docSetupPrefs.AutoSave));
deDocumentSetup.setAttribute("AutoSaveTime", appPrefs.docSetupPrefs.AutoSaveTime);
deDocumentSetup.setAttribute("SaveCompressed", static_cast<int>(appPrefs.docSetupPrefs.saveCompressed));
- deDocumentSetup.setAttribute("BleedTop", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.Top));
- deDocumentSetup.setAttribute("BleedLeft", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.Left));
- deDocumentSetup.setAttribute("BleedRight", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.Right));
- deDocumentSetup.setAttribute("BleedBottom", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.Bottom));
+ deDocumentSetup.setAttribute("BleedTop", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.top()));
+ deDocumentSetup.setAttribute("BleedLeft", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.left()));
+ deDocumentSetup.setAttribute("BleedRight", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.right()));
+ deDocumentSetup.setAttribute("BleedBottom", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.bottom()));
elem.appendChild(deDocumentSetup);
QDomElement dePaths=docu.createElement("Paths");
@@ -1397,10 +1388,10 @@
elem.appendChild(deSE);
QDomElement deDisplay=docu.createElement("Display");
- deDisplay.setAttribute("ScratchBottom", ScCLocale::toQStringC(appPrefs.displayPrefs.scratch.Bottom));
- deDisplay.setAttribute("ScratchLeft", ScCLocale::toQStringC(appPrefs.displayPrefs.scratch.Left));
- deDisplay.setAttribute("ScratchRight", ScCLocale::toQStringC(appPrefs.displayPrefs.scratch.Right));
- deDisplay.setAttribute("ScratchTop", ScCLocale::toQStringC(appPrefs.displayPrefs.scratch.Top));
+ deDisplay.setAttribute("ScratchBottom", ScCLocale::toQStringC(appPrefs.displayPrefs.scratch.bottom()));
+ deDisplay.setAttribute("ScratchLeft", ScCLocale::toQStringC(appPrefs.displayPrefs.scratch.left()));
+ deDisplay.setAttribute("ScratchRight", ScCLocale::toQStringC(appPrefs.displayPrefs.scratch.right()));
+ deDisplay.setAttribute("ScratchTop", ScCLocale::toQStringC(appPrefs.displayPrefs.scratch.top()));
deDisplay.setAttribute("PageGapHorizontal", ScCLocale::toQStringC(appPrefs.displayPrefs.pageGapHorizontal));
deDisplay.setAttribute("PageGapVertical", ScCLocale::toQStringC(appPrefs.displayPrefs.pageGapVertical));
deDisplay.setAttribute("ShowPageShadow",static_cast<int>(appPrefs.displayPrefs.showPageShadow));
@@ -1490,10 +1481,10 @@
dcItemTools.setAttribute("TextColumnCount",appPrefs.itemToolPrefs.textColumns);
dcItemTools.setAttribute("TextColumnGap",ScCLocale::toQStringC(appPrefs.itemToolPrefs.textColumnGap));
dcItemTools.setAttribute("TextTabWidth",ScCLocale::toQStringC(appPrefs.itemToolPrefs.textTabWidth));
- dcItemTools.setAttribute("TextDistanceTop",ScCLocale::toQStringC(appPrefs.itemToolPrefs.textDistances.Top));
- dcItemTools.setAttribute("TextDistanceBottom",ScCLocale::toQStringC(appPrefs.itemToolPrefs.textDistances.Bottom));
- dcItemTools.setAttribute("TextDistanceLeft",ScCLocale::toQStringC(appPrefs.itemToolPrefs.textDistances.Left));
- dcItemTools.setAttribute("TextDistanceRight",ScCLocale::toQStringC(appPrefs.itemToolPrefs.textDistances.Right));
+ dcItemTools.setAttribute("TextDistanceTop",ScCLocale::toQStringC(appPrefs.itemToolPrefs.textDistances.top()));
+ dcItemTools.setAttribute("TextDistanceBottom",ScCLocale::toQStringC(appPrefs.itemToolPrefs.textDistances.bottom()));
+ dcItemTools.setAttribute("TextDistanceLeft",ScCLocale::toQStringC(appPrefs.itemToolPrefs.textDistances.left()));
+ dcItemTools.setAttribute("TextDistanceRight",ScCLocale::toQStringC(appPrefs.itemToolPrefs.textDistances.right()));
dcItemTools.setAttribute("TabFillCharacter",appPrefs.itemToolPrefs.textTabFillChar);
dcItemTools.setAttribute("ShapeLineStyle",appPrefs.itemToolPrefs.shapeLineStyle);
dcItemTools.setAttribute("LineStyle",appPrefs.itemToolPrefs.lineStyle);
@@ -1753,10 +1744,10 @@
pdf.setAttribute("ImageProfile", appPrefs.pdfPrefs.ImageProf);
pdf.setAttribute("PrintProfile", appPrefs.pdfPrefs.PrintProf);
pdf.setAttribute("InfoString", appPrefs.pdfPrefs.Info);
- pdf.setAttribute("BleedTop", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.Top));
- pdf.setAttribute("BleedLeft", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.Left));
- pdf.setAttribute("BleedRight", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.Right));
- pdf.setAttribute("BleedBottom", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.Bottom));
+ pdf.setAttribute("BleedTop", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.top()));
+ pdf.setAttribute("BleedLeft", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.left()));
+ pdf.setAttribute("BleedRight", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.right()));
+ pdf.setAttribute("BleedBottom", ScCLocale::toQStringC(appPrefs.pdfPrefs.bleeds.bottom()));
pdf.setAttribute("UseDocBleeds", static_cast<int>(appPrefs.pdfPrefs.useDocBleeds));
pdf.setAttribute("CropMarks", static_cast<int>(appPrefs.pdfPrefs.cropMarks));
pdf.setAttribute("BleedMarks", static_cast<int>(appPrefs.pdfPrefs.bleedMarks));
@@ -1931,19 +1922,19 @@
appPrefs.docSetupPrefs.pageOrientation = dc.attribute("PageOrientation", "0").toInt();
appPrefs.docSetupPrefs.pageWidth = ScCLocale::toDoubleC(dc.attribute("PageWidth"), 595.0);
appPrefs.docSetupPrefs.pageHeight = ScCLocale::toDoubleC(dc.attribute("PageHeight"), 842.0);
- appPrefs.docSetupPrefs.margins.Top = ScCLocale::toDoubleC(dc.attribute("MarginTop"), 9.0);
- appPrefs.docSetupPrefs.margins.Bottom = ScCLocale::toDoubleC(dc.attribute("MarginBottom"), 40.0);
- appPrefs.docSetupPrefs.margins.Left = ScCLocale::toDoubleC(dc.attribute("MarginLeft"), 9.0);
- appPrefs.docSetupPrefs.margins.Right = ScCLocale::toDoubleC(dc.attribute("MarginRight"), 9.0);
+ appPrefs.docSetupPrefs.margins.setTop(ScCLocale::toDoubleC(dc.attribute("MarginTop"), 9.0));
+ appPrefs.docSetupPrefs.margins.setBottom(ScCLocale::toDoubleC(dc.attribute("MarginBottom"), 40.0));
+ appPrefs.docSetupPrefs.margins.setLeft(ScCLocale::toDoubleC(dc.attribute("MarginLeft"), 9.0));
+ appPrefs.docSetupPrefs.margins.setRight(ScCLocale::toDoubleC(dc.attribute("MarginRight"), 9.0));
appPrefs.docSetupPrefs.marginPreset = dc.attribute("MarginPreset", "0").toInt();
appPrefs.docSetupPrefs.pagePositioning = dc.attribute("PagePositioning", "0").toInt();
appPrefs.docSetupPrefs.AutoSave = static_cast<bool>(dc.attribute("AutoSave", "0").toInt());
appPrefs.docSetupPrefs.AutoSaveTime = dc.attribute("AutoSaveTime", "600000").toInt();
appPrefs.docSetupPrefs.saveCompressed = static_cast<bool>(dc.attribute("SaveCompressed", "0").toInt());
- appPrefs.docSetupPrefs.bleeds.Top = ScCLocale::toDoubleC(dc.attribute("BleedTop"), 0.0);
- appPrefs.docSetupPrefs.bleeds.Left = ScCLocale::toDoubleC(dc.attribute("BleedLeft"), 0.0);
- appPrefs.docSetupPrefs.bleeds.Right = ScCLocale::toDoubleC(dc.attribute("BleedRight"), 0.0);
- appPrefs.docSetupPrefs.bleeds.Bottom = ScCLocale::toDoubleC(dc.attribute("BleedBottom"), 0.0);
+ appPrefs.docSetupPrefs.bleeds.setTop(ScCLocale::toDoubleC(dc.attribute("BleedTop"), 0.0));
+ appPrefs.docSetupPrefs.bleeds.setLeft(ScCLocale::toDoubleC(dc.attribute("BleedLeft"), 0.0));
+ appPrefs.docSetupPrefs.bleeds.setRight(ScCLocale::toDoubleC(dc.attribute("BleedRight"), 0.0));
+ appPrefs.docSetupPrefs.bleeds.setBottom(ScCLocale::toDoubleC(dc.attribute("BleedBottom"), 0.0));
}
@@ -1957,10 +1948,10 @@
if (dc.tagName()=="Display")
{
- appPrefs.displayPrefs.scratch.Bottom = ScCLocale::toDoubleC(dc.attribute("ScratchBottom"), 20.0);
- appPrefs.displayPrefs.scratch.Left = ScCLocale::toDoubleC(dc.attribute("ScratchLeft"), 100.0);
- appPrefs.displayPrefs.scratch.Right = ScCLocale::toDoubleC(dc.attribute("ScratchRight"), 100.0);
- appPrefs.displayPrefs.scratch.Top = ScCLocale::toDoubleC(dc.attribute("ScratchTop"), 20.0);
+ appPrefs.displayPrefs.scratch.setBottom(ScCLocale::toDoubleC(dc.attribute("ScratchBottom"), 20.0));
+ appPrefs.displayPrefs.scratch.setLeft(ScCLocale::toDoubleC(dc.attribute("ScratchLeft"), 100.0));
+ appPrefs.displayPrefs.scratch.setRight(ScCLocale::toDoubleC(dc.attribute("ScratchRight"), 100.0));
+ appPrefs.displayPrefs.scratch.setTop(ScCLocale::toDoubleC(dc.attribute("ScratchTop"), 20.0));
appPrefs.displayPrefs.pageGapHorizontal = ScCLocale::toDoubleC(dc.attribute("PageGapHorizontal"), 0.0);
appPrefs.displayPrefs.pageGapVertical = ScCLocale::toDoubleC(dc.attribute("PageGapVertical"), 40.0);
appPrefs.displayPrefs.showPageShadow = static_cast<bool>(dc.attribute("ShowPageShadow", "1").toInt());
@@ -2104,10 +2095,10 @@
appPrefs.itemToolPrefs.textColumnGap = ScCLocale::toDoubleC(dc.attribute("TextColumnGap"), 0.0);
appPrefs.itemToolPrefs.textTabFillChar = dc.attribute("TabFillCharacter", "");
appPrefs.itemToolPrefs.textTabWidth = ScCLocale::toDoubleC(dc.attribute("TextTabWidth"), 36.0);
- appPrefs.itemToolPrefs.textDistances.Top = ScCLocale::toDoubleC(dc.attribute("TextDistanceTop"), 0.0);
- appPrefs.itemToolPrefs.textDistances.Bottom = ScCLocale::toDoubleC(dc.attribute("TextDistanceBottom"), 0.0);
- appPrefs.itemToolPrefs.textDistances.Left = ScCLocale::toDoubleC(dc.attribute("TextDistanceLeft"), 0.0);
- appPrefs.itemToolPrefs.textDistances.Right = ScCLocale::toDoubleC(dc.attribute("TextDistanceRight"), 0.0);
+ appPrefs.itemToolPrefs.textDistances.setTop(ScCLocale::toDoubleC(dc.attribute("TextDistanceTop"), 0.0));
+ appPrefs.itemToolPrefs.textDistances.setBottom(ScCLocale::toDoubleC(dc.attribute("TextDistanceBottom"), 0.0));
+ appPrefs.itemToolPrefs.textDistances.setLeft(ScCLocale::toDoubleC(dc.attribute("TextDistanceLeft"), 0.0));
+ appPrefs.itemToolPrefs.textDistances.setRight(ScCLocale::toDoubleC(dc.attribute("TextDistanceRight"), 0.0));
appPrefs.itemToolPrefs.shapeLineStyle = dc.attribute("ShapeLineStyle").toInt();
appPrefs.itemToolPrefs.lineStyle = dc.attribute("LineStyle").toInt();
appPrefs.itemToolPrefs.shapeLineWidth = ScCLocale::toDoubleC(dc.attribute("ShapeLineWidth"), 1.0);
@@ -2493,10 +2484,10 @@
appPrefs.pdfPrefs.ImageProf = dc.attribute("ImageProfile", "");
appPrefs.pdfPrefs.PrintProf = dc.attribute("PrintProfile", "");
appPrefs.pdfPrefs.Info = dc.attribute("InfoString", "");
- appPrefs.pdfPrefs.bleeds.Top = ScCLocale::toDoubleC(dc.attribute("BleedTop"), 0.0);
- appPrefs.pdfPrefs.bleeds.Left = ScCLocale::toDoubleC(dc.attribute("BleedLeft"), 0.0);
- appPrefs.pdfPrefs.bleeds.Right = ScCLocale::toDoubleC(dc.attribute("BleedRight"), 0.0);
- appPrefs.pdfPrefs.bleeds.Bottom = ScCLocale::toDoubleC(dc.attribute("BleedBottom"), 0.0);
+ appPrefs.pdfPrefs.bleeds.setTop(ScCLocale::toDoubleC(dc.attribute("BleedTop"), 0.0));
+ appPrefs.pdfPrefs.bleeds.setLeft(ScCLocale::toDoubleC(dc.attribute("BleedLeft"), 0.0));
+ appPrefs.pdfPrefs.bleeds.setRight(ScCLocale::toDoubleC(dc.attribute("BleedRight"), 0.0));
+ appPrefs.pdfPrefs.bleeds.setBottom(ScCLocale::toDoubleC(dc.attribute("BleedBottom"), 0.0));
appPrefs.pdfPrefs.useDocBleeds = static_cast<bool>(dc.attribute("UseDocBleeds", "1").toInt());
appPrefs.pdfPrefs.cropMarks = static_cast<bool>(dc.attribute("CropMarks", "0").toInt());
appPrefs.pdfPrefs.bleedMarks = static_cast<bool>(dc.attribute("BleedMarks", "0").toInt());
Modified: trunk/Scribus/scribus/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp (original)
+++ trunk/Scribus/scribus/pslib.cpp Thu Feb 19 13:59:32 2015
@@ -550,14 +550,14 @@
markOffs = qMax(markOffs, Options.markOffset + 20.0);
GetBleeds(pg, bleedLeft, bleedRight);
double maxBoxX = pg->width()+bleedLeft+bleedRight+markOffs*2.0;
- double maxBoxY = pg->height()+Options.bleeds.Bottom+Options.bleeds.Top+markOffs*2.0;
+ double maxBoxY = pg->height()+Options.bleeds.bottom()+Options.bleeds.top()+markOffs*2.0;
Seiten++;
PutStream("%%Page: " + IToStr(Seiten) + " " + IToStr(Seiten) + "\n");
PutStream("%%PageOrientation: ");
// when creating EPS files determine the orientation from the bounding box
if (!psExport)
{
- if ((pg->width() - Ma->Left - Ma->Right) <= (pg->height() - Ma->Bottom - Ma->Top))
+ if ((pg->width() - Ma->left() - Ma->right()) <= (pg->height() - Ma->bottom() - Ma->top()))
PutStream("Portrait\n");
else
PutStream("Landscape\n");
@@ -568,13 +568,13 @@
{
PutStream("Portrait\n");
PutStream("%%PageBoundingBox: 0 0 "+IToStr(qRound(maxBoxX))+" "+IToStr(qRound(maxBoxY))+"\n");
- PutStream("%%PageCropBox: "+ToStr(bleedLeft+markOffs)+" "+ToStr(Options.bleeds.Bottom+markOffs)+" "+ToStr(maxBoxX-bleedRight-markOffs*2.0)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs*2.0)+"\n");
+ PutStream("%%PageCropBox: "+ToStr(bleedLeft+markOffs)+" "+ToStr(Options.bleeds.bottom()+markOffs)+" "+ToStr(maxBoxX-bleedRight-markOffs*2.0)+" "+ToStr(maxBoxY-Options.bleeds.top()-markOffs*2.0)+"\n");
}
else
{
PutStream("Landscape\n");
PutStream("%%PageBoundingBox: 0 0 "+IToStr(qRound(maxBoxY))+" "+IToStr(qRound(maxBoxX))+"\n");
- PutStream("%%PageCropBox: "+ToStr(bleedLeft+markOffs)+" "+ToStr(Options.bleeds.Bottom+markOffs)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs*2.0)+" "+ToStr(maxBoxX-bleedRight-markOffs*2.0)+"\n");
+ PutStream("%%PageCropBox: "+ToStr(bleedLeft+markOffs)+" "+ToStr(Options.bleeds.bottom()+markOffs)+" "+ToStr(maxBoxY-Options.bleeds.top()-markOffs*2.0)+" "+ToStr(maxBoxX-bleedRight-markOffs*2.0)+"\n");
}
}
PutStream("Scribusdict begin\n");
@@ -587,14 +587,14 @@
if (pg->orientation() == 1 && psExport)
PutStream("90 rotate 0 "+IToStr(qRound(maxBoxY))+" neg translate\n");
PutStream("/DeviceCMYK setcolorspace\n");
- PutStream(ToStr(bleedLeft+markOffs)+" "+ToStr(Options.bleeds.Bottom+markOffs)+" tr\n");
+ PutStream(ToStr(bleedLeft+markOffs)+" "+ToStr(Options.bleeds.bottom()+markOffs)+" tr\n");
ActPage = pg;
if (Clipping)
{
- PDev = ToStr(Ma->Left) + " " + ToStr(Ma->Bottom) + " m\n";
- PDev += ToStr(pg->width() - Ma->Right) + " " + ToStr(Ma->Bottom) + " li\n";
- PDev += ToStr(pg->width() - Ma->Right) + " " + ToStr(pg->height() - Ma->Top) + " li\n";
- PDev += ToStr(Ma->Left) + " " + ToStr(pg->height() - Ma->Top) + " li cl clip newpath\n";
+ PDev = ToStr(Ma->left()) + " " + ToStr(Ma->bottom()) + " m\n";
+ PDev += ToStr(pg->width() - Ma->right()) + " " + ToStr(Ma->bottom()) + " li\n";
+ PDev += ToStr(pg->width() - Ma->right()) + " " + ToStr(pg->height() - Ma->top()) + " li\n";
+ PDev += ToStr(Ma->left()) + " " + ToStr(pg->height() - Ma->top()) + " li cl clip newpath\n";
PutStream(PDev);
}
}
@@ -611,7 +611,7 @@
double bleedRight, bleedLeft;
GetBleeds(ActPage, bleedLeft, bleedRight);
double maxBoxX = ActPage->width()+bleedLeft+bleedRight+markOffs*2.0;
- double maxBoxY = ActPage->height()+Options.bleeds.Bottom+Options.bleeds.Top+markOffs*2.0;
+ double maxBoxY = ActPage->height()+Options.bleeds.bottom()+Options.bleeds.top()+markOffs*2.0;
PutStream("gs\n");
if(ActPage->orientation() == 1 && psExport)
PutStream("90 rotate 0 "+IToStr(qRound(maxBoxY))+" neg translate\n");
@@ -626,29 +626,29 @@
if (Options.cropMarks)
{
// Bottom Left
- PutStream(ToStr(markDelta)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
- PutStream(ToStr(markDelta+Options.markLength)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
+ PutStream(ToStr(markDelta)+" "+ToStr(markOffs+Options.bleeds.bottom())+" m\n");
+ PutStream(ToStr(markDelta+Options.markLength)+" "+ToStr(markOffs+Options.bleeds.bottom())+" li\n");
PutStream("st\n");
PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(markDelta)+" m\n");
PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(markDelta+Options.markLength)+" li\n");
PutStream("st\n");
// Top Left
- PutStream(ToStr(markDelta)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
- PutStream(ToStr(markDelta+Options.markLength)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
+ PutStream(ToStr(markDelta)+" "+ToStr(maxBoxY-Options.bleeds.top()-markOffs)+" m\n");
+ PutStream(ToStr(markDelta+Options.markLength)+" "+ToStr(maxBoxY-Options.bleeds.top()-markOffs)+" li\n");
PutStream("st\n");
PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-markDelta)+" m\n");
PutStream(ToStr(markOffs+bleedLeft)+" "+ToStr(maxBoxY-markDelta-Options.markLength) +" li\n");
PutStream("st\n");
// Bottom Right
- PutStream(ToStr(maxBoxX-markDelta)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" m\n");
- PutStream(ToStr(maxBoxX-markDelta-Options.markLength)+" "+ToStr(markOffs+Options.bleeds.Bottom)+" li\n");
+ PutStream(ToStr(maxBoxX-markDelta)+" "+ToStr(markOffs+Options.bleeds.bottom())+" m\n");
+ PutStream(ToStr(maxBoxX-markDelta-Options.markLength)+" "+ToStr(markOffs+Options.bleeds.bottom())+" li\n");
PutStream("st\n");
PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(markDelta)+" m\n");
PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(markDelta+Options.markLength) +" li\n");
PutStream("st\n");
// Top Right
- PutStream(ToStr(maxBoxX-markDelta)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" m\n");
- PutStream(ToStr(maxBoxX-markDelta-Options.markLength)+" "+ToStr(maxBoxY-Options.bleeds.Top-markOffs)+" li\n");
+ PutStream(ToStr(maxBoxX-markDelta)+" "+ToStr(maxBoxY-Options.bleeds.top()-markOffs)+" m\n");
+ PutStream(ToStr(maxBoxX-markDelta-Options.markLength)+" "+ToStr(maxBoxY-Options.bleeds.top()-markOffs)+" li\n");
PutStream("st\n");
PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(maxBoxY-markDelta)+" m\n");
PutStream(ToStr(maxBoxX-bleedRight-markOffs)+" "+ ToStr(maxBoxY-markDelta-Options.markLength) +" li\n");
@@ -1588,10 +1588,10 @@
if ((!psExport) && (Doc->m_Selection->count() != 0))
{
MarginStruct Ma;
- Ma.Left = gx;
- Ma.Top = gy;
- Ma.Bottom = page->height() - (gy + gh);
- Ma.Right = page->width() - (gx + gw);
+ Ma.setLeft(gx);
+ Ma.setTop(gy);
+ Ma.setBottom(page->height() - (gy + gh));
+ Ma.setRight(page->width() - (gx + gw));
PS_begin_page(page, &Ma, true);
}
else
@@ -5553,18 +5553,18 @@
{
MarginStruct values;
m_Doc->getBleeds(page, Options.bleeds, values);
- left = values.Left;
- right = values.Right;
+ left = values.left();
+ right = values.right();
}
void PSLib::GetBleeds(ScPage* page, double& left, double& right, double& bottom, double& top)
{
MarginStruct values;
m_Doc->getBleeds(page, Options.bleeds, values);
- left = values.Left;
- right = values.Right;
- bottom = values.Bottom;
- top = values.Top;
+ left = values.left();
+ right = values.right();
+ bottom = values.bottom();
+ top = values.top();
}
void PSLib::SetClipPath(FPointArray *c, bool poly)
Modified: trunk/Scribus/scribus/scpage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/scpage.cpp
==============================================================================
--- trunk/Scribus/scribus/scpage.cpp (original)
+++ trunk/Scribus/scribus/scpage.cpp Thu Feb 19 13:59:32 2015
@@ -274,13 +274,13 @@
this->setHeight(height_old);
this->setInitialHeight(init_height_old);
this->setInitialWidth(init_width_old);
- this->initialMargins.Top = init_margin_top_old;
- this->initialMargins.Bottom = init_margin_bottom_old;
- this->initialMargins.Left = init_margin_left_old;
- this->initialMargins.Right = init_margin_right_old;
+ this->initialMargins.setTop(init_margin_top_old);
+ this->initialMargins.setBottom(init_margin_bottom_old);
+ this->initialMargins.setLeft(init_margin_left_old);
+ this->initialMargins.setRight(init_margin_right_old);
this->marginPreset = margin_preset_old;
- this->Margins.Top = margin_top_old;
- this->Margins.Bottom = margin_bottom_old;
+ this->Margins.setTop(margin_top_old);
+ this->Margins.setBottom(margin_bottom_old);
this->guides.setHorizontalAutoGap(horizontal_autogap_old);
this->guides.setVerticalAutoGap(vertical_autogap_old);
this->guides.setHorizontalAutoCount(horizontal_autocount_old);
@@ -298,13 +298,13 @@
this->setHeight(height);
this->setInitialHeight(init_height);
this->setInitialWidth(init_width);
- this->initialMargins.Top = init_margin_top;
- this->initialMargins.Bottom = init_margin_bottom;
- this->initialMargins.Left = init_margin_left;
- this->initialMargins.Right = init_margin_right;
+ this->initialMargins.setTop(init_margin_top);
+ this->initialMargins.setBottom(init_margin_bottom);
+ this->initialMargins.setLeft(init_margin_left);
+ this->initialMargins.setRight(init_margin_right);
this->marginPreset = margin_preset;
- this->Margins.Top = margin_top;
- this->Margins.Bottom = margin_bottom;
+ this->Margins.setTop(margin_top);
+ this->Margins.setBottom(margin_bottom);
this->guides.setHorizontalAutoGap(horizontal_autogap);
this->guides.setVerticalAutoGap(vertical_autogap);
this->guides.setHorizontalAutoCount(horizontal_autocount);
@@ -474,14 +474,8 @@
m_initialWidth = sourcePage->m_initialWidth;
m_initialHeight = sourcePage->m_initialHeight;
- Margins.Top = pageMargins.Top;
- Margins.Bottom = pageMargins.Bottom;
- Margins.Left = pageMargins.Left;//todo fix for layouts
- Margins.Right = pageMargins.Right;
+ Margins = pageMargins;
// #8859 do not get initialMargins from pageMargins otherwise
// margins may be inverted when applying master pages
- initialMargins.Top = sourcePage->initialMargins.Top;
- initialMargins.Bottom = sourcePage->initialMargins.Bottom;
- initialMargins.Left = sourcePage->initialMargins.Left;
- initialMargins.Right = sourcePage->initialMargins.Right;
-}
+ initialMargins = sourcePage->initialMargins;
+}
Modified: trunk/Scribus/scribus/scpage.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/scpage.h
==============================================================================
--- trunk/Scribus/scribus/scpage.h (original)
+++ trunk/Scribus/scribus/scpage.h Thu Feb 19 13:59:32 2015
@@ -64,10 +64,10 @@
void setOrientation(int);
void copySizingProperties(ScPage *sourcePage, const MarginStruct& pageMargins);
MarginStruct margins() const { return Margins; }
- double leftMargin() const { return Margins.Left; }
- double topMargin() const { return Margins.Top; }
- double bottomMargin() const { return Margins.Bottom; }
- double rightMargin() const { return Margins.Right; }
+ double leftMargin() const { return Margins.left(); }
+ double topMargin() const { return Margins.top(); }
+ double bottomMargin() const { return Margins.bottom(); }
+ double rightMargin() const { return Margins.right(); }
MarginStruct Margins;
MarginStruct initialMargins;
Modified: trunk/Scribus/scribus/scpageoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/scpageoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/scpageoutput.cpp (original)
+++ trunk/Scribus/scribus/scpageoutput.cpp Thu Feb 19 13:59:32 2015
@@ -55,10 +55,10 @@
{
markLength = opt.markLength;
markOffset = opt.markOffset;
- BleedTop = opt.bleeds.Top;
- BleedLeft = opt.bleeds.Left;
- BleedRight = opt.bleeds.Right;
- BleedBottom = opt.bleeds.Bottom;
+ BleedTop = opt.bleeds.top();
+ BleedLeft = opt.bleeds.left();
+ BleedRight = opt.bleeds.right();
+ BleedBottom = opt.bleeds.bottom();
cropMarks = opt.cropMarks;
bleedMarks = opt.bleedMarks;
registrationMarks = opt.registrationMarks;
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Thu Feb 19 13:59:32 2015
@@ -3662,10 +3662,7 @@
addedPage->setInitialWidth(docPage->width());
addedPage->setHeight(docPage->height());
addedPage->setWidth(docPage->width());
- addedPage->initialMargins.Top = docPage->initialMargins.Top;
- addedPage->initialMargins.Bottom = docPage->initialMargins.Bottom;
- addedPage->initialMargins.Left = docPage->initialMargins.Left;
- addedPage->initialMargins.Right = docPage->initialMargins.Right;
+ addedPage->initialMargins = docPage->initialMargins;
addedPage->LeftPg = docPage->LeftPg;
addedPage->setOrientation(docPage->orientation());
}
@@ -6768,10 +6765,7 @@
options.colorMarks = false;
options.markLength = 20.0;
options.markOffset = 0.0;
- options.bleeds.Top = 0.0;
- options.bleeds.Left = 0.0;
- options.bleeds.Right = 0.0;
- options.bleeds.Bottom = 0.0;
+ options.bleeds.set(0, 0, 0, 0);
PSLib *dd = new PSLib(options, false, prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, usedColors, false, true);
if (dd != NULL)
{
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Thu Feb 19 13:59:32 2015
@@ -291,7 +291,7 @@
docPrefsData.docSetupPrefs.pageHeight=0;
docPrefsData.docSetupPrefs.pageWidth=0;
docPrefsData.docSetupPrefs.pagePositioning=0;
- maxCanvasCoordinate=(FPoint(docPrefsData.displayPrefs.scratch.Left + docPrefsData.displayPrefs.scratch.Right, docPrefsData.displayPrefs.scratch.Top + docPrefsData.displayPrefs.scratch.Bottom)),
+ maxCanvasCoordinate=(FPoint(docPrefsData.displayPrefs.scratch.left() + docPrefsData.displayPrefs.scratch.right(), docPrefsData.displayPrefs.scratch.top() + docPrefsData.displayPrefs.scratch.bottom())),
init();
docPrefsData.pdfPrefs.bleeds = docPrefsData.docSetupPrefs.bleeds;
docPrefsData.pdfPrefs.useDocBleeds = true;
@@ -409,7 +409,7 @@
docPrefsData.docSetupPrefs.pageWidth=pagesize.width();
docPrefsData.docSetupPrefs.pageSize=pagesize.name();
docPrefsData.docSetupPrefs.margins=margins;
- maxCanvasCoordinate=(FPoint(docPrefsData.displayPrefs.scratch.Left + docPrefsData.displayPrefs.scratch.Right, docPrefsData.displayPrefs.scratch.Top + docPrefsData.displayPrefs.scratch.Bottom)),
+ maxCanvasCoordinate=(FPoint(docPrefsData.displayPrefs.scratch.left() + docPrefsData.displayPrefs.scratch.right(), docPrefsData.displayPrefs.scratch.top() + docPrefsData.displayPrefs.scratch.bottom())),
setPageSetFirstPage(pagesSetup.pageArrangement, pagesSetup.firstPageLocation);
init();
docPrefsData.pdfPrefs.bleeds = docPrefsData.docSetupPrefs.bleeds;
@@ -2443,10 +2443,10 @@
automaticTextFrames = atf;
//CB Moved from scribus.cpp. Overrides the defaults...
-// PDF_Options.BleedTop = pageMargins.Top;
-// PDF_Options.BleedLeft = pageMargins.Left;
-// PDF_Options.BleedRight = pageMargins.Right;
-// PDF_Options.BleedBottom = pageMargins.Bottom;
+// PDF_Options.BleedTop = pageMargins.top();
+// PDF_Options.BleedLeft = pageMargins.left();
+// PDF_Options.BleedRight = pageMargins.right();
+// PDF_Options.BleedBottom = pageMargins.bottom();
}
void ScribusDoc::resetPage(int fp, MarginStruct* newMargins)
@@ -2627,15 +2627,12 @@
ScPage* ScribusDoc::addPage(const int pageIndex, const QString& masterPageName, const bool addAutoFrame)
{
assert(masterPageMode()==false);
- ScPage* addedPage = new ScPage(docPrefsData.displayPrefs.scratch.Left, DocPages.count()*(docPrefsData.docSetupPrefs.pageHeight+docPrefsData.displayPrefs.scratch.Bottom+docPrefsData.displayPrefs.scratch.Top)+docPrefsData.displayPrefs.scratch.Top, docPrefsData.docSetupPrefs.pageWidth, docPrefsData.docSetupPrefs.pageHeight);
+ ScPage* addedPage = new ScPage(docPrefsData.displayPrefs.scratch.left(), DocPages.count()*(docPrefsData.docSetupPrefs.pageHeight+docPrefsData.displayPrefs.scratch.bottom()+docPrefsData.displayPrefs.scratch.top())+docPrefsData.displayPrefs.scratch.top(), docPrefsData.docSetupPrefs.pageWidth, docPrefsData.docSetupPrefs.pageHeight);
assert(addedPage!=NULL);
addedPage->setDocument(this);
- addedPage->Margins.Top = docPrefsData.docSetupPrefs.margins.Top;
- addedPage->Margins.Bottom = docPrefsData.docSetupPrefs.margins.Bottom;
- addedPage->initialMargins.Top = docPrefsData.docSetupPrefs.margins.Top;
- addedPage->initialMargins.Bottom = docPrefsData.docSetupPrefs.margins.Bottom;
- addedPage->initialMargins.Left = docPrefsData.docSetupPrefs.margins.Left;
- addedPage->initialMargins.Right = docPrefsData.docSetupPrefs.margins.Right;
+ addedPage->Margins.setTop(docPrefsData.docSetupPrefs.margins.top());
+ addedPage->Margins.setBottom(docPrefsData.docSetupPrefs.margins.bottom());
+ addedPage->initialMargins = docPrefsData.docSetupPrefs.margins;
addedPage->setPageNr(pageIndex);
addedPage->m_pageSize = docPrefsData.docSetupPrefs.pageSize;
addedPage->setOrientation(docPrefsData.docSetupPrefs.pageOrientation);
@@ -2659,7 +2656,7 @@
{
//CB We dont create master pages (yet) with a pageCount based location
//Page* addedPage = new Page(ScratchLeft, MasterPages.count()*(pageHeight+ScratchBottom+ScratchTop)+ScratchTop, pageWidth, pageHeight);
- ScPage* addedPage = new ScPage(docPrefsData.displayPrefs.scratch.Left, docPrefsData.displayPrefs.scratch.Top, docPrefsData.docSetupPrefs.pageWidth, docPrefsData.docSetupPrefs.pageHeight);
+ ScPage* addedPage = new ScPage(docPrefsData.displayPrefs.scratch.left(), docPrefsData.displayPrefs.scratch.top(), docPrefsData.docSetupPrefs.pageWidth, docPrefsData.docSetupPrefs.pageHeight);
assert(addedPage!=NULL);
addedPage->setDocument(this);
addedPage->Margins = docPrefsData.docSetupPrefs.margins;
@@ -2930,9 +2927,9 @@
if ((!masterPageMode()) && (usesAutomaticTextFrames()))// && (!isLoading()))
{
int z = itemAdd(PageItem::TextFrame, PageItem::Unspecified,
- addToPage->Margins.Left+addToPage->xOffset(),
- addToPage->Margins.Top+addToPage->yOffset(), docPrefsData.docSetupPrefs.pageWidth-addToPage->Margins.Right-addToPage->Margins.Left,
- docPrefsData.docSetupPrefs.pageHeight-addToPage->Margins.Bottom-addToPage->Margins.Top,
+ addToPage->Margins.left()+addToPage->xOffset(),
+ addToPage->Margins.top()+addToPage->yOffset(), docPrefsData.docSetupPrefs.pageWidth-addToPage->Margins.right()-addToPage->Margins.left(),
+ docPrefsData.docSetupPrefs.pageHeight-addToPage->Margins.bottom()-addToPage->Margins.top(),
1, CommonStrings::None, docPrefsData.itemToolPrefs.shapeLineColor, true);
Items->at(z)->isAutoText = true;
Items->at(z)->Cols = qRound(PageSp);
@@ -4814,12 +4811,12 @@
else
Mp->guides.copy(&Ap->guides);
- Ap->initialMargins.Top = Mp->Margins.Top;
- Ap->initialMargins.Bottom = Mp->Margins.Bottom;
+ Ap->initialMargins.setTop(Mp->Margins.top());
+ Ap->initialMargins.setBottom(Mp->Margins.bottom());
if (pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns == 1)
{
- Ap->initialMargins.Left = Mp->Margins.Left;
- Ap->initialMargins.Right = Mp->Margins.Right;
+ Ap->initialMargins.setLeft(Mp->Margins.left());
+ Ap->initialMargins.setRight(Mp->Margins.right());
}
else
{
@@ -4828,32 +4825,32 @@
{
if (Mp->LeftPg != 0)
{
- Ap->initialMargins.Right = Mp->initialMargins.Right;
- Ap->initialMargins.Left = Mp->initialMargins.Left;
+ Ap->initialMargins.setRight(Mp->initialMargins.right());
+ Ap->initialMargins.setLeft(Mp->initialMargins.left());
}
else
{
- Ap->initialMargins.Left = Mp->initialMargins.Right;
- Ap->initialMargins.Right = Mp->initialMargins.Left;
+ Ap->initialMargins.setLeft(Mp->initialMargins.right());
+ Ap->initialMargins.setRight(Mp->initialMargins.left());
}
}
else if (pageLoc==RightPage) // Right hand page
{
if (Mp->LeftPg != 0)
{
- Ap->initialMargins.Left = Mp->initialMargins.Right;
- Ap->initialMargins.Right = Mp->initialMargins.Left;
+ Ap->initialMargins.setLeft(Mp->initialMargins.right());
+ Ap->initialMargins.setRight(Mp->initialMargins.left());
}
else
{
- Ap->initialMargins.Right = Mp->initialMargins.Right;
- Ap->initialMargins.Left = Mp->initialMargins.Left;
+ Ap->initialMargins.setRight(Mp->initialMargins.right());
+ Ap->initialMargins.setLeft(Mp->initialMargins.left());
}
}
else //Middle pages
{
- Ap->initialMargins.Left = Mp->initialMargins.Left;
- Ap->initialMargins.Right = Mp->initialMargins.Right;
+ Ap->initialMargins.setLeft(Mp->initialMargins.left());
+ Ap->initialMargins.setRight(Mp->initialMargins.right());
}
}
@@ -4968,10 +4965,10 @@
SimpleState *ss = new SimpleState(Um::ChangePageProps);//, QString("%1").arg(pageNumber), Um::IPage);
ss->set("PAGE_CHANGEPROPS", "page_changeprops");
ss->set("PAGE_NUM", pageNumber);
- ss->set("OLD_PAGE_INITIALTOP", currentPage()->initialMargins.Top);
- ss->set("OLD_PAGE_INITIALBOTTOM", currentPage()->initialMargins.Bottom);
- ss->set("OLD_PAGE_INITIALLEFT", currentPage()->initialMargins.Left);
- ss->set("OLD_PAGE_INITIALRIGHT", currentPage()->initialMargins.Right);
+ ss->set("OLD_PAGE_INITIALTOP", currentPage()->initialMargins.top());
+ ss->set("OLD_PAGE_INITIALBOTTOM", currentPage()->initialMargins.bottom());
+ ss->set("OLD_PAGE_INITIALLEFT", currentPage()->initialMargins.left());
+ ss->set("OLD_PAGE_INITIALRIGHT", currentPage()->initialMargins.right());
ss->set("OLD_PAGE_INITIALHEIGHT", currentPage()->initialHeight());
ss->set("OLD_PAGE_INITIALWIDTH", currentPage()->initialWidth());
ss->set("OLD_PAGE_HEIGHT", currentPage()->height());
@@ -4996,10 +4993,10 @@
undoManager->action(this, ss);
}
//set the current page's values
- currentPage()->initialMargins.Top = initialTop;
- currentPage()->initialMargins.Bottom = initialBottom;
- currentPage()->initialMargins.Left = initialLeft;
- currentPage()->initialMargins.Right = initialRight;
+ currentPage()->initialMargins.setTop(initialTop);
+ currentPage()->initialMargins.setBottom(initialBottom);
+ currentPage()->initialMargins.setLeft(initialLeft);
+ currentPage()->initialMargins.setRight(initialRight);
currentPage()->setInitialHeight(initialHeight);
currentPage()->setInitialWidth(initialWidth);
currentPage()->setHeight(height);
@@ -5547,8 +5544,8 @@
if (iafData.positionType==0) // Frame starts at top left of page margins
{
- x1=targetPage->xOffset()+targetPage->Margins.Left;
- y1=targetPage->yOffset()+targetPage->Margins.Top;
+ x1=targetPage->xOffset()+targetPage->Margins.left();
+ y1=targetPage->yOffset()+targetPage->Margins.top();
}
else if (iafData.positionType==1) // Frame starts at top left of page
{
@@ -5557,8 +5554,8 @@
}
else if (iafData.positionType==2) // Frame starts at top left of page - bleeds
{
- x1=targetPage->xOffset()-docPrefsData.docSetupPrefs.bleeds.Left;
- y1=targetPage->yOffset()-docPrefsData.docSetupPrefs.bleeds.Top;
+ x1=targetPage->xOffset()-docPrefsData.docSetupPrefs.bleeds.left();
+ y1=targetPage->yOffset()-docPrefsData.docSetupPrefs.bleeds.top();
}
else if (iafData.positionType==3) // Frame starts at custom position
{
@@ -5568,8 +5565,8 @@
if (iafData.sizeType==0) // Frame is size of page margins
{
- w1=targetPage->width()-targetPage->Margins.Right-targetPage->Margins.Left;
- h1=targetPage->height()-targetPage->Margins.Bottom-targetPage->Margins.Top;
+ w1=targetPage->width()-targetPage->Margins.right()-targetPage->Margins.left();
+ h1=targetPage->height()-targetPage->Margins.bottom()-targetPage->Margins.top();
}
else if (iafData.sizeType==1) // Frame is size of page
{
@@ -5578,8 +5575,8 @@
}
else if (iafData.sizeType==2) // Frame is size of page + bleed
{
- w1=targetPage->width()+docPrefsData.docSetupPrefs.bleeds.Right+docPrefsData.docSetupPrefs.bleeds.Left;
- h1=targetPage->height()+docPrefsData.docSetupPrefs.bleeds.Bottom+docPrefsData.docSetupPrefs.bleeds.Top;
+ w1=targetPage->width()+docPrefsData.docSetupPrefs.bleeds.right()+docPrefsData.docSetupPrefs.bleeds.left();
+ h1=targetPage->height()+docPrefsData.docSetupPrefs.bleeds.bottom()+docPrefsData.docSetupPrefs.bleeds.top();
}
else if (iafData.sizeType==3) //Frame is size of imported image, we resize below when we load it
{
@@ -5920,10 +5917,10 @@
{
Seite = Pages->at(a);
getBleeds(Seite, pageBleeds);
- minx = qMin(minx, Seite->xOffset() - pageBleeds.Left);
- miny = qMin(miny, Seite->yOffset() - pageBleeds.Top);
- maxx = qMax(maxx, Seite->xOffset() + Seite->width() + pageBleeds.Left + pageBleeds.Right);
- maxy = qMax(maxy, Seite->yOffset() + Seite->height() + pageBleeds.Top + pageBleeds.Bottom);
+ minx = qMin(minx, Seite->xOffset() - pageBleeds.left());
+ miny = qMin(miny, Seite->yOffset() - pageBleeds.top());
+ maxx = qMax(maxx, Seite->xOffset() + Seite->width() + pageBleeds.left() + pageBleeds.right());
+ maxy = qMax(maxy, Seite->yOffset() + Seite->height() + pageBleeds.top() + pageBleeds.bottom());
}
}
minPoint.setX(minx);
@@ -5938,10 +5935,10 @@
int retw = -1;
if (masterPageMode())
{
- int x = static_cast<int>(currentPage()->xOffset() - docPrefsData.docSetupPrefs.bleeds.Left);
- int y = static_cast<int>(currentPage()->yOffset() - docPrefsData.docSetupPrefs.bleeds.Top);
- int w = static_cast<int>(currentPage()->width() + docPrefsData.docSetupPrefs.bleeds.Left + docPrefsData.docSetupPrefs.bleeds.Right);
- int h = static_cast<int>(currentPage()->height() + docPrefsData.docSetupPrefs.bleeds.Bottom + docPrefsData.docSetupPrefs.bleeds.Top);
+ int x = static_cast<int>(currentPage()->xOffset() - docPrefsData.docSetupPrefs.bleeds.left());
+ int y = static_cast<int>(currentPage()->yOffset() - docPrefsData.docSetupPrefs.bleeds.top());
+ int w = static_cast<int>(currentPage()->width() + docPrefsData.docSetupPrefs.bleeds.left() + docPrefsData.docSetupPrefs.bleeds.right());
+ int h = static_cast<int>(currentPage()->height() + docPrefsData.docSetupPrefs.bleeds.bottom() + docPrefsData.docSetupPrefs.bleeds.top());
if (QRect(x, y, w, h).contains(qRound(x2), qRound(y2)))
retw = currentPage()->pageNr();
}
@@ -5952,10 +5949,10 @@
for (uint a = 0; a < docPageCount; ++a)
{
getBleeds(a, pageBleeds);
- int x = static_cast<int>(Pages->at(a)->xOffset() - pageBleeds.Left);
- int y = static_cast<int>(Pages->at(a)->yOffset() - pageBleeds.Top);
- int w = static_cast<int>(Pages->at(a)->width() + pageBleeds.Left + pageBleeds.Right);
- int h = static_cast<int>(Pages->at(a)->height() + pageBleeds.Bottom + pageBleeds.Top);
+ int x = static_cast<int>(Pages->at(a)->xOffset() - pageBleeds.left());
+ int y = static_cast<int>(Pages->at(a)->yOffset() - pageBleeds.top());
+ int w = static_cast<int>(Pages->at(a)->width() + pageBleeds.left() + pageBleeds.right());
+ int h = static_cast<int>(Pages->at(a)->height() + pageBleeds.bottom() + pageBleeds.top());
if (QRect(x, y, w, h).contains(qRound(x2), qRound(y2)))
{
retw = static_cast<int>(a);
@@ -5972,10 +5969,10 @@
int retw = -1;
if (masterPageMode())
{
- double x = currentPage()->xOffset() - docPrefsData.docSetupPrefs.bleeds.Left;
- double y = currentPage()->yOffset() - docPrefsData.docSetupPrefs.bleeds.Top;
- double w = currentPage()->width() + docPrefsData.docSetupPrefs.bleeds.Left + docPrefsData.docSetupPrefs.bleeds.Right;
- double h1 = currentPage()->height() + docPrefsData.docSetupPrefs.bleeds.Bottom + docPrefsData.docSetupPrefs.bleeds.Top;
+ double x = currentPage()->xOffset() - docPrefsData.docSetupPrefs.bleeds.left();
+ double y = currentPage()->yOffset() - docPrefsData.docSetupPrefs.bleeds.top();
+ double w = currentPage()->width() + docPrefsData.docSetupPrefs.bleeds.left() + docPrefsData.docSetupPrefs.bleeds.right();
+ double h1 = currentPage()->height() + docPrefsData.docSetupPrefs.bleeds.bottom() + docPrefsData.docSetupPrefs.bleeds.top();
QTransform t = currItem->getCombinedTransform();
double w2 = currItem->visualWidth();
double h2 = currItem->visualHeight();
@@ -5993,10 +5990,10 @@
for (uint a = 0; a < docPageCount; ++a)
{
getBleeds(a, pageBleeds);
- double x = Pages->at(a)->xOffset() - pageBleeds.Left;
- double y = Pages->at(a)->yOffset() - pageBleeds.Top;
- double w = Pages->at(a)->width() + pageBleeds.Left + pageBleeds.Right;
- double h1 = Pages->at(a)->height() + pageBleeds.Bottom + pageBleeds.Top;
+ double x = Pages->at(a)->xOffset() - pageBleeds.left();
+ double y = Pages->at(a)->yOffset() - pageBleeds.top();
+ double w = Pages->at(a)->width() + pageBleeds.left() + pageBleeds.right();
+ double h1 = Pages->at(a)->height() + pageBleeds.bottom() + pageBleeds.top();
QTransform t = currItem->getCombinedTransform();
double w2 = currItem->visualWidth();
double h2 = currItem->visualHeight();
@@ -6068,10 +6065,10 @@
{
page = Pages->at(pageNr);
getBleeds(page, pageBleeds);
- double x1 = page->xOffset() - pageBleeds.Left;
- double y1 = page->yOffset() - pageBleeds.Top;
- double w1 = page->width() + pageBleeds.Left + pageBleeds.Right;
- double h1 = page->height() + pageBleeds.Bottom + pageBleeds.Top;
+ double x1 = page->xOffset() - pageBleeds.left();
+ double y1 = page->yOffset() - pageBleeds.top();
+ double w1 = page->width() + pageBleeds.left() + pageBleeds.right();
+ double h1 = page->height() + pageBleeds.bottom() + pageBleeds.top();
QTransform t = currItem->getCombinedTransform();
double w2 = currItem->visualWidth();
double h2 = currItem->visualHeight();
@@ -6157,7 +6154,7 @@
int counter = pageSets()[docPrefsData.docSetupPrefs.pagePositioning].FirstPage;
int rowcounter = 0;
double maxYPos=0.0, maxXPos=0.0;
- double currentXPos=docPrefsData.displayPrefs.scratch.Left, currentYPos=docPrefsData.displayPrefs.scratch.Top, lastYPos=Pages->at(0)->initialHeight();
+ double currentXPos=docPrefsData.displayPrefs.scratch.left(), currentYPos=docPrefsData.displayPrefs.scratch.top(), lastYPos=Pages->at(0)->initialHeight();
// currentXPos += (pageWidth+pageSets[currentPageLayout].GapHorizontal) * counter;
currentXPos += (docPrefsData.docSetupPrefs.pageWidth+docPrefsData.displayPrefs.pageGapHorizontal) * counter;
@@ -6174,22 +6171,22 @@
Seite->setPageNr(a);
if (masterPageMode())
{
- Seite->setXOffset(docPrefsData.displayPrefs.scratch.Left);
- Seite->setYOffset(docPrefsData.displayPrefs.scratch.Top);
+ Seite->setXOffset(docPrefsData.displayPrefs.scratch.left());
+ Seite->setYOffset(docPrefsData.displayPrefs.scratch.top());
if (Seite->LeftPg == 0)
{
- Seite->Margins.Right = Seite->initialMargins.Right;
- Seite->Margins.Left = Seite->initialMargins.Left;
+ Seite->Margins.setRight(Seite->initialMargins.right());
+ Seite->Margins.setLeft(Seite->initialMargins.left());
}
else if ((Seite->LeftPg > 1) && (Seite->LeftPg < pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns))
{
- Seite->Margins.Left = Seite->initialMargins.Left;
- Seite->Margins.Right = Seite->initialMargins.Left;
+ Seite->Margins.setLeft(Seite->initialMargins.left());
+ Seite->Margins.setRight(Seite->initialMargins.left());
}
else
{
- Seite->Margins.Left = Seite->initialMargins.Right;
- Seite->Margins.Right = Seite->initialMargins.Left;
+ Seite->Margins.setLeft(Seite->initialMargins.right());
+ Seite->Margins.setRight(Seite->initialMargins.left());
}
}
else
@@ -6205,18 +6202,18 @@
lastYPos = qMax(lastYPos, Seite->height());
if (counter == 0)
{
- Seite->Margins.Left = Seite->initialMargins.Right;
- Seite->Margins.Right = Seite->initialMargins.Left;
+ Seite->Margins.setLeft(Seite->initialMargins.right());
+ Seite->Margins.setRight(Seite->initialMargins.left());
}
else
{
- Seite->Margins.Left = Seite->initialMargins.Left;
- Seite->Margins.Right = Seite->initialMargins.Left;
+ Seite->Margins.setLeft(Seite->initialMargins.left());
+ Seite->Margins.setRight(Seite->initialMargins.left());
}
}
else
{
- currentXPos = docPrefsData.displayPrefs.scratch.Left;
+ currentXPos = docPrefsData.displayPrefs.scratch.left();
if (pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns > 1)
currentYPos += qMax(lastYPos, Seite->height())+docPrefsData.displayPrefs.pageGapVertical;
// currentYPos += qMax(lastYPos, Seite->height())+pageSets[currentPageLayout].GapVertical;
@@ -6225,8 +6222,8 @@
// currentYPos += Seite->height()+pageSets[currentPageLayout].GapVertical;
// lastYPos = qMax(lastYPos, Seite->height());
lastYPos = 0;
- Seite->Margins.Right = Seite->initialMargins.Right;
- Seite->Margins.Left = Seite->initialMargins.Left;
+ Seite->Margins.setRight(Seite->initialMargins.right());
+ Seite->Margins.setLeft(Seite->initialMargins.left());
}
counter++;
if (counter > pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns-1)
@@ -6241,10 +6238,10 @@
}
}
}
- Seite->Margins.Top = Seite->initialMargins.Top;
- Seite->Margins.Bottom = Seite->initialMargins.Bottom;
- maxXPos = qMax(maxXPos, Seite->xOffset()+Seite->width()+docPrefsData.displayPrefs.scratch.Right);
- maxYPos = qMax(maxYPos, Seite->yOffset()+Seite->height()+docPrefsData.displayPrefs.scratch.Bottom);
+ Seite->Margins.setTop(Seite->initialMargins.top());
+ Seite->Margins.setBottom(Seite->initialMargins.bottom());
+ maxXPos = qMax(maxXPos, Seite->xOffset()+Seite->width()+docPrefsData.displayPrefs.scratch.right());
+ maxYPos = qMax(maxYPos, Seite->yOffset()+Seite->height()+docPrefsData.displayPrefs.scratch.bottom());
}
if (!isLoading())
{
@@ -6298,8 +6295,8 @@
{
FPoint minPoint, maxPoint;
canvasMinMax(minPoint, maxPoint);
- FPoint maxSize(qMax(maxXPos, maxPoint.x()+docPrefsData.displayPrefs.scratch.Right), qMax(maxYPos, maxPoint.y()+docPrefsData.displayPrefs.scratch.Bottom));
- adjustCanvas(FPoint(qMin(0.0, minPoint.x()-docPrefsData.displayPrefs.scratch.Left),qMin(0.0, minPoint.y()-docPrefsData.displayPrefs.scratch.Top)), maxSize, true);
+ FPoint maxSize(qMax(maxXPos, maxPoint.x()+docPrefsData.displayPrefs.scratch.right()), qMax(maxYPos, maxPoint.y()+docPrefsData.displayPrefs.scratch.bottom()));
+ adjustCanvas(FPoint(qMin(0.0, minPoint.x()-docPrefsData.displayPrefs.scratch.left()),qMin(0.0, minPoint.y()-docPrefsData.displayPrefs.scratch.top())), maxSize, true);
changed();
}
else
@@ -6348,12 +6345,12 @@
void ScribusDoc::getBleeds(const ScPage* page, const MarginStruct& baseValues, MarginStruct& bleedData)
{
- bleedData.Bottom = baseValues.Bottom;
- bleedData.Top = baseValues.Top;
+ bleedData.setBottom(baseValues.bottom());
+ bleedData.setTop(baseValues.top());
if (pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns == 1)
{
- bleedData.Right = baseValues.Right;
- bleedData.Left = baseValues.Left;
+ bleedData.setRight(baseValues.right());
+ bleedData.setLeft(baseValues.left());
}
else
{
@@ -6369,18 +6366,18 @@
if (pageLocation == LeftPage)
{
- bleedData.Right = baseValues.Left;
- bleedData.Left = baseValues.Right;
+ bleedData.setRight(baseValues.left());
+ bleedData.setLeft(baseValues.right());
}
else if (pageLocation == RightPage)
{
- bleedData.Right = baseValues.Right;
- bleedData.Left = baseValues.Left;
+ bleedData.setRight(baseValues.right());
+ bleedData.setLeft(baseValues.left());
}
else
{
- bleedData.Right = baseValues.Left;
- bleedData.Left = baseValues.Left;
+ bleedData.setRight(baseValues.left());
+ bleedData.setLeft(baseValues.left());
}
}
}
@@ -6654,16 +6651,10 @@
setLayerLocked(layerID, false);
ScPattern pa = docPatterns[symbolName];
currentEditedSymbol = symbolName;
- ScPage* addedPage = new ScPage(docPrefsData.displayPrefs.scratch.Left, docPrefsData.displayPrefs.scratch.Top, pa.width, pa.height);
+ ScPage* addedPage = new ScPage(docPrefsData.displayPrefs.scratch.left(), docPrefsData.displayPrefs.scratch.top(), pa.width, pa.height);
addedPage->setDocument(this);
- addedPage->Margins.Top = 0;
- addedPage->Margins.Bottom = 0;
- addedPage->Margins.Left = 0;
- addedPage->Margins.Right = 0;
- addedPage->initialMargins.Top = 0;
- addedPage->initialMargins.Bottom = 0;
- addedPage->initialMargins.Left = 0;
- addedPage->initialMargins.Right = 0;
+ addedPage->Margins.set(0, 0, 0, 0);
+ addedPage->initialMargins.set(0, 0, 0, 0);
addedPage->setPageNr(0);
addedPage->MPageNam = "";
addedPage->setPageName("");
@@ -6809,16 +6800,10 @@
PageItem *pa = FrameItems[id];
pa->isEmbedded = false;
currentEditedIFrame = id;
- ScPage* addedPage = new ScPage(docPrefsData.displayPrefs.scratch.Left, docPrefsData.displayPrefs.scratch.Top, pa->visualWidth(), pa->visualHeight());
+ ScPage* addedPage = new ScPage(docPrefsData.displayPrefs.scratch.left(), docPrefsData.displayPrefs.scratch.top(), pa->visualWidth(), pa->visualHeight());
addedPage->setDocument(this);
- addedPage->Margins.Top = 0;
- addedPage->Margins.Bottom = 0;
- addedPage->Margins.Left = 0;
- addedPage->Margins.Right = 0;
- addedPage->initialMargins.Top = 0;
- addedPage->initialMargins.Bottom = 0;
- addedPage->initialMargins.Left = 0;
- addedPage->initialMargins.Right = 0;
+ addedPage->Margins.set(0, 0, 0, 0);
+ addedPage->initialMargins.set(0, 0, 0, 0);
addedPage->setPageNr(0);
addedPage->MPageNam = "";
addedPage->setPageName("");
@@ -7219,7 +7204,7 @@
--destLocation;
else if (whereToInsert==2)
destLocation=DocPages.count();
- ScPage* destination = new ScPage(docPrefsData.displayPrefs.scratch.Left, DocPages.count()*(docPrefsData.docSetupPrefs.pageHeight+docPrefsData.displayPrefs.scratch.Bottom+docPrefsData.displayPrefs.scratch.Top)+docPrefsData.displayPrefs.scratch.Top, docPrefsData.docSetupPrefs.pageWidth, docPrefsData.docSetupPrefs.pageHeight);
+ ScPage* destination = new ScPage(docPrefsData.displayPrefs.scratch.left(), DocPages.count()*(docPrefsData.docSetupPrefs.pageHeight+docPrefsData.displayPrefs.scratch.bottom()+docPrefsData.displayPrefs.scratch.top())+docPrefsData.displayPrefs.scratch.top(), docPrefsData.docSetupPrefs.pageWidth, docPrefsData.docSetupPrefs.pageHeight);
destination->setDocument(this);
destination->setPageNr(destLocation);
lastDest = destination;
@@ -7232,12 +7217,12 @@
destination->m_pageSize = from->m_pageSize;
//CB: Can possibly partially use the code from applyMasterPage here instead of runnin all of this again..
//TODO make a fucntion to do this margin stuff and use elsewhere too
- destination->initialMargins.Top = from->initialMargins.Top;
- destination->initialMargins.Bottom = from->initialMargins.Bottom;
+ destination->initialMargins.setTop(from->initialMargins.top());
+ destination->initialMargins.setBottom(from->initialMargins.bottom());
if (pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns == 1)
{
- destination->initialMargins.Left = from->initialMargins.Left;
- destination->initialMargins.Right = from->initialMargins.Right;
+ destination->initialMargins.setLeft(from->initialMargins.left());
+ destination->initialMargins.setRight(from->initialMargins.right());
}
else
{
@@ -7245,19 +7230,19 @@
{
if (locationOfPage(destination->pageNr()) == MiddlePage)
{
- destination->initialMargins.Right = from->initialMargins.Left;
- destination->initialMargins.Left = from->initialMargins.Left;
+ destination->initialMargins.setRight(from->initialMargins.left());
+ destination->initialMargins.setLeft(from->initialMargins.left());
}
else
{
- destination->initialMargins.Right = from->initialMargins.Left;
- destination->initialMargins.Left = from->initialMargins.Right;
+ destination->initialMargins.setRight(from->initialMargins.left());
+ destination->initialMargins.setLeft(from->initialMargins.right());
}
}
else
{
- destination->initialMargins.Left = from->initialMargins.Left;
- destination->initialMargins.Right = from->initialMargins.Right;
+ destination->initialMargins.setLeft(from->initialMargins.left());
+ destination->initialMargins.setRight(from->initialMargins.right());
}
}
reformPages();
@@ -7316,8 +7301,8 @@
if (setcol==1)
{
ScPage* pageToAdjust=DocPages.at(pageIndex);
- pageToAdjust->Margins.Left = pageToAdjust->initialMargins.Left;
- pageToAdjust->Margins.Right = pageToAdjust->initialMargins.Right;
+ pageToAdjust->Margins.setLeft(pageToAdjust->initialMargins.left());
+ pageToAdjust->Margins.setRight(pageToAdjust->initialMargins.right());
return;
}
@@ -7325,18 +7310,18 @@
PageLocation pageLoc=locationOfPage(pageIndex);
if (pageLoc==LeftPage) //Left hand page
{
- pageToAdjust->Margins.Left = pageToAdjust->initialMargins.Right;
- pageToAdjust->Margins.Right = pageToAdjust->initialMargins.Left;
+ pageToAdjust->Margins.setLeft(pageToAdjust->initialMargins.right());
+ pageToAdjust->Margins.setRight(pageToAdjust->initialMargins.left());
}
else if (pageLoc==RightPage) // Right hand page
{
- pageToAdjust->Margins.Right = pageToAdjust->initialMargins.Right;
- pageToAdjust->Margins.Left = pageToAdjust->initialMargins.Left;
+ pageToAdjust->Margins.setRight(pageToAdjust->initialMargins.right());
+ pageToAdjust->Margins.setLeft(pageToAdjust->initialMargins.left());
}
else //Middle pages
{
- pageToAdjust->Margins.Left = pageToAdjust->initialMargins.Left;
- pageToAdjust->Margins.Right = pageToAdjust->initialMargins.Left;
+ pageToAdjust->Margins.setLeft(pageToAdjust->initialMargins.left());
+ pageToAdjust->Margins.setRight(pageToAdjust->initialMargins.left());
}
/* Can also calc the X pos of the frame too, and Y pos, but thats not done yet
int myRow=(pageIndex+pageSets[currentPageLayout].FirstPage)/setcol;
@@ -9981,8 +9966,8 @@
void ScribusDoc::setRedrawBounding(PageItem *currItem)
{
currItem->setRedrawBounding();
- FPoint maxSize(currItem->BoundingX+currItem->BoundingW+docPrefsData.displayPrefs.scratch.Right, currItem->BoundingY+currItem->BoundingH+docPrefsData.displayPrefs.scratch.Bottom);
- FPoint minSize(currItem->BoundingX-docPrefsData.displayPrefs.scratch.Left, currItem->BoundingY-docPrefsData.displayPrefs.scratch.Top);
+ FPoint maxSize(currItem->BoundingX+currItem->BoundingW+docPrefsData.displayPrefs.scratch.right(), currItem->BoundingY+currItem->BoundingH+docPrefsData.displayPrefs.scratch.bottom());
+ FPoint minSize(currItem->BoundingX-docPrefsData.displayPrefs.scratch.left(), currItem->BoundingY-docPrefsData.displayPrefs.scratch.top());
adjustCanvas(minSize, maxSize);
}
@@ -12419,7 +12404,7 @@
break;
case alignMargins:
newX = currentPage()->xOffset();
- newX += currentPage()->Margins.Left;
+ newX += currentPage()->Margins.left();
break;
case alignGuide:
newX=currentPage()->xOffset() + guidePosition;
@@ -12457,7 +12442,7 @@
break;
case alignMargins:
newX = currentPage()->xOffset();
- newX += currentPage()->Margins.Left;
+ newX += currentPage()->Margins.left();
break;
case alignGuide:
newX=currentPage()->xOffset() + guidePosition;
@@ -12499,8 +12484,8 @@
break;
case alignMargins:
newX = currentPage()->xOffset();
- newX += currentPage()->Margins.Left;
- newX += (currentPage()->width() - currentPage()->Margins.Right - currentPage()->Margins.Left)/2;
+ newX += currentPage()->Margins.left();
+ newX += (currentPage()->width() - currentPage()->Margins.right() - currentPage()->Margins.left())/2;
break;
case alignGuide:
newX=currentPage()->xOffset() + guidePosition;
@@ -12551,7 +12536,7 @@
case alignMargins:
newX = currentPage()->xOffset();
newX += currentPage()->width();;
- newX -= currentPage()->Margins.Right;
+ newX -= currentPage()->Margins.right();
break;
case alignGuide:
newX=currentPage()->xOffset() + guidePosition;
@@ -12591,7 +12576,7 @@
case alignMargins:
newX = currentPage()->xOffset();
newX += currentPage()->width();
- newX -= currentPage()->Margins.Right;
+ newX -= currentPage()->Margins.right();
break;
case alignGuide:
newX=currentPage()->xOffset() + guidePosition;
@@ -12629,7 +12614,7 @@
break;
case alignMargins:
newY = currentPage()->yOffset();
- newY += currentPage()->Margins.Top;
+ newY += currentPage()->Margins.top();
break;
case alignGuide:
newY=currentPage()->yOffset() + guidePosition;
@@ -12667,7 +12652,7 @@
break;
case alignMargins:
newY = currentPage()->yOffset();
- newY += currentPage()->Margins.Top;
+ newY += currentPage()->Margins.top();
break;
case alignGuide:
newY=currentPage()->yOffset() + guidePosition;
@@ -12709,8 +12694,8 @@
break;
case alignMargins:
newY = currentPage()->yOffset();
- newY += currentPage()->Margins.Top;
- newY += (currentPage()->height() - currentPage()->Margins.Bottom - currentPage()->Margins.Top)/2;
+ newY += currentPage()->Margins.top();
+ newY += (currentPage()->height() - currentPage()->Margins.bottom() - currentPage()->Margins.top())/2;
break;
case alignGuide:
newY=currentPage()->yOffset() + guidePosition;
@@ -12761,7 +12746,7 @@
case alignMargins:
newY = currentPage()->yOffset();
newY += currentPage()->height();
- newY -= currentPage()->Margins.Bottom;
+ newY -= currentPage()->Margins.bottom();
break;
case alignGuide:
newY=currentPage()->yOffset() + guidePosition;
@@ -12801,7 +12786,7 @@
case alignMargins:
newY = currentPage()->yOffset();
newY += currentPage()->height();
- newY -= currentPage()->Margins.Bottom;
+ newY -= currentPage()->Margins.bottom();
break;
case alignGuide:
newY=currentPage()->yOffset() + guidePosition;
@@ -13227,7 +13212,7 @@
double totalSpace=0.0;
if (useMargins)
- totalSpace=currentPage()->width()-currentPage()->Margins.Left-currentPage()->Margins.Right;
+ totalSpace=currentPage()->width()-currentPage()->Margins.left()-currentPage()->Margins.right();
else
totalSpace=currentPage()->width();
double totalWidth=0.0;
@@ -13240,7 +13225,7 @@
double separation=(totalSpace-totalWidth)/(insideObjectCount+1);
double currX=currentPage()->xOffset();
if (useMargins)
- currX+=currentPage()->Margins.Left;
+ currX+=currentPage()->Margins.left();
//Handle when our items are too wide for the page.
if (separation<0.0)
{
@@ -13277,7 +13262,7 @@
double totalSpace=0.0;
if (useMargins)
- totalSpace=currentPage()->height()-currentPage()->Margins.Top-currentPage()->Margins.Bottom;
+ totalSpace=currentPage()->height()-currentPage()->Margins.top()-currentPage()->Margins.bottom();
else
totalSpace=currentPage()->height();
double totalHeight=0.0;
@@ -13290,7 +13275,7 @@
double separation=(totalSpace-totalHeight)/(insideObjectCount+1);
double currY=currentPage()->yOffset();
if (useMargins)
- currY+=currentPage()->Margins.Top;
+ currY+=currentPage()->Margins.top();
//Handle when our items are too high for the page.
if (separation<0.0)
{
@@ -13694,10 +13679,10 @@
}
m_constants.insert("pagewidth", newPage->width());
m_constants.insert("pageheight", newPage->height());
- m_constants.insert("marginleft", newPage->Margins.Left);
- m_constants.insert("marginright", newPage->width() - newPage->Margins.Right);
- m_constants.insert("margintop", newPage->Margins.Top);
- m_constants.insert("marginbottom", newPage->height() - newPage->Margins.Bottom);
+ m_constants.insert("marginleft", newPage->Margins.left());
+ m_constants.insert("marginright", newPage->width() - newPage->Margins.right());
+ m_constants.insert("margintop", newPage->Margins.top());
+ m_constants.insert("marginbottom", newPage->height() - newPage->Margins.bottom());
}
@@ -13971,27 +13956,27 @@
{
ScPage *lp = addMasterPage(0, CommonStrings::trMasterPageNormalLeft);
lp->LeftPg = 1;
- lp->Margins.Left = lp->initialMargins.Right;
- lp->Margins.Right = lp->initialMargins.Left;
+ lp->Margins.setLeft(lp->initialMargins.right());
+ lp->Margins.setRight(lp->initialMargins.left());
lp = addMasterPage(1, CommonStrings::trMasterPageNormalRight);
lp->LeftPg = 0;
- lp->Margins.Right = lp->initialMargins.Right;
- lp->Margins.Left = lp->initialMargins.Left;
+ lp->Margins.setRight(lp->initialMargins.right());
+ lp->Margins.setLeft(lp->initialMargins.left());
}
else if ((setcol == 3) || (setcol == 4))
{
ScPage *lp = addMasterPage(0, CommonStrings::trMasterPageNormalLeft);
lp->LeftPg = 1;
- lp->Margins.Left = lp->initialMargins.Right;
- lp->Margins.Right = lp->initialMargins.Left;
+ lp->Margins.setLeft(lp->initialMargins.right());
+ lp->Margins.setRight(lp->initialMargins.left());
lp = addMasterPage(1, CommonStrings::trMasterPageNormalRight);
lp->LeftPg = 0;
- lp->Margins.Right = lp->initialMargins.Right;
- lp->Margins.Left = lp->initialMargins.Left;
+ lp->Margins.setRight(lp->initialMargins.right());
+ lp->Margins.setLeft(lp->initialMargins.left());
lp = addMasterPage(2, CommonStrings::trMasterPageNormalMiddle);
lp->LeftPg = 2;
- lp->Margins.Left = lp->initialMargins.Left;
- lp->Margins.Right = lp->initialMargins.Left;
+ lp->Margins.setLeft(lp->initialMargins.left());
+ lp->Margins.setRight(lp->initialMargins.left());
}
}
@@ -14235,14 +14220,14 @@
ret = true;
}
double invViewScale=1/m_View->scale();
- if (fabs(page->Margins.Left + page->xOffset() - *x) < (docPrefsData.guidesPrefs.guideRad * invViewScale))
- {
- *x = page->Margins.Left+page->xOffset();
+ if (fabs(page->Margins.left() + page->xOffset() - *x) < (docPrefsData.guidesPrefs.guideRad * invViewScale))
+ {
+ *x = page->Margins.left()+page->xOffset();
ret = true;
}
- if (fabs((page->width() - page->Margins.Right) + page->xOffset() - *x) < (docPrefsData.guidesPrefs.guideRad * invViewScale))
- {
- *x = page->width() - page->Margins.Right+page->xOffset();
+ if (fabs((page->width() - page->Margins.right()) + page->xOffset() - *x) < (docPrefsData.guidesPrefs.guideRad * invViewScale))
+ {
+ *x = page->width() - page->Margins.right()+page->xOffset();
ret = true;
}
if (fabs(page->width() + page->xOffset() - *x) < (docPrefsData.guidesPrefs.guideRad * invViewScale))
@@ -14255,14 +14240,14 @@
*x = page->xOffset();
ret = true;
}
- if (fabs(page->Margins.Top + page->yOffset() - *y) < (docPrefsData.guidesPrefs.guideRad * invViewScale))
- {
- *y = page->Margins.Top+page->yOffset();
+ if (fabs(page->Margins.top() + page->yOffset() - *y) < (docPrefsData.guidesPrefs.guideRad * invViewScale))
+ {
+ *y = page->Margins.top()+page->yOffset();
ret = true;
}
- if (fabs((page->height() - page->Margins.Bottom)+page->yOffset() - *y) < (docPrefsData.guidesPrefs.guideRad * invViewScale))
- {
- *y = page->height() - page->Margins.Bottom+page->yOffset();
+ if (fabs((page->height() - page->Margins.bottom())+page->yOffset() - *y) < (docPrefsData.guidesPrefs.guideRad * invViewScale))
+ {
+ *y = page->height() - page->Margins.bottom()+page->yOffset();
ret = true;
}
if (fabs(page->height() + page->yOffset() - *y) < (docPrefsData.guidesPrefs.guideRad * invViewScale))
@@ -16515,8 +16500,8 @@
void ScribusDoc::setNewPrefs(const ApplicationPrefs& prefsData, const ApplicationPrefs& oldPrefsData, bool resizePages, bool resizeMasterPages, bool resizePageMargins, bool resizeMasterPageMargins)
{
docPrefsData=prefsData;
- double topDisplacement = prefsData.displayPrefs.scratch.Top - oldPrefsData.displayPrefs.scratch.Top;
- double leftDisplacement = prefsData.displayPrefs.scratch.Left - oldPrefsData.displayPrefs.scratch.Left;
+ double topDisplacement = prefsData.displayPrefs.scratch.top() - oldPrefsData.displayPrefs.scratch.top();
+ double leftDisplacement = prefsData.displayPrefs.scratch.left() - oldPrefsData.displayPrefs.scratch.left();
applyPrefsPageSizingAndMargins(resizePages, resizeMasterPages, resizePageMargins, resizeMasterPageMargins);
uint docItemsCount = MasterItems.count();
@@ -16669,10 +16654,10 @@
//apply new margins if same
const int masterPageNumber = MasterNames[pp->MPageNam];
const ScPage* mp = MasterPages.at(masterPageNumber);
- if (pp->initialMargins.Left == mp->initialMargins.Left &&
- pp->initialMargins.Right == mp->initialMargins.Right &&
- pp->initialMargins.Top == mp->initialMargins.Top &&
- pp->initialMargins.Bottom == mp->initialMargins.Bottom)
+ if (pp->initialMargins.left() == mp->initialMargins.left() &&
+ pp->initialMargins.top() == mp->initialMargins.top() &&
+ pp->initialMargins.right() == mp->initialMargins.right() &&
+ pp->initialMargins.bottom() == mp->initialMargins.bottom())
{
pp->initialMargins=docPrefsData.docSetupPrefs.margins;
pp->marginPreset=docPrefsData.docSetupPrefs.marginPreset;
@@ -16696,8 +16681,8 @@
pp->initialMargins=docPrefsData.docSetupPrefs.margins;
pp->marginPreset=docPrefsData.docSetupPrefs.marginPreset;
}
- pp->setXOffset(scratch()->Left);
- pp->setYOffset(scratch()->Top);
+ pp->setXOffset(scratch()->left());
+ pp->setYOffset(scratch()->top());
}
}
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Thu Feb 19 13:59:32 2015
@@ -2610,8 +2610,8 @@
ScLayer layer;
layer.isViewable = false;
int Nr = Doc->MasterNames[name];
- int clipx = static_cast<int>(Doc->scratch()->Left);
- int clipy = static_cast<int>(Doc->scratch()->Top);
+ int clipx = static_cast<int>(Doc->scratch()->left());
+ int clipy = static_cast<int>(Doc->scratch()->top());
int clipw = qRound(Doc->MasterPages.at(Nr)->width());
int cliph = qRound(Doc->MasterPages.at(Nr)->height());
if ((clipw > 0) && (cliph > 0))
Modified: trunk/Scribus/scribus/ui/marginpresetlayout.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/ui/marginpresetlayout.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/marginpresetlayout.cpp (original)
+++ trunk/Scribus/scribus/ui/marginpresetlayout.cpp Thu Feb 19 13:59:32 2015
@@ -28,38 +28,38 @@
switch (index)
{
case PresetLayout::magazine:
- ret.Top = ret.Bottom = ret.Left = ret.Right = leftMargin;
+ ret.set(leftMargin, leftMargin, leftMargin, leftMargin);
break;
case PresetLayout::gutenberg:
{
double ratio = pageHeight / pageWidth;
- ret.Left = leftMargin;
- ret.Top = leftMargin * ratio;
- ret.Right = leftMargin * 2.0;
- ret.Bottom = ret.Right * ratio;
+ ret.setLeft(leftMargin);
+ ret.setTop(leftMargin * ratio);
+ ret.setRight(leftMargin * 2.0);
+ ret.setBottom(ret.right() * ratio);
}
break;
case PresetLayout::fibonacci:
- ret.Left = leftMargin;
- ret.Top = leftMargin / 2.0 * 3.0;
- ret.Right = leftMargin / 2.0 * 5.0;
- ret.Bottom = leftMargin / 2.0 * 8.0;
+ ret.setLeft(leftMargin);
+ ret.setTop(leftMargin / 2.0 * 3.0);
+ ret.setRight(leftMargin / 2.0 * 5.0);
+ ret.setBottom(leftMargin / 2.0 * 8.0);
break;
case PresetLayout::goldencut:
- ret.Left = leftMargin;
- ret.Top = leftMargin / 2.0 * 3.4;
- ret.Right = leftMargin / 2.0 * 4.8;
- ret.Bottom = leftMargin / 2.0 * 6.8;
+ ret.setLeft(leftMargin);
+ ret.setTop(leftMargin / 2.0 * 3.4);
+ ret.setRight(leftMargin / 2.0 * 4.8);
+ ret.setBottom(leftMargin / 2.0 * 6.8);
break;
case PresetLayout::nineparts:
- ret.Left = pageWidth / 9.0;
- ret.Top = pageHeight / 9.0;
- ret.Right = pageWidth / 9.0 * 2.0;
- ret.Bottom = pageHeight / 9.0 * 2.0;
+ ret.setLeft(pageWidth / 9.0);
+ ret.setTop(pageHeight / 9.0);
+ ret.setRight(pageWidth / 9.0 * 2.0);
+ ret.setBottom(pageHeight / 9.0 * 2.0);
break;
default:
updateMargins = false;
- ret.Top = ret.Bottom = ret.Left = ret.Right = -1.0;
+ ret.set(-1.0, -1.0, -1.0, -1.0);
}
return ret;
}
Modified: trunk/Scribus/scribus/ui/marginwidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/ui/marginwidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/marginwidget.cpp (original)
+++ trunk/Scribus/scribus/ui/marginwidget.cpp Thu Feb 19 13:59:32 2015
@@ -263,7 +263,7 @@
updateMarginSpinValues();
}
else
- marginData.Top = newVal;
+ marginData.setTop(newVal);
setPreset();
}
@@ -277,7 +277,7 @@
updateMarginSpinValues();
}
else
- marginData.Bottom = newVal;
+ marginData.setBottom(newVal);
setPreset();
}
@@ -291,7 +291,7 @@
updateMarginSpinValues();
}
else
- marginData.Left = newVal;
+ marginData.setLeft(newVal);
setPreset();
}
@@ -305,7 +305,7 @@
updateMarginSpinValues();
}
else
- marginData.Right = newVal;
+ marginData.setRight(newVal);
setPreset();
}
@@ -364,7 +364,7 @@
}
if (restoringValues || (presetCombo->needUpdate() && facingPages))
{
- marginData.set(qMax(0.0, marg.Top), qMax(0.0, marg.Left), qMax(0.0, marg.Bottom), qMax(0.0, marg.Right));
+ marginData.set(qMax(0.0, marg.top()), qMax(0.0, marg.left()), qMax(0.0, marg.bottom()), qMax(0.0, marg.right()));
updateMarginSpinValues();
bottomR->setMaximum(qMax(0.0, pageHeight * m_unitRatio - topR->value()));
@@ -408,10 +408,10 @@
upm.getNewPrinterMargins(t,b,l,r);
presetCombo->setCurrentIndex(PresetLayout::none);
- marginData.Top = t;
- marginData.Bottom = b;
- marginData.Left = l;
- marginData.Right = r;
+ marginData.setTop(t);
+ marginData.setBottom(b);
+ marginData.setLeft(l);
+ marginData.setRight(r);
updateMarginSpinValues();
bottomR->setMaximum((qMax(0.0, pageHeight - t) * m_unitRatio));
@@ -427,22 +427,22 @@
double MarginWidget::top() const
{
- return marginData.Top;
+ return marginData.top();
}
double MarginWidget::bottom() const
{
- return marginData.Bottom;
+ return marginData.bottom();
}
double MarginWidget::left() const
{
- return marginData.Left;
+ return marginData.left();
}
double MarginWidget::right() const
{
- return marginData.Right;
+ return marginData.right();
}
void MarginWidget::setNewMargins(MarginStruct &m)
@@ -515,10 +515,10 @@
disconnect(BleedRight, SIGNAL(valueChanged(double)), this, SLOT(changeBleeds()));
disconnect(BleedTop, SIGNAL(valueChanged(double)), this, SLOT(changeBleeds()));
disconnect(BleedBottom, SIGNAL(valueChanged(double)), this, SLOT(changeBleeds()));
- BleedTop->setValue(b.Top * m_unitRatio);
- BleedBottom->setValue(b.Bottom * m_unitRatio);
- BleedLeft->setValue(b.Left * m_unitRatio);
- BleedRight->setValue(b.Right * m_unitRatio);
+ BleedTop->setValue(b.top() * m_unitRatio);
+ BleedBottom->setValue(b.bottom() * m_unitRatio);
+ BleedLeft->setValue(b.left() * m_unitRatio);
+ BleedRight->setValue(b.right() * m_unitRatio);
connect(BleedLeft, SIGNAL(valueChanged(double)), this, SLOT(changeBleeds()));
connect(BleedRight, SIGNAL(valueChanged(double)), this, SLOT(changeBleeds()));
connect(BleedTop, SIGNAL(valueChanged(double)), this, SLOT(changeBleeds()));
@@ -573,8 +573,8 @@
void MarginWidget::updateMarginSpinValues()
{
- topR->setValue(marginData.Top * m_unitRatio);
- rightR->setValue(marginData.Right * m_unitRatio);
- bottomR->setValue(marginData.Bottom * m_unitRatio);
- leftR->setValue(marginData.Left * m_unitRatio);
-}
+ topR->setValue(marginData.top() * m_unitRatio);
+ rightR->setValue(marginData.right() * m_unitRatio);
+ bottomR->setValue(marginData.bottom() * m_unitRatio);
+ leftR->setValue(marginData.left() * m_unitRatio);
+}
Modified: trunk/Scribus/scribus/ui/newmarginwidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/ui/newmarginwidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/newmarginwidget.cpp (original)
+++ trunk/Scribus/scribus/ui/newmarginwidget.cpp Thu Feb 19 13:59:32 2015
@@ -115,7 +115,7 @@
updateMarginSpinValues();
}
else
- marginData.Top = newVal;
+ marginData.setTop(newVal);
setPreset();
}
@@ -129,7 +129,7 @@
updateMarginSpinValues();
}
else
- marginData.Bottom = newVal;
+ marginData.setBottom(newVal);
setPreset();
}
@@ -143,7 +143,7 @@
updateMarginSpinValues();
}
else
- marginData.Left = newVal;
+ marginData.setLeft(newVal);
setPreset();
}
@@ -157,7 +157,7 @@
updateMarginSpinValues();
}
else
- marginData.Right = newVal;
+ marginData.setRight(newVal);
setPreset();
}
@@ -203,7 +203,7 @@
}
if (restoringValues || (presetLayoutComboBox->needUpdate() && facingPages))
{
- marginData.set(qMax(0.0, marg.Top), qMax(0.0, marg.Left), qMax(0.0, marg.Bottom), qMax(0.0, marg.Right));
+ marginData.set(qMax(0.0, marg.top()), qMax(0.0, marg.left()), qMax(0.0, marg.bottom()), qMax(0.0, marg.right()));
updateMarginSpinValues();
bottomMarginSpinBox->setMaximum(qMax(0.0, pageHeight * m_unitRatio - topMarginSpinBox->value()));
@@ -246,10 +246,10 @@
bool topBlocked = topMarginSpinBox->blockSignals(true);
bool bottomBlocked = bottomMarginSpinBox->blockSignals(true);
- topMarginSpinBox->setValue(marginData.Top * m_unitRatio);
- rightMarginSpinBox->setValue(marginData.Right * m_unitRatio);
- bottomMarginSpinBox->setValue(marginData.Bottom * m_unitRatio);
- leftMarginSpinBox->setValue(marginData.Left * m_unitRatio);
+ topMarginSpinBox->setValue(marginData.top() * m_unitRatio);
+ rightMarginSpinBox->setValue(marginData.right() * m_unitRatio);
+ bottomMarginSpinBox->setValue(marginData.bottom() * m_unitRatio);
+ leftMarginSpinBox->setValue(marginData.left() * m_unitRatio);
leftMarginSpinBox->blockSignals(leftBlocked);
rightMarginSpinBox->blockSignals(rightBlocked);
Modified: trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp (original)
+++ trunk/Scribus/scribus/ui/pagepalette_masterpages.cpp Thu Feb 19 13:59:32 2015
@@ -248,12 +248,12 @@
lp++;
destination->LeftPg = lp;
}
- destination->initialMargins.Top = from->initialMargins.Top;
- destination->initialMargins.Bottom = from->initialMargins.Bottom;
+ destination->initialMargins.setTop(from->initialMargins.top());
+ destination->initialMargins.setBottom(from->initialMargins.bottom());
if (m_doc->pageSets()[m_doc->pagePositioning()].Columns == 1)
{
- destination->initialMargins.Left = from->initialMargins.Left;
- destination->initialMargins.Right = from->initialMargins.Right;
+ destination->initialMargins.setLeft(from->initialMargins.left());
+ destination->initialMargins.setRight(from->initialMargins.right());
}
else
{
@@ -261,19 +261,19 @@
{
if (destination->LeftPg > 1)
{
- destination->initialMargins.Right = from->initialMargins.Left;
- destination->initialMargins.Left = from->initialMargins.Left;
+ destination->initialMargins.setRight(from->initialMargins.left());
+ destination->initialMargins.setLeft(from->initialMargins.left());
}
else
{
- destination->initialMargins.Left = from->initialMargins.Left;
- destination->initialMargins.Right = from->initialMargins.Right;
+ destination->initialMargins.setLeft(from->initialMargins.left());
+ destination->initialMargins.setRight(from->initialMargins.right());
}
}
else
{
- destination->initialMargins.Left = from->initialMargins.Left;
- destination->initialMargins.Right = from->initialMargins.Right;
+ destination->initialMargins.setLeft(from->initialMargins.left());
+ destination->initialMargins.setRight(from->initialMargins.right());
}
}
//#8321 : incorrect selection of master page on new mp creation/duplictation
Modified: trunk/Scribus/scribus/ui/pdfopts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/ui/pdfopts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pdfopts.cpp (original)
+++ trunk/Scribus/scribus/ui/pdfopts.cpp Thu Feb 19 13:59:32 2015
@@ -275,10 +275,10 @@
m_opts.useDocBleeds = Options->docBleeds->isChecked();
if (!Options->docBleeds->isChecked())
{
- m_opts.bleeds.Top = Options->BleedTop->value() / m_unitRatio;
- m_opts.bleeds.Left = Options->BleedLeft->value() / m_unitRatio;
- m_opts.bleeds.Right = Options->BleedRight->value() / m_unitRatio;
- m_opts.bleeds.Bottom = Options->BleedBottom->value()/ m_unitRatio;
+ m_opts.bleeds.setTop(Options->BleedTop->value() / m_unitRatio);
+ m_opts.bleeds.setLeft(Options->BleedLeft->value() / m_unitRatio);
+ m_opts.bleeds.setRight(Options->BleedRight->value() / m_unitRatio);
+ m_opts.bleeds.setBottom(Options->BleedBottom->value()/ m_unitRatio);
}
m_opts.markLength = Options->markLength->value() / m_unitRatio;
m_opts.markOffset = Options->markOffset->value() / m_unitRatio;
Modified: trunk/Scribus/scribus/ui/prefs_display.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/ui/prefs_display.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_display.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_display.cpp Thu Feb 19 13:59:32 2015
@@ -121,10 +121,10 @@
unitChange(docUnitIndex);
- scratchSpaceLeftSpinBox->setValue(prefsData->displayPrefs.scratch.Left * unitRatio);
- scratchSpaceRightSpinBox->setValue(prefsData->displayPrefs.scratch.Right * unitRatio);
- scratchSpaceTopSpinBox->setValue(prefsData->displayPrefs.scratch.Top * unitRatio);
- scratchSpaceBottomSpinBox->setValue(prefsData->displayPrefs.scratch.Bottom * unitRatio);
+ scratchSpaceLeftSpinBox->setValue(prefsData->displayPrefs.scratch.left() * unitRatio);
+ scratchSpaceRightSpinBox->setValue(prefsData->displayPrefs.scratch.right() * unitRatio);
+ scratchSpaceTopSpinBox->setValue(prefsData->displayPrefs.scratch.top() * unitRatio);
+ scratchSpaceBottomSpinBox->setValue(prefsData->displayPrefs.scratch.bottom() * unitRatio);
pageGapHorizontalSpinBox->setValue(prefsData->displayPrefs.pageGapHorizontal * unitRatio);
pageGapVerticalSpinBox->setValue(prefsData->displayPrefs.pageGapVertical * unitRatio);
@@ -413,10 +413,10 @@
prefsData->displayPrefs.showVerifierWarningsOnCanvas=showVerifierWarningsOnCanvasCheckBox->isChecked();
prefsData->displayPrefs.showAutosaveClockOnCanvas=showAutosaveClockOnCanvasCheckBox->isChecked();
double unitRatio = unitGetRatioFromIndex(docUnitIndex);
- prefsData->displayPrefs.scratch.Left=scratchSpaceLeftSpinBox->value() / unitRatio;
- prefsData->displayPrefs.scratch.Right=scratchSpaceRightSpinBox->value() / unitRatio;
- prefsData->displayPrefs.scratch.Top=scratchSpaceTopSpinBox->value() / unitRatio;
- prefsData->displayPrefs.scratch.Bottom=scratchSpaceBottomSpinBox->value() / unitRatio;
+ prefsData->displayPrefs.scratch.setLeft(scratchSpaceLeftSpinBox->value() / unitRatio);
+ prefsData->displayPrefs.scratch.setRight(scratchSpaceRightSpinBox->value() / unitRatio);
+ prefsData->displayPrefs.scratch.setTop(scratchSpaceTopSpinBox->value() / unitRatio);
+ prefsData->displayPrefs.scratch.setBottom(scratchSpaceBottomSpinBox->value() / unitRatio);
prefsData->displayPrefs.pageGapHorizontal=pageGapHorizontalSpinBox->value() / unitRatio;
prefsData->displayPrefs.pageGapVertical=pageGapVerticalSpinBox->value() / unitRatio;
Modified: trunk/Scribus/scribus/ui/prefs_itemtools.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/ui/prefs_itemtools.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_itemtools.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_itemtools.cpp Thu Feb 19 13:59:32 2015
@@ -129,10 +129,10 @@
textTabWidthSpinBox->setValue(prefsData->itemToolPrefs.textTabWidth * unitRatio);
textColumnsSpinBox->setValue(prefsData->itemToolPrefs.textColumns);
textColumnGapSpinBox->setValue(prefsData->itemToolPrefs.textColumnGap * unitRatio);
- topTextDistanceSpinBox->setValue(prefsData->itemToolPrefs.textDistances.Top * unitRatio);
- bottomTextDistanceSpinBox->setValue(prefsData->itemToolPrefs.textDistances.Bottom * unitRatio);
- leftTextDistanceSpinBox->setValue(prefsData->itemToolPrefs.textDistances.Left * unitRatio);
- rightTextDistanceSpinBox->setValue(prefsData->itemToolPrefs.textDistances.Right * unitRatio);
+ topTextDistanceSpinBox->setValue(prefsData->itemToolPrefs.textDistances.top() * unitRatio);
+ bottomTextDistanceSpinBox->setValue(prefsData->itemToolPrefs.textDistances.bottom() * unitRatio);
+ leftTextDistanceSpinBox->setValue(prefsData->itemToolPrefs.textDistances.left() * unitRatio);
+ rightTextDistanceSpinBox->setValue(prefsData->itemToolPrefs.textDistances.right() * unitRatio);
//Image Tool
imageFreeScalingRadioButton->setChecked( prefsData->itemToolPrefs.imageScaleType );
@@ -253,10 +253,10 @@
prefsData->itemToolPrefs.textTabFillChar = textTabFillCharComboBox->currentText().right(1);
break;
}
- prefsData->itemToolPrefs.textDistances.Top = topTextDistanceSpinBox->value() / unitRatio;
- prefsData->itemToolPrefs.textDistances.Bottom = bottomTextDistanceSpinBox->value() / unitRatio;
- prefsData->itemToolPrefs.textDistances.Left = leftTextDistanceSpinBox->value() / unitRatio;
- prefsData->itemToolPrefs.textDistances.Right = rightTextDistanceSpinBox->value() / unitRatio;
+ prefsData->itemToolPrefs.textDistances.setTop(topTextDistanceSpinBox->value() / unitRatio);
+ prefsData->itemToolPrefs.textDistances.setBottom(bottomTextDistanceSpinBox->value() / unitRatio);
+ prefsData->itemToolPrefs.textDistances.setLeft(leftTextDistanceSpinBox->value() / unitRatio);
+ prefsData->itemToolPrefs.textDistances.setRight(rightTextDistanceSpinBox->value() / unitRatio);
prefsData->itemToolPrefs.imageFillColor = imageFrameFillColorComboBox->currentText();
if (prefsData->itemToolPrefs.imageFillColor == CommonStrings::tr_NoneColor)
prefsData->itemToolPrefs.imageFillColor = CommonStrings::None;
Modified: trunk/Scribus/scribus/ui/prefs_printer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/ui/prefs_printer.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_printer.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_printer.cpp Thu Feb 19 13:59:32 2015
@@ -89,6 +89,8 @@
prefs->getDouble("BleedBottom", 0.0),
prefs->getDouble("BleedRight", 0.0),
prefs->getDouble("BleedLeft", 0.0));
+
+
bleedsWidget->setup(bleeds, 0, docUnitIndex, false, false);
bleedsWidget->setPageWidth(prefsData->docSetupPrefs.pageWidth);
bleedsWidget->setPageHeight(prefsData->docSetupPrefs.pageHeight);
@@ -114,7 +116,7 @@
prefs->set("Copies", 1);
prefs->set("Separations", static_cast<int>(outputComboBox->currentIndex()==1));
//FIXME: This comparison looks wrong.
- prefs->set("PrintColor", static_cast<int>(!postscriptPrintToColorComboBox->currentIndex()==0));
+ prefs->set("PrintColor", static_cast<int>(!(postscriptPrintToColorComboBox->currentIndex()==0)));
prefs->set("SepArt", tr("All"));
prefs->set("MirrorH", pageMirrorHorizontallyCheckBox->isChecked());
prefs->set("MirrorV", pageMirrorVerticallyCheckBox->isChecked());
@@ -126,10 +128,10 @@
prefs->set("ICCinUse", applyICCProfilesCheckBox->isChecked());
double unitRatio = unitGetRatioFromIndex(prefsData->docSetupPrefs.docUnitIndex);
MarginStruct bleeds(bleedsWidget->margins());
- prefs->set("BleedTop", bleeds.Left);
- prefs->set("BleedBottom", bleeds.Bottom);
- prefs->set("BleedRight", bleeds.Right);
- prefs->set("BleedLeft", bleeds.Left);
+ prefs->set("BleedTop", bleeds.top());
+ prefs->set("BleedBottom", bleeds.bottom());
+ prefs->set("BleedRight", bleeds.right());
+ prefs->set("BleedLeft", bleeds.left());
prefs->set("markLength", markLengthSpinBox->value() / unitRatio);
prefs->set("markOffset", markOffsetSpinBox->value() / unitRatio);
prefs->set("cropMarks", cropMarksCheckBox->isChecked());
Modified: trunk/Scribus/scribus/ui/preview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/ui/preview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/preview.cpp (original)
+++ trunk/Scribus/scribus/ui/preview.cpp Thu Feb 19 13:59:32 2015
@@ -605,10 +605,7 @@
options.colorMarks = false;
options.markLength = 20.0;
options.markOffset = 0.0;
- options.bleeds.Top = 0.0;
- options.bleeds.Left = 0.0;
- options.bleeds.Right = 0.0;
- options.bleeds.Bottom = 0.0;
+ options.bleeds.set(0, 0, 0, 0);
PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, doc->PageColors, false, !spotColors->isChecked());
if (dd != NULL)
{
@@ -718,10 +715,7 @@
options.colorMarks = false;
options.markLength = 20.0;
options.markOffset = 0.0;
- options.bleeds.Top = 0.0;
- options.bleeds.Left = 0.0;
- options.bleeds.Right = 0.0;
- options.bleeds.Bottom = 0.0;
+ options.bleeds.set(0, 0, 0, 0);
PSLib *dd = new PSLib(options, true, prefsManager->appPrefs.fontPrefs.AvailFonts, ReallyUsed, doc->PageColors, false, !spotColors->isChecked());
if (dd != NULL)
{
Modified: trunk/Scribus/scribus/ui/printdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/ui/printdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/printdialog.cpp Thu Feb 19 13:59:32 2015
@@ -417,10 +417,10 @@
m_doc->Print_Options.prnEngine= printEngine();
m_doc->Print_Options.setDevParam = doDev();
m_doc->Print_Options.useDocBleeds = docBleeds->isChecked();
- m_doc->Print_Options.bleeds.Top = BleedTop->value() / m_doc->unitRatio();
- m_doc->Print_Options.bleeds.Left = BleedLeft->value() / m_doc->unitRatio();
- m_doc->Print_Options.bleeds.Right = BleedRight->value() / m_doc->unitRatio();
- m_doc->Print_Options.bleeds.Bottom = BleedBottom->value() / m_doc->unitRatio();
+ m_doc->Print_Options.bleeds.setTop(BleedTop->value() / m_doc->unitRatio());
+ m_doc->Print_Options.bleeds.setLeft(BleedLeft->value() / m_doc->unitRatio());
+ m_doc->Print_Options.bleeds.setRight(BleedRight->value() / m_doc->unitRatio());
+ m_doc->Print_Options.bleeds.setBottom(BleedBottom->value() / m_doc->unitRatio());
m_doc->Print_Options.markLength = markLength->value() / m_doc->unitRatio();
m_doc->Print_Options.markOffset = markOffset->value() / m_doc->unitRatio();
m_doc->Print_Options.cropMarks = cropMarks->isChecked();
@@ -544,17 +544,17 @@
docBleeds->setChecked(m_doc->Print_Options.useDocBleeds);
if (docBleeds->isChecked())
{
- BleedTop->setValue(m_doc->bleeds()->Top*unitRatio);
- BleedBottom->setValue(m_doc->bleeds()->Bottom*unitRatio);
- BleedRight->setValue(m_doc->bleeds()->Right*unitRatio);
- BleedLeft->setValue(m_doc->bleeds()->Left*unitRatio);
+ BleedTop->setValue(m_doc->bleeds()->top()*unitRatio);
+ BleedBottom->setValue(m_doc->bleeds()->bottom()*unitRatio);
+ BleedRight->setValue(m_doc->bleeds()->right()*unitRatio);
+ BleedLeft->setValue(m_doc->bleeds()->left()*unitRatio);
}
else
{
- BleedTop->setValue(m_doc->Print_Options.bleeds.Top*unitRatio);
- BleedBottom->setValue(m_doc->Print_Options.bleeds.Bottom*unitRatio);
- BleedRight->setValue(m_doc->Print_Options.bleeds.Right*unitRatio);
- BleedLeft->setValue(m_doc->Print_Options.bleeds.Left*unitRatio);
+ BleedTop->setValue(m_doc->Print_Options.bleeds.top()*unitRatio);
+ BleedBottom->setValue(m_doc->Print_Options.bleeds.bottom()*unitRatio);
+ BleedRight->setValue(m_doc->Print_Options.bleeds.right()*unitRatio);
+ BleedLeft->setValue(m_doc->Print_Options.bleeds.left()*unitRatio);
}
BleedTop->setEnabled(!docBleeds->isChecked());
BleedBottom->setEnabled(!docBleeds->isChecked());
@@ -680,10 +680,10 @@
prefs->set("BleedBottom", BleedBottom->value() / unitRatio);
prefs->set("BleedRight", BleedRight->value() / unitRatio);
prefs->set("BleedLeft", BleedLeft->value() / unitRatio);
- BleedTop->setValue(m_doc->bleeds()->Top*unitRatio);
- BleedBottom->setValue(m_doc->bleeds()->Bottom*unitRatio);
- BleedRight->setValue(m_doc->bleeds()->Right*unitRatio);
- BleedLeft->setValue(m_doc->bleeds()->Left*unitRatio);
+ BleedTop->setValue(m_doc->bleeds()->top()*unitRatio);
+ BleedBottom->setValue(m_doc->bleeds()->bottom()*unitRatio);
+ BleedRight->setValue(m_doc->bleeds()->right()*unitRatio);
+ BleedLeft->setValue(m_doc->bleeds()->left()*unitRatio);
}
else
{
Modified: trunk/Scribus/scribus/ui/tabpdfoptions.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19831&path=/trunk/Scribus/scribus/ui/tabpdfoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabpdfoptions.cpp (original)
+++ trunk/Scribus/scribus/ui/tabpdfoptions.cpp Thu Feb 19 13:59:32 2015
@@ -1325,10 +1325,10 @@
InfoString->setText(fi.fileName());
}
- BleedTop->setValue(Opts.bleeds.Top*unitRatio);
- BleedBottom->setValue(Opts.bleeds.Bottom*unitRatio);
- BleedRight->setValue(Opts.bleeds.Right*unitRatio);
- BleedLeft->setValue(Opts.bleeds.Left*unitRatio);
+ BleedTop->setValue(Opts.bleeds.top()*unitRatio);
+ BleedBottom->setValue(Opts.bleeds.bottom()*unitRatio);
+ BleedRight->setValue(Opts.bleeds.right()*unitRatio);
+ BleedLeft->setValue(Opts.bleeds.left()*unitRatio);
docBleeds->setChecked(Opts.useDocBleeds);
doDocBleeds();
@@ -1422,10 +1422,10 @@
pdfOptions.markLength = markLength->value() / unitRatio;
pdfOptions.markOffset = markOffset->value() / unitRatio;
pdfOptions.useDocBleeds = docBleeds->isChecked();
- pdfOptions.bleeds.Bottom = BleedBottom->value() / unitRatio;
- pdfOptions.bleeds.Top = BleedTop->value() / unitRatio;
- pdfOptions.bleeds.Left = BleedLeft->value() / unitRatio;
- pdfOptions.bleeds.Right = BleedRight->value() / unitRatio;
+ pdfOptions.bleeds.setBottom(BleedBottom->value() / unitRatio);
+ pdfOptions.bleeds.setTop(BleedTop->value() / unitRatio);
+ pdfOptions.bleeds.setLeft(BleedLeft->value() / unitRatio);
+ pdfOptions.bleeds.setRight(BleedRight->value() / unitRatio);
pdfOptions.doClip = ClipMarg->isChecked();
if (Encry->isChecked())
{
@@ -1495,14 +1495,14 @@
{
if (docBleeds->isChecked())
{
- Opts.bleeds.Top = BleedTop->value() / unitRatio;
- Opts.bleeds.Bottom = BleedBottom->value() / unitRatio;
- Opts.bleeds.Right = BleedRight->value() / unitRatio;
- Opts.bleeds.Left = BleedLeft->value() / unitRatio;
- BleedTop->setValue(m_Doc->bleeds()->Top*unitRatio);
- BleedBottom->setValue(m_Doc->bleeds()->Bottom*unitRatio);
- BleedRight->setValue(m_Doc->bleeds()->Right*unitRatio);
- BleedLeft->setValue(m_Doc->bleeds()->Left*unitRatio);
+ Opts.bleeds.setTop(BleedTop->value() / unitRatio);
+ Opts.bleeds.setBottom(BleedBottom->value() / unitRatio);
+ Opts.bleeds.setRight(BleedRight->value() / unitRatio);
+ Opts.bleeds.setLeft(BleedLeft->value() / unitRatio);
+ BleedTop->setValue(m_Doc->bleeds()->top()*unitRatio);
+ BleedBottom->setValue(m_Doc->bleeds()->bottom()*unitRatio);
+ BleedRight->setValue(m_Doc->bleeds()->right()*unitRatio);
+ BleedLeft->setValue(m_Doc->bleeds()->left()*unitRatio);
BleedTop->setEnabled(false);
BleedBottom->setEnabled(false);
BleedRight->setEnabled(false);
@@ -1510,10 +1510,10 @@
}
else
{
- BleedTop->setValue(Opts.bleeds.Top*unitRatio);
- BleedBottom->setValue(Opts.bleeds.Bottom*unitRatio);
- BleedRight->setValue(Opts.bleeds.Right*unitRatio);
- BleedLeft->setValue(Opts.bleeds.Left*unitRatio);
+ BleedTop->setValue(Opts.bleeds.top()*unitRatio);
+ BleedBottom->setValue(Opts.bleeds.bottom()*unitRatio);
+ BleedRight->setValue(Opts.bleeds.right()*unitRatio);
+ BleedLeft->setValue(Opts.bleeds.left()*unitRatio);
BleedTop->setEnabled(true);
BleedBottom->setEnabled(true);
BleedRight->setEnabled(true);
More information about the scribus-commit
mailing list