r19415 by jghali - code style fixes
scribus-commit
scribus-commit at lists.scribus.net
Thu Aug 7 06:51:47 UTC 2014
Author: jghali
Date: Thu Aug 7 06:51:47 2014
New Revision: 19415
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19415
Log:
code style fixes
Modified:
trunk/Scribus/scribus/pageitem.cpp
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19415&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Thu Aug 7 06:51:47 2014
@@ -1348,7 +1348,7 @@
void PageItem::unlink(bool createUndo)
{
- if( NextBox )
+ if (NextBox)
{
PageItem *undoNextBox=NextBox;
// make sure lastInFrame is valid
@@ -1535,7 +1535,7 @@
void PageItem::setTextToFrameDistLeft(double newLeft)
{
- if(m_textDistanceMargins.Left==newLeft)
+ if (m_textDistanceMargins.Left==newLeft)
return;
if (UndoManager::undoEnabled())
{
@@ -1551,7 +1551,7 @@
void PageItem::setTextToFrameDistRight(double newRight)
{
- if(m_textDistanceMargins.Right==newRight)
+ if (m_textDistanceMargins.Right==newRight)
return;
if (UndoManager::undoEnabled())
{
@@ -1567,7 +1567,7 @@
void PageItem::setTextToFrameDistTop(double newTop)
{
- if(m_textDistanceMargins.Top==newTop)
+ if (m_textDistanceMargins.Top==newTop)
return;
if (UndoManager::undoEnabled())
{
@@ -1583,7 +1583,7 @@
void PageItem::setTextToFrameDistBottom(double newBottom)
{
- if(m_textDistanceMargins.Bottom==newBottom)
+ if (m_textDistanceMargins.Bottom==newBottom)
return;
if (UndoManager::undoEnabled())
{
@@ -1622,9 +1622,9 @@
void PageItem::setGridDistance(double) { } // FIXME
void PageItem::setColumns(int n)
{
- if(Cols==n)
- return;
- if(UndoManager::undoEnabled())
+ if (Cols==n)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::Columns, "", Um::IBorder);
ss->set("COLUMNS", "columns");
@@ -1636,9 +1636,9 @@
}
void PageItem::setColumnGap(double gap)
{
- if(ColGap==gap)
- return;
- if(UndoManager::undoEnabled()){
+ if (ColGap==gap)
+ return;
+ if (UndoManager::undoEnabled()){
SimpleState *ss = new SimpleState(Um::Columns, "", Um::IBorder);
ss->set("COLUMNSGAP", "columnsgap");
ss->set("OLD_COLUMNS", ColGap);
@@ -1657,7 +1657,7 @@
{
if (val == verticalAlign)
return;
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::AlignText, "", Um::ITextFrame);
ss->set("VERTICAL_ALIGN", "vertical_align");
@@ -1670,9 +1670,9 @@
void PageItem::setCornerRadius(double newRadius)
{
- if(m_roundedCorderRadius==newRadius)
- return;
- if(UndoManager::undoEnabled())
+ if (m_roundedCorderRadius==newRadius)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *state = new SimpleState(Um::RoundCorner,"",Um::IBorder);
state->set("CORNER_RADIUS","corner_radius");
@@ -2903,9 +2903,9 @@
}
void PageItem::setMaskGradient(VGradient grad){
- if(mask_gradient==grad)
- return;
- if(UndoManager::undoEnabled())
+ if (mask_gradient==grad)
+ return;
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<VGradient,VGradient> > *is = new ScItemState<QPair<VGradient,VGradient> >(Um::GradVal);
is->set("MASK_GRAD","mask_grad");
@@ -2916,9 +2916,9 @@
}
void PageItem::setFillGradient(VGradient grad){
- if(fill_gradient==grad)
- return;
- if(UndoManager::undoEnabled())
+ if (fill_gradient==grad)
+ return;
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<VGradient,VGradient> > *is = new ScItemState<QPair<VGradient,VGradient> >(Um::GradVal);
is->set("FILL_GRAD","fill_grad");
@@ -2929,9 +2929,9 @@
}
void PageItem::setStrokeGradient(VGradient grad){
- if(stroke_gradient==grad)
- return;
- if(UndoManager::undoEnabled())
+ if (stroke_gradient==grad)
+ return;
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<VGradient,VGradient> > *is = new ScItemState<QPair<VGradient,VGradient> >(Um::GradVal);
is->set("STROKE_GRAD","STROKE_grad");
@@ -2967,13 +2967,13 @@
void PageItem::set4ColorTransparency(double t1, double t2, double t3, double t4)
{
UndoTransaction *trans = NULL;
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
trans = new UndoTransaction(undoManager->beginTransaction(Um::Selection,Um::IFill,Um::GradVal,"",Um::IFill));
setGradientTransp1(t1);
setGradientTransp2(t2);
setGradientTransp3(t3);
setGradientTransp4(t4);
- if(trans)
+ if (trans)
{
trans->commit();
delete trans;
@@ -2984,13 +2984,13 @@
void PageItem::set4ColorShade(int t1, int t2, int t3, int t4)
{
UndoTransaction *trans = NULL;
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
trans = new UndoTransaction(undoManager->beginTransaction(Um::Selection,Um::IFill,Um::GradVal,"",Um::IFill));
setGradientShade1(t1);
setGradientShade2(t2);
setGradientShade3(t3);
setGradientShade4(t4);
- if(trans)
+ if (trans)
{
trans->commit();
delete trans;
@@ -3002,7 +3002,7 @@
{
QColor tmp;
UndoTransaction *trans = NULL;
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
trans = new UndoTransaction(undoManager->beginTransaction(Um::Selection,Um::IFill,Um::GradVal,"",Um::IFill));
setGradientCol1(col1);
if (GrColorP1 != CommonStrings::None)
@@ -3160,7 +3160,7 @@
VisionDefectColor defect;
setGradientColor4(defect.convertDefect(GrColorP4QColor, m_Doc->previewVisual));
}
- if(trans)
+ if (trans)
{
trans->commit();
delete trans;
@@ -3254,7 +3254,7 @@
}
UndoTransaction *trans = NULL;
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
trans = new UndoTransaction(undoManager->beginTransaction(Um::Selection,Um::IFill,Um::GradVal,"",Um::IFill));
ScItemState<QPair<QColor,QColor> > *ss = new ScItemState<QPair<QColor,QColor> >(Um::GradVal);
@@ -3283,7 +3283,7 @@
if (meshGradientPatches[col].TL.gridPoint == xx)
{
mp = &(meshGradientPatches[col].TL);
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<QColor,QColor> > *ss = new ScItemState<QPair<QColor,QColor> >(Um::GradVal);
ss->set("GRAD_MESH_COLOR","grad_mesh_color");
@@ -3307,7 +3307,7 @@
if (meshGradientPatches[col].TR.gridPoint == xx)
{
mp = &(meshGradientPatches[col].TR);
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<QColor,QColor> > *ss = new ScItemState<QPair<QColor,QColor> >(Um::GradVal);
ss->set("GRAD_MESH_COLOR","grad_mesh_color");
@@ -3331,7 +3331,7 @@
if (meshGradientPatches[col].BR.gridPoint == xx)
{
mp = &(meshGradientPatches[col].BR);
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<QColor,QColor> > *ss = new ScItemState<QPair<QColor,QColor> >(Um::GradVal);
ss->set("GRAD_MESH_COLOR","grad_mesh_color");
@@ -3355,7 +3355,7 @@
if (meshGradientPatches[col].BL.gridPoint == xx)
{
mp = &(meshGradientPatches[col].BL);
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<QColor,QColor> > *ss = new ScItemState<QPair<QColor,QColor> >(Um::GradVal);
ss->set("GRAD_MESH_COLOR","grad_mesh_color");
@@ -3378,7 +3378,7 @@
}
}
}
- if(trans)
+ if (trans)
{
trans->commit();
delete trans;
@@ -3390,7 +3390,7 @@
if ((x > -1) && (y > -1))
{
mp = &(meshGradientArray[x][y]);
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<QColor,QColor> > *ss = new ScItemState<QPair<QColor,QColor> >(Um::GradVal);
ss->set("GRAD_MESH_COLOR","grad_mesh_color");
@@ -3455,7 +3455,7 @@
VisionDefectColor defect;
MQColor = defect.convertDefect(MQColor, m_Doc->previewVisual);
}
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
ScItemState<QList<QList<meshPoint> > > *is = new ScItemState<QList<QList<meshPoint> > >(Um::MeshGradient);
is->set("CREATE_MESH_GRAD","create_mesh_grad");
@@ -3488,7 +3488,7 @@
{
int rows = meshGradientArray.count();
int cols = meshGradientArray[0].count();
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
ScItemState<QList<QList<meshPoint> > > *is = new ScItemState<QList<QList<meshPoint> > >(Um::ResetControlPoints);
is->set("RESET_MESH_GRAD","reset_mesh_grad");
@@ -3539,7 +3539,7 @@
}
UndoTransaction *trans = NULL;
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
trans = new UndoTransaction(undoManager->beginTransaction(Um::Selection,Um::IFill,Um::ChangeMeshGradient,"",Um::IFill));
ScItemState<QPair<QList<QList<meshPoint> >,FPointArray> > *ism = new ScItemState<QPair<QList<QList<meshPoint> >,FPointArray> >(Um::ChangeMeshGradient, "",Um::IFill);
@@ -3568,7 +3568,7 @@
for (int x = 0; x < rows+1; x++)
for (int y = 0; y < cols+1; y++)
meshGradientArray[x][y].moveRel(dx, dy);
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
ScItemState<FPointArray> *is = new ScItemState<FPointArray>(Um::ResetContourLine, "",Um::IBorder);
is->set("RESET_CONTOUR", "reset_contour");
@@ -3576,7 +3576,7 @@
undoManager->action(this, is);
}
ContourLine = PoLine.copy();
- if(trans)
+ if (trans)
{
trans->commit();
delete trans;
@@ -3863,9 +3863,9 @@
void PageItem::setMaskType(int val)
{
- if(GrMask==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrMask==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradTypeMask,"",Um::IFill);
ss->set("MASKTYPE","masktype");
@@ -4435,7 +4435,7 @@
{
if (m_startArrowScale == newScale)
return; // nothing to do -> return
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::StartArrowScale,"",Um::IArrow);
ss->set("START_ARROWSCALE","start_arrowscale");
@@ -4450,7 +4450,7 @@
{
if (m_endArrowScale == newScale)
return; // nothing to do -> return
- if(UndoManager::undoEnabled())
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::EndArrowScale,"",Um::IArrow);
ss->set("END_ARROWSCALE","end_arrowscale");
@@ -4533,7 +4533,7 @@
}
void PageItem::setOverprint(bool val) {
- if(doOverprint==val)
+ if (doOverprint==val)
return;
if (UndoManager::undoEnabled())
@@ -4753,13 +4753,13 @@
if (UndoManager::undoEnabled())
{
QString stateMessage;
- if( mode == TextFlowUsesFrameShape )
+ if (mode == TextFlowUsesFrameShape)
stateMessage = Um::ObjectFrame;
- else if( mode == TextFlowUsesBoundingBox )
+ else if (mode == TextFlowUsesBoundingBox)
stateMessage = Um::BoundingBox;
- else if( mode == TextFlowUsesContourLine )
+ else if (mode == TextFlowUsesContourLine)
stateMessage = Um::ContourLine;
- else if( mode == TextFlowUsesImageClipping )
+ else if (mode == TextFlowUsesImageClipping)
stateMessage = Um::ImageClip;
else
stateMessage = Um::NoTextFlow;
@@ -4775,7 +4775,7 @@
void PageItem::checkTextFlowInteractions(bool allItems)
{
- if(!m_Doc->isLoading())
+ if (!m_Doc->isLoading())
{
QRectF baseRect(getBoundingRect());
QList<PageItem*>* items = OnMasterPage.isEmpty() ? &m_Doc->DocItems : &m_Doc->MasterItems;
@@ -4784,10 +4784,10 @@
int ids = items->indexOf(this) - 1;
for(int idx = ids; idx >= 0 ; --idx)
{
- if(items->at(idx)->asTextFrame()) // do not bother with no text frames
+ if (items->at(idx)->asTextFrame()) // do not bother with no text frames
{
QRectF uRect(items->at(idx)->getBoundingRect());
- if(baseRect.intersects(uRect))
+ if (baseRect.intersects(uRect))
{
items->at(idx)->update();
}
@@ -4798,12 +4798,12 @@
{
for(int idx = items->count() - 1; idx >= 0 ; --idx)
{
- if(items->at(idx) != this) // avoids itself
+ if (items->at(idx) != this) // avoids itself
{
- if(items->at(idx)->asTextFrame()) // do not bother with no text frames
+ if (items->at(idx)->asTextFrame()) // do not bother with no text frames
{
QRectF uRect(items->at(idx)->getBoundingRect());
- if(baseRect.intersects(uRect))
+ if (baseRect.intersects(uRect))
{
items->at(idx)->update();
}
@@ -5399,7 +5399,7 @@
void PageItem::restoreConnectPath(SimpleState *state, bool isUndo)
{
ScItemState<QPair<FPointArray, FPointArray> > *is = dynamic_cast<ScItemState<QPair<FPointArray, FPointArray> > *>(state);
- if(isUndo)
+ if (isUndo)
{
PoLine = is->getItem().first;
doc()->AdjustItemSize(this);
@@ -5850,7 +5850,7 @@
{
doc()->m_Selection->clear();
select();
- if(isUndo)
+ if (isUndo)
doc()->view()->requestMode(state->getInt("OLD"));
else
doc()->view()->requestMode(state->getInt("NEW"));
@@ -6216,7 +6216,7 @@
void PageItem::restoreMoveMeshGrad(SimpleState *state, bool isUndo)
{
ScItemState<QPair<QList<QList<meshPoint> >,FPointArray> > *is = dynamic_cast<ScItemState<QPair<QList<QList<meshPoint> >,FPointArray> > *>(state);
- if(isUndo)
+ if (isUndo)
{
PoLine = is->getItem().second;
ClipEdited = true;
@@ -6281,7 +6281,7 @@
int y = is->getInt("Y");
if (isUndo)
{
- if(is->getBool("ARRAY"))
+ if (is->getBool("ARRAY"))
meshGradientArray[x][y] = is->getItem().first;
else
switch(y){
@@ -6301,7 +6301,7 @@
}
else
{
- if(is->getBool("ARRAY"))
+ if (is->getBool("ARRAY"))
meshGradientArray[x][y] = is->getItem().second;
else
switch(y){
@@ -6329,7 +6329,7 @@
fill_gradient = is->getItem().first;
else
fill_gradient = is->getItem().second;
- if(gradientType()==13)
+ if (gradientType()==13)
createConicalMesh();
update();
}
@@ -6361,7 +6361,7 @@
int x = is->getInt("X");
int y = is->getInt("Y");
meshPoint *mp=NULL;
- if(is->getBool("PATCH"))
+ if (is->getBool("PATCH"))
{
meshGradientPatch *patch = &meshGradientPatches[x];
switch (y)
@@ -7143,7 +7143,7 @@
for(int idx(0); idx < pList.count(); ++idx)
{
QRectF uRect(pList.at(idx)->getBoundingRect());
- if(baseRect.intersects(uRect))
+ if (baseRect.intersects(uRect))
pList.at(idx)->update();
}
}
@@ -7632,7 +7632,7 @@
}
}
ObjectAttribute returnAttribute;
- if(countFound==1)
+ if (countFound==1)
returnAttribute = (*foundIt);
else
returnAttribute.name = QString::null;
@@ -7950,9 +7950,9 @@
void PageItem::setGradientType(int val)
{
- if(GrType==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrType==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradType,"",Um::IFill);
ss->set("GRAD_TYPE","grad_type");
@@ -7965,9 +7965,9 @@
void PageItem::setStrokeGradientType(int val)
{
- if(GrTypeStroke==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrTypeStroke==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradTypeStroke,"",Um::ILineStyle);
ss->set("GRAD_TYPESTROKE","grad_typestroke");
@@ -7980,9 +7980,9 @@
void PageItem::setGradientCol1(QString val)
{
- if(GrColorP1==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrColorP1==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradCol,"",Um::IFill);
ss->set("GRAD_COL1","grad_col1");
@@ -7995,9 +7995,9 @@
void PageItem::setGradientCol2(QString val)
{
- if(GrColorP2==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrColorP2==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradCol,"",Um::IFill);
ss->set("GRAD_COL2","grad_col2");
@@ -8010,9 +8010,9 @@
void PageItem::setGradientCol3(QString val)
{
- if(GrColorP3==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrColorP3==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradCol,"",Um::IFill);
ss->set("GRAD_COL3","grad_col3");
@@ -8025,9 +8025,9 @@
void PageItem::setGradientCol4(QString val)
{
- if(GrColorP4==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrColorP4==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradCol,"",Um::IFill);
ss->set("GRAD_COL4","grad_col4");
@@ -8040,9 +8040,9 @@
void PageItem::setGradientShade1(int val)
{
- if(GrCol1Shade==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrCol1Shade==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradCol,"",Um::IFill);
ss->set("GRAD_SHADE1","grad_shade1");
@@ -8055,9 +8055,9 @@
void PageItem::setGradientShade2(int val)
{
- if(GrCol2Shade==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrCol2Shade==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradCol,"",Um::IFill);
ss->set("GRAD_SHADE2","grad_shade2");
@@ -8070,9 +8070,9 @@
void PageItem::setGradientShade3(int val)
{
- if(GrCol3Shade==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrCol3Shade==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradCol,"",Um::IFill);
ss->set("GRAD_SHADE3","grad_shade3");
@@ -8085,9 +8085,9 @@
void PageItem::setGradientShade4(int val)
{
- if(GrCol4Shade==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrCol4Shade==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradCol,"",Um::IFill);
ss->set("GRAD_SHADE4","grad_shade4");
@@ -8100,9 +8100,9 @@
void PageItem::setGradientTransp1(double val)
{
- if(GrCol1transp==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrCol1transp==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradCol,"",Um::IFill);
ss->set("GRAD_TRANSP1","grad_transp1");
@@ -8115,9 +8115,9 @@
void PageItem::setGradientTransp2(double val)
{
- if(GrCol2transp==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrCol2transp==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradCol,"",Um::IFill);
ss->set("GRAD_TRANSP2","grad_transp2");
@@ -8130,9 +8130,9 @@
void PageItem::setGradientTransp3(double val)
{
- if(GrCol3transp==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrCol3transp==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradCol,"",Um::IFill);
ss->set("GRAD_TRANSP3","grad_transp3");
@@ -8145,9 +8145,9 @@
void PageItem::setGradientTransp4(double val)
{
- if(GrCol4transp==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrCol4transp==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradCol,"",Um::IFill);
ss->set("GRAD_TRANSP4","grad_transp4");
@@ -8160,9 +8160,9 @@
void PageItem::setGradientColor1(QColor val)
{
- if(GrColorP1QColor ==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrColorP1QColor ==val)
+ return;
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<QColor,QColor> > *ss = new ScItemState<QPair<QColor,QColor> >(Um::GradCol,"",Um::IFill);
ss->set("GRAD_QCOLOR1","grad_qcolor1");
@@ -8174,9 +8174,9 @@
void PageItem::setGradientColor2(QColor val)
{
- if(GrColorP2QColor ==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrColorP2QColor ==val)
+ return;
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<QColor,QColor> > *ss = new ScItemState<QPair<QColor,QColor> >(Um::GradCol,"",Um::IFill);
ss->set("GRAD_QCOLOR2","grad_qcolor2");
@@ -8188,9 +8188,9 @@
void PageItem::setGradientColor3(QColor val)
{
- if(GrColorP3QColor ==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrColorP3QColor ==val)
+ return;
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<QColor,QColor> > *ss = new ScItemState<QPair<QColor,QColor> >(Um::GradCol,"",Um::IFill);
ss->set("GRAD_QCOLOR3","grad_qcolor3");
@@ -8202,9 +8202,9 @@
void PageItem::setGradientColor4(QColor val)
{
- if(GrColorP4QColor ==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrColorP4QColor ==val)
+ return;
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<QColor,QColor> > *ss = new ScItemState<QPair<QColor,QColor> >(Um::GradCol,"",Um::IFill);
ss->set("GRAD_QCOLOR4","grad_qcolor4");
@@ -8237,9 +8237,9 @@
void PageItem::setSnapToPatchGrid(bool val)
{
- if(snapToPatchGrid ==val)
- return;
- if(UndoManager::undoEnabled())
+ if (snapToPatchGrid ==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("SNAP_TO_PATCH","snap_to_patch");
@@ -8250,9 +8250,9 @@
}
void PageItem::setGradientStartX(double val){
- if(GrStartX==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrStartX==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_STARTX","grad_startx");
@@ -8264,9 +8264,9 @@
}
void PageItem::setGradientStartY(double val){
- if(GrStartY==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrStartY==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_STARTY","grad_starty");
@@ -8278,9 +8278,9 @@
}
void PageItem::setGradientEndX(double val){
- if(GrEndX==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrEndX==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_ENDX","grad_endx");
@@ -8292,9 +8292,9 @@
}
void PageItem::setGradientEndY(double val){
- if(GrEndY==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrEndY==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_ENDY","grad_endy");
@@ -8306,9 +8306,9 @@
}
void PageItem::setGradientFocalX(double val){
- if(GrFocalX==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrFocalX==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_FOCALX","grad_focalx");
@@ -8320,9 +8320,9 @@
}
void PageItem::setGradientFocalY(double val){
- if(GrFocalY==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrFocalY==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_FOCALY","grad_focaly");
@@ -8334,9 +8334,9 @@
}
void PageItem::setGradientScale(double val){
- if(GrScale==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrScale==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_SCALE","grad_scale");
@@ -8348,9 +8348,9 @@
}
void PageItem::setGradientSkew(double val){
- if(GrSkew==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrSkew==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_SKEW","grad_skew");
@@ -8362,9 +8362,9 @@
}
void PageItem::setGradientMaskStartX(double val){
- if(GrMaskStartX==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrMaskStartX==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_MASKSTARTX","grad_maskstartx");
@@ -8376,9 +8376,9 @@
}
void PageItem::setGradientMaskStartY(double val){
- if(GrMaskStartY==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrMaskStartY==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_MASKSTARTY","grad_maskstarty");
@@ -8390,9 +8390,9 @@
}
void PageItem::setGradientMaskEndX(double val){
- if(GrMaskEndX==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrMaskEndX==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_MASKENDX","grad_maskendx");
@@ -8404,9 +8404,9 @@
}
void PageItem::setGradientMaskEndY(double val){
- if(GrMaskEndY==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrMaskEndY==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_MASKENDY","grad_maskendy");
@@ -8418,9 +8418,9 @@
}
void PageItem::setGradientMaskFocalX(double val){
- if(GrMaskFocalX==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrMaskFocalX==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_MASKFOCALX","grad_maskfocalx");
@@ -8432,9 +8432,9 @@
}
void PageItem::setGradientMaskFocalY(double val){
- if(GrMaskFocalY==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrMaskFocalY==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_MASKFOCALY","grad_maskfocaly");
@@ -8446,9 +8446,9 @@
}
void PageItem::setGradientMaskScale(double val){
- if(GrMaskScale==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrMaskScale==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_MASKSCALE","grad_maskscale");
@@ -8460,9 +8460,9 @@
}
void PageItem::setGradientMaskSkew(double val){
- if(GrMaskSkew==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrMaskSkew==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::IFill);
ss->set("GRAD_MASKSKEW","grad_maskskew");
@@ -8474,9 +8474,9 @@
}
void PageItem::setGradientControl1(FPoint val){
- if(GrControl1==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrControl1==val)
+ return;
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<FPoint,FPoint> > *ss = new ScItemState<QPair<FPoint,FPoint> >(Um::GradPos,"",Um::IFill);
ss->set("GRAD_CONTROL1","grad_control1");
@@ -8487,9 +8487,9 @@
}
void PageItem::setGradientControl2(FPoint val){
- if(GrControl2==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrControl2==val)
+ return;
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<FPoint,FPoint> > *ss = new ScItemState<QPair<FPoint,FPoint> >(Um::GradPos,"",Um::IFill);
ss->set("GRAD_CONTROL2","grad_control2");
@@ -8500,9 +8500,9 @@
}
void PageItem::setGradientControl3(FPoint val){
- if(GrControl3==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrControl3==val)
+ return;
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<FPoint,FPoint> > *ss = new ScItemState<QPair<FPoint,FPoint> >(Um::GradPos,"",Um::IFill);
ss->set("GRAD_CONTROL3","grad_control3");
@@ -8513,9 +8513,9 @@
}
void PageItem::setGradientControl4(FPoint val){
- if(GrControl4==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrControl4==val)
+ return;
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<FPoint,FPoint> > *ss = new ScItemState<QPair<FPoint,FPoint> >(Um::GradPos,"",Um::IFill);
ss->set("GRAD_CONTROL4","grad_control4");
@@ -8526,9 +8526,9 @@
}
void PageItem::setGradientControl5(FPoint val){
- if(GrControl5==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrControl5==val)
+ return;
+ if (UndoManager::undoEnabled())
{
ScItemState<QPair<FPoint,FPoint> > *ss = new ScItemState<QPair<FPoint,FPoint> >(Um::GradPos,"",Um::IFill);
ss->set("GRAD_CONTROL5","grad_control5");
@@ -8539,9 +8539,9 @@
}
void PageItem::setGradientStrokeScale(double val){
- if(GrStrokeScale==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrStrokeScale==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::ILine);
ss->set("GRADSTROKE_SCALE","gradstroke_scale");
@@ -8553,9 +8553,9 @@
}
void PageItem::setGradientStrokeSkew(double val){
- if(GrStrokeSkew==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrStrokeSkew==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::ILine);
ss->set("GRADSTROKE_SKEW","gradstroke_skew");
@@ -8567,9 +8567,9 @@
}
void PageItem::setGradientStrokeFocalX(double val){
- if(GrStrokeFocalX==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrStrokeFocalX==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::ILine);
ss->set("GRADSTROKE_FOCALX","gradstroke_focalx");
@@ -8581,9 +8581,9 @@
}
void PageItem::setGradientStrokeFocalY(double val){
- if(GrStrokeFocalY==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrStrokeFocalY==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::ILine);
ss->set("GRADSTROKE_FOCALY","gradstroke_focaly");
@@ -8595,9 +8595,9 @@
}
void PageItem::setGradientStrokeStartX(double val){
- if(GrStrokeStartX==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrStrokeStartX==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::ILine);
ss->set("GRADSTROKE_STARTX","gradstroke_startx");
@@ -8609,9 +8609,9 @@
}
void PageItem::setGradientStrokeStartY(double val){
- if(GrStrokeStartY==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrStrokeStartY==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::ILine);
ss->set("GRADSTROKE_STARTY","gradstroke_starty");
@@ -8623,9 +8623,9 @@
}
void PageItem::setGradientStrokeEndX(double val){
- if(GrStrokeEndX==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrStrokeEndX==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::ILine);
ss->set("GRADSTROKE_ENDX","gradstroke_endx");
@@ -8637,9 +8637,9 @@
}
void PageItem::setGradientStrokeEndY(double val){
- if(GrStrokeEndY==val)
- return;
- if(UndoManager::undoEnabled())
+ if (GrStrokeEndY==val)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::GradPos,"",Um::ILine);
ss->set("GRADSTROKE_ENDY","gradstroke_endy");
@@ -10017,9 +10017,9 @@
}
void PageItem::setResolution(int id){
- if(pixm.imgInfo.lowResType==id)
- return;
- if(UndoManager::undoEnabled())
+ if (pixm.imgInfo.lowResType==id)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::ResTyp,"",Um::IImageFrame);
ss->set("RES_TYP","res_typ");
@@ -10037,9 +10037,9 @@
void PageItem::setImageShown(bool isShown)
{
- if(PicArt==isShown)
- return;
- if(UndoManager::undoEnabled())
+ if (PicArt==isShown)
+ return;
+ if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::ResTyp,"",Um::IImageFrame);
ss->set("SHOW_IMAGE","show_image");
@@ -10412,7 +10412,7 @@
void PageItem::setFirstLineOffset(FirstLineOffsetPolicy flop)
{
- if(firstLineOffsetP != flop)
+ if (firstLineOffsetP != flop)
{
if (UndoManager::undoEnabled())
{
@@ -10503,7 +10503,7 @@
return;
addWelded(pIt);
pIt->addWelded(this);
- if(undoManager->undoEnabled())
+ if (undoManager->undoEnabled())
{
ScItemState<PageItem*> *is = new ScItemState<PageItem*>(Um::WeldItems,"",Um::IGroup);
is->set("WELD_ITEMS", "weld_items");
@@ -10633,7 +10633,7 @@
if (pIt2 == this)
{
pIt->weldList.removeAt(b);
- if(undoManager->undoEnabled())
+ if (undoManager->undoEnabled())
{
ScItemState<PageItem*> *is = new ScItemState<PageItem*>(Um::WeldItems,"",Um::IGroup);
is->set("UNWELD_ITEM", "unweld_item");
More information about the scribus-commit
mailing list