Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 3199 → Rev 3200

/branches/Version13x/Scribus/scribus/fileloader.cpp
626,7 → 626,7
}
if (((pg.tagName()=="PAGE") || (pg.tagName()=="MASTERPAGE")) && (QStoInt(pg.attribute("NUM")) == PageToLoad))
{
a = doc->currentPage->PageNr;
a = doc->currentPage->pageNr();
Apage = doc->Pages.at(a);
if ((pg.tagName()!="MASTERPAGE") && (Mpage))
{
643,12 → 643,12
if (pg.hasAttribute("Orientation"))
Apage->PageOri = QStoInt(pg.attribute("Orientation"));
if (pg.hasAttribute("PAGEWIDTH"))
Apage->Width=QStodouble(pg.attribute("PAGEWIDTH"));
Apage->setWidth(QStodouble(pg.attribute("PAGEWIDTH")));
else
Apage->Width=QStodouble(pg.attribute("PAGEWITH"));
Apage->Height = QStodouble(pg.attribute("PAGEHEIGHT"));
Apage->initialHeight = Apage->Height;
Apage->initialWidth = Apage->Width;
Apage->setWidth(QStodouble(pg.attribute("PAGEWITH")));
Apage->setHeight(QStodouble(pg.attribute("PAGEHEIGHT")));
Apage->setInitialHeight(Apage->height());
Apage->setInitialWidth(Apage->width());
Apage->initialMargins.Top = QStodouble(pg.attribute("BORDERTOP"));
Apage->initialMargins.Bottom = QStodouble(pg.attribute("BORDERBOTTOM"));
Apage->initialMargins.Left = QStodouble(pg.attribute("BORDERLEFT"));
701,8 → 701,8
int docGc = doc->GroupCounter;
doc->GroupCounter = 0;
Neu = PasteItem(&pg, doc, view);
Neu->Xpos = Neu->Xpos - pageX + Apage->Xoffset;
Neu->Ypos = Neu->Ypos - pageY + Apage->Yoffset;
Neu->Xpos = Neu->Xpos - pageX + Apage->xOffset();
Neu->Ypos = Neu->Ypos - pageY + Apage->yOffset();
view->setRedrawBounding(Neu);
Neu->OwnPage = view->OnPage(Neu);
if (pg.tagName()=="PAGEOBJECT")
1505,15 → 1505,15
Apage->PageSize = pg.attribute("Size");
if (pg.hasAttribute("Orientation"))
Apage->PageOri = QStoInt(pg.attribute("Orientation"));
Apage->Xoffset = QStodouble(pg.attribute("PAGEXPOS"));
Apage->Yoffset = QStodouble(pg.attribute("PAGEYPOS"));
Apage->setXOffset(QStodouble(pg.attribute("PAGEXPOS")));
Apage->setYOffset(QStodouble(pg.attribute("PAGEYPOS")));
if (pg.hasAttribute("PAGEWIDTH"))
Apage->Width=QStodouble(pg.attribute("PAGEWIDTH"));
Apage->setWidth(QStodouble(pg.attribute("PAGEWIDTH")));
else
Apage->Width=QStodouble(pg.attribute("PAGEWITH"));
Apage->Height = QStodouble(pg.attribute("PAGEHEIGHT"));
Apage->initialHeight = Apage->Height;
Apage->initialWidth = Apage->Width;
Apage->setWidth(QStodouble(pg.attribute("PAGEWITH")));
Apage->setHeight(QStodouble(pg.attribute("PAGEHEIGHT")));
Apage->setInitialHeight(Apage->height());
Apage->setInitialWidth(Apage->width());
Apage->initialMargins.Top = QStodouble(pg.attribute("BORDERTOP"));
Apage->initialMargins.Bottom = QStodouble(pg.attribute("BORDERBOTTOM"));
Apage->initialMargins.Left = QStodouble(pg.attribute("BORDERLEFT"));
/branches/Version13x/Scribus/scribus/mpalette.cpp
1404,8 → 1404,8
inY -= doc->rulerYoffset;
if (doc->guidesSettings.rulerMode)
{
inX -= doc->currentPage->Xoffset;
inY -= doc->currentPage->Yoffset;
inX -= doc->currentPage->xOffset();
inY -= doc->currentPage->yOffset();
}
}
Xpos->setValue(inX*Umrech);
1806,8 → 1806,8
y += doc->rulerYoffset;
if (doc->guidesSettings.rulerMode)
{
x += doc->currentPage->Xoffset;
y += doc->currentPage->Yoffset;
x += doc->currentPage->xOffset();
y += doc->currentPage->yOffset();
}
if (ScApp->view->GroupSel)
{
1868,8 → 1868,8
y += doc->rulerYoffset;
if (doc->guidesSettings.rulerMode)
{
x += doc->currentPage->Xoffset;
y += doc->currentPage->Yoffset;
x += doc->currentPage->xOffset();
y += doc->currentPage->yOffset();
}
if (ScApp->view->GroupSel)
{
/branches/Version13x/Scribus/scribus/util.cpp
103,7 → 103,8
QImage out = Image->copy();
if ((CMSuse) && (SoftProofing))
{
for (int i=0; i < out.height(); ++i)
int outheight=out.height();
for (int i=0; i < outheight; ++i)
{
LPBYTE ptr = out.scanLine(i);
cmsDoTransform(stdProofImgG, ptr, ptr, out.width());
113,7 → 114,8
{
if (CMSuse)
{
for (int i=0; i < out.height(); ++i)
int outheight=out.height();
for (int i=0; i < outheight; ++i)
{
LPBYTE ptr = out.scanLine(i);
cmsDoTransform(stdTransImgG, ptr, ptr, out.width());
/branches/Version13x/Scribus/scribus/page.h
36,18 → 36,23
class SCRIBUS_API Page : public UndoObject
{
public:
Page(double x, double y, double b, double h);
Page(const double x, const double y, const double b, const double h);
~Page() {};
double Xoffset;
double Yoffset;
double Width;
double Height;
double initialWidth;
double initialHeight;
const double xOffset();
const double yOffset();
const double width();
const double height();
const double initialWidth();
const double initialHeight();
void setXOffset(const double);
void setYOffset(const double);
void setWidth(const double);
void setHeight(const double);
void setInitialWidth(const double);
void setInitialHeight(const double);
MarginStruct Margins;
MarginStruct initialMargins;
/** Nummer der Seite */
uint PageNr;
int LeftPg;
QString MPageNam;
QString PageNam;
56,8 → 61,8
QValueList<double> XGuides;
QValueList<double> YGuides;
QPtrList<PageItem> FromMaster;
void setPageNr(int pageNr);
uint getPageNr();
void setPageNr(const int pageNr);
uint pageNr();
void addXGuide(double position);
void addYGuide(double position);
void addXGuides(QValueList<double>& guides);
75,6 → 80,14
UndoManager* undoManager;
void restorePageItemCreation(ItemState<PageItem*> *state, bool isUndo);
void restorePageItemDeletion(ItemState<PageItem*> *state, bool isUndo);
double m_xOffset;
double m_yOffset;
double m_width;
double m_height;
double m_initialWidth;
double m_initialHeight;
uint m_pageNr;
};
 
#endif
/branches/Version13x/Scribus/scribus/preview.cpp
346,8 → 346,8
return ret;
}
QString tmp, tmp2, tmp3;
double b = doc->Pages.at(Seite)->Width * Res / 72.0;
double h = doc->Pages.at(Seite)->Height * Res / 72.0;
double b = doc->Pages.at(Seite)->width() * Res / 72.0;
double h = doc->Pages.at(Seite)->height() * Res / 72.0;
cmd1 = getShortPathName(prefsManager->ghostscriptExecutable());
cmd1 += " -q -dNOPAUSE -r"+tmp.setNum(qRound(Res))+" -g"+tmp2.setNum(qRound(b))+"x"+tmp3.setNum(qRound(h));
if (EnableCMYK->isChecked())
406,8 → 406,8
{
int ret = -1;
QPixmap Bild;
double b = doc->Pages.at(Seite)->Width * Res / 72.0;
double h = doc->Pages.at(Seite)->Height * Res / 72.0;
double b = doc->Pages.at(Seite)->width() * Res / 72.0;
double h = doc->Pages.at(Seite)->height() * Res / 72.0;
qApp->setOverrideCursor(QCursor(waitCursor), true);
if ((Seite != APage) || (EnableCMYK->isChecked() != CMode) || (SMode != scaleBox->currentItem())
|| (AliasText->isChecked() != TxtAl) || (AliasGr->isChecked() != GrAl) || (EnableGCR->isChecked() != GMode)
/branches/Version13x/Scribus/scribus/margindialog.cpp
64,13 → 64,13
widthMSpinBox = new MSpinBox( 1, 100000, dsGroupBox7, unitGetDecimalsFromIndex(doc->unitIndex()) );
widthQLabel = new QLabel( tr( "&Width:" ), dsGroupBox7, "widthLabel" );
widthMSpinBox->setSuffix(unitGetSuffixFromIndex(doc->unitIndex()));
widthMSpinBox->setValue(doc->currentPage->Width * doc->unitRatio());
widthMSpinBox->setValue(doc->currentPage->width() * doc->unitRatio());
widthQLabel->setBuddy(widthMSpinBox);
dsGroupBox7Layout->addWidget( widthQLabel, 2, 0 );
dsGroupBox7Layout->addWidget( widthMSpinBox, 2, 1 );
heightMSpinBox = new MSpinBox( 1, 100000, dsGroupBox7, unitGetDecimalsFromIndex(doc->unitIndex()) );
heightMSpinBox->setSuffix(unitGetSuffixFromIndex(doc->unitIndex()));
heightMSpinBox->setValue(doc->currentPage->Height * doc->unitRatio());
heightMSpinBox->setValue(doc->currentPage->height() * doc->unitRatio());
heightQLabel = new QLabel(heightMSpinBox, tr( "&Height:" ), dsGroupBox7, "heightLabel" );
dsGroupBox7Layout->addWidget( heightQLabel, 2, 2 );
dsGroupBox7Layout->addWidget( heightMSpinBox, 2, 3 );
100,8 → 100,8
dialogLayout->addWidget( dsGroupBox7 );
GroupRand = new MarginWidget(this, tr( "Margin Guides" ), &doc->currentPage->initialMargins, unitGetDecimalsFromIndex(doc->unitIndex()), doc->unitRatio(), unitGetSuffixFromIndex(doc->unitIndex()));
GroupRand->setPageHeight(doc->currentPage->Height * doc->unitRatio());
GroupRand->setPageWidth(doc->currentPage->Width * doc->unitRatio());
GroupRand->setPageHeight(doc->currentPage->height() * doc->unitRatio());
GroupRand->setPageWidth(doc->currentPage->width() * doc->unitRatio());
GroupRand->setFacingPages(!(doc->currentPageLayout == singlePage));
dialogLayout->addWidget( GroupRand );
 
/branches/Version13x/Scribus/scribus/aligndistribute.h
151,7 → 151,6
double guidePosition;
QString guideInfoText, guideInfoTextNone;
void enableGuideButtons();
double widthForPageLocation();
signals:
void documentChanged();
/branches/Version13x/Scribus/scribus/hruler.cpp
316,9 → 316,9
p.begin(currView->viewport());
p.setRasterOp(XorROP);
p.setPen(QPen(white, 1, DotLine, FlatCap, MiterJoin));
QPoint out = currView->contentsToViewport(QPoint(0, qRound(currDoc->currentPage->Yoffset*Scaling)));
p.drawLine(Markp, out.y(), Markp, out.y()+qRound(currDoc->currentPage->Height * Scaling));
p.drawLine(py.x(), out.y(), py.x(), out.y()+qRound(currDoc->currentPage->Height * Scaling));
QPoint out = currView->contentsToViewport(QPoint(0, qRound(currDoc->currentPage->yOffset() * Scaling)));
p.drawLine(Markp, out.y(), Markp, out.y()+qRound(currDoc->currentPage->height() * Scaling));
p.drawLine(py.x(), out.y(), py.x(), out.y()+qRound(currDoc->currentPage->height() * Scaling));
p.end();
Markp = py.x();
}
752,8 → 752,8
ItemEndPos = pos+width;
if (currDoc->guidesSettings.rulerMode)
{
ItemPos -= currDoc->currentPage->Xoffset;
ItemEndPos -= currDoc->currentPage->Xoffset;
ItemPos -= currDoc->currentPage->xOffset();
ItemEndPos -= currDoc->currentPage->xOffset();
}
}
 
/branches/Version13x/Scribus/scribus/page.cpp
23,14 → 23,14
extern QPixmap loadIcon(QString nam);
extern ScribusApp *ScApp;
 
Page::Page(double x, double y, double b, double h) : UndoObject(QObject::tr("Page"))
Page::Page(const double x, const double y, const double b, const double h) : UndoObject(QObject::tr("Page"))
{
Xoffset = x;
Yoffset = y;
Width = b;
Height = h;
initialWidth = b;
initialHeight = h;
m_xOffset = x;
m_yOffset = y;
m_width = b;
m_height = h;
m_initialWidth = b;
m_initialHeight = h;
Margins.Top = 40;
Margins.Left = 40;
Margins.Right = 40;
47,18 → 47,18
undoManager = UndoManager::instance();
}
 
void Page::setPageNr(int pageNr)
void Page::setPageNr(const int pageNr)
{
PageNr = pageNr;
m_pageNr = pageNr;
if (PageNam.isEmpty())
setUName(QString(QObject::tr("Page") + " %1").arg(ScApp->doc->FirstPnum + PageNr));
setUName(QString(QObject::tr("Page") + " %1").arg(ScApp->doc->FirstPnum + m_pageNr));
else
setUName(PageNam);
}
 
uint Page::getPageNr()
uint Page::pageNr()
{
return PageNr;
return m_pageNr;
}
 
void Page::addXGuide(double position)
307,3 → 307,63
ScApp->view->Deselect();
}
}
 
const double Page::xOffset()
{
return m_xOffset;
}
 
const double Page::yOffset()
{
return m_yOffset;
}
 
const double Page::width()
{
return m_width;
}
 
const double Page::height()
{
return m_height;
}
 
const double Page::initialWidth()
{
return m_initialWidth;
}
 
const double Page::initialHeight()
{
return m_initialHeight;
}
 
void Page::setXOffset(const double newCanvasXOffset)
{
m_xOffset = newCanvasXOffset;
}
 
void Page::setYOffset(const double newCanvasYOffset)
{
m_yOffset = newCanvasYOffset;
}
 
void Page::setWidth(const double newWidth)
{
m_width = newWidth;
}
 
void Page::setHeight(const double newHeight)
{
m_height = newHeight;
}
 
void Page::setInitialWidth(const double newInitialWidth)
{
m_initialWidth = newInitialWidth;
}
 
void Page::setInitialHeight(const double newInitialHeight)
{
m_initialHeight = newInitialHeight;
}
/branches/Version13x/Scribus/scribus/reformdoc.cpp
715,8 → 715,8
Page *pp = currDoc->Pages.at(p);
if (sizeAllPages->isChecked())
{
pp->initialWidth = currDoc->pageWidth;
pp->initialHeight = currDoc->pageHeight;
pp->setInitialWidth(currDoc->pageWidth);
pp->setInitialHeight(currDoc->pageHeight);
}
if (marginsForAllPages->isChecked())
{
731,8 → 731,8
Page *pp = currDoc->MasterPages.at(p);
if (sizeAllPages->isChecked())
{
pp->initialWidth = currDoc->pageWidth;
pp->initialHeight = currDoc->pageHeight;
pp->setInitialWidth(currDoc->pageWidth);
pp->setInitialHeight(currDoc->pageHeight);
}
if (marginsForAllPages->isChecked())
{
/branches/Version13x/Scribus/scribus/pdflib.cpp
1023,10 → 1023,10
ite =PItems.at(a);
if (ite->LayerNr != ll.LNr)
continue;
int x = static_cast<int>(pag->Xoffset);
int y = static_cast<int>(pag->Yoffset);
int w = static_cast<int>(pag->Width);
int h1 = static_cast<int>(pag->Height);
int x = static_cast<int>(pag->xOffset());
int y = static_cast<int>(pag->yOffset());
int w = static_cast<int>(pag->width());
int h1 = static_cast<int>(pag->height());
int x2 = static_cast<int>(ite->BoundingX - ite->Pwidth / 2.0);
int y2 = static_cast<int>(ite->BoundingY - ite->Pwidth / 2.0);
int w2 = static_cast<int>(ite->BoundingW + ite->Pwidth);
1035,13 → 1035,13
continue;
if (ite->ChangedMasterItem)
continue;
if ((!pag->PageNam.isEmpty()) && (ite->OwnPage != static_cast<int>(pag->PageNr)) && (ite->OwnPage != -1))
if ((!pag->PageNam.isEmpty()) && (ite->OwnPage != static_cast<int>(pag->pageNr())) && (ite->OwnPage != -1))
continue;
PutPage("q\n");
if (((ite->fillTransparency() != 0) || (ite->lineTransparency() != 0)) && (Options->Version >= 14))
PutPage(PDF_Transparenz(ite));
if ((ite->isBookmark) && (Options->Bookmarks))
PDF_Bookmark(ite->BMnr, pag->Height - (ite->Ypos - pag->Yoffset));
PDF_Bookmark(ite->BMnr, pag->height() - (ite->Ypos - pag->yOffset()));
if (!ite->printable() || ((ite->itemType() == PageItem::TextFrame) && (!pag->PageNam.isEmpty())))
{
PutPage("Q\n");
1120,7 → 1120,7
PutPage("0 j\n");
break;
}
PutPage("1 0 0 1 "+FToStr(ite->Xpos - pag->Xoffset)+" "+FToStr(pag->Height - (ite->Ypos - pag->Yoffset))+" cm\n");
PutPage("1 0 0 1 "+FToStr(ite->Xpos - pag->xOffset())+" "+FToStr(pag->height() - (ite->Ypos - pag->yOffset()))+" cm\n");
if (ite->Rot != 0)
{
double sr = sin(-ite->Rot* M_PI / 180.0);
1413,7 → 1413,7
PutPage("Q\n");
}
}
PutPage(setTextSt(ite, pag->PageNr, pag));
PutPage(setTextSt(ite, pag->pageNr(), pag));
break;
}
PutPage("Q\n");
1420,7 → 1420,7
StartObj(ObjCounter);
ObjCounter++;
PutDoc("<<\n/Type /XObject\n/Subtype /Form\n/FormType 1\n");
PutDoc("/BBox [ 0 0 "+FToStr(ActPageP->Width)+" "+FToStr(ActPageP->Height)+" ]\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)
{
1515,14 → 1515,14
 
void PDFlib::PDF_End_Page()
{
uint PgNr = ActPageP->PageNr;
uint PgNr = ActPageP->pageNr();
Seite.ObjNum = ObjCounter;
WritePDFStream(&Inhalt);
StartObj(ObjCounter);
PutDoc("<<\n/Type /Page\n/Parent 4 0 R\n");
PutDoc("/MediaBox [0 0 "+FToStr(ActPageP->Width)+" "+FToStr(ActPageP->Height)+"]\n");
PutDoc("/MediaBox [0 0 "+FToStr(ActPageP->width())+" "+FToStr(ActPageP->height())+"]\n");
PutDoc("/TrimBox ["+FToStr(Options->BleedLeft)+" "+FToStr(Options->BleedBottom)+
" "+FToStr(ActPageP->Width-Options->BleedRight)+" "+FToStr(ActPageP->Height-Options->BleedTop)+"]\n");
" "+FToStr(ActPageP->width()-Options->BleedRight)+" "+FToStr(ActPageP->height()-Options->BleedTop)+"]\n");
PutDoc("/Rotate "+IToStr(Options->RotateDeg)+"\n");
PutDoc("/Contents "+IToStr(Seite.ObjNum)+" 0 R\n");
if (Options->Thumbnails)
1625,18 → 1625,18
if (Options->UseLPI)
PutPage("/"+HTName+" gs\n");
if ( (Options->MirrorH) && (!pag->MPageNam.isEmpty()) )
PutPage("-1 0 0 1 "+FToStr(ActPageP->Width)+" 0 cm\n");
PutPage("-1 0 0 1 "+FToStr(ActPageP->width())+" 0 cm\n");
if ( (Options->MirrorV) && (!pag->MPageNam.isEmpty()) )
PutPage("1 0 0 -1 0 "+FToStr(ActPageP->Height)+" cm\n");
PutPage("1 0 0 -1 0 "+FToStr(ActPageP->height())+" cm\n");
if (clip)
{
PutPage(FToStr(pag->Margins.Left) + " " + FToStr(pag->Margins.Bottom) + " m\n");
PutPage(FToStr(ActPageP->Width - pag->Margins.Right) + " " + FToStr(pag->Margins.Bottom) + " l\n");
PutPage(FToStr(ActPageP->Width - pag->Margins.Right) + " " + FToStr(ActPageP->Height - pag->Margins.Top) + " l\n");
PutPage(FToStr(pag->Margins.Left) + " " + FToStr(ActPageP->Height - pag->Margins.Top) + " l h W n\n");
PutPage(FToStr(ActPageP->width() - pag->Margins.Right) + " " + FToStr(pag->Margins.Bottom) + " l\n");
PutPage(FToStr(ActPageP->width() - pag->Margins.Right) + " " + FToStr(ActPageP->height() - pag->Margins.Top) + " l\n");
PutPage(FToStr(pag->Margins.Left) + " " + FToStr(ActPageP->height() - pag->Margins.Top) + " l h W n\n");
}
else
PutPage("0 0 "+FToStr(ActPageP->Width)+" "+FToStr(ActPageP->Height)+" re W n\n");
PutPage("0 0 "+FToStr(ActPageP->width())+" "+FToStr(ActPageP->height())+" re W n\n");
if (!pag->MPageNam.isEmpty())
{
Page* mPage = doc->MasterPages.at(doc->MasterNames[doc->Pages.at(PNr)->MPageNam]);
1657,7 → 1657,7
ite = pag->FromMaster.at(am);
if ((ite->LayerNr != ll.LNr) || (!ite->printable()))
continue;
if ((!pag->PageNam.isEmpty()) && (ite->OwnPage != static_cast<int>(pag->PageNr)) && (ite->OwnPage != -1))
if ((!pag->PageNam.isEmpty()) && (ite->OwnPage != static_cast<int>(pag->pageNr())) && (ite->OwnPage != -1))
continue;
QString name = "/"+pag->MPageNam.simplifyWhiteSpace().replace( QRegExp("\\s"), "" ) + IToStr(ite->ItemNr);
if (ite->itemType() != PageItem::TextFrame)
1726,7 → 1726,7
PutPage("0 j\n");
break;
}
PutPage("1 0 0 1 "+FToStr(ite->Xpos - mPage->Xoffset)+" "+FToStr(mPage->Height - (ite->Ypos - mPage->Yoffset))+" cm\n");
PutPage("1 0 0 1 "+FToStr(ite->Xpos - mPage->xOffset())+" "+FToStr(mPage->height() - (ite->Ypos - mPage->yOffset()))+" cm\n");
if (ite->Rot != 0)
{
double sr = sin(-ite->Rot* M_PI / 180.0);
1782,7 → 1782,7
continue;
if (ite->ChangedMasterItem)
continue;
if ((!pag->PageNam.isEmpty()) && (ite->OwnPage != static_cast<int>(pag->PageNr)) && (ite->OwnPage != -1))
if ((!pag->PageNam.isEmpty()) && (ite->OwnPage != static_cast<int>(pag->pageNr())) && (ite->OwnPage != -1))
continue;
if (!ite->isTableItem)
continue;
1848,7 → 1848,7
PutPage("0 j\n");
break;
}
PutPage("1 0 0 1 "+FToStr(ite->Xpos - mPage->Xoffset)+" "+FToStr(mPage->Height - (ite->Ypos - mPage->Yoffset))+" cm\n");
PutPage("1 0 0 1 "+FToStr(ite->Xpos - mPage->xOffset())+" "+FToStr(mPage->height() - (ite->Ypos - mPage->yOffset()))+" cm\n");
if (ite->Rot != 0)
{
double sr = sin(-ite->Rot* M_PI / 180.0);
1919,10 → 1919,10
continue;
if (!ite->isTableItem)
continue;
int x = static_cast<int>(pag->Xoffset);
int y = static_cast<int>(pag->Yoffset);
int w = static_cast<int>(pag->Width);
int h1 = static_cast<int>(pag->Height);
int x = static_cast<int>(pag->xOffset());
int y = static_cast<int>(pag->yOffset());
int w = static_cast<int>(pag->width());
int h1 = static_cast<int>(pag->height());
int x2 = static_cast<int>(ite->BoundingX - ite->Pwidth / 2.0);
int y2 = static_cast<int>(ite->BoundingY - ite->Pwidth / 2.0);
int w2 = static_cast<int>(ite->BoundingW + ite->Pwidth);
1931,7 → 1931,7
continue;
if (ite->ChangedMasterItem)
continue;
if ((!pag->PageNam.isEmpty()) && (ite->OwnPage != static_cast<int>(pag->PageNr)) && (ite->OwnPage != -1))
if ((!pag->PageNam.isEmpty()) && (ite->OwnPage != static_cast<int>(pag->pageNr())) && (ite->OwnPage != -1))
continue;
PutPage("q\n");
if (((ite->fillTransparency() != 0) || (ite->lineTransparency() != 0)) && (Options->Version >= 14))
2000,7 → 2000,7
PutPage("0 j\n");
break;
}
PutPage("1 0 0 1 "+FToStr(ite->Xpos - pag->Xoffset)+" "+FToStr(pag->Height - (ite->Ypos - pag->Yoffset))+" cm\n");
PutPage("1 0 0 1 "+FToStr(ite->Xpos - pag->xOffset())+" "+FToStr(pag->height() - (ite->Ypos - pag->yOffset()))+" cm\n");
if (ite->Rot != 0)
{
double sr = sin(-ite->Rot* M_PI / 180.0);
2050,10 → 2050,10
QString PDFlib::PDF_ProcessItem(PageItem* ite, Page* pag, uint PNr, bool embedded)
{
QString tmp = "";
int x = static_cast<int>(pag->Xoffset);
int y = static_cast<int>(pag->Yoffset);
int w = static_cast<int>(pag->Width);
int h1 = static_cast<int>(pag->Height);
int x = static_cast<int>(pag->xOffset());
int y = static_cast<int>(pag->yOffset());
int w = static_cast<int>(pag->width());
int h1 = static_cast<int>(pag->height());
int x2 = static_cast<int>(ite->BoundingX - ite->Pwidth / 2.0);
int y2 = static_cast<int>(ite->BoundingY - ite->Pwidth / 2.0);
int w2 = static_cast<int>(ite->BoundingW + ite->Pwidth);
2062,13 → 2062,13
return tmp;
if (ite->ChangedMasterItem)
return tmp;
if ((!pag->PageNam.isEmpty()) && (ite->OwnPage != static_cast<int>(pag->PageNr)) && (ite->OwnPage != -1))
if ((!pag->PageNam.isEmpty()) && (ite->OwnPage != static_cast<int>(pag->pageNr())) && (ite->OwnPage != -1))
return tmp;
tmp += "q\n";
if (((ite->fillTransparency() != 0) || (ite->lineTransparency() != 0)) && (Options->Version >= 14))
tmp += PDF_Transparenz(ite);
if ((ite->isBookmark) && (Options->Bookmarks))
PDF_Bookmark(ite->BMnr, pag->Height - (ite->Ypos - pag->Yoffset));
PDF_Bookmark(ite->BMnr, pag->height() - (ite->Ypos - pag->yOffset()));
if (!ite->printable() || ((ite->itemType() == PageItem::TextFrame) && (!pag->PageNam.isEmpty())))
{
tmp += "Q\n";
2149,7 → 2149,7
}
if (!embedded)
{
tmp += "1 0 0 1 "+FToStr(ite->Xpos - pag->Xoffset)+" "+FToStr(pag->Height - (ite->Ypos - pag->Yoffset))+" cm\n";
tmp += "1 0 0 1 "+FToStr(ite->Xpos - pag->xOffset())+" "+FToStr(pag->height() - (ite->Ypos - pag->yOffset()))+" cm\n";
}
if (ite->Rot != 0)
{
3587,8 → 3587,8
size_t ar = sizeof(tmp) / sizeof(*tmp);
for (uint a = 0; a < ar; ++a)
ind2PDFabr[a] = tmp[a];
double x = ite->Xpos - ActPageP->Xoffset;
double y = ActPageP->Height - (ite->Ypos - ActPageP->Yoffset);
double x = ite->Xpos - ActPageP->xOffset();
double y = ActPageP->height() - (ite->Ypos - ActPageP->yOffset());
double x2 = x+ite->Width;
double y2 = y-ite->Height;
for (uint d = 0; d < ite->itemText.count(); ++d)
3869,22 → 3869,22
case 0:
break;
case 90:
x = ite->Xpos - ActPageP->Xoffset;
y2 = ActPageP->Height - (ite->Ypos - ActPageP->Yoffset);
x = ite->Xpos - ActPageP->xOffset();
y2 = ActPageP->height() - (ite->Ypos - ActPageP->yOffset());
x2 = x + ite->Height;
y = y2 + ite->Width;
break;
case 180:
x = ite->Xpos - ActPageP->Xoffset - ite->Width;
y2 = ActPageP->Height - (ite->Ypos - ActPageP->Yoffset);
x2 = ite->Xpos - ActPageP->Xoffset;
x = ite->Xpos - ActPageP->xOffset() - ite->Width;
y2 = ActPageP->height() - (ite->Ypos - ActPageP->yOffset());
x2 = ite->Xpos - ActPageP->xOffset();
y = y2 + ite->Height;
break;
case 270:
x = ite->Xpos - ActPageP->Xoffset - ite->Height;
y2 = ActPageP->Height - (ite->Ypos - ActPageP->Yoffset) - ite->Width;
x2 = ite->Xpos - ActPageP->Xoffset;
y = ActPageP->Height - (ite->Ypos - ActPageP->Yoffset);
x = ite->Xpos - ActPageP->xOffset() - ite->Height;
y2 = ActPageP->height() - (ite->Ypos - ActPageP->yOffset()) - ite->Width;
x2 = ite->Xpos - ActPageP->xOffset();
y = ActPageP->height() - (ite->Ypos - ActPageP->yOffset());
break;
}
PutDoc("/Rect [ "+FToStr(x)+" "+FToStr(y2)+" "+FToStr(x2)+" "+FToStr(y)+" ]\n");
4846,8 → 4846,8
bd.Prev = ccb - 1;
ccb++;
bd.Page = PageTree.Kids[tel->OwnPage];
bd.Recht = QRect(static_cast<int>(tel->Xpos - doc->Pages.at(tel->OwnPage)->Xoffset),
static_cast<int>(doc->Pages.at(tel->OwnPage)->Height - (tel->Ypos - doc->Pages.at(tel->OwnPage)->Yoffset)),
bd.Recht = QRect(static_cast<int>(tel->Xpos - doc->Pages.at(tel->OwnPage)->xOffset()),
static_cast<int>(doc->Pages.at(tel->OwnPage)->height() - (tel->Ypos - doc->Pages.at(tel->OwnPage)->yOffset())),
static_cast<int>(tel->Width),
static_cast<int>(tel->Height));
Beads.append(bd);
4860,8 → 4860,8
if (tel->OwnPage != -1)
{
bd.Page = PageTree.Kids[tel->OwnPage];
bd.Recht = QRect(static_cast<int>(tel->Xpos - doc->Pages.at(tel->OwnPage)->Xoffset),
static_cast<int>(doc->Pages.at(tel->OwnPage)->Height - (tel->Ypos - doc->Pages.at(tel->OwnPage)->Yoffset)),
bd.Recht = QRect(static_cast<int>(tel->Xpos - doc->Pages.at(tel->OwnPage)->xOffset()),
static_cast<int>(doc->Pages.at(tel->OwnPage)->height() - (tel->Ypos - doc->Pages.at(tel->OwnPage)->yOffset())),
static_cast<int>(tel->Width),
static_cast<int>(tel->Height));
Beads.append(bd);
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
2035,10 → 2035,10
currentPage->initialMargins.Bottom = initialBottom;
currentPage->initialMargins.Left = initialLeft;
currentPage->initialMargins.Right = initialRight;
currentPage->initialHeight = initialHeight;
currentPage->initialWidth = initialWidth;
currentPage->Height = height;
currentPage->Width = width;
currentPage->setInitialHeight(initialHeight);
currentPage->setInitialWidth(initialWidth);
currentPage->setHeight(height);
currentPage->setWidth(width);
currentPage->PageOri = orientation;
currentPage->PageSize = pageSize;
}
2136,3 → 2136,90
sctextdata->csize = docParagraphStyles[currentParaStyle].FontSize;
}
}
 
const bool ScribusDoc::copyPageToMasterPage(const int pageNumber, const int leftPage, const QString& masterPageName)
{
Page* sourcePage = Pages.at(pageNumber);
int nr = Pages.count();
DocPages = Pages;
Pages = MasterPages;
DocItems = Items;
Items = MasterItems;
masterPageMode = true;
MasterNames.insert(masterPageName, nr);
pageCount = 0;
bool atf = PageAT;
PageAT = false;
ScApp->slotNewPage(nr);
setLoading(true);
if (currentPageLayout != singlePage)
Pages.at(nr)->LeftPg = leftPage;
QMap<int,int> TableID;
QPtrList<PageItem> TableItems;
Page* targetPage = Pages.at(nr);
if (sourcePage->YGuides.count() != 0)
{
targetPage->YGuides.clear();
for (uint y = 0; y < sourcePage->YGuides.count(); ++y)
targetPage->YGuides.append(sourcePage->YGuides[y]);
qHeapSort(targetPage->YGuides);
}
if (sourcePage->XGuides.count() != 0)
{
targetPage->XGuides.clear();
for (uint x = 0; x < sourcePage->XGuides.count(); ++x)
targetPage->XGuides.append(sourcePage->XGuides[x]);
qHeapSort(targetPage->XGuides);
}
struct CopyPasteBuffer BufferT;
uint end = DocItems.count();
for (uint a = 0; a < end; ++a)
{
if (DocItems.at(a)->OwnPage == static_cast<int>(sourcePage->pageNr()))
{
DocItems.at(a)->copyToCopyPasteBuffer(&BufferT);
ScApp->view->PasteItem(&BufferT, true, true);
PageItem* Neu = Items.at(Items.count()-1);
if (Neu->isTableItem)
{
TableItems.append(Neu);
TableID.insert(a, Neu->ItemNr);
}
}
}
uint tableItemsCount = TableItems.count();
if (tableItemsCount != 0)
{
for (uint ttc = 0; ttc < tableItemsCount; ++ttc)
{
PageItem* ta = TableItems.at(ttc);
if (ta->TopLinkID != -1)
ta->TopLink = Items.at(TableID[ta->TopLinkID]);
else
ta->TopLink = 0;
if (ta->LeftLinkID != -1)
ta->LeftLink = Items.at(TableID[ta->LeftLinkID]);
else
ta->LeftLink = 0;
if (ta->RightLinkID != -1)
ta->RightLink = Items.at(TableID[ta->RightLinkID]);
else
ta->RightLink = 0;
if (ta->BottomLinkID != -1)
ta->BottomLink = Items.at(TableID[ta->BottomLinkID]);
else
ta->BottomLink = 0;
}
}
MasterPages = Pages;
pageCount = DocPages.count();
Pages = DocPages;
MasterItems = Items;
Items = DocItems;
masterPageMode = false;
targetPage->setPageName(masterPageName);
targetPage->MPageNam = "";
PageAT = atf;
setLoading(false);
return true;
}
/branches/Version13x/Scribus/scribus/applytemplatedialog.cpp
153,7 → 153,7
if (view->Pages.count() < 2)
evenPagesRadioButton->setEnabled(false);
fromPageSpinBox->setMaxValue(view->Pages.count());
fromPageSpinBox->setValue(view->currentPage->PageNr+1);
fromPageSpinBox->setValue(view->currentPage->pageNr()+1);
toPageSpinBox->setMaxValue(view->Pages.count());
toPageSpinBox->setValue(view->Pages.count());
}
/branches/Version13x/Scribus/scribus/scribusXml.cpp
1017,7 → 1017,7
}
if ((pg.tagName()=="PAGE") && (QStoInt(pg.attribute("NUM")) == PageToLoad))
{
a = doc->currentPage->PageNr;
a = doc->currentPage->pageNr();
if (!(pg.attribute("NAM", "").isEmpty()) && (Mpage))
{
PAGE=PAGE.nextSibling();
1082,8 → 1082,8
}
}
GetItemProps(newVersion, &obj, &OB);
OB.Xpos = QStodouble(obj.attribute("XPOS"))+doc->Pages.at(a)->Xoffset;
OB.Ypos=QStodouble(obj.attribute("YPOS"))+doc->Pages.at(a)->Yoffset;
OB.Xpos = QStodouble(obj.attribute("XPOS"))+doc->Pages.at(a)->xOffset();
OB.Ypos=QStodouble(obj.attribute("YPOS"))+doc->Pages.at(a)->yOffset();
OB.NamedLStyle = obj.attribute("NAMEDLST", "");
if (!doc->MLineStyles.contains(OB.NamedLStyle))
OB.NamedLStyle = "";
1602,8 → 1602,8
}
}
GetItemProps(newVersion, &obj, &OB);
OB.Xpos = QStodouble(obj.attribute("XPOS"))+doc->Pages.at(a)->Xoffset;
OB.Ypos=QStodouble(obj.attribute("YPOS"))+doc->Pages.at(a)->Yoffset;
OB.Xpos = QStodouble(obj.attribute("XPOS"))+doc->Pages.at(a)->xOffset();
OB.Ypos=QStodouble(obj.attribute("YPOS"))+doc->Pages.at(a)->yOffset();
OB.NamedLStyle = obj.attribute("NAMEDLST", "");
OB.isBookmark=QStoInt(obj.attribute("BOOKMARK"));
if ((OB.isBookmark) && (doc->BookMarks.count() == 0))
2700,15 → 2700,15
pg = docu->createElement("PAGE");
page = doc->DocPages.at(i);
}
pg.setAttribute("PAGEXPOS",page->Xoffset);
pg.setAttribute("PAGEYPOS",page->Yoffset);
pg.setAttribute("PAGEWIDTH",page->Width);
pg.setAttribute("PAGEHEIGHT",page->Height);
pg.setAttribute("PAGEXPOS",page->xOffset());
pg.setAttribute("PAGEYPOS",page->yOffset());
pg.setAttribute("PAGEWIDTH",page->width());
pg.setAttribute("PAGEHEIGHT",page->height());
pg.setAttribute("BORDERLEFT",page->initialMargins.Left);
pg.setAttribute("BORDERRIGHT",page->initialMargins.Right);
pg.setAttribute("BORDERTOP",page->initialMargins.Top);
pg.setAttribute("BORDERBOTTOM",page->initialMargins.Bottom);
pg.setAttribute("NUM",page->PageNr);
pg.setAttribute("NUM",page->pageNr());
pg.setAttribute("NAM",page->PageNam);
pg.setAttribute("MNAM",page->MPageNam);
pg.setAttribute("Size", page->PageSize);
/branches/Version13x/Scribus/scribus/seiten.cpp
577,7 → 577,7
for (uint aa=0; aa < Vie->Doc->MasterPages.count(); ++aa)
{
Seite = Vie->Doc->MasterPages.at(aa);
Seite->PageNr = aa;
Seite->setPageNr(aa);
if (Vie->Doc->currentPageLayout == doublePage)
{
Seite->Margins.Left = Seite->LeftPg ? Vie->Doc->pageMargins.Right : Vie->Doc->pageMargins.Left;
646,7 → 646,7
Vie->Doc->resetPage(tpr, lr, rr, br, fp);
Vie->reformPages();
Vie->DrawNew();
Vie->GotoPage(Vie->Doc->currentPage->PageNr);
Vie->GotoPage(Vie->Doc->currentPage->pageNr());
RebuildPage();
Vie->Doc->setModified(true);
firstPageLeftChk->setEnabled(fp ? true : false);
664,7 → 664,7
Vie->Doc->resetPage(tpr, lr, rr, br, fp2);
Vie->reformPages();
Vie->DrawNew();
Vie->GotoPage(Vie->Doc->currentPage->PageNr);
Vie->GotoPage(Vie->Doc->currentPage->pageNr());
RebuildPage();
Vie->Doc->setModified(true);
}
/branches/Version13x/Scribus/scribus/guidemanager.cpp
64,8 → 64,8
 
horizontalGuides = ScApp->doc->currentPage->YGuides; // in page XGuides and YGuides are inverted
verticalGuides = ScApp->doc->currentPage->XGuides;
LocPageWidth = ScApp->doc->currentPage->Width;
LocPageHeight = ScApp->doc->currentPage->Height;
LocPageWidth = ScApp->doc->currentPage->width();
LocPageHeight = ScApp->doc->currentPage->height();
lockedGuides = ScApp->doc->GuideLock;
 
LocLeft = MarginTopLeft.x();
/branches/Version13x/Scribus/scribus/pageitem.cpp
171,7 → 171,7
Segments.clear();
PoShow = false;
BaseOffs = 0;
OwnPage = Doc->currentPage->PageNr;
OwnPage = Doc->currentPage->pageNr();
oldOwnPage = OwnPage;
savedOwnPage = OwnPage;
PicArt = true;
1006,7 → 1006,7
if (docItem->textFlowsAroundFrame())
{
pp.begin(ScApp->view->viewport());
pp.translate(docItem->Xpos - Mp->Xoffset + Dp->Xoffset, docItem->Ypos - Mp->Yoffset + Dp->Yoffset);
pp.translate(docItem->Xpos - Mp->xOffset() + Dp->xOffset(), docItem->Ypos - Mp->yOffset() + Dp->yOffset());
pp.rotate(docItem->Rot);
if (docItem->textFlowUsesBoundingBox())
{
1365,7 → 1365,7
{
double by = Ypos;
if (OwnPage != -1)
by = Ypos - Doc->Pages.at(OwnPage)->Yoffset;
by = Ypos - Doc->Pages.at(OwnPage)->yOffset();
int ol1 = qRound((by + CurY - Doc->typographicSettings.offsetBaseGrid) * 10000.0);
int ol2 = static_cast<int>(ol1 / Doc->typographicSettings.valueBaseGrid);
CurY = ceil( ol2 / 10000.0 ) * Doc->typographicSettings.valueBaseGrid + Doc->typographicSettings.offsetBaseGrid - by;
1393,7 → 1393,7
{
double by = Ypos;
if (OwnPage != -1)
by = Ypos - Doc->Pages.at(OwnPage)->Yoffset;
by = Ypos - Doc->Pages.at(OwnPage)->yOffset();
int ol1 = qRound((by + CurY - Doc->typographicSettings.offsetBaseGrid) * 10000.0);
int ol2 = static_cast<int>(ol1 / Doc->typographicSettings.valueBaseGrid);
CurY = ceil( ol2 / 10000.0 ) * Doc->typographicSettings.valueBaseGrid + Doc->typographicSettings.offsetBaseGrid - by;
1423,7 → 1423,7
{
double by = Ypos;
if (OwnPage != -1)
by = Ypos - Doc->Pages.at(OwnPage)->Yoffset;
by = Ypos - Doc->Pages.at(OwnPage)->yOffset();
int ol1 = qRound((by + CurY - Doc->typographicSettings.offsetBaseGrid) * 10000.0);
int ol2 = static_cast<int>(ol1 / Doc->typographicSettings.valueBaseGrid);
CurY = ceil( ol2 / 10000.0 ) * Doc->typographicSettings.valueBaseGrid + Doc->typographicSettings.offsetBaseGrid - by;
1460,7 → 1460,7
{
double by = Ypos;
if (OwnPage != -1)
by = Ypos - Doc->Pages.at(OwnPage)->Yoffset;
by = Ypos - Doc->Pages.at(OwnPage)->yOffset();
int ol1 = qRound((by + CurY - Doc->typographicSettings.offsetBaseGrid) * 10000.0);
int ol2 = static_cast<int>(ol1 / Doc->typographicSettings.valueBaseGrid);
CurY = ceil( ol2 / 10000.0 ) * Doc->typographicSettings.valueBaseGrid + Doc->typographicSettings.offsetBaseGrid - by;
1713,7 → 1713,7
CurY -= Doc->typographicSettings.valueBaseGrid * (DropLines-1);
double by = Ypos;
if (OwnPage != -1)
by = Ypos - Doc->Pages.at(OwnPage)->Yoffset;
by = Ypos - Doc->Pages.at(OwnPage)->yOffset();
int ol1 = qRound((by + CurY - Doc->typographicSettings.offsetBaseGrid) * 10000.0);
int ol2 = static_cast<int>(ol1 / Doc->typographicSettings.valueBaseGrid);
CurY = ceil( ol2 / 10000.0 ) * Doc->typographicSettings.valueBaseGrid + Doc->typographicSettings.offsetBaseGrid - by;
/branches/Version13x/Scribus/scribus/scribusdoc.h
290,6 → 290,10
* @brief Sets up the ScText defaults from the document
*/
void setScTextDefaultsFromDoc(ScText *);
/**
* @brief Copies a normal page to be a master pages
*/
const bool copyPageToMasterPage(const int, const int, const QString&);
protected:
void addSymbols();
/branches/Version13x/Scribus/scribus/scribusview.cpp
239,10 → 239,10
{
for (uint a = 0; a < Doc->Pages.count(); ++a)
{
int x = static_cast<int>(Doc->Pages.at(a)->Xoffset * Scale);
int y = static_cast<int>(Doc->Pages.at(a)->Yoffset * Scale);
int w = static_cast<int>(Doc->Pages.at(a)->Width * Scale);
int h = static_cast<int>(Doc->Pages.at(a)->Height * Scale);
int x = static_cast<int>(Doc->Pages.at(a)->xOffset() * Scale);
int y = static_cast<int>(Doc->Pages.at(a)->yOffset() * Scale);
int w = static_cast<int>(Doc->Pages.at(a)->width() * Scale);
int h = static_cast<int>(Doc->Pages.at(a)->height() * Scale);
QRect drawRect = QRect(x, y, w+5, h+5);
drawRect.moveBy(qRound(-Doc->minCanvasCoordinate.x() * Scale), qRound(-Doc->minCanvasCoordinate.y() * Scale));
if (drawRect.intersects(QRect(clipx, clipy, clipw, cliph)))
251,7 → 251,7
painter->setPen(black, 1, SolidLine, FlatCap, MiterJoin);
painter->setBrush(QColor(128,128,128));
painter->drawRect(x+5, y+5, w, h);
if (a == Doc->currentPage->PageNr)
if (a == Doc->currentPage->pageNr())
painter->setPen(red, 2, SolidLine, FlatCap, MiterJoin);
else
painter->setPen(black, 1, SolidLine, FlatCap, MiterJoin);
267,10 → 267,10
{
for (uint a = 0; a < Doc->Pages.count(); ++a)
{
int x = static_cast<int>(Doc->Pages.at(a)->Xoffset * Scale);
int y = static_cast<int>(Doc->Pages.at(a)->Yoffset * Scale);
int w = static_cast<int>(Doc->Pages.at(a)->Width * Scale);
int h = static_cast<int>(Doc->Pages.at(a)->Height * Scale);
int x = static_cast<int>(Doc->Pages.at(a)->xOffset() * Scale);
int y = static_cast<int>(Doc->Pages.at(a)->yOffset() * Scale);
int w = static_cast<int>(Doc->Pages.at(a)->width() * Scale);
int h = static_cast<int>(Doc->Pages.at(a)->height() * Scale);
QRect drawRect = QRect(x, y, w+5, h+5);
drawRect.moveBy(qRound(-Doc->minCanvasCoordinate.x() * Scale), qRound(-Doc->minCanvasCoordinate.y() * Scale));
if (drawRect.intersects(QRect(clipx, clipy, clipw, cliph)))
282,8 → 282,8
{
int x = static_cast<int>(Doc->ScratchLeft * Scale);
int y = static_cast<int>(Doc->ScratchTop * Scale);
int w = static_cast<int>(Doc->currentPage->Width * Scale);
int h = static_cast<int>(Doc->currentPage->Height * Scale);
int w = static_cast<int>(Doc->currentPage->width() * Scale);
int h = static_cast<int>(Doc->currentPage->height() * Scale);
QRect drawRect = QRect(x, y, w+5, h+5);
drawRect.moveBy(qRound(-Doc->minCanvasCoordinate.x() * Scale), qRound(-Doc->minCanvasCoordinate.y() * Scale));
if (drawRect.intersects(QRect(clipx, clipy, clipw, cliph)))
520,7 → 520,7
currItem = page->FromMaster.at(a);
if (currItem->LayerNr != ll.LNr)
continue;
if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->PageNr)))
if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->pageNr())))
continue;
if ((previewMode) && (!currItem->printable()))
continue;
529,13 → 529,13
double OldY = currItem->Ypos;
double OldBX = currItem->BoundingX;
double OldBY = currItem->BoundingY;
currItem->OwnPage = page->PageNr;
currItem->OwnPage = page->pageNr();
if (!currItem->ChangedMasterItem)
{
currItem->Xpos = OldX - Mp->Xoffset + page->Xoffset;
currItem->Ypos = OldY - Mp->Yoffset + page->Yoffset;
currItem->BoundingX = OldBX - Mp->Xoffset + page->Xoffset;
currItem->BoundingY = OldBY - Mp->Yoffset + page->Yoffset;
currItem->Xpos = OldX - Mp->xOffset() + page->xOffset();
currItem->Ypos = OldY - Mp->yOffset() + page->yOffset();
currItem->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
currItem->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
}
if (evSpon)
currItem->Dirty = true;
558,7 → 558,7
continue;
if (!currItem->isTableItem)
continue;
if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->PageNr)))
if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->pageNr())))
continue;
double OldX = currItem->Xpos;
double OldY = currItem->Ypos;
566,10 → 566,10
double OldBY = currItem->BoundingY;
if (!currItem->ChangedMasterItem)
{
currItem->Xpos = OldX - Mp->Xoffset + page->Xoffset;
currItem->Ypos = OldY - Mp->Yoffset + page->Yoffset;
currItem->BoundingX = OldBX - Mp->Xoffset + page->Xoffset;
currItem->BoundingY = OldBY - Mp->Yoffset + page->Yoffset;
currItem->Xpos = OldX - Mp->xOffset() + page->xOffset();
currItem->Ypos = OldY - Mp->yOffset() + page->yOffset();
currItem->BoundingX = OldBX - Mp->xOffset() + page->xOffset();
currItem->BoundingY = OldBY - Mp->yOffset() + page->yOffset();
}
QRect oldR = getRedrawBounding(currItem);
if (clip.intersects(oldR))
643,7 → 643,7
continue;
if ((previewMode) && (!currItem->printable()))
continue;
if ((Doc->masterPageMode) && ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Doc->currentPage->PageNr))))
if ((Doc->masterPageMode) && ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Doc->currentPage->pageNr()))))
continue;
if ((!Doc->masterPageMode) && (!currItem->OnMasterPage.isEmpty()))
{
752,7 → 752,7
double z = p->zoomFactor();
p->save();
p->setZoomFactor(Scale);
p->translate(page->Xoffset * Scale, page->Yoffset * Scale);
p->translate(page->xOffset() * Scale, page->yOffset() * Scale);
p->setLineWidth(lw);
if (Doc->guidesSettings.marginsShown)
{
760,33 → 760,33
if (Doc->marginColored)
{
p->setBrush(Doc->guidesSettings.margColor);
p->drawRect(0, 0, page->Width, page->Margins.Top);
p->drawRect(0, page->Margins.Top, page->Margins.Left, page->Height - page->Margins.Top);
p->drawRect(page->Margins.Left, page->Height - page->Margins.Bottom, page->Width - page->Margins.Right - page->Margins.Left, page->Margins.Bottom);
p->drawRect(page->Width - page->Margins.Right, page->Margins.Top, page->Margins.Right, page->Height-page->Margins.Top);
p->drawRect(0, 0, page->width(), page->Margins.Top);
p->drawRect(0, page->Margins.Top, page->Margins.Left, page->height() - page->Margins.Top);
p->drawRect(page->Margins.Left, page->height() - page->Margins.Bottom, page->width() - page->Margins.Right - page->Margins.Left, page->Margins.Bottom);
p->drawRect(page->width() - page->Margins.Right, page->Margins.Top, page->Margins.Right, page->height()-page->Margins.Top);
}
p->setPen(Doc->guidesSettings.margColor);
p->drawLine(FPoint(0, page->Margins.Top), FPoint(page->Width, page->Margins.Top));
p->drawLine(FPoint(0, page->Height - page->Margins.Bottom), FPoint(page->Width, page->Height - page->Margins.Bottom));
p->drawLine(FPoint(page->Margins.Left, 0), FPoint(page->Margins.Left, page->Height));
p->drawLine(FPoint(page->Width - page->Margins.Right, 0), FPoint(page->Width - page->Margins.Right, page->Height));
p->drawLine(FPoint(0, page->Margins.Top), FPoint(page->width(), page->Margins.Top));
p->drawLine(FPoint(0, page->height() - page->Margins.Bottom), FPoint(page->width(), page->height() - page->Margins.Bottom));
p->drawLine(FPoint(page->Margins.Left, 0), FPoint(page->Margins.Left, page->height()));
p->drawLine(FPoint(page->width() - page->Margins.Right, 0), FPoint(page->width() - page->Margins.Right, page->height()));
}
if (Doc->guidesSettings.baseShown)
{
p->setPen(Doc->guidesSettings.baseColor, lw, SolidLine, FlatCap, MiterJoin);
for (double yg = Doc->typographicSettings.offsetBaseGrid; yg < page->Height; yg += Doc->typographicSettings.valueBaseGrid)
p->drawLine(FPoint(0, yg), FPoint(page->Width, yg));
for (double yg = Doc->typographicSettings.offsetBaseGrid; yg < page->height(); yg += Doc->typographicSettings.valueBaseGrid)
p->drawLine(FPoint(0, yg), FPoint(page->width(), yg));
}
if (Doc->guidesSettings.gridShown)
{
double stx = 0;
double endx = page->Width;
double endx = page->width();
double sty = 0;
double endy = page->Height;
double endy = page->height();
/* double stx = QMAX((clip.x() - page->Xoffset) / Scale, 0);
double endx = QMIN(stx + clip.width() / Scale, page->Width);
double endx = QMIN(stx + clip.width() / Scale, page->width());
double sty = QMAX((clip.y() - page->Yoffset) / Scale, 0);
double endy = QMIN(sty + clip.height() / Scale, page->Height); */
double endy = QMIN(sty + clip.height() / Scale, page->height()); */
if (Scale > 0.49)
{
double i,start;
796,13 → 796,13
start*=i;
for (double b = start; b < endy; b+=i)
{
p->drawLine(FPoint(0, b), FPoint(page->Width, b));
p->drawLine(FPoint(0, b), FPoint(page->width(), b));
}
start=floor(stx/i);
start*=i;
for (double b = start; b <= endx; b+=i)
{
p->drawLine(FPoint(b, 0), FPoint(b, page->Height));
p->drawLine(FPoint(b, 0), FPoint(b, page->height()));
}
i = Doc->guidesSettings.minorGrid;
p->setPen(Doc->guidesSettings.minorColor, lw, DotLine, FlatCap, MiterJoin);
810,13 → 810,13
start*=i;
for (double b = start; b < endy; b+=i)
{
p->drawLine(FPoint(0, b), FPoint(page->Width, b));
p->drawLine(FPoint(0, b), FPoint(page->width(), b));
}
start=floor(stx/i);
start*=i;
for (double b = start; b <= endx; b+=i)
{
p->drawLine(FPoint(b, 0), FPoint(b, page->Height));
p->drawLine(FPoint(b, 0), FPoint(b, page->height()));
}
}
}
827,8 → 827,8
{
for (uint xg = 0; xg < page->XGuides.count(); ++xg)
{
if ((page->XGuides[xg] >= 0) && (page->XGuides[xg] <= page->Width))
p->drawLine(FPoint(page->XGuides[xg], 0), FPoint(page->XGuides[xg], page->Height));
if ((page->XGuides[xg] >= 0) && (page->XGuides[xg] <= page->width()))
p->drawLine(FPoint(page->XGuides[xg], 0), FPoint(page->XGuides[xg], page->height()));
}
}
if (page->YGuides.count() != 0)
835,8 → 835,8
{
for (uint yg = 0; yg < page->YGuides.count(); ++yg)
{
if ((page->YGuides[yg] >= 0) && (page->YGuides[yg] <= page->Height))
p->drawLine(FPoint(0, page->YGuides[yg]), FPoint(page->Width, page->YGuides[yg]));
if ((page->YGuides[yg] >= 0) && (page->YGuides[yg] <= page->height()))
p->drawLine(FPoint(0, page->YGuides[yg]), FPoint(page->width(), page->YGuides[yg]));
}
}
}
1261,8 → 1261,8
{
for (uint yg = 0; yg < Doc->currentPage->YGuides.count(); ++yg)
{
if ((Doc->currentPage->YGuides[yg]+Doc->currentPage->Yoffset < (ny+Doc->guidesSettings.grabRad)) &&
(Doc->currentPage->YGuides[yg]+Doc->currentPage->Yoffset > (ny-Doc->guidesSettings.grabRad)))
if ((Doc->currentPage->YGuides[yg]+Doc->currentPage->yOffset()< (ny+Doc->guidesSettings.grabRad)) &&
(Doc->currentPage->YGuides[yg]+Doc->currentPage->yOffset()> (ny-Doc->guidesSettings.grabRad)))
{
fg = true;
break;
1273,8 → 1273,8
{
for (uint xg = 0; xg < Doc->currentPage->XGuides.count(); ++xg)
{
if ((Doc->currentPage->XGuides[xg]+Doc->currentPage->Xoffset < (nx+Doc->guidesSettings.grabRad)) &&
(Doc->currentPage->XGuides[xg]+Doc->currentPage->Xoffset > (nx-Doc->guidesSettings.grabRad)))
if ((Doc->currentPage->XGuides[xg]+Doc->currentPage->xOffset()< (nx+Doc->guidesSettings.grabRad)) &&
(Doc->currentPage->XGuides[xg]+Doc->currentPage->xOffset()> (nx-Doc->guidesSettings.grabRad)))
{
fg = true;
break;
2787,7 → 2787,7
currItem->PoLine.resize(currItem->PoLine.size()-2);
if (currItem->PoLine.size() < 4)
{
// emit DelObj(Doc->currentPage->PageNr, currItem->ItemNr);
// emit DelObj(Doc->currentPage->pageNr(), currItem->ItemNr);
Doc->Items.remove(currItem->ItemNr);
SelItem.removeFirst();
emit HaveSel(-1);
2861,7 → 2861,7
if (MoveGY)
{
FromHRuler(m);
if (((m->y()/sc) < Doc->currentPage->Yoffset - Doc->minCanvasCoordinate.y()) || ((m->y()/sc) > Doc->currentPage->Height+Doc->currentPage->Yoffset - Doc->minCanvasCoordinate.y()))
if (((m->y()/sc) < Doc->currentPage->yOffset()- Doc->minCanvasCoordinate.y()) || ((m->y()/sc) > Doc->currentPage->height()+Doc->currentPage->yOffset()- Doc->minCanvasCoordinate.y()))
qApp->setOverrideCursor(QCursor(loadIcon("DelPoint.png")), true);
else
qApp->setOverrideCursor(QCursor(SPLITHC), true);
2870,7 → 2870,7
if (MoveGX)
{
FromVRuler(m);
if (((m->x()/sc) < Doc->currentPage->Xoffset - Doc->minCanvasCoordinate.x()) || ((m->x()/sc) > Doc->currentPage->Width+Doc->currentPage->Xoffset - Doc->minCanvasCoordinate.x()))
if (((m->x()/sc) < Doc->currentPage->xOffset()- Doc->minCanvasCoordinate.x()) || ((m->x()/sc) > Doc->currentPage->width()+Doc->currentPage->xOffset()- Doc->minCanvasCoordinate.x()))
qApp->setOverrideCursor(QCursor(loadIcon("DelPoint.png")), true);
else
qApp->setOverrideCursor(QCursor(SPLITVC), true);
2941,10 → 2941,10
p.end();
Mxp = newX;
Myp = newY;
double dxp = Dxp / sc - Doc->currentPage->Xoffset + Doc->minCanvasCoordinate.x();
double dyp = Dyp / sc - Doc->currentPage->Yoffset + Doc->minCanvasCoordinate.y();
double nxp = newX / sc - Doc->currentPage->Xoffset + Doc->minCanvasCoordinate.x();
double nyp = newY / sc - Doc->currentPage->Yoffset + Doc->minCanvasCoordinate.y();
double dxp = Dxp / sc - Doc->currentPage->xOffset()+ Doc->minCanvasCoordinate.x();
double dyp = Dyp / sc - Doc->currentPage->yOffset()+ Doc->minCanvasCoordinate.y();
double nxp = newX / sc - Doc->currentPage->xOffset()+ Doc->minCanvasCoordinate.x();
double nyp = newY / sc - Doc->currentPage->yOffset()+ Doc->minCanvasCoordinate.y();
emit MVals(dxp, dyp, nxp, nyp, -xy2Deg(newX/sc - Dxp*sc, newY/sc - Dyp/sc), sqrt(pow(newX/sc - Dxp/sc,2)+pow(newY/sc - Dyp/sc,2)), Doc->unitIndex());
return;
}
3768,12 → 3768,12
{
for (uint yg = 0; yg < Doc->currentPage->YGuides.count(); ++yg)
{
if ((Doc->currentPage->YGuides[yg]+Doc->currentPage->Yoffset - Doc->minCanvasCoordinate.y() < (static_cast<int>(m->y()/sc)+Doc->guidesSettings.guideRad)) &&
(Doc->currentPage->YGuides[yg]+Doc->currentPage->Yoffset - Doc->minCanvasCoordinate.y() > (static_cast<int>(m->y()/sc)-Doc->guidesSettings.guideRad)))
if ((Doc->currentPage->YGuides[yg]+Doc->currentPage->yOffset()- Doc->minCanvasCoordinate.y() < (static_cast<int>(m->y()/sc)+Doc->guidesSettings.guideRad)) &&
(Doc->currentPage->YGuides[yg]+Doc->currentPage->yOffset()- Doc->minCanvasCoordinate.y() > (static_cast<int>(m->y()/sc)-Doc->guidesSettings.guideRad)))
{
if ((Mpressed) && (GyM != -1))
MoveGY = true;
if (((m->x()/sc) < Doc->currentPage->Xoffset - Doc->minCanvasCoordinate.x()) || ((m->x()/sc) >= Doc->currentPage->Width-1+Doc->currentPage->Xoffset - Doc->minCanvasCoordinate.x()))
if (((m->x()/sc) < Doc->currentPage->xOffset()- Doc->minCanvasCoordinate.x()) || ((m->x()/sc) >= Doc->currentPage->width()-1+Doc->currentPage->xOffset()- Doc->minCanvasCoordinate.x()))
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
else
qApp->setOverrideCursor(QCursor(SPLITHC), true);
3786,12 → 3786,12
{
for (uint xg = 0; xg < Doc->currentPage->XGuides.count(); ++xg)
{
if ((Doc->currentPage->XGuides[xg]+Doc->currentPage->Xoffset - Doc->minCanvasCoordinate.x() < (static_cast<int>(m->x()/sc)+Doc->guidesSettings.guideRad)) &&
(Doc->currentPage->XGuides[xg]+Doc->currentPage->Xoffset - Doc->minCanvasCoordinate.x() > (static_cast<int>(m->x()/sc)-Doc->guidesSettings.guideRad)))
if ((Doc->currentPage->XGuides[xg]+Doc->currentPage->xOffset()- Doc->minCanvasCoordinate.x() < (static_cast<int>(m->x()/sc)+Doc->guidesSettings.guideRad)) &&
(Doc->currentPage->XGuides[xg]+Doc->currentPage->xOffset()- Doc->minCanvasCoordinate.x() > (static_cast<int>(m->x()/sc)-Doc->guidesSettings.guideRad)))
{
if ((Mpressed) && (GxM != -1))
MoveGX = true;
if (((m->y()/sc) < Doc->currentPage->Yoffset - Doc->minCanvasCoordinate.x()) || ((m->y()/sc) >= Doc->currentPage->Height-1+Doc->currentPage->Yoffset - Doc->minCanvasCoordinate.y()))
if (((m->y()/sc) < Doc->currentPage->yOffset()- Doc->minCanvasCoordinate.x()) || ((m->y()/sc) >= Doc->currentPage->height()-1+Doc->currentPage->yOffset()- Doc->minCanvasCoordinate.y()))
qApp->setOverrideCursor(QCursor(ArrowCursor), true);
else
qApp->setOverrideCursor(QCursor(SPLITVC), true);
4630,7 → 4630,7
break;
case modeInsertPDFLinkAnnotation:
currItem->AnType = 11;
currItem->AnZiel = Doc->currentPage->PageNr;
currItem->AnZiel = Doc->currentPage->pageNr();
currItem->AnAction = "0 0";
currItem->setTextFlowsAroundFrame(false);
break;
4714,9 → 4714,9
{
for (uint yg = 0; yg < page->YGuides.count(); ++yg)
{
if ((page->YGuides[yg]+page->Yoffset < (*y+Doc->guidesSettings.guideRad)) && (page->YGuides[yg]+page->Yoffset > (*y-Doc->guidesSettings.guideRad)))
if ((page->YGuides[yg]+page->yOffset() < (*y+Doc->guidesSettings.guideRad)) && (page->YGuides[yg]+page->yOffset() > (*y-Doc->guidesSettings.guideRad)))
{
*y= page->YGuides[yg]+page->Yoffset;
*y= page->YGuides[yg]+page->yOffset();
ret = true;
break;
}
4726,32 → 4726,32
{
for (uint xg = 0; xg < page->XGuides.count(); ++xg)
{
if ((page->XGuides[xg]+page->Xoffset < (*x+Doc->guidesSettings.guideRad)) && (page->XGuides[xg]+page->Xoffset > (*x-Doc->guidesSettings.guideRad)))
if ((page->XGuides[xg]+page->xOffset() < (*x+Doc->guidesSettings.guideRad)) && (page->XGuides[xg]+page->xOffset() > (*x-Doc->guidesSettings.guideRad)))
{
*x = page->XGuides[xg]+page->Xoffset;
*x = page->XGuides[xg]+page->xOffset();
ret = true;
break;
}
}
}
if ((page->Margins.Left+page->Xoffset < (*x+Doc->guidesSettings.guideRad)) && (page->Margins.Left+page->Xoffset > (*x-Doc->guidesSettings.guideRad)))
if ((page->Margins.Left+page->xOffset() < (*x+Doc->guidesSettings.guideRad)) && (page->Margins.Left+page->xOffset() > (*x-Doc->guidesSettings.guideRad)))
{
*x = page->Margins.Left+page->Xoffset;
*x = page->Margins.Left+page->xOffset();
ret = true;
}
if (((page->Width - page->Margins.Right)+page->Xoffset < (*x+Doc->guidesSettings.guideRad)) && ((page->Width - page->Margins.Right)+page->Xoffset > (*x-Doc->guidesSettings.guideRad)))
if (((page->width() - page->Margins.Right)+page->xOffset() < (*x+Doc->guidesSettings.guideRad)) && ((page->width() - page->Margins.Right)+page->xOffset() > (*x-Doc->guidesSettings.guideRad)))
{
*x = page->Width - page->Margins.Right+page->Xoffset;
*x = page->width() - page->Margins.Right+page->xOffset();
ret = true;
}
if ((page->Margins.Top+page->Yoffset < (*y+Doc->guidesSettings.guideRad)) && (page->Margins.Top+page->Yoffset > (*y-Doc->guidesSettings.guideRad)))
if ((page->Margins.Top+page->xOffset() < (*y+Doc->guidesSettings.guideRad)) && (page->Margins.Top+page->yOffset() > (*y-Doc->guidesSettings.guideRad)))
{
*y = page->Margins.Top+page->Yoffset;
*y = page->Margins.Top+page->yOffset();
ret = true;
}
if (((page->Height - page->Margins.Bottom)+page->Yoffset < (*y+Doc->guidesSettings.guideRad)) && ((page->Height - page->Margins.Bottom)+page->Yoffset > (*y-Doc->guidesSettings.guideRad)))
if (((page->height() - page->Margins.Bottom)+page->yOffset() < (*y+Doc->guidesSettings.guideRad)) && ((page->height() - page->Margins.Bottom)+page->yOffset() > (*y-Doc->guidesSettings.guideRad)))
{
*y = page->Height - page->Margins.Bottom+page->Yoffset;
*y = page->height() - page->Margins.Bottom+page->yOffset();
ret = true;
}
}
4768,9 → 4768,9
{
for (uint yg = 0; yg < page->YGuides.count(); ++yg)
{
if ((page->YGuides[yg]+page->Yoffset < (currItem->Ypos+Doc->guidesSettings.guideRad)) && (page->YGuides[yg]+page->Yoffset > (currItem->Ypos-Doc->guidesSettings.guideRad)))
if ((page->YGuides[yg]+page->yOffset() < (currItem->Ypos+Doc->guidesSettings.guideRad)) && (page->YGuides[yg]+page->yOffset() > (currItem->Ypos-Doc->guidesSettings.guideRad)))
{
currItem->Ypos = page->YGuides[yg]+page->Yoffset;
currItem->Ypos = page->YGuides[yg]+page->yOffset();
break;
}
if (currItem->itemType() == PageItem::Line)
4779,18 → 4779,18
ma.translate(currItem->Xpos, currItem->Ypos);
ma.rotate(currItem->Rot);
double my = ma.m22() * currItem->Height + ma.m12() * currItem->Width + ma.dy();
if ((page->YGuides[yg]+page->Yoffset < (my+Doc->guidesSettings.guideRad)) && (page->YGuides[yg]+page->Yoffset > (my-Doc->guidesSettings.guideRad)))
if ((page->YGuides[yg]+page->yOffset() < (my+Doc->guidesSettings.guideRad)) && (page->YGuides[yg]+page->yOffset() > (my-Doc->guidesSettings.guideRad)))
{
currItem->Ypos = currItem->Ypos + page->YGuides[yg] - my + page->Yoffset;
currItem->Ypos = currItem->Ypos + page->YGuides[yg] - my + page->yOffset();
break;
}
}
else
{
if ((page->YGuides[yg]+page->Yoffset < (currItem->Ypos+currItem->Height+Doc->guidesSettings.guideRad)) &&
(page->YGuides[yg]+page->Yoffset > ((currItem->Ypos+currItem->Height)-Doc->guidesSettings.guideRad)))
if ((page->YGuides[yg]+page->yOffset() < (currItem->Ypos+currItem->Height+Doc->guidesSettings.guideRad)) &&
(page->YGuides[yg]+page->yOffset() > ((currItem->Ypos+currItem->Height)-Doc->guidesSettings.guideRad)))
{
currItem->Ypos = page->YGuides[yg]-currItem->Height+page->Yoffset;
currItem->Ypos = page->YGuides[yg]-currItem->Height+page->yOffset();
break;
}
}
4800,9 → 4800,9
{
for (uint xg = 0; xg < page->XGuides.count(); ++xg)
{
if ((page->XGuides[xg]+page->Xoffset < (currItem->Xpos+Doc->guidesSettings.guideRad)) && (page->XGuides[xg]+page->Xoffset > (currItem->Xpos-Doc->guidesSettings.guideRad)))
if ((page->XGuides[xg]+page->xOffset() < (currItem->Xpos+Doc->guidesSettings.guideRad)) && (page->XGuides[xg]+page->xOffset() > (currItem->Xpos-Doc->guidesSettings.guideRad)))
{
currItem->Xpos = page->XGuides[xg]+page->Xoffset;
currItem->Xpos = page->XGuides[xg]+page->xOffset();
break;
}
if (currItem->itemType() == PageItem::Line)
4811,18 → 4811,18
ma.translate(currItem->Xpos, currItem->Ypos);
ma.rotate(currItem->Rot);
double mx = ma.m11() * currItem->Width + ma.m21() * currItem->Height + ma.dx();
if ((page->XGuides[xg]+page->Xoffset < (mx+Doc->guidesSettings.guideRad)) && (page->XGuides[xg]+page->Xoffset > (mx-Doc->guidesSettings.guideRad)))
if ((page->XGuides[xg]+page->xOffset() < (mx+Doc->guidesSettings.guideRad)) && (page->XGuides[xg]+page->xOffset() > (mx-Doc->guidesSettings.guideRad)))
{
currItem->Xpos = currItem->Xpos + page->XGuides[xg] - mx + page->Xoffset;
currItem->Xpos = currItem->Xpos + page->XGuides[xg] - mx + page->xOffset();
break;
}
}
else
{
if ((page->XGuides[xg]+page->Xoffset < (currItem->Xpos+currItem->Width+Doc->guidesSettings.guideRad)) &&
(page->XGuides[xg]+page->Xoffset > ((currItem->Xpos+currItem->Width)-Doc->guidesSettings.guideRad)))
if ((page->XGuides[xg]+page->xOffset() < (currItem->Xpos+currItem->Width+Doc->guidesSettings.guideRad)) &&
(page->XGuides[xg]+page->xOffset() > ((currItem->Xpos+currItem->Width)-Doc->guidesSettings.guideRad)))
{
currItem->Xpos = page->XGuides[xg]-currItem->Width+page->Xoffset;
currItem->Xpos = page->XGuides[xg]-currItem->Width+page->xOffset();
break;
}
}
4836,8 → 4836,8
int onp = OnPage(in.x(), in.y());
if ((Doc->useRaster) && (onp != -1))
{
np.setX(static_cast<int>(qRound((in.x() - Doc->Pages.at(onp)->Xoffset) / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid + Doc->Pages.at(onp)->Xoffset));
np.setY(static_cast<int>(qRound((in.y() - Doc->Pages.at(onp)->Yoffset) / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid + Doc->Pages.at(onp)->Yoffset));
np.setX(static_cast<int>(qRound((in.x() - Doc->Pages.at(onp)->xOffset()) / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid + Doc->Pages.at(onp)->xOffset()));
np.setY(static_cast<int>(qRound((in.y() - Doc->Pages.at(onp)->yOffset()) / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid + Doc->Pages.at(onp)->yOffset()));
}
else
np = in;
4851,8 → 4851,8
if ((Doc->useRaster) && (onp != -1))
{
 
np.setX(qRound((in.x() - Doc->Pages.at(onp)->Xoffset) / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid + Doc->Pages.at(onp)->Xoffset);
np.setY(qRound((in.y() - Doc->Pages.at(onp)->Yoffset) / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid + Doc->Pages.at(onp)->Yoffset);
np.setX(qRound((in.x() - Doc->Pages.at(onp)->xOffset()) / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid + Doc->Pages.at(onp)->xOffset());
np.setY(qRound((in.y() - Doc->Pages.at(onp)->yOffset()) / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid + Doc->Pages.at(onp)->yOffset());
}
else
np = in;
5071,7 → 5071,7
double oldy = currItem->Ypos;
currItem->Xpos += newX;
currItem->Ypos += newY;
if ((Doc->useRaster) && (!Imoved) && (!fromMP) && (static_cast<int>(Doc->currentPage->PageNr) == currItem->OwnPage))
if ((Doc->useRaster) && (!Imoved) && (!fromMP) && (static_cast<int>(Doc->currentPage->pageNr()) == currItem->OwnPage))
{
currItem->Xpos = qRound(currItem->Xpos / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid;
currItem->Ypos = qRound(currItem->Ypos / Doc->guidesSettings.minorGrid) * Doc->guidesSettings.minorGrid;
5093,7 → 5093,7
emit ItemPos(currItem->Xpos, currItem->Ypos);
}
/* if (!Doc->loading)
emit UpdtObj(Doc->currentPage->PageNr, b->ItemNr); */
emit UpdtObj(Doc->currentPage->pageNr(), b->ItemNr); */
QRect oldR = getRedrawBounding(currItem);
setRedrawBounding(currItem);
QRect newR = getRedrawBounding(currItem);
7091,21 → 7091,21
int retw = -1;
if (Doc->masterPageMode)
{
int x = static_cast<int>(Doc->currentPage->Xoffset);
int y = static_cast<int>(Doc->currentPage->Yoffset);
int w = static_cast<int>(Doc->currentPage->Width);
int h = static_cast<int>(Doc->currentPage->Height);
int x = static_cast<int>(Doc->currentPage->xOffset());
int y = static_cast<int>(Doc->currentPage->yOffset());
int w = static_cast<int>(Doc->currentPage->width());
int h = static_cast<int>(Doc->currentPage->height());
if (QRect(x, y, w, h).contains(QPoint(qRound(x2), qRound(y2))))
retw = Doc->currentPage->PageNr;
retw = Doc->currentPage->pageNr();
}
else
{
for (int a = 0; a < static_cast<int>(Doc->Pages.count()); ++a)
{
int x = static_cast<int>(Doc->Pages.at(a)->Xoffset);
int y = static_cast<int>(Doc->Pages.at(a)->Yoffset);
int w = static_cast<int>(Doc->Pages.at(a)->Width);
int h = static_cast<int>(Doc->Pages.at(a)->Height);
int x = static_cast<int>(Doc->Pages.at(a)->xOffset());
int y = static_cast<int>(Doc->Pages.at(a)->yOffset());
int w = static_cast<int>(Doc->Pages.at(a)->width());
int h = static_cast<int>(Doc->Pages.at(a)->height());
if (QRect(x, y, w, h).contains(QPoint(qRound(x2), qRound(y2))))
{
retw = a;
7121,25 → 7121,25
int retw = -1;
if (Doc->masterPageMode)
{
int x = static_cast<int>(Doc->currentPage->Xoffset);
int y = static_cast<int>(Doc->currentPage->Yoffset);
int w = static_cast<int>(Doc->currentPage->Width);
int h = static_cast<int>(Doc->currentPage->Height);
int x = static_cast<int>(Doc->currentPage->xOffset());
int y = static_cast<int>(Doc->currentPage->yOffset());
int w = static_cast<int>(Doc->currentPage->width());
int h = static_cast<int>(Doc->currentPage->height());
int x2 = static_cast<int>(currItem->Xpos);
int y2 = static_cast<int>(currItem->Ypos);
int w2 = QMAX(static_cast<int>(currItem->Width), 1);
int h2 = QMAX(static_cast<int>(currItem->Height), 1);
if (QRect(x, y, w, h).intersects(QRect(x2, y2, w2, h2)))
retw = Doc->currentPage->PageNr;
retw = Doc->currentPage->pageNr();
}
else
{
for (int a = 0; a < static_cast<int>(Doc->Pages.count()); ++a)
{
int x = static_cast<int>(Doc->Pages.at(a)->Xoffset);
int y = static_cast<int>(Doc->Pages.at(a)->Yoffset);
int w = static_cast<int>(Doc->Pages.at(a)->Width);
int h = static_cast<int>(Doc->Pages.at(a)->Height);
int x = static_cast<int>(Doc->Pages.at(a)->xOffset());
int y = static_cast<int>(Doc->Pages.at(a)->yOffset());
int w = static_cast<int>(Doc->Pages.at(a)->width());
int h = static_cast<int>(Doc->Pages.at(a)->height());
int x2 = static_cast<int>(currItem->Xpos);
int y2 = static_cast<int>(currItem->Ypos);
int w2 = QMAX(static_cast<int>(currItem->Width), 1);
7303,13 → 7303,13
{
for (uint a = 0; a < Doc->Pages.count(); ++a)
{
int x = static_cast<int>(Doc->Pages.at(a)->Xoffset * Scale);
int y = static_cast<int>(Doc->Pages.at(a)->Yoffset * Scale);
int w = static_cast<int>(Doc->Pages.at(a)->Width * Scale);
int h = static_cast<int>(Doc->Pages.at(a)->Height * Scale);
int x = static_cast<int>(Doc->Pages.at(a)->xOffset() * Scale);
int y = static_cast<int>(Doc->Pages.at(a)->yOffset() * Scale);
int w = static_cast<int>(Doc->Pages.at(a)->width() * Scale);
int h = static_cast<int>(Doc->Pages.at(a)->height() * Scale);
if (QRect(x, y, w, h).intersects(mpo))
{
if (Doc->currentPage->PageNr != a)
if (Doc->currentPage->pageNr() != a)
{
Doc->currentPage = Doc->Pages.at(a);
setMenTxt(a);
7344,13 → 7344,13
{
for (a = 0; a < Doc->Pages.count(); ++a)
{
int x = static_cast<int>(Doc->Pages.at(a)->Xoffset * Scale);
int y = static_cast<int>(Doc->Pages.at(a)->Yoffset * Scale);
int w = static_cast<int>(Doc->Pages.at(a)->Width * Scale);
int h = static_cast<int>(Doc->Pages.at(a)->Height * Scale);
int x = static_cast<int>(Doc->Pages.at(a)->xOffset() * Scale);
int y = static_cast<int>(Doc->Pages.at(a)->yOffset() * Scale);
int w = static_cast<int>(Doc->Pages.at(a)->width() * Scale);
int h = static_cast<int>(Doc->Pages.at(a)->height() * Scale);
if (QRect(x, y, w, h).intersects(mpo))
{
if (Doc->currentPage->PageNr != a)
if (Doc->currentPage->pageNr() != a)
{
Doc->currentPage = Doc->Pages.at(a);
setMenTxt(a);
7377,8 → 7377,8
double OldY = currItem->Ypos;
if (!currItem->ChangedMasterItem)
{
currItem->Xpos = OldX - Mp->Xoffset + Doc->currentPage->Xoffset;
currItem->Ypos = OldY - Mp->Yoffset + Doc->currentPage->Yoffset;
currItem->Xpos = OldX - Mp->xOffset() + Doc->currentPage->xOffset();
currItem->Ypos = OldY - Mp->yOffset() + Doc->currentPage->yOffset();
}
Transform(currItem, &p);
if ((QRegion(p.xForm(QPointArray(QRect(0, 0, static_cast<int>(currItem->Width), static_cast<int>(currItem->Height))))).contains(mpo)) ||
7511,7 → 7511,7
SelItem.clear();
return false;
}
if ((Doc->masterPageMode) && (!((currItem->OwnPage == -1) || (currItem->OwnPage == static_cast<int>(Doc->currentPage->PageNr)))))
if ((Doc->masterPageMode) && (!((currItem->OwnPage == -1) || (currItem->OwnPage == static_cast<int>(Doc->currentPage->pageNr())))))
{
currItem = Doc->Items.prev();
continue;
7634,8 → 7634,8
{
for (uint yg = 0; yg < Doc->currentPage->YGuides.count(); ++yg)
{
if ((Doc->currentPage->YGuides[yg]+Doc->currentPage->Yoffset < (MypS+Doc->guidesSettings.grabRad)) &&
(Doc->currentPage->YGuides[yg]+Doc->currentPage->Yoffset > (MypS-Doc->guidesSettings.grabRad)))
if ((Doc->currentPage->YGuides[yg]+Doc->currentPage->yOffset()< (MypS+Doc->guidesSettings.grabRad)) &&
(Doc->currentPage->YGuides[yg]+Doc->currentPage->yOffset()> (MypS-Doc->guidesSettings.grabRad)))
{
GyM = yg;
QPoint py = viewport()->mapFromGlobal(m->globalPos());
7648,8 → 7648,8
{
for (uint xg = 0; xg < Doc->currentPage->XGuides.count(); ++xg)
{
if ((Doc->currentPage->XGuides[xg]+Doc->currentPage->Xoffset < (MxpS+Doc->guidesSettings.grabRad)) &&
(Doc->currentPage->XGuides[xg]+Doc->currentPage->Xoffset > (MxpS-Doc->guidesSettings.grabRad)))
if ((Doc->currentPage->XGuides[xg]+Doc->currentPage->xOffset()< (MxpS+Doc->guidesSettings.grabRad)) &&
(Doc->currentPage->XGuides[xg]+Doc->currentPage->xOffset()> (MxpS-Doc->guidesSettings.grabRad)))
{
GxM = xg;
QPoint py = viewport()->mapFromGlobal(m->globalPos());
8213,7 → 8213,7
RefreshItem(currItem);
emit HaveSel(currItem->itemType());
if (!Doc->isLoading())
emit UpdtObj(Doc->currentPage->PageNr, currItem->ItemNr);
emit UpdtObj(Doc->currentPage->pageNr(), currItem->ItemNr);
EmitValues(currItem);
emit DocChanged();
}
8231,7 → 8231,7
RefreshItem(currItem);
emit HaveSel(currItem->itemType());
if (!Doc->isLoading())
emit UpdtObj(Doc->currentPage->PageNr, currItem->ItemNr);
emit UpdtObj(Doc->currentPage->pageNr(), currItem->ItemNr);
EmitValues(currItem);
emit DocChanged();
}
8245,7 → 8245,7
RefreshItem(currItem);
emit HaveSel(currItem->itemType());
if (!Doc->isLoading())
emit UpdtObj(Doc->currentPage->PageNr, currItem->ItemNr);
emit UpdtObj(Doc->currentPage->pageNr(), currItem->ItemNr);
EmitValues(currItem);
emit DocChanged();
}
8261,7 → 8261,7
RefreshItem(currItem);
emit HaveSel(currItem->itemType());
if (!Doc->isLoading())
emit UpdtObj(Doc->currentPage->PageNr, currItem->ItemNr);
emit UpdtObj(Doc->currentPage->pageNr(), currItem->ItemNr);
EmitValues(currItem);
emit DocChanged();
}
8282,7 → 8282,7
RefreshItem(currItem);
emit HaveSel(currItem->itemType());
if (!Doc->isLoading())
emit UpdtObj(Doc->currentPage->PageNr, currItem->ItemNr);
emit UpdtObj(Doc->currentPage->pageNr(), currItem->ItemNr);
EmitValues(currItem);
emit DocChanged();
}
8352,7 → 8352,7
currItem->setFillTransparency(0.0);
currItem->setLineTransparency(0.0);
currItem->imageClip.resize(0);
/* emit UpdtObj(Doc->currentPage->PageNr, currItem->ItemNr); */
/* emit UpdtObj(Doc->currentPage->pageNr(), currItem->ItemNr); */
}
for (uint a = 0; a < Doc->FrameItems.count(); ++a)
{
8560,8 → 8560,8
return;
if (Doc->guidesSettings.rulerMode)
{
horizRuler->offs = qRound(x / Scale - Doc->currentPage->Xoffset);
vertRuler->offs = qRound(y / Scale - Doc->currentPage->Yoffset);
horizRuler->offs = qRound(x / Scale - Doc->currentPage->xOffset());
vertRuler->offs = qRound(y / Scale - Doc->currentPage->xOffset());
}
else
{
8595,8 → 8595,8
reformPages(mov);
if ((Doc->PageAT) && (!Doc->isLoading()))
{
int z = PaintText(fe->Margins.Left+fe->Xoffset,
fe->Margins.Top+fe->Yoffset,
int z = PaintText(fe->Margins.Left+fe->xOffset(),
fe->Margins.Top+fe->yOffset(),
Doc->pageWidth-fe->Margins.Right-fe->Margins.Left,
Doc->pageHeight-fe->Margins.Bottom-fe->Margins.Top,
1, Doc->toolSettings.dPen);
8672,19 → 8672,19
currentYPos = Doc->ScratchTop;
currentXPos = Doc->ScratchLeft;
currentXPos += (Doc->pageWidth+Doc->pageSets[Doc->currentPageLayout].GapHorizontal) * counter;
lastYPos = Doc->Pages.at(0)->initialHeight;
lastYPos = Doc->Pages.at(0)->initialHeight();
for (uint a = 0; a < Doc->Pages.count(); ++a)
{
Seite = Doc->Pages.at(a);
oldPg.oldXO = Seite->Xoffset;
oldPg.oldYO = Seite->Yoffset;
oldPg.oldXO = Seite->xOffset();
oldPg.oldYO = Seite->yOffset();
oldPg.newPg = a;
pageTable.insert(Seite->PageNr, oldPg);
pageTable.insert(Seite->pageNr(), oldPg);
Seite->setPageNr(a);
if (Doc->masterPageMode)
{
Seite->Xoffset = Doc->ScratchLeft;
Seite->Yoffset = Doc->ScratchTop;
Seite->setXOffset(Doc->ScratchLeft);
Seite->setYOffset(Doc->ScratchTop);
if (Seite->LeftPg == 0)
{
Seite->Margins.Right = Seite->initialMargins.Right;
8703,14 → 8703,14
}
else
{
Seite->Width = Seite->initialWidth;
Seite->Height = Seite->initialHeight;
Seite->Xoffset = currentXPos;
Seite->Yoffset = currentYPos;
Seite->setWidth(Seite->initialWidth());
Seite->setHeight(Seite->initialHeight());
Seite->setXOffset(currentXPos);
Seite->setYOffset(currentYPos);
if (counter < Doc->pageSets[Doc->currentPageLayout].Columns-1)
{
currentXPos += Seite->Width + Doc->pageSets[Doc->currentPageLayout].GapHorizontal;
lastYPos = QMAX(lastYPos, Seite->Height);
currentXPos += Seite->width() + Doc->pageSets[Doc->currentPageLayout].GapHorizontal;
lastYPos = QMAX(lastYPos, Seite->height());
if (counter == 0)
{
Seite->Margins.Left = Seite->initialMargins.Right;
8725,8 → 8725,8
else
{
currentXPos = Doc->ScratchLeft;
currentYPos += QMAX(lastYPos, Seite->Height)+Doc->pageSets[Doc->currentPageLayout].GapVertical;
lastYPos = QMAX(lastYPos, Seite->Height);
currentYPos += QMAX(lastYPos, Seite->height())+Doc->pageSets[Doc->currentPageLayout].GapVertical;
lastYPos = QMAX(lastYPos, Seite->height());
Seite->Margins.Right = Seite->initialMargins.Right;
Seite->Margins.Left = Seite->initialMargins.Left;
}
8744,8 → 8744,8
}
Seite->Margins.Top = Seite->initialMargins.Top;
Seite->Margins.Bottom = Seite->initialMargins.Bottom;
maxXPos = QMAX(maxXPos, Seite->Xoffset+Seite->Width+Doc->ScratchRight);
maxYPos = QMAX(maxYPos, Seite->Yoffset+Seite->Height+Doc->ScratchBottom);
maxXPos = QMAX(maxXPos, Seite->xOffset()+Seite->width()+Doc->ScratchRight);
maxYPos = QMAX(maxYPos, Seite->yOffset()+Seite->height()+Doc->ScratchBottom);
}
if (!Doc->isLoading())
{
8764,8 → 8764,8
if (moveObjects)
{
oldPg = pageTable[item->OwnPage];
item->Xpos = item->Xpos - oldPg.oldXO + Doc->Pages.at(oldPg.newPg)->Xoffset;
item->Ypos = item->Ypos - oldPg.oldYO + Doc->Pages.at(oldPg.newPg)->Yoffset;
item->Xpos = item->Xpos - oldPg.oldXO + Doc->Pages.at(oldPg.newPg)->xOffset();
item->Ypos = item->Ypos - oldPg.oldYO + Doc->Pages.at(oldPg.newPg)->yOffset();
item->OwnPage = static_cast<int>(oldPg.newPg);
}
else
8782,11 → 8782,11
maxSize = FPoint(maxXPos, maxYPos);
adjustCanvas(FPoint(0,0), maxSize);
if (!ScApp->ScriptRunning)
setContentsPos(qRound((Doc->currentPage->Xoffset-10 - Doc->minCanvasCoordinate.x()) * Scale), qRound((Doc->currentPage->Yoffset-10 - Doc->minCanvasCoordinate.y()) * Scale));
setContentsPos(qRound((Doc->currentPage->xOffset()-10 - Doc->minCanvasCoordinate.x()) * Scale), qRound((Doc->currentPage->yOffset()-10 - Doc->minCanvasCoordinate.y()) * Scale));
if (!Doc->isLoading())
{
setRulerPos(contentsX(), contentsY());
setMenTxt(Doc->currentPage->PageNr);
setMenTxt(Doc->currentPage->pageNr());
}
}
 
8916,7 → 8916,7
forceRedraw = true;
updateContents();
setRulerPos(contentsX(), contentsY());
setMenTxt(Doc->currentPage->PageNr);
setMenTxt(Doc->currentPage->pageNr());
disconnect(LE, SIGNAL(valueChanged(int)), this, SLOT(Zval()));
LE->setValue(Scale/Prefs->DisScale*100);
connect(LE, SIGNAL(valueChanged(int)), this, SLOT(Zval()));
8987,7 → 8987,7
Doc->currentPage = Doc->Pages.at(Seite);
if (ScApp->ScriptRunning)
return;
SetCPo(qRound(Doc->currentPage->Xoffset-10), qRound(Doc->currentPage->Yoffset-10));
SetCPo(qRound(Doc->currentPage->xOffset()-10), qRound(Doc->currentPage->yOffset()-10));
PGS->setMaxValue(Doc->pageCount);
if ((!Doc->isLoading()) && (!Doc->masterPageMode))
PGS->GotoPg(Seite);
9011,8 → 9011,8
updateOn = false;
// reformPages();
slotDoZoom();
oldX = qRound(Doc->currentPage->Xoffset - 10);
oldY = qRound(Doc->currentPage->Yoffset - 10);
oldX = qRound(Doc->currentPage->xOffset()- 10);
oldY = qRound(Doc->currentPage->yOffset()- 10);
SetCPo(oldX, oldY);
updateOn = true;
DrawNew();
9033,8 → 9033,8
updateOn = false;
GotoPage(0);
slotDoZoom();
oldX = qRound(Doc->currentPage->Xoffset - 10);
oldY = qRound(Doc->currentPage->Yoffset - 10);
oldX = qRound(Doc->currentPage->xOffset()- 10);
oldY = qRound(Doc->currentPage->yOffset()- 10);
SetCPo(oldX, oldY);
updateOn = true;
// DrawNew();
9082,8 → 9082,8
int Nr = Doc->MasterNames[name];
int clipx = static_cast<int>(Doc->ScratchLeft);
int clipy = static_cast<int>(Doc->ScratchTop);
int clipw = qRound(Doc->MasterPages.at(Nr)->Width);
int cliph = qRound(Doc->MasterPages.at(Nr)->Height);
int clipw = qRound(Doc->MasterPages.at(Nr)->width());
int cliph = qRound(Doc->MasterPages.at(Nr)->height());
if ((clipw > 0) && (cliph > 0))
{
double sca = Scale;
9133,10 → 9133,10
{
QImage pm;
QImage im;
int clipx = static_cast<int>(Doc->Pages.at(Nr)->Xoffset);
int clipy = static_cast<int>(Doc->Pages.at(Nr)->Yoffset);
int clipw = qRound(Doc->Pages.at(Nr)->Width);
int cliph = qRound(Doc->Pages.at(Nr)->Height);
int clipx = static_cast<int>(Doc->Pages.at(Nr)->xOffset());
int clipy = static_cast<int>(Doc->Pages.at(Nr)->yOffset());
int clipw = qRound(Doc->Pages.at(Nr)->width());
int cliph = qRound(Doc->Pages.at(Nr)->height());
if ((clipw > 0) && (cliph > 0))
{
double sca = Scale;
9202,8 → 9202,8
Doc->rulerYoffset = (py.y() + contentsY()) / Scale + Doc->minCanvasCoordinate.y();
if (Doc->guidesSettings.rulerMode)
{
Doc->rulerXoffset -= Doc->currentPage->Xoffset;
Doc->rulerYoffset -= Doc->currentPage->Yoffset;
Doc->rulerXoffset -= Doc->currentPage->xOffset();
Doc->rulerYoffset -= Doc->currentPage->yOffset();
}
setRulerPos(contentsX(), contentsY());
updateContents();
9266,11 → 9266,11
if (pg != -1)
{
if (oldIndex < 0)
Doc->Pages.at(pg)->addYGuide(newY-Doc->Pages.at(pg)->Yoffset);
Doc->Pages.at(pg)->addYGuide(newY-Doc->Pages.at(pg)->yOffset());
else
Doc->Pages.at(pg)->moveYGuide(oldIndex, newY-Doc->Pages.at(pg)->Yoffset);
Doc->Pages.at(pg)->moveYGuide(oldIndex, newY-Doc->Pages.at(pg)->yOffset());
emit DocChanged();
emit signalGuideInformation(0, qRound((newY-Doc->Pages.at(pg)->Yoffset) * 10000.0) / 10000.0);
emit signalGuideInformation(0, qRound((newY-Doc->Pages.at(pg)->yOffset()) * 10000.0) / 10000.0);
}
else if (oldIndex >= 0)
{
9289,11 → 9289,11
if (pg != -1)
{
if (oldIndex < 0)
Doc->Pages.at(pg)->addXGuide(newX-Doc->Pages.at(pg)->Xoffset);
Doc->Pages.at(pg)->addXGuide(newX-Doc->Pages.at(pg)->xOffset());
else
Doc->Pages.at(pg)->moveXGuide(oldIndex, newX-Doc->Pages.at(pg)->Xoffset);
Doc->Pages.at(pg)->moveXGuide(oldIndex, newX-Doc->Pages.at(pg)->xOffset());
emit DocChanged();
emit signalGuideInformation(1, qRound((newX-Doc->Pages.at(pg)->Xoffset) * 10000.0) / 10000.0);
emit signalGuideInformation(1, qRound((newX-Doc->Pages.at(pg)->xOffset()) * 10000.0) / 10000.0);
}
else if (oldIndex >= 0)
{
9970,7 → 9970,7
AdjustItemSize(currItem);
}
/* if (!Doc->loading)
emit UpdtObj(Doc->currentPage->PageNr, currItem->ItemNr); */
emit UpdtObj(Doc->currentPage->pageNr(), currItem->ItemNr); */
RefreshItem(currItem);
}
}
11248,7 → 11248,7
currItem->PicAvail = false;
currItem->pixm = QImage();
/* if (currItem->itemType() == PageItem::ImageFrame)
emit UpdtObj(Doc->currentPage->PageNr, currItem->ItemNr); */
emit UpdtObj(Doc->currentPage->pageNr(), currItem->ItemNr); */
}
}
for (uint a = 0; a < Doc->MasterItems.count(); ++a)
11800,7 → 11800,7
currItem->PLineEnd = bb->PLineEnd;
currItem->PLineJoin = bb->PLineJoin;
/* if (!Doc->loading)
emit UpdtObj(Doc->currentPage->PageNr, b->ItemNr); */
emit UpdtObj(Doc->currentPage->pageNr(), b->ItemNr); */
UpdatePolyClip(currItem);
AdjustItemSize(currItem);
double dx = bb->Xpos - currItem->Xpos;
/branches/Version13x/Scribus/scribus/muster.cpp
97,7 → 97,7
emit removePage(currentDoc->MasterNames[sMuster]);
currentDoc->MasterNames.clear();
for (uint a = 0; a < currentDoc->Pages.count(); ++a)
currentDoc->MasterNames[currentDoc->Pages.at(a)->PageNam] = currentDoc->Pages.at(a)->PageNr;
currentDoc->MasterNames[currentDoc->Pages.at(a)->PageNam] = currentDoc->Pages.at(a)->pageNr();
for (uint b = 0; b < currentDoc->DocPages.count(); ++b)
{
if (currentDoc->DocPages.at(b)->MPageNam == sMuster)
/branches/Version13x/Scribus/scribus/scribus.cpp
993,8 → 993,8
double yn = yp;
if (doc->guidesSettings.rulerMode)
{
xn -= doc->currentPage->Xoffset;
yn -= doc->currentPage->Yoffset;
xn -= doc->currentPage->xOffset();
yn -= doc->currentPage->yOffset();
}
xn -= doc->rulerXoffset;
yn -= doc->rulerYoffset;
2623,7 → 2623,7
scrActions["viewShowTextControls"]->setOn(doc->guidesSettings.showControls);
scrActions["viewRulerMode"]->setOn(doc->guidesSettings.rulerMode);
view->reformPages();
view->GotoPage(doc->currentPage->PageNr);
view->GotoPage(doc->currentPage->pageNr());
view->DrawNew();
propertiesPalette->ShowCMS();
pagePalette->RebuildPage();
2941,7 → 2941,7
scrActions["toolsRotate"]->setEnabled(false);
scrActions["toolsCopyProperties"]->setEnabled(false);
propertiesPalette->Cpal->gradientQCombo->setCurrentItem(0);
outlinePalette->slotShowSelect(doc->currentPage->PageNr, -1);
outlinePalette->slotShowSelect(doc->currentPage->pageNr(), -1);
break;
case PageItem::ImageFrame: //Image Frame
scrActions["fileImportAppendText"]->setEnabled(false);
3517,7 → 3517,7
bool ScribusApp::slotPageImport()
{
bool ret = false;
MergeDoc *dia = new MergeDoc(this, false, doc->pageCount, doc->currentPage->PageNr + 1);
MergeDoc *dia = new MergeDoc(this, false, doc->pageCount, doc->currentPage->pageNr() + 1);
if (dia->exec())
{
mainWindowStatusLabel->setText( tr("Importing Pages..."));
3546,9 → 3546,9
}
else
{
startPage = doc->currentPage->PageNr + 1;
startPage = doc->currentPage->pageNr() + 1;
nrToImport = pageNs.size();
if (pageNs.size() > (doc->pageCount - doc->currentPage->PageNr))
if (pageNs.size() > (doc->pageCount - doc->currentPage->pageNr()))
{
qApp->setOverrideCursor(QCursor(arrowCursor), true);
QMessageBox mb( tr("Import Page(s)"),
3568,10 → 3568,10
switch( mb.exec() ) {
case QMessageBox::Yes:
nrToImport = pageNs.size();
addNewPages(doc->pageCount, 2, pageNs.size() - (doc->pageCount - doc->currentPage->PageNr), doc->pageHeight, doc->pageWidth, doc->PageOri, doc->PageSize, true);
addNewPages(doc->pageCount, 2, pageNs.size() - (doc->pageCount - doc->currentPage->pageNr()), doc->pageHeight, doc->pageWidth, doc->PageOri, doc->PageSize, true);
break;
case QMessageBox::No:
nrToImport = doc->pageCount - doc->currentPage->PageNr;
nrToImport = doc->pageCount - doc->currentPage->pageNr();
break;
case QMessageBox::Cancel:
doIt = false;
4581,7 → 4581,7
doc->getUsedColors(usedSpots, true);
QStringList spots = usedSpots.keys();
Druck *printer = new Druck(this, options.filename, options.printer, PDef.Command, prefsManager->appPrefs.GCRMode, spots);
printer->setMinMax(1, doc->Pages.count(), doc->currentPage->PageNr+1);
printer->setMinMax(1, doc->Pages.count(), doc->currentPage->pageNr()+1);
if (printer->exec())
{
ReOrderText(doc, view);
4590,7 → 4590,7
options.filename = printer->outputFileName();
options.toFile = printer->outputToFile();
if (printer->CurrentPage->isChecked())
options.pageNumbers.push_back(doc->currentPage->PageNr+1);
options.pageNumbers.push_back(doc->currentPage->pageNr()+1);
else
{
if (printer->RadioButton1->isChecked())
5283,7 → 5283,7
 
void ScribusApp::applyNewMaster(QString name)
{
Apply_MasterPage(name, doc->currentPage->PageNr);
Apply_MasterPage(name, doc->currentPage->pageNr());
view->DrawNew();
slotDocCh();
pagePalette->Rebuild();
5309,7 → 5309,7
NoFrameEdit();
view->Deselect(true);
QStringList base;
InsPage *dia = new InsPage(this, doc, doc->currentPage->PageNr, doc->Pages.count());
InsPage *dia = new InsPage(this, doc, doc->currentPage->pageNr(), doc->Pages.count());
if (dia->exec())
{
base = dia->getMasterPages();
5365,11 → 5365,11
for (cc = 0; cc < numPages; ++cc)
{
slotNewPage(wot, mov);
doc->currentPage->initialHeight = height;
doc->currentPage->initialWidth = width;
doc->currentPage->setInitialHeight(height);
doc->currentPage->setInitialWidth(width);
doc->currentPage->PageOri = orient;
doc->currentPage->PageSize = siz;
applyNewMaster(base[(doc->currentPage->PageNr+doc->pageSets[doc->currentPageLayout].FirstPage) % doc->pageSets[doc->currentPageLayout].Columns]);
applyNewMaster(base[(doc->currentPage->pageNr()+doc->pageSets[doc->currentPageLayout].FirstPage) % doc->pageSets[doc->currentPageLayout].Columns]);
wot ++;
}
break;
5377,11 → 5377,11
for (cc = 0; cc < numPages; ++cc)
{
slotNewPage(wot, mov);
doc->currentPage->initialHeight = height;
doc->currentPage->initialWidth = width;
doc->currentPage->setInitialHeight(height);
doc->currentPage->setInitialWidth(width);
doc->currentPage->PageOri = orient;
doc->currentPage->PageSize = siz;
applyNewMaster(base[(doc->currentPage->PageNr+doc->pageSets[doc->currentPageLayout].FirstPage) % doc->pageSets[doc->currentPageLayout].Columns]);
applyNewMaster(base[(doc->currentPage->pageNr()+doc->pageSets[doc->currentPageLayout].FirstPage) % doc->pageSets[doc->currentPageLayout].Columns]);
wot ++;
}
break;
5389,11 → 5389,11
for (cc = 0; cc < numPages; ++cc)
{
slotNewPage(doc->Pages.count(), mov);
doc->currentPage->initialHeight = height;
doc->currentPage->initialWidth = width;
doc->currentPage->setInitialHeight(height);
doc->currentPage->setInitialWidth(width);
doc->currentPage->PageOri = orient;
doc->currentPage->PageSize = siz;
applyNewMaster(base[(doc->currentPage->PageNr+doc->pageSets[doc->currentPageLayout].FirstPage) % doc->pageSets[doc->currentPageLayout].Columns]);
applyNewMaster(base[(doc->currentPage->pageNr()+doc->pageSets[doc->currentPageLayout].FirstPage) % doc->pageSets[doc->currentPageLayout].Columns]);
}
break;
}
5434,8 → 5434,45
slotDocCh(!doc->loading); */
}
 
/*
void ScribusApp::duplicateToMasterPage()
{
NewTm *dia = new NewTm(this, tr("Name:"), tr("Convert Page to Master Page"), doc);
dia->Answer->setText( tr("New Master Page"));
dia->Answer->selectAll();
if (dia->exec())
{
view->Deselect(true);
QString masterPageName = dia->Answer->text();
while (doc->MasterNames.contains(masterPageName) || (masterPageName == "Normal"))
{
if (!dia->exec())
{
delete dia;
return;
}
masterPageName = dia->Answer->text();
}
//Grab the left page setting for the current document layout from the dialog, and increment, singlePage==1 remember.
int lp;
if (doc->currentPageLayout != singlePage)
{
lp = dia->Links->currentItem();
if (lp == static_cast<int>(dia->Links->count()-1))
lp = 0;
else
++lp;
}
int currentPageNumber=doc->currentPage->pageNr();
bool ok=doc->copyPageToMasterPage(currentPageNumber, lp, masterPageName);
Q_ASSERT(ok); //TODO get a return value in case the copy was not possible
}
delete dia;
}
*/
 
void ScribusApp::duplicateToMasterPage()
{
QString MasterPageName;
int nr;
bool atf;
5503,10 → 5540,10
}
qHeapSort(Target->XGuides);
}
uint end = doc->DocItems.count();
for (uint a = 0; a < end; ++a)
uint docItemsCount = doc->DocItems.count();
for (uint a = 0; a < docItemsCount; ++a)
{
if (doc->DocItems.at(a)->OwnPage == static_cast<int>(Source->PageNr))
if (doc->DocItems.at(a)->OwnPage == static_cast<int>(Source->pageNr()))
{
doc->DocItems.at(a)->copyToCopyPasteBuffer(&BufferT);
view->PasteItem(&BufferT, true, true);
6317,7 → 6354,7
{
NoFrameEdit();
view->Deselect(true);
DelPages *dia = new DelPages(this, doc->currentPage->PageNr+1, doc->Pages.count());
DelPages *dia = new DelPages(this, doc->currentPage->pageNr()+1, doc->Pages.count());
if (dia->exec())
DeletePage(dia->getFromPage(), dia->getToPage());
delete dia;
6384,7 → 6421,7
void ScribusApp::MovePage()
{
NoFrameEdit();
MovePages *dia = new MovePages(this, doc->currentPage->PageNr+1, doc->Pages.count(), true);
MovePages *dia = new MovePages(this, doc->currentPage->pageNr()+1, doc->Pages.count(), true);
if (dia->exec())
{
// doc->OpenNodes = outlinePalette->buildReopenVals();
6407,7 → 6444,7
void ScribusApp::CopyPage()
{
NoFrameEdit();
MovePages *dia = new MovePages(this, doc->currentPage->PageNr+1, doc->Pages.count(), false);
MovePages *dia = new MovePages(this, doc->currentPage->pageNr()+1, doc->Pages.count(), false);
if (dia->exec())
{
doc->setLoading(true);
6426,8 → 6463,8
break;
}
Page* Ziel = doc->currentPage;
Ziel->initialHeight = from->Height;
Ziel->initialWidth = from->Width;
Ziel->setInitialHeight(from->height());
Ziel->setInitialWidth(from->width());
Ziel->PageOri = from->PageOri;
Ziel->PageSize = from->PageSize;
Ziel->initialMargins.Top = from->Margins.Top;
6441,11 → 6478,11
uint oldItems = doc->Items.count();
for (uint ite = 0; ite < oldItems; ++ite)
{
if (doc->Items.at(ite)->OwnPage == static_cast<int>(from->PageNr))
if (doc->Items.at(ite)->OwnPage == static_cast<int>(from->pageNr()))
{
doc->Items.at(ite)->copyToCopyPasteBuffer(&Buffer);
Buffer.Xpos = Buffer.Xpos - from->Xoffset + Ziel->Xoffset;
Buffer.Ypos = Buffer.Ypos - from->Yoffset + Ziel->Yoffset;
Buffer.Xpos = Buffer.Xpos - from->xOffset() + Ziel->xOffset();
Buffer.Ypos = Buffer.Ypos - from->yOffset() + Ziel->yOffset();
view->PasteItem(&Buffer, true, true);
PageItem* Neu = doc->Items.at(doc->Items.count()-1);
Neu->OnMasterPage = "";
6481,7 → 6518,7
ta->BottomLink = 0;
}
}
Apply_MasterPage(from->MPageNam, Ziel->PageNr, false);
Apply_MasterPage(from->MPageNam, Ziel->pageNr(), false);
if (from->YGuides.count() != 0)
{
for (uint y = 0; y < from->YGuides.count(); ++y)
6518,7 → 6555,7
MarginDialog *dia = new MarginDialog(this, doc);
if (dia->exec())
{
doc->changePageMargins(dia->GroupRand->RandT, dia->GroupRand->RandB, dia->GroupRand->RandL, dia->GroupRand->RandR, dia->pageHeight, dia->pageWidth, dia->pageHeight, dia->pageWidth, dia->orientationQComboBox->currentItem(), dia->prefsPageSizeName, doc->currentPage->PageNr);
doc->changePageMargins(dia->GroupRand->RandT, dia->GroupRand->RandB, dia->GroupRand->RandL, dia->GroupRand->RandR, dia->pageHeight, dia->pageWidth, dia->pageHeight, dia->pageWidth, dia->orientationQComboBox->currentItem(), dia->prefsPageSizeName, doc->currentPage->pageNr());
view->reformPages(dia->moveObjects->isChecked());
view->DrawNew();
slotDocCh();
7482,7 → 7519,7
NoFrameEdit();
setActiveWindow();
view->Deselect(true);
if ((Page != -1) && (Page != static_cast<int>(doc->currentPage->PageNr)))
if ((Page != -1) && (Page != static_cast<int>(doc->currentPage->pageNr())))
view->GotoPage(Page);
view->SelectItemNr(Item, true, single);
if (view->SelItem.count() != 0)
7715,7 → 7752,7
QStringList spots;
bool return_value = true;
std::vector<int> pageNs;
pageNs.push_back(doc->currentPage->PageNr+1);
pageNs.push_back(doc->currentPage->pageNr()+1);
ReOrderText(doc, view);
qApp->setOverrideCursor(QCursor(waitCursor), true);
QMap<QString,QFont> ReallyUsed;
7784,12 → 7821,12
if (!doc->DocName.startsWith(tr("Document")))
{
QFileInfo fi(doc->DocName);
fna = fi.dirPath() + "/" + getFileNameByPage(doc->currentPage->PageNr, "eps");
fna = fi.dirPath() + "/" + getFileNameByPage(doc->currentPage->pageNr(), "eps");
}
else
{
QDir di = QDir();
fna = di.currentDirPath() + "/" + getFileNameByPage(doc->currentPage->PageNr, "eps");
fna = di.currentDirPath() + "/" + getFileNameByPage(doc->currentPage->pageNr(), "eps");
}
fna = QDir::convertSeparators(fna);
QString wdir = ".";
8202,7 → 8239,7
QString masterPageName = dia->getMasterPageName();
int pageSelection = dia->getPageSelection(); //0=current, 1=even, 2=odd, 3=all
if (pageSelection==0) //current page only
Apply_MasterPage(masterPageName, doc->currentPage->PageNr, false);
Apply_MasterPage(masterPageName, doc->currentPage->pageNr(), false);
else
{
int startPage, endPage;
/branches/Version13x/Scribus/scribus/plugins/pixmapexport/export.cpp
61,7 → 61,7
 
// interval widgets handling
QString tmp;
dia->RangeVal->setText(tmp.setNum(plug->doc->currentPage->PageNr+1));
dia->RangeVal->setText(tmp.setNum(plug->doc->currentPage->pageNr()+1));
// main "loop"
if (dia->exec()==QDialog::Accepted)
{
166,7 → 166,7
 
bool ExportBitmap::exportActual()
{
return exportPage(carrier->doc->currentPage->PageNr, true);
return exportPage(carrier->doc->currentPage->pageNr(), true);
}
 
bool ExportBitmap::exportInterval(std::vector<int> &pageNs)
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
5,7 → 5,7
{
if(!checkHaveDocument())
return NULL;
return PyInt_FromLong(static_cast<long>(Carrier->doc->currentPage->PageNr + 1));
return PyInt_FromLong(static_cast<long>(Carrier->doc->currentPage->pageNr() + 1));
}
 
PyObject *scribus_redraw(PyObject* /* self */)
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp
20,13 → 20,13
/// in system units.
double pageUnitXToDocX(double pageUnitX)
{
return ValueToPoint(pageUnitX) + Carrier->doc->currentPage->Xoffset;
return ValueToPoint(pageUnitX) + Carrier->doc->currentPage->xOffset();
}
 
// Convert doc units to page units
double docUnitXToPageX(double pageUnitX)
{
return PointToValue(pageUnitX - Carrier->doc->currentPage->Xoffset);
return PointToValue(pageUnitX - Carrier->doc->currentPage->xOffset());
}
 
/// Convert a Y co-ordinate part in page units to a document co-ordinate
35,12 → 35,12
/// origin on the top left of the current page.
double pageUnitYToDocY(double pageUnitY)
{
return ValueToPoint(pageUnitY) + Carrier->doc->currentPage->Yoffset;
return ValueToPoint(pageUnitY) + Carrier->doc->currentPage->yOffset();
}
 
double docUnitYToPageY(double pageUnitY)
{
return PointToValue(pageUnitY - Carrier->doc->currentPage->Yoffset);
return PointToValue(pageUnitY - Carrier->doc->currentPage->yOffset());
}
 
int GetItem(QString Name)
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
170,7 → 170,7
return NULL;
if(!checkHaveDocument())
return NULL;
uint ap = Carrier->doc->currentPage->PageNr;
uint ap = Carrier->doc->currentPage->pageNr();
// If we were passed a list of items to group...
if (il != 0)
{
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/objimageexport.cpp
139,7 → 139,7
(Carrier->doc->pageHeight > Carrier->doc->pageWidth)
? pixmapSize = Carrier->doc->pageHeight
: pixmapSize = Carrier->doc->pageWidth;
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->currentPage->PageNr, qRound(pixmapSize * self->scale * (self->dpi / 72.0) / 100.0));
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->currentPage->pageNr(), qRound(pixmapSize * self->scale * (self->dpi / 72.0) / 100.0));
QImage im = pixmap.convertToImage();
int dpi = qRound(100.0 / 2.54 * self->dpi);
im.setDotsPerMeterY(dpi);
169,7 → 169,7
(Carrier->doc->pageHeight > Carrier->doc->pageWidth)
? pixmapSize = Carrier->doc->pageHeight
: pixmapSize = Carrier->doc->pageWidth;
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->currentPage->PageNr, qRound(pixmapSize * self->scale * (self->dpi / 72.0) / 100.0));
QPixmap pixmap = Carrier->view->PageToPixmap(Carrier->doc->currentPage->pageNr(), qRound(pixmapSize * self->scale * (self->dpi / 72.0) / 100.0));
QImage im = pixmap.convertToImage();
int dpi = qRound(100.0 / 2.54 * self->dpi);
im.setDotsPerMeterY(dpi);
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
43,7 → 43,7
Carrier->doc->resetPage(tpr, lr, rr, btr, Carrier->doc->currentPageLayout);
Carrier->view->reformPages();
Carrier->doc->setModified(true);
Carrier->view->GotoPage(Carrier->doc->currentPage->PageNr);
Carrier->view->GotoPage(Carrier->doc->currentPage->pageNr());
Carrier->view->DrawNew();
Py_INCREF(Py_None);
return Py_None;
170,7 → 170,7
if (Carrier->doc->currentPageLayout = fp)
Carrier->doc->pageSets[Carrier->doc->currentPageLayout].FirstPage = fsl;
Carrier->view->reformPages();
Carrier->view->GotoPage(Carrier->doc->currentPage->PageNr); // is this needed?
Carrier->view->GotoPage(Carrier->doc->currentPage->pageNr()); // is this needed?
Carrier->view->DrawNew(); // is this needed?
//CB TODO Carrier->pagePalette->RebuildPage(); // is this needed?
Carrier->slotDocCh();
/branches/Version13x/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
335,8 → 335,8
QPtrList<PageItem> GElements;
FPointArray ImgClip;
ImgClip.resize(0);
double BaseX = Doku->currentPage->Xoffset;
double BaseY = Doku->currentPage->Yoffset;
double BaseX = Doku->currentPage->xOffset();
double BaseY = Doku->currentPage->yOffset();
for( QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling() )
{
int z = -1;
/branches/Version13x/Scribus/scribus/plugins/fileloader/oodraw/oodrawimp.cpp
323,8 → 323,8
double yGoff= 0;
bool HaveGradient = false;
int GradientType = 0;
double BaseX = Doku->currentPage->Xoffset;
double BaseY = Doku->currentPage->Yoffset;
double BaseX = Doku->currentPage->xOffset();
double BaseY = Doku->currentPage->yOffset();
double lwidth = 0;
double x, y, w, h;
double FillTrans = 0;
/branches/Version13x/Scribus/scribus/plugins/short-words/shortwords.cpp
76,7 → 76,7
 
ShortWords::ShortWords()
{
originalPage = ScApp->doc->currentPage->PageNr;
originalPage = ScApp->doc->currentPage->pageNr();
VlnaDialog *dlg = new VlnaDialog(ScApp, "dlg", true, 0);
if (dlg->exec() == QDialog::Accepted) {
parse = new Parse();
87,7 → 87,7
parse->parseSelection();
break;
case 1:
parse->parsePage(ScApp->doc->currentPage->PageNr);
parse->parsePage(ScApp->doc->currentPage->pageNr());
break;
case 2:
parse->parseAll();
/branches/Version13x/Scribus/scribus/plugins/short-words/parse.cpp
110,7 → 110,7
 
void Parse::parsePage()
{
parsePage(ScApp->doc->currentPage->PageNr);
parsePage(ScApp->doc->currentPage->pageNr());
}
 
void Parse::parsePage(int page)
/branches/Version13x/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
105,7 → 105,7
{
PrefsContext* prefs = PrefsManager::instance()->prefsFile->getPluginContext("svgex");
QString wdir = prefs->get("wdir", ".");
QString defaultName = getFileNameByPage(plug->doc->currentPage->PageNr, "svg");
QString defaultName = getFileNameByPage(plug->doc->currentPage->pageNr(), "svg");
#ifdef HAVE_LIBZ
QString fileName = plug->CFileDialog(wdir, QObject::tr("Save as"), QObject::tr("SVG-Images (*.svg *.svgz);;All Files (*)"), defaultName, false, false, true);
#else
237,10 → 237,10
Item = Items.at(j);
if (Item->LayerNr != ll.LNr)
continue;
int x = static_cast<int>(Seite->Xoffset);
int y = static_cast<int>(Seite->Yoffset);
int w = static_cast<int>(Seite->Width);
int h = static_cast<int>(Seite->Height);
int x = static_cast<int>(Seite->xOffset());
int y = static_cast<int>(Seite->yOffset());
int w = static_cast<int>(Seite->width());
int h = static_cast<int>(Seite->height());
int x2 = static_cast<int>(Item->BoundingX);
int y2 = static_cast<int>(Item->BoundingY);
int w2 = static_cast<int>(Item->BoundingW);
329,7 → 329,7
}
else
stroke = "stroke:none;";
trans = "translate("+FToStr(Item->Xpos-Seite->Xoffset)+", "+FToStr(Item->Ypos-Seite->Yoffset)+")";
trans = "translate("+FToStr(Item->Xpos-Seite->xOffset())+", "+FToStr(Item->Ypos-Seite->yOffset())+")";
if (Item->Rot != 0)
trans += " rotate("+FToStr(Item->Rot)+")";
strokeW = "stroke-width:"+FToStr(Item->Pwidth)+"pt;";
/branches/Version13x/Scribus/scribus/plugins/psimport/importps.cpp
468,7 → 468,7
z = Prog->view->PaintPolyLine(0, 0, 10, 10, LineW, CurrColor, "None");
ite = Doku->Items.at(z);
ite->PoLine = Coords.copy();
ite->PoLine.translate(Doku->currentPage->Xoffset, Doku->currentPage->Yoffset);
ite->PoLine.translate(Doku->currentPage->xOffset(), Doku->currentPage->yOffset());
ite->ClipEdited = true;
ite->FrameType = 3;
FPoint wh = getMaxClipF(&ite->PoLine);
507,7 → 507,7
z = Prog->view->PaintPolyLine(0, 0, 10, 10, LineW, "None", CurrColor);
ite = Doku->Items.at(z);
ite->PoLine = Coords.copy();
ite->PoLine.translate(Doku->currentPage->Xoffset, Doku->currentPage->Yoffset);
ite->PoLine.translate(Doku->currentPage->xOffset(), Doku->currentPage->yOffset());
ite->ClipEdited = true;
ite->FrameType = 3;
ite->PLineEnd = CapStyle;
/branches/Version13x/Scribus/scribus/pslib.cpp
982,8 → 982,8
view->setGroupRect();
view->getGroupRect(&gx, &gy, &gw, &gh);
int pgNum = pageNs[0]-1;
gx -= Doc->Pages.at(pgNum)->Xoffset;
gy -= Doc->Pages.at(pgNum)->Yoffset;
gx -= Doc->Pages.at(pgNum)->xOffset();
gy -= Doc->Pages.at(pgNum)->yOffset();
PS_begin_doc(Doc->PageOri, gx, Doc->pageHeight - (gy+gh), gx + gw, Doc->pageHeight - gy, 1*pagemult, false, sep);
}
else
1007,10 → 1007,10
PageItem *it = Doc->MasterItems.at(api);
if ((it->LayerNr != ll.LNr) || (!it->printable()))
continue;
int x = static_cast<int>(Doc->MasterPages.at(ap)->Xoffset);
int y = static_cast<int>(Doc->MasterPages.at(ap)->Yoffset);
int w = static_cast<int>(Doc->MasterPages.at(ap)->Width);
int h = static_cast<int>(Doc->MasterPages.at(ap)->Height);
int x = static_cast<int>(Doc->MasterPages.at(ap)->xOffset());
int y = static_cast<int>(Doc->MasterPages.at(ap)->yOffset());
int w = static_cast<int>(Doc->MasterPages.at(ap)->width());
int h = static_cast<int>(Doc->MasterPages.at(ap)->height());
int x2 = static_cast<int>(it->BoundingX - it->Pwidth / 2.0);
int y2 = static_cast<int>(it->BoundingY - it->Pwidth / 2.0);
int w2 = static_cast<int>(it->BoundingW + it->Pwidth);
1017,7 → 1017,7
int h2 = static_cast<int>(it->BoundingH + it->Pwidth);
if (!QRect(x, y, w, h).intersects(QRect(x2, y2, w2, h2)))
continue;
if ((it->OwnPage != static_cast<int>(Doc->MasterPages.at(ap)->PageNr)) && (it->OwnPage != -1))
if ((it->OwnPage != static_cast<int>(Doc->MasterPages.at(ap)->pageNr())) && (it->OwnPage != -1))
continue;
if ((it->itemType() == PageItem::ImageFrame) && (it->PicAvail) && (!it->Pfile.isEmpty()) && (it->printable()) && (!sep) && (farb))
PS_ImageData(it, it->Pfile, it->itemName(), it->IProfile, it->UseEmbedded, Ic);
1040,20 → 1040,20
struct MarginStruct Ma;
Ma.Left = gx;
Ma.Top = gy;
Ma.Bottom = Doc->Pages.at(a)->Height - (gy + gh);
Ma.Right = Doc->Pages.at(a)->Width - (gx + gw);
PS_begin_page(Doc->Pages.at(a)->Width, Doc->Pages.at(a)->Height, &Ma, true);
Ma.Bottom = Doc->Pages.at(a)->height() - (gy + gh);
Ma.Right = Doc->Pages.at(a)->width() - (gx + gw);
PS_begin_page(Doc->Pages.at(a)->width(), Doc->Pages.at(a)->height(), &Ma, true);
}
else
PS_begin_page(Doc->Pages.at(a)->Width, Doc->Pages.at(a)->Height, &Doc->Pages.at(a)->Margins, view->Prefs->ClipMargin);
PS_begin_page(Doc->Pages.at(a)->width(), Doc->Pages.at(a)->height(), &Doc->Pages.at(a)->Margins, view->Prefs->ClipMargin);
if (Hm)
{
PS_translate(Doc->Pages.at(a)->Width, 0);
PS_translate(Doc->Pages.at(a)->width(), 0);
PS_scale(-1, 1);
}
if (Vm)
{
PS_translate(0, Doc->Pages.at(a)->Height);
PS_translate(0, Doc->Pages.at(a)->height());
PS_scale(1, -1);
}
if (sep)
1099,7 → 1099,7
else if (ite->itemType() == PageItem::ImageFrame)
{
PS_save();
PS_translate(ite->Xpos - mPage->Xoffset, mPage->Height -(ite->Ypos) - mPage->Yoffset);
PS_translate(ite->Xpos - mPage->xOffset(), mPage->height() -(ite->Ypos) - mPage->yOffset());
if (ite->Rot != 0)
PS_rotate(-ite->Rot);
if (ite->fillColor() != "None")
1177,7 → 1177,7
SetFarbe(ite->fillColor(), ite->fillShade(), &h, &s, &v, &k, gcr);
PS_setcmykcolor_fill(h / 255.0, s / 255.0, v / 255.0, k / 255.0);
}
PS_translate(ite->Xpos - mPage->Xoffset, mPage->Height - (ite->Ypos - mPage->Yoffset));
PS_translate(ite->Xpos - mPage->xOffset(), mPage->height() - (ite->Ypos - mPage->yOffset()));
if (ite->Rot != 0)
PS_rotate(-ite->Rot);
if ((ite->fillColor() != "None") || (ite->GrType != 0))
1246,7 → 1246,7
PS_setlinewidth(ite->Pwidth);
PS_setcapjoin(ite->PLineEnd, ite->PLineJoin);
PS_setdash(ite->PLineArt, ite->DashOffset, ite->DashValues);
PS_translate(ite->Xpos - mPage->Xoffset, mPage->Height - (ite->Ypos - mPage->Yoffset));
PS_translate(ite->Xpos - mPage->xOffset(), mPage->height() - (ite->Ypos - mPage->yOffset()));
if (ite->Rot != 0)
PS_rotate(-ite->Rot);
if ((ite->TopLine) || (ite->RightLine) || (ite->BottomLine) || (ite->LeftLine))
1329,7 → 1329,7
PS_setdash(c->PLineArt, c->DashOffset, c->DashValues);
if (!embedded)
{
PS_translate(c->Xpos - a->Xoffset, a->Height - (c->Ypos - a->Yoffset));
PS_translate(c->Xpos - a->xOffset(), a->height() - (c->Ypos - a->yOffset()));
}
if (c->Rot != 0)
PS_rotate(-c->Rot);
1417,7 → 1417,7
break;
bm += "\\"+cc.setNum(QMAX(c->itemText.at(d)->ch.at(0).unicode(), 32), 8);
}
PDF_Bookmark(bm, a->PageNr+1);
PDF_Bookmark(bm, a->pageNr()+1);
}
if (c->isAnnotation)
{
1795,10 → 1795,10
continue;
if ((!Art) && (view->SelItem.count() != 0) && (!c->Select))
continue;
int x = static_cast<int>(a->Xoffset);
int y = static_cast<int>(a->Yoffset);
int w = static_cast<int>(a->Width);
int h1 = static_cast<int>(a->Height);
int x = static_cast<int>(a->xOffset());
int y = static_cast<int>(a->yOffset());
int w = static_cast<int>(a->width());
int h1 = static_cast<int>(a->height());
int x2 = static_cast<int>(c->BoundingX - c->Pwidth / 2.0);
int y2 = static_cast<int>(c->BoundingY - c->Pwidth / 2.0);
int w2 = static_cast<int>(c->BoundingW + c->Pwidth);
1807,7 → 1807,7
continue;
if (c->ChangedMasterItem)
continue;
if ((!a->PageNam.isEmpty()) && (c->OwnPage != static_cast<int>(a->PageNr)) && (c->OwnPage != -1))
if ((!a->PageNam.isEmpty()) && (c->OwnPage != static_cast<int>(a->pageNr())) && (c->OwnPage != -1))
continue;
ProcessItem(Doc, a, c, PNr, sep, farb, ic, gcr, false);
}
1821,10 → 1821,10
continue;
if ((!a->PageNam.isEmpty()) && (c->itemType() == PageItem::ImageFrame) && ((sep) || (!farb)))
continue;
int x = static_cast<int>(a->Xoffset);
int y = static_cast<int>(a->Yoffset);
int w = static_cast<int>(a->Width);
int h1 = static_cast<int>(a->Height);
int x = static_cast<int>(a->xOffset());
int y = static_cast<int>(a->yOffset());
int w = static_cast<int>(a->width());
int h1 = static_cast<int>(a->height());
int x2 = static_cast<int>(c->BoundingX - c->Pwidth / 2.0);
int y2 = static_cast<int>(c->BoundingY - c->Pwidth / 2.0);
int w2 = static_cast<int>(c->BoundingW + c->Pwidth);
1835,7 → 1835,7
continue;
if (!c->isTableItem)
continue;
if ((!a->PageNam.isEmpty()) && (c->OwnPage != static_cast<int>(a->PageNr)) && (c->OwnPage != -1))
if ((!a->PageNam.isEmpty()) && (c->OwnPage != static_cast<int>(a->pageNr())) && (c->OwnPage != -1))
continue;
if (c->printable())
{
1848,7 → 1848,7
PS_setlinewidth(c->Pwidth);
PS_setcapjoin(c->PLineEnd, c->PLineJoin);
PS_setdash(c->PLineArt, c->DashOffset, c->DashValues);
PS_translate(c->Xpos - a->Xoffset, a->Height - (c->Ypos - a->Yoffset));
PS_translate(c->Xpos - a->xOffset(), a->height() - (c->Ypos - a->yOffset()));
if (c->Rot != 0)
PS_rotate(-c->Rot);
if ((c->TopLine) || (c->RightLine) || (c->BottomLine) || (c->LeftLine))
/branches/Version13x/Scribus/scribus/newtemp.cpp
52,7 → 52,7
PushButton2 = new QPushButton( CommonStrings::tr_Cancel, this, "PushButton2" );
Layout1->addWidget( PushButton2 );
QueryLayout->addLayout( Layout1 );
setMaximumSize(sizeHint());
setMinimumSize(sizeHint());
Answer->setFocus();
 
// signals and slots connections
/branches/Version13x/Scribus/scribus/aligndistribute.cpp
440,17 → 440,14
loopEnd=alignObjectsCount-2;
break;
case Page:
newX = currDoc->ScratchLeft;
newX += widthForPageLocation();
newX = currDoc->currentPage->xOffset();
break;
case Margins:
newX = currDoc->ScratchLeft;
newX += widthForPageLocation();
newX = currDoc->currentPage->xOffset();
newX += currDoc->currentPage->Margins.Left;
break;
case Guide:
newX=currDoc->ScratchLeft + guidePosition;
newX += widthForPageLocation();
newX=currDoc->currentPage->xOffset() + guidePosition;
break;
case Selection:
for (uint a = 0; a < alignObjectsCount; ++a)
486,17 → 483,14
loopEnd=alignObjectsCount-2;
break;
case Page:
newX = currDoc->ScratchLeft; //singlePage
newX += widthForPageLocation();
newX = currDoc->currentPage->xOffset();
break;
case Margins:
newX = currDoc->ScratchLeft;
newX += widthForPageLocation();
newX = currDoc->currentPage->xOffset();
newX += currDoc->currentPage->Margins.Left;
break;
case Guide:
newX=currDoc->ScratchLeft + guidePosition;
newX += widthForPageLocation();
newX=currDoc->currentPage->xOffset() + guidePosition;
break;
case Selection:
for (uint a = 0; a < alignObjectsCount; ++a)
535,19 → 529,16
}
break;
case Page:
newX = currDoc->ScratchLeft;
newX += widthForPageLocation();
newX += currDoc->currentPage->Width/2;
newX = currDoc->currentPage->xOffset();
newX += currDoc->currentPage->width()/2;
break;
case Margins:
newX = currDoc->ScratchLeft;
newX += widthForPageLocation();
newX = currDoc->currentPage->xOffset();
newX += currDoc->currentPage->Margins.Left;
newX += (currDoc->currentPage->Width - currDoc->currentPage->Margins.Right - currDoc->currentPage->Margins.Left)/2;
newX += (currDoc->currentPage->width() - currDoc->currentPage->Margins.Right - currDoc->currentPage->Margins.Left)/2;
break;
case Guide:
newX=currDoc->ScratchLeft + guidePosition;
newX += widthForPageLocation();
newX=currDoc->currentPage->xOffset() + guidePosition;
break;
case Selection:
double minX=99999.9, maxX=-99999.9;
588,19 → 579,16
loopEnd=alignObjectsCount-2;
break;
case Page:
newX = currDoc->ScratchLeft;
newX += widthForPageLocation();
newX += currDoc->currentPage->Width;
newX = currDoc->currentPage->xOffset();
newX += currDoc->currentPage->width();;
break;
case Margins:
newX = currDoc->ScratchLeft;
newX += widthForPageLocation();
newX += currDoc->currentPage->Width;
newX = currDoc->currentPage->xOffset();
newX += currDoc->currentPage->width();;
newX -= currDoc->currentPage->Margins.Right;
break;
case Guide:
newX=currDoc->ScratchLeft + guidePosition;
newX += widthForPageLocation();
newX=currDoc->currentPage->xOffset() + guidePosition;
break;
case Selection:
for (uint a = 0; a < alignObjectsCount; ++a)
636,19 → 624,16
loopEnd=alignObjectsCount-2;
break;
case Page:
newX = currDoc->ScratchLeft;
newX += widthForPageLocation();
newX += currDoc->currentPage->Width;
newX = currDoc->currentPage->xOffset();
newX += currDoc->currentPage->width();
break;
case Margins:
newX = currDoc->ScratchLeft;
newX += widthForPageLocation();
newX += currDoc->currentPage->Width;
newX = currDoc->currentPage->xOffset();
newX += currDoc->currentPage->width();
newX -= currDoc->currentPage->Margins.Right;
break;
case Guide:
newX=currDoc->ScratchLeft + guidePosition;
newX += widthForPageLocation();
newX=currDoc->currentPage->xOffset() + guidePosition;
break;
case Selection:
for (uint a = 0; a < alignObjectsCount; ++a)
671,7 → 656,7
{
if (!startAlign())
return;
uint loopStart=0, loopEnd=alignObjectsCount, multiplier;
uint loopStart=0, loopEnd=alignObjectsCount;
double newY = 99999.9;
switch ( currAlignTo )
{
684,38 → 669,14
loopEnd=alignObjectsCount-2;
break;
case Page:
newY = currDoc->ScratchTop;
if (!currDoc->masterPageMode)
{
if (!(currDoc->currentPageLayout == doublePage ))
multiplier=currDoc->currentPage->PageNr;
else
{
multiplier=currDoc->currentPage->PageNr/2;
if (!currDoc->pageSets[currDoc->currentPageLayout].FirstPage && currDoc->currentPage->PageNr % 2 == 1)
multiplier++;
}
newY += (currDoc->ScratchBottom + currDoc->ScratchTop + currDoc->currentPage->Height) * static_cast<double>(multiplier);
}
newY = currDoc->currentPage->yOffset();
break;
case Margins:
newY = currDoc->ScratchTop;
if (!currDoc->masterPageMode)
{
if (!(currDoc->currentPageLayout == doublePage ))
multiplier=currDoc->currentPage->PageNr;
else
{
multiplier=currDoc->currentPage->PageNr/2;
if (!currDoc->pageSets[currDoc->currentPageLayout].FirstPage && currDoc->currentPage->PageNr % 2 == 1)
multiplier++;
}
newY += (currDoc->ScratchBottom + currDoc->ScratchTop + currDoc->currentPage->Height) * static_cast<double>(multiplier);
}
newY = currDoc->currentPage->yOffset();
newY += currDoc->currentPage->Margins.Top;
break;
case Guide:
newY=currDoc->ScratchTop + guidePosition;
newY=currDoc->currentPage->yOffset() + guidePosition;
break;
case Selection:
for (uint a = 0; a < alignObjectsCount; ++a)
738,7 → 699,7
{
if (!startAlign())
return;
uint loopStart=0, loopEnd=alignObjectsCount, multiplier;
uint loopStart=0, loopEnd=alignObjectsCount;
double newY = 99999.9;
switch ( currAlignTo )
{
751,38 → 712,14
loopEnd=alignObjectsCount-2;
break;
case Page:
newY = currDoc->ScratchTop;
if (!currDoc->masterPageMode)
{
if (!(currDoc->currentPageLayout == doublePage ))
multiplier=currDoc->currentPage->PageNr;
else
{
multiplier=currDoc->currentPage->PageNr/2;
if (!currDoc->pageSets[currDoc->currentPageLayout].FirstPage && currDoc->currentPage->PageNr % 2 == 1)
multiplier++;
}
newY += (currDoc->ScratchBottom + currDoc->ScratchTop + currDoc->currentPage->Height) * static_cast<double>(multiplier);
}
newY = currDoc->currentPage->yOffset();
break;
case Margins:
newY = currDoc->ScratchTop;
if (!currDoc->masterPageMode)
{
if (!(currDoc->currentPageLayout == doublePage ))
multiplier=currDoc->currentPage->PageNr;
else
{
multiplier=currDoc->currentPage->PageNr/2;
if (!currDoc->pageSets[currDoc->currentPageLayout].FirstPage && currDoc->currentPage->PageNr % 2 == 1)
multiplier++;
}
newY += (currDoc->ScratchBottom + currDoc->ScratchTop + currDoc->currentPage->Height) * static_cast<double>(multiplier);
}
newY = currDoc->currentPage->yOffset();
newY += currDoc->currentPage->Margins.Top;
break;
case Guide:
newY=currDoc->ScratchTop + guidePosition;
newY=currDoc->currentPage->yOffset() + guidePosition;
break;
case Selection:
for (uint a = 0; a < alignObjectsCount; ++a)
806,7 → 743,7
{
if (!startAlign())
return;
uint loopStart=0, loopEnd=alignObjectsCount, multiplier;
uint loopStart=0, loopEnd=alignObjectsCount;
double newY;
switch ( currAlignTo )
{
822,40 → 759,16
}
break;
case Page:
newY = currDoc->ScratchTop;
if (!currDoc->masterPageMode)
{
if (!(currDoc->currentPageLayout == doublePage ))
multiplier=currDoc->currentPage->PageNr;
else
{
multiplier=currDoc->currentPage->PageNr/2;
if (!currDoc->pageSets[currDoc->currentPageLayout].FirstPage && currDoc->currentPage->PageNr % 2 == 1)
multiplier++;
}
newY += (currDoc->ScratchBottom + currDoc->ScratchTop + currDoc->currentPage->Height) * static_cast<double>(multiplier);
}
newY += currDoc->currentPage->Height/2;
newY = currDoc->currentPage->yOffset();
newY += currDoc->currentPage->height()/2;
break;
case Margins:
newY = currDoc->ScratchTop;
if (!currDoc->masterPageMode)
{
if (!(currDoc->currentPageLayout == doublePage ))
multiplier=currDoc->currentPage->PageNr;
else
{
multiplier=currDoc->currentPage->PageNr/2;
if (!currDoc->pageSets[currDoc->currentPageLayout].FirstPage && currDoc->currentPage->PageNr % 2 == 1)
multiplier++;
}
newY += (currDoc->ScratchBottom + currDoc->ScratchTop + currDoc->currentPage->Height) * static_cast<double>(multiplier);
}
newY = currDoc->currentPage->yOffset();
newY += currDoc->currentPage->Margins.Top;
newY += (currDoc->currentPage->Height - currDoc->currentPage->Margins.Bottom - currDoc->currentPage->Margins.Top)/2;
newY += (currDoc->currentPage->height() - currDoc->currentPage->Margins.Bottom - currDoc->currentPage->Margins.Top)/2;
break;
case Guide:
newY=currDoc->ScratchTop + guidePosition;
newY=currDoc->currentPage->yOffset() + guidePosition;
break;
case Selection:
double minY=99999.9, maxY=-99999.9;
884,7 → 797,7
{
if (!startAlign())
return;
uint loopStart=0, loopEnd=alignObjectsCount, multiplier;
uint loopStart=0, loopEnd=alignObjectsCount;
double newY = -99999.9;
switch ( currAlignTo )
{
897,40 → 810,16
loopEnd=alignObjectsCount-2;
break;
case Page:
newY = currDoc->ScratchTop;
if (!currDoc->masterPageMode)
{
if (!(currDoc->currentPageLayout == doublePage ))
multiplier=currDoc->currentPage->PageNr;
else
{
multiplier=currDoc->currentPage->PageNr/2;
if (!currDoc->pageSets[currDoc->currentPageLayout].FirstPage && currDoc->currentPage->PageNr % 2 == 1)
multiplier++;
}
newY += (currDoc->ScratchBottom + currDoc->ScratchTop + currDoc->currentPage->Height) * static_cast<double>(multiplier);
}
newY += currDoc->currentPage->Height;
newY = currDoc->currentPage->yOffset();
newY += currDoc->currentPage->height();
break;
case Margins:
newY = currDoc->ScratchTop;
if (!currDoc->masterPageMode)
{
if (!(currDoc->currentPageLayout == doublePage ))
multiplier=currDoc->currentPage->PageNr;
else
{
multiplier=currDoc->currentPage->PageNr/2;
if (!currDoc->pageSets[currDoc->currentPageLayout].FirstPage && currDoc->currentPage->PageNr % 2 == 1)
multiplier++;
}
newY += (currDoc->ScratchBottom + currDoc->ScratchTop + currDoc->currentPage->Height) * static_cast<double>(multiplier);
}
newY += currDoc->currentPage->Height;
newY = currDoc->currentPage->yOffset();
newY += currDoc->currentPage->height();
newY -= currDoc->currentPage->Margins.Bottom;
break;
case Guide:
newY=currDoc->ScratchTop + guidePosition;
newY=currDoc->currentPage->yOffset() + guidePosition;
break;
case Selection:
for (uint a = 0; a < alignObjectsCount; ++a)
953,7 → 842,7
{
if (!startAlign())
return;
uint loopStart=0, loopEnd=alignObjectsCount, multiplier;
uint loopStart=0, loopEnd=alignObjectsCount;
double newY = -99999.9;
switch ( currAlignTo )
{
966,40 → 855,16
loopEnd=alignObjectsCount-2;
break;
case Page:
newY = currDoc->ScratchTop;
if (!currDoc->masterPageMode)
{
if (!(currDoc->currentPageLayout == doublePage ))
multiplier=currDoc->currentPage->PageNr;
else
{
multiplier=currDoc->currentPage->PageNr/2;
if (!currDoc->pageSets[currDoc->currentPageLayout].FirstPage && currDoc->currentPage->PageNr % 2 == 1)
multiplier++;
}
newY += (currDoc->ScratchBottom + currDoc->ScratchTop + currDoc->currentPage->Height) * static_cast<double>(multiplier);
}
newY += currDoc->currentPage->Height;
newY = currDoc->currentPage->yOffset();
newY += currDoc->currentPage->height();
break;
case Margins:
newY = currDoc->ScratchTop;
if (!currDoc->masterPageMode)
{
if (!(currDoc->currentPageLayout == doublePage ))
multiplier=currDoc->currentPage->PageNr;
else
{
multiplier=currDoc->currentPage->PageNr/2;
if (!currDoc->pageSets[currDoc->currentPageLayout].FirstPage && currDoc->currentPage->PageNr % 2 == 1)
multiplier++;
}
newY += (currDoc->ScratchBottom + currDoc->ScratchTop + currDoc->currentPage->Height) * static_cast<double>(multiplier);
}
newY += currDoc->currentPage->Height;
newY = currDoc->currentPage->yOffset();
newY += currDoc->currentPage->height();
newY -= currDoc->currentPage->Margins.Bottom;
break;
case Guide:
newY=currDoc->ScratchTop + guidePosition;
newY=currDoc->currentPage->yOffset() + guidePosition;
break;
case Selection:
for (uint a = 0; a < alignObjectsCount; ++a)
1467,49 → 1332,3
alignGuideLineEdit->setText(guideInfoText);
}
 
double AlignDistributePalette::widthForPageLocation()
{
double retVal;
if (!currDoc->masterPageMode)
{
//TODO fix for orientation changes...
if (currDoc->currentPageLayout == doublePage)
{
if ((currDoc->currentPage->PageNr % 2 == 1) && (currDoc->pageSets[currDoc->currentPageLayout].FirstPage==0) ||
(currDoc->currentPage->PageNr % 2 == 0) && (currDoc->pageSets[currDoc->currentPageLayout].FirstPage==1))
{
retVal = currDoc->currentPage->Width;
retVal += currDoc->pageSets[currDoc->currentPageLayout].GapHorizontal;
}
}
//TODO all
/*
if (currDoc->currentPageLayout == triplePage)
{
if ((currDoc->currentPage->PageNr % 2 == 1) && (currDoc->pageSets[currDoc->currentPageLayout].FirstPage==0) ||
(currDoc->currentPage->PageNr % 2 == 0) && (currDoc->pageSets[currDoc->currentPageLayout].FirstPage==1))
{
retVal = currDoc->currentPage->Width;
retVal += currDoc->pageSets[currDoc->currentPageLayout].GapHorizontal;
}
}
*/
//TODO all
/*
if (currDoc->currentPageLayout == quadroPage)
{
if ((currDoc->currentPage->PageNr % 2 == 1) && (currDoc->pageSets[currDoc->currentPageLayout].FirstPage==0) ||
(currDoc->currentPage->PageNr % 2 == 0) && (currDoc->pageSets[currDoc->currentPageLayout].FirstPage==1))
{
retVal = currDoc->currentPage->Width;
retVal += currDoc->pageSets[currDoc->currentPageLayout].GapHorizontal;
}
}
*/
}
return retVal;
}