r19219 by jghali - remove now unused fromMP argument from a few ScribusDoc functions
scribus-commit
scribus-commit at lists.scribus.net
Thu Jun 12 21:52:51 UTC 2014
Author: jghali
Date: Thu Jun 12 21:52:51 2014
New Revision: 19219
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19219
Log:
remove now unused fromMP argument from a few ScribusDoc functions
Modified:
trunk/Scribus/scribus/canvasmode.cpp
trunk/Scribus/scribus/canvasmode_edit.cpp
trunk/Scribus/scribus/canvasmode_normal.cpp
trunk/Scribus/scribus/canvasmode_objimport.cpp
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusdoc.h
trunk/Scribus/scribus/scribusview.cpp
trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19219&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Thu Jun 12 21:52:51 2014
@@ -1471,7 +1471,7 @@
{
if (!resizingsmaller)
{
- m_doc->MoveItem(-resizeBy, 0, currItem, false);
+ m_doc->MoveItem(-resizeBy, 0, currItem);
currItem->moveImageXYOffsetBy(resizeBy / currItem->imageXScale(), 0);
}
currItem->Sizing = false;
@@ -1545,7 +1545,7 @@
{
if (resizingsmaller)
{
- m_doc->MoveItem(-resizeBy, 0, currItem, false);
+ m_doc->MoveItem(-resizeBy, 0, currItem);
currItem->moveImageXYOffsetBy(resizeBy / currItem->imageXScale(), 0);
}
currItem->Sizing = false;
@@ -1619,7 +1619,7 @@
{
if (!resizingsmaller)
{
- m_doc->MoveItem(0, -resizeBy, currItem, false);
+ m_doc->MoveItem(0, -resizeBy, currItem);
currItem->moveImageXYOffsetBy(0, resizeBy / currItem->imageYScale());
}
currItem->Sizing = false;
@@ -1693,7 +1693,7 @@
{
if (resizingsmaller)
{
- m_doc->MoveItem(0, -resizeBy, currItem, false);
+ m_doc->MoveItem(0, -resizeBy, currItem);
currItem->moveImageXYOffsetBy(0, resizeBy / currItem->imageYScale());
}
currItem->Sizing = false;
Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19219&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp Thu Jun 12 21:52:51 2014
@@ -782,13 +782,13 @@
else
ny = npx.y();
}
- m_doc->moveGroup(nx-gx, ny-gy, false);
+ m_doc->moveGroup(nx-gx, ny-gy);
m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
nx = gx+gw;
ny = gy+gh;
if (m_doc->ApplyGuides(&nx, &ny) || m_doc->ApplyGuides(&nx,&ny,true))
- m_doc->moveGroup(nx-(gx+gw), ny-(gy+gh), false);
+ m_doc->moveGroup(nx-(gx+gw), ny-(gy+gh));
m_doc->m_Selection->setGroupRect();
}
else
@@ -817,7 +817,7 @@
m_doc->MoveItem(nx-currItem->xPos(), ny-currItem->yPos(), currItem);
}
else
- m_doc->MoveItem(0, 0, currItem, false);
+ m_doc->MoveItem(0, 0, currItem);
}
m_canvas->m_viewMode.operItemMoving = false;
if (m_doc->m_Selection->isMultipleSelection())
Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19219&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Thu Jun 12 21:52:51 2014
@@ -1104,13 +1104,13 @@
else
ny = npx.y();
}
- m_doc->moveGroup(nx-gx, ny-gy, false);
+ m_doc->moveGroup(nx-gx, ny-gy);
m_doc->m_Selection->setGroupRect();
m_doc->m_Selection->getVisualGroupRect(&gx, &gy, &gw, &gh);
nx = gx+gw;
ny = gy+gh;
if (m_doc->ApplyGuides(&nx, &ny) && !m_doc->ApplyGuides(&nx, &ny,true))
- m_doc->moveGroup(nx-(gx+gw), ny-(gy+gh), false);
+ m_doc->moveGroup(nx-(gx+gw), ny-(gy+gh));
m_doc->m_Selection->setGroupRect();
}
else
Modified: trunk/Scribus/scribus/canvasmode_objimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19219&path=/trunk/Scribus/scribus/canvasmode_objimport.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_objimport.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_objimport.cpp Thu Jun 12 21:52:51 2014
@@ -190,7 +190,7 @@
{
double gx, gy, gh, gw;
m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
- m_doc->moveGroup(mousePointDoc.x() - gx, mousePointDoc.y() -gy, false);
+ m_doc->moveGroup(mousePointDoc.x() - gx, mousePointDoc.y() -gy);
}
// Commit undo transaction if necessary
if (undoTransaction)
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19219&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Thu Jun 12 21:52:51 2014
@@ -6822,7 +6822,7 @@
mx = -mx;
my = -my;
}
- m_Doc->MoveItem(mx, my, this, false);
+ m_Doc->MoveItem(mx, my, this);
oldXpos = m_xPos;
oldYpos = m_yPos;
oldOwnPage = OwnPage;
@@ -6847,7 +6847,7 @@
if (isUndo)
{
m_Doc->SizeItem(ow, oh, this, false, true, redraw);
- m_Doc->MoveItem(mx, my, this, false);
+ m_Doc->MoveItem(mx, my, this);
m_Doc->RotateItem(ort, this);
}
else
@@ -6855,7 +6855,7 @@
mx = -mx;
my = -my;
m_Doc->SizeItem(w, h, this, false, true, redraw);
- m_Doc->MoveItem(mx, my, this, false);
+ m_Doc->MoveItem(mx, my, this);
m_Doc->RotateItem(rt, this);
}
oldWidth = m_width;
@@ -6883,13 +6883,13 @@
if (isUndo)
{
m_Doc->RotateItem(ort, this);
- m_Doc->MoveItem(ox - m_xPos, oy - m_yPos, this, false);
+ m_Doc->MoveItem(ox - m_xPos, oy - m_yPos, this);
m_Doc->SizeItem(ow, oh, this, false, true, redraw);
}
else
{
m_Doc->RotateItem(rt, this);
- m_Doc->MoveItem(x - m_xPos, y - m_yPos, this, false);
+ m_Doc->MoveItem(x - m_xPos, y - m_yPos, this);
m_Doc->SizeItem(w, h, this, false, true, redraw);
}
oldRot = m_rotation;
@@ -7501,7 +7501,7 @@
else
PoLine = oldClip;
m_Doc->AdjustItemSize(this);
- m_Doc->MoveItem(oldX - xPos(), oldY - yPos(), this, false);
+ m_Doc->MoveItem(oldX - xPos(), oldY - yPos(), this);
}
else
{
@@ -7510,7 +7510,7 @@
else
PoLine = newClip;
m_Doc->AdjustItemSize(this);
- m_Doc->MoveItem(newX - xPos(), newY - yPos(), this, false);
+ m_Doc->MoveItem(newX - xPos(), newY - yPos(), this);
}
if (oldClip.count() != newClip.count())
m_Doc->nodeEdit.deselect();
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19219&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Thu Jun 12 21:52:51 2014
@@ -14416,7 +14416,7 @@
return ret;
}
-bool ScribusDoc::MoveItem(double newX, double newY, PageItem* currItem, bool fromMP)
+bool ScribusDoc::MoveItem(double newX, double newY, PageItem* currItem)
{
if (currItem->locked())
return false;
@@ -14424,37 +14424,9 @@
double oldx = currItem->xPos();
double oldy = currItem->yPos();
currItem->moveBy(newX, newY);
-/* if ((SnapGrid) && (!m_View->operItemMoving) && (!fromMP) && (static_cast<int>(currentPage()->pageNr()) == currItem->OwnPage))
- {
- FPoint np = ApplyGridF(FPoint(currItem->xPos(), currItem->yPos()));
- currItem->setXYPos(np.x(), np.y());
- }
- if ((SnapGuides) && (!m_View->operItemMoving) && (appMode == modeNormal) && (!EditClip) && (!fromMP))
- SnapToGuides(currItem); */
if ((currItem->xPos() != oldx) || (currItem->yPos() != oldy))
retw = true;
- if (!fromMP)
- {
-/* if (GroupSel)
- {
- double gx, gy, gh, gw;
- setGroupRect();
- getGroupRect(&gx, &gy, &gw, &gh);
- emit ItemPos(gx, gy);
- }
- else */
- //CB if (!GroupSel)
- //CB emit ItemPos(currItem->xPos(), currItem->yPos());
- //CB qDebug("if (!GroupSel) emit ItemPos(currItem->xPos(), currItem->yPos());");
- }
-/* if (!loading)
- emit UpdtObj(currentPage->pageNr(), b->ItemNr); */
- //FIXME: stop using m_View
-// QRect oldR(currItem->getRedrawBounding(m_View->scale()));
setRedrawBounding(currItem);
-// QRect newR(currItem->getRedrawBounding(m_View->scale()));
-// if ((!m_View->operItemMoving) && (!currItem->Sizing))
-// emit updateContents(newR.unite(oldR));
currItem->OwnPage = OnPage(currItem);
return retw;
}
@@ -14519,14 +14491,14 @@
-void ScribusDoc::MoveRotated(PageItem *currItem, FPoint npv, bool fromMP)
+void ScribusDoc::MoveRotated(PageItem *currItem, FPoint npv)
{
QTransform ma;
ma.translate(currItem->xPos(), currItem->yPos());
ma.rotate(currItem->rotation());
double mxc = currItem->xPos() - (ma.m11() * npv.x() + ma.m21() * npv.y() + ma.dx());
double myc = currItem->yPos() - (ma.m22() * npv.y() + ma.m12() * npv.x() + ma.dy());
- MoveItem(-mxc, -myc, currItem, fromMP);
+ MoveItem(-mxc, -myc, currItem);
}
bool ScribusDoc::SizeItem(double newX, double newY, PageItem *pi, bool fromMP, bool DoUpdateClip, bool redraw)
@@ -14677,7 +14649,7 @@
ma.rotate(currItem->rotation());
double mx = ma.m11() * currItem->width() + ma.dx();
double my = ma.m12() * currItem->width() + ma.dy();
- MoveItem(newX.x(), newX.y(), currItem, fromMP);
+ MoveItem(newX.x(), newX.y(), currItem);
double newRot=xy2Deg(mx - currItem->xPos(), my - currItem->yPos());
//CB Hmm should work, doesnt. (constraining on the first point of a line) FIXME
//if (constrainRotation)
@@ -14707,12 +14679,12 @@
double mxc3 = currItem->xPos() - (ma3.m11() * npv.x() + ma3.m21() * npv.y() + ma3.dx());
double myc3 = currItem->yPos() - (ma3.m22() * npv.y() + ma3.m12() * npv.x() + ma3.dy());
SizeItem(currItem->width() - newY.x(), currItem->height() - newY.y(), currItem, fromMP, true, false);
- MoveItem(-mxc3, -myc3, currItem, fromMP);
+ MoveItem(-mxc3, -myc3, currItem);
}
else
{
SizeItem(currItem->width() - newY.x(), currItem->height() - newY.y(), currItem, fromMP, true, false);
- MoveItem(newX.x(), newX.y(), currItem, fromMP);
+ MoveItem(newX.x(), newX.y(), currItem);
}
}
return true;
@@ -14743,10 +14715,10 @@
if (currItem->rotation() != 0)
{
FPoint npv(tp2.x(), tp2.y());
- MoveRotated(currItem, npv, true);
+ MoveRotated(currItem, npv);
}
else
- MoveItem(tp2.x(), tp2.y(), currItem, true);
+ MoveItem(tp2.x(), tp2.y(), currItem);
if (!currItem->imageFlippedH())
currItem->moveImageInFrame(-tp2.x()/currItem->imageXScale(), 0);
if (!currItem->imageFlippedV())
@@ -14767,21 +14739,21 @@
for (int em = 0; em < currItem->groupItemList.count(); ++em)
{
PageItem* embedded = currItem->groupItemList.at(em);
- MoveItem(-dx, -dy, embedded, true);
+ MoveItem(-dx, -dy, embedded);
}
if (currItem->imageFlippedH())
{
if (oldX - currItem->xPos() == 0)
- MoveItem(oldW - currItem->width(), 0, currItem, true);
+ MoveItem(oldW - currItem->width(), 0, currItem);
else
- MoveItem((oldX - currItem->xPos()), 0, currItem, true);
+ MoveItem((oldX - currItem->xPos()), 0, currItem);
}
if (currItem->imageFlippedV())
{
if (oldY- currItem->yPos() == 0)
- MoveItem(0, oldH - currItem->height(), currItem, true);
+ MoveItem(0, oldH - currItem->height(), currItem);
else
- MoveItem(0, oldY - currItem->yPos(), currItem, true);
+ MoveItem(0, oldY - currItem->yPos(), currItem);
}
}
}
@@ -14799,7 +14771,7 @@
undoManager->setUndoEnabled(true);
}
-void ScribusDoc::moveGroup(double x, double y, bool fromMP, Selection* customSelection)
+void ScribusDoc::moveGroup(double x, double y, Selection* customSelection)
{
double Scale = 1; //FIXME:av should all be in doc coordinates
Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
@@ -14826,7 +14798,7 @@
{
if (currItem->isWelded())
weldL.append(currItem->itemsWeldedTo());
- MoveItem(x, y, currItem, fromMP);
+ MoveItem(x, y, currItem);
}
}
itemSelection->setGroupRect();
@@ -15009,7 +14981,7 @@
FPoint n(gx-oldPos.x(), gy-oldPos.y());
x = ma3.m11() * n.x() + ma3.m21() * n.y() + ma3.dx();
y = ma3.m22() * n.y() + ma3.m12() * n.x() + ma3.dy();
- // MoveItem(gx-x, gy-y, bb, true);
+ // MoveItem(gx-x, gy-y, bb);
bb->setXYPos(b1.x()+gx, b1.y()+gy);
if (oldRot != 0)
{
@@ -15074,16 +15046,16 @@
switch (rotMode)
{
case 2:
- moveGroup((origGW-gw) / 2.0, (origGH-gh) / 2.0, true);
+ moveGroup((origGW-gw) / 2.0, (origGH-gh) / 2.0);
break;
case 4:
- moveGroup(origGW-gw, origGH-gh, true);
+ moveGroup(origGW-gw, origGH-gh);
break;
case 3:
- moveGroup(0.0, origGH-gh, true);
+ moveGroup(0.0, origGH-gh);
break;
case 1:
- moveGroup(origGW-gw, 0.0, true);
+ moveGroup(origGW-gw, 0.0);
break;
}
}
Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19219&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h (original)
+++ trunk/Scribus/scribus/scribusdoc.h Thu Jun 12 21:52:51 2014
@@ -1167,13 +1167,13 @@
void SnapToGuides(PageItem *currItem);
bool ApplyGuides(double *x, double *y, bool elementSnap = false);
bool ApplyGuides(FPoint* point, bool elementSnap = false);
- bool MoveItem(double newX, double newY, PageItem* ite, bool fromMP = false);
+ bool MoveItem(double newX, double newY, PageItem* ite);
void RotateItem(double win, PageItem *currItem);
- void MoveRotated(PageItem *currItem, FPoint npv, bool fromMP = false);
+ void MoveRotated(PageItem *currItem, FPoint npv);
bool SizeItem(double newX, double newY, PageItem *pi, bool fromMP = false, bool DoUpdateClip = true, bool redraw = true);
bool MoveSizeItem(FPoint newX, FPoint newY, PageItem* currItem, bool fromMP = false, bool constrainRotation = false);
void AdjustItemSize(PageItem *currItem, bool includeGroup = false, bool moveInGroup = true);
- void moveGroup(double x, double y, bool fromMP = false, Selection* customSelection = 0);
+ void moveGroup(double x, double y, Selection* customSelection = 0);
void rotateGroup(double angle, Selection* customSelection = 0);
void rotateGroup(double angle, FPoint RCenter, Selection* customSelection = 0);
void scaleGroup(double scx, double scy, bool scaleText=true, Selection* customSelection = 0, bool scaleLine = false);
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19219&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Thu Jun 12 21:52:51 2014
@@ -1074,14 +1074,14 @@
ny = npx.y();
}
activeTransaction = new UndoTransaction(undoManager->beginTransaction(Um::SelectionGroup, Um::IGroup, Um::Move,"",Um::IMove));
- Doc->moveGroup(nx-gx, ny-gy, false);
+ Doc->moveGroup(nx-gx, ny-gy);
Doc->m_Selection->setGroupRect();
Doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
nx = gx+gw;
ny = gy+gh;
Doc->ApplyGuides(&nx, &ny);
Doc->ApplyGuides(&nx, &ny,true);
- Doc->moveGroup(nx-(gx+gw), ny-(gy+gh), false);
+ Doc->moveGroup(nx-(gx+gw), ny-(gy+gh));
Doc->m_Selection->setGroupRect();
Doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
for (int a = 0; a < Doc->m_Selection->count(); ++a)
@@ -1721,7 +1721,7 @@
pastedObjects.setGroupRect();
double gx, gy, gh, gw;
pastedObjects.getGroupRect(&gx, &gy, &gw, &gh);
- Doc->moveGroup(dragX - gx, dragY - gy, false, &pastedObjects);
+ Doc->moveGroup(dragX - gx, dragY - gy, &pastedObjects);
Doc->m_Selection->clear();
}
else
@@ -1755,14 +1755,14 @@
nx = npx.x();
ny = npx.y();
}
- Doc->moveGroup(nx-gx, ny-gy, false, &newObjects);
+ Doc->moveGroup(nx-gx, ny-gy, &newObjects);
newObjects.setGroupRect();
newObjects.getGroupRect(&gx, &gy, &gw, &gh);
nx = gx+gw;
ny = gy+gh;
Doc->ApplyGuides(&nx, &ny);
Doc->ApplyGuides(&nx, &ny,true);
- Doc->moveGroup(nx-(gx+gw), ny-(gy+gh), false, &newObjects);
+ Doc->moveGroup(nx-(gx+gw), ny-(gy+gh), &newObjects);
newObjects.setGroupRect();
newObjects.getGroupRect(&gx, &gy, &gw, &gh);
emit ItemGeom();
Modified: trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19219&path=/trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp Thu Jun 12 21:52:51 2014
@@ -701,7 +701,7 @@
base = gx + gw;
if (!_userActionOn)
m_ScMW->view->startGroupTransaction();
- m_doc->moveGroup(x - base, 0, true);
+ m_doc->moveGroup(x - base, 0);
if (!_userActionOn)
{
m_ScMW->view->endGroupTransaction();
@@ -741,7 +741,7 @@
base = ma.m11() * m_item->width() + ma.m21() * m_item->height() + ma.dx();
else if (bp == 3)
base = ma.m11() * 0.0 + ma.m21() * m_item->height() + ma.dx();
- m_doc->MoveItem(x - base, 0, m_item, true);
+ m_doc->MoveItem(x - base, 0, m_item);
}
}
m_doc->regionsChanged()->update(QRect());
@@ -780,7 +780,7 @@
base = gy + gh;
if (!_userActionOn)
m_ScMW->view->startGroupTransaction();
- m_doc->moveGroup(0, y - base, true);
+ m_doc->moveGroup(0, y - base);
if (!_userActionOn)
{
m_ScMW->view->endGroupTransaction();
@@ -801,7 +801,7 @@
}
double r = atan2(h-y,w-x)*(180.0/M_PI);
w = sqrt(pow(w-x,2)+pow(h-y,2));
- m_doc->MoveItem(0, y - m_item->yPos(), m_item, true);
+ m_doc->MoveItem(0, y - m_item->yPos(), m_item);
m_item->setXYPos(m_item->xPos(), y, true);
m_item->setRotation(r, true);
m_doc->SizeItem(w, m_item->height(), m_item, true);
@@ -822,7 +822,7 @@
base = ma.m22() * m_item->height() + ma.m12() * m_item->width() + ma.dy();
else if (bp == 3)
base = ma.m22() * m_item->height() + ma.m12() * 0.0 + ma.dy();
- m_doc->MoveItem(0, y - base, m_item, true);
+ m_doc->MoveItem(0, y - base, m_item);
}
}
m_doc->regionsChanged()->update(QRect());
More information about the scribus-commit
mailing list