Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 16515 → Rev 16516

/trunk/Scribus/scribus/pageitem.cpp
2507,6 → 2507,7
return;
QString oldName = AnName;
AnName = generateUniqueCopyName(newName);
AutoName=false;
if (UndoManager::undoEnabled())
{
SimpleState *ss = new SimpleState(Um::Rename, QString(Um::FromTo).arg(AnName).arg(newName));
/trunk/Scribus/scribus/scribusview.cpp
3549,7 → 3549,6
bb->setLocked(currItem->locked());
bb->NamedLStyle = currItem->NamedLStyle;
bb->setItemName(currItem->itemName()+"+U"+ccounter.setNum(a));
bb->AutoName = false;
FPoint start, stop;
if (charStyle.effects() & ScStyle_Subscript)
{
3591,7 → 3590,6
bb->setLocked(currItem->locked());
bb->NamedLStyle = currItem->NamedLStyle;
bb->setItemName(currItem->itemName()+"+Sh"+ccounter.setNum(a));
bb->AutoName = false;
bb->PoLine = pts.copy();
QTransform shmap;
shmap.translate(glxTr, glyTr);
3627,7 → 3625,6
bb->setLocked(currItem->locked());
bb->NamedLStyle = currItem->NamedLStyle;
bb->setItemName(currItem->itemName()+"+"+ccounter.setNum(a));
bb->AutoName = false;
bb->PoLine = pts.copy();
if (!currItem->asPathText())
bb->setRotation(currItem->rotation());
3692,7 → 3689,6
bb->setLocked(currItem->locked());
bb->NamedLStyle = currItem->NamedLStyle;
bb->setItemName(currItem->itemName()+"+S"+ccounter.setNum(a));
bb->AutoName = false;
FPoint start = FPoint(hl->glyph.xoffset-kern, -Upos);
FPoint stop = FPoint(hl->glyph.xoffset+Ulen, -Upos);
bb->PoLine.resize(0);
3783,7 → 3779,6
bb->setLocked(currItem->locked());
bb->NamedLStyle = currItem->NamedLStyle;
bb->setItemName(currItem->itemName()+"+U"+ccounter.setNum(a));
bb->AutoName = false;
bb->setRotation(currItem->rotation());
bb->PoLine.addQuadPoint(FPoint(0, 0), FPoint(0, 0), FPoint(hl->glyph.xadvance, 0), FPoint(hl->glyph.xadvance, 0));
bb->setLineColor(hl->fillColor());
3843,7 → 3838,6
bb->setLocked(currItem->locked());
bb->NamedLStyle = currItem->NamedLStyle;
bb->setItemName(currItem->itemName()+"+Sh"+ccounter.setNum(a));
bb->AutoName = false;
bb->PoLine = pts.copy();
bb->setRotation(currItem->rotation());
bb->setFillColor(hl->strokeColor());
3893,7 → 3887,6
bb->setLocked(currItem->locked());
bb->NamedLStyle = currItem->NamedLStyle;
bb->setItemName(currItem->itemName()+"+"+ccounter.setNum(a));
bb->AutoName = false;
bb->PoLine = pts.copy();
bb->setRotation(currItem->rotation());
bb->setFillColor(hl->fillColor());
3970,7 → 3963,6
bb->setLocked(currItem->locked());
bb->NamedLStyle = currItem->NamedLStyle;
bb->setItemName(currItem->itemName()+"+S"+ccounter.setNum(a));
bb->AutoName = false;
bb->setRotation(currItem->rotation());
bb->PoLine.addQuadPoint(FPoint(0, 0), FPoint(0, 0), FPoint(hl->glyph.xadvance, 0), FPoint(hl->glyph.xadvance, 0));
bb->setLineColor(hl->fillColor());
/trunk/Scribus/scribus/ui/annot.cpp
1822,10 → 1822,7
bool AAct = false;
item->annotation().setType(ComboBox1->currentIndex()+2);
if (Name->text() != OldName)
{
item->setItemName(Name->text());
item->AutoName = false;
}
item->annotation().setToolTip(Tip->text());
item->annotation().setRollOver(TextO->text());
item->annotation().setDown(DownT->text());
/trunk/Scribus/scribus/ui/propertiespalette.cpp
4805,7 → 4805,6
if (CurItem->itemName() != NameEdit->text())
{
CurItem->setItemName(NameEdit->text());
CurItem->AutoName = false;
emit DocChanged();
}
}
/trunk/Scribus/scribus/ui/outlinepalette.cpp
326,7 → 326,6
else
{
item->PageItemObject->setItemName(NameNew);
item->PageItemObject->AutoName = false;
m_MainWindow->propertiesPalette->SetCurItem(item->PageItemObject);
currDoc->setModified(true);
}
/trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
36,13 → 36,8
{
QString objName = QString::fromUtf8(Name);
if (!ItemExists(objName))
{
ScCore->primaryMainWindow()->doc->Items->at(i)->setItemName(objName);
ScCore->primaryMainWindow()->doc->Items->at(i)->AutoName = false;
}
}
// if (Name != EMPTY_STRING)
// ScCore->primaryMainWindow()->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
return PyString_FromString(ScCore->primaryMainWindow()->doc->Items->at(i)->itemName().toUtf8());
}
 
64,22 → 59,11
ScCore->primaryMainWindow()->doc->itemToolPrefs().shapeFillColor,
ScCore->primaryMainWindow()->doc->itemToolPrefs().shapeLineColor,
true);
// if (ItemExists(QString::fromUtf8(Name)))
// {
// PyErr_SetString(NameExistsError, QObject::tr("An object with the requested name already exists.","python error"));
// return NULL;
// }
// ScCore->primaryMainWindow()->doc->setRedrawBounding(ScCore->primaryMainWindow()->doc->Items->at(i));
// if (Name != EMPTY_STRING)
// ScCore->primaryMainWindow()->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
if (Name != EMPTY_STRING)
{
QString objName = QString::fromUtf8(Name);
if (!ItemExists(objName))
{
ScCore->primaryMainWindow()->doc->Items->at(i)->setItemName(objName);
ScCore->primaryMainWindow()->doc->Items->at(i)->AutoName = false;
}
}
return PyString_FromString(ScCore->primaryMainWindow()->doc->Items->at(i)->itemName().toUtf8());
}
100,22 → 84,11
ValueToPoint(h),
1, ScCore->primaryMainWindow()->doc->itemToolPrefs().imageFillColor,
CommonStrings::None, true);
// if (ItemExists(QString::fromUtf8(Name)))
// {
// PyErr_SetString(NameExistsError, QObject::tr("An object with the requested name already exists.","python error"));
// return NULL;
// }
// ScCore->primaryMainWindow()->doc->setRedrawBounding(ScCore->primaryMainWindow()->doc->Items->at(i));
// if (Name != EMPTY_STRING)
// ScCore->primaryMainWindow()->doc->Items->at(i)->setItemName(QString::fromUtf8(Name));
if (Name != EMPTY_STRING)
{
QString objName = QString::fromUtf8(Name);
if (!ItemExists(objName))
{
ScCore->primaryMainWindow()->doc->Items->at(i)->setItemName(objName);
ScCore->primaryMainWindow()->doc->Items->at(i)->AutoName = false;
}
}
return PyString_FromString(ScCore->primaryMainWindow()->doc->Items->at(i)->itemName().toUtf8());
}
136,20 → 109,11
ValueToPoint(h),
ScCore->primaryMainWindow()->doc->itemToolPrefs().shapeLineWidth, CommonStrings::None,
ScCore->primaryMainWindow()->doc->itemToolPrefs().textColor, true);
// if (ItemExists(QString::fromUtf8(Name)))
// {
// PyErr_SetString(NameExistsError, QObject::tr("An object with the requested name already exists.","python error"));
// return NULL;
// }
// ScCore->primaryMainWindow()->doc->setRedrawBounding(ScCore->primaryMainWindow()->doc->Items->at(i));
if (Name != EMPTY_STRING)
{
QString objName = QString::fromUtf8(Name);
if (!ItemExists(objName))
{
ScCore->primaryMainWindow()->doc->Items->at(i)->setItemName(objName);
ScCore->primaryMainWindow()->doc->Items->at(i)->AutoName = false;
}
}
return PyString_FromString(ScCore->primaryMainWindow()->doc->Items->at(i)->itemName().toUtf8());
}
205,16 → 169,11
ScCore->primaryMainWindow()->view->SizeItem(it->PoLine.WidthHeight().x(),
it->PoLine.WidthHeight().y(), i, false, false, false);
ScCore->primaryMainWindow()->view->AdjustItemSize(it);*/
// if (Name != EMPTY_STRING)
// it->setItemName(QString::fromUtf8(Name));
if (Name != EMPTY_STRING)
{
QString objName = QString::fromUtf8(Name);
if (!ItemExists(objName))
{
ScCore->primaryMainWindow()->doc->Items->at(i)->setItemName(objName);
ScCore->primaryMainWindow()->doc->Items->at(i)->AutoName = false;
}
}
return PyString_FromString(it->itemName().toUtf8());
}
287,18 → 246,11
}
ScCore->primaryMainWindow()->doc->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
ScCore->primaryMainWindow()->doc->AdjustItemSize(it);
// if (Name != EMPTY_STRING)
// {
// it->setItemName(QString::fromUtf8(Name));
// }
if (Name != EMPTY_STRING)
{
QString objName = QString::fromUtf8(Name);
if (!ItemExists(objName))
{
ScCore->primaryMainWindow()->doc->Items->at(ic)->setItemName(objName);
ScCore->primaryMainWindow()->doc->Items->at(ic)->AutoName = false;
}
}
return PyString_FromString(it->itemName().toUtf8());
}
376,16 → 328,11
}
ScCore->primaryMainWindow()->doc->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
ScCore->primaryMainWindow()->doc->AdjustItemSize(it);
// if (Name != EMPTY_STRING)
// it->setItemName(QString::fromUtf8(Name));
if (Name != EMPTY_STRING)
{
QString objName = QString::fromUtf8(Name);
if (!ItemExists(objName))
{
ScCore->primaryMainWindow()->doc->Items->at(ic)->setItemName(objName);
ScCore->primaryMainWindow()->doc->Items->at(ic)->AutoName = false;
}
}
return PyString_FromString(it->itemName().toUtf8());
}
472,16 → 419,11
}
ScCore->primaryMainWindow()->doc->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false);
ScCore->primaryMainWindow()->doc->AdjustItemSize(it);
// if (Name != EMPTY_STRING)
// it->setItemName(QString::fromUtf8(Name));
if (Name != EMPTY_STRING)
{
QString objName = QString::fromUtf8(Name);
if (!ItemExists(objName))
{
ScCore->primaryMainWindow()->doc->Items->at(ic)->setItemName(objName);
ScCore->primaryMainWindow()->doc->Items->at(ic)->AutoName = false;
}
}
return PyString_FromString(it->itemName().toUtf8());
}
519,16 → 461,11
PageItem *it = ScCore->primaryMainWindow()->doc->Items->at(i);
ScCore->primaryMainWindow()->view->ToPathText();
ScCore->primaryMainWindow()->doc->MoveItem(pageUnitXToDocX(x) - it->xPos(), pageUnitYToDocY(y) - it->yPos(), it);
// if (Name != EMPTY_STRING)
// it->setItemName(QString::fromUtf8(Name));
if (Name != EMPTY_STRING)
{
QString objName = QString::fromUtf8(Name);
if (!ItemExists(objName))
{
ScCore->primaryMainWindow()->doc->Items->at(i)->setItemName(objName);
ScCore->primaryMainWindow()->doc->Items->at(i)->AutoName = false;
}
}
return PyString_FromString(it->itemName().toUtf8());
}
/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
1663,10 → 1663,7
if (currItem->itemName() == AnName)
currItem->AutoName = true;
else
{
currItem->setItemName(AnName);
currItem->AutoName = false;
}
}
 
currItem->annotation().setAction(obj->attribute("ANACTION",""));
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
2683,10 → 2683,7
if (currItem->itemName() == AnName)
currItem->AutoName = true;
else
{
currItem->setItemName(AnName);
currItem->AutoName = false;
}
}
currItem->annotation().setAction( attrs.valueAsString("ANACTION","") );
currItem->annotation().setE_act ( attrs.valueAsString("ANEACT","") );
/trunk/Scribus/scribus/plugins/import/ps/importps.cpp
633,7 → 633,6
m_Doc->AdjustItemSize(ite, true);
ite->ContourLine = ite->PoLine.copy();
ite->setItemName( tr("Group%1").arg(m_Doc->GroupCounter));
ite->AutoName = false;
ite->setTextFlowMode(PageItem::TextFlowDisabled);
Elements.append(ite);
if ((groupStack.count() != 0) && (groupStackP.count() != 0))
663,7 → 662,6
m_Doc->AdjustItemSize(ite, true);
ite->ContourLine = ite->PoLine.copy();
ite->setItemName( tr("Group%1").arg(m_Doc->GroupCounter));
ite->AutoName = false;
ite->setTextFlowMode(PageItem::TextFlowDisabled);
Elements.append(ite);
if ((groupStack.count() != 0) && (groupStackP.count() != 0))
/trunk/Scribus/scribus/plugins/import/ai/importai.cpp
2494,7 → 2494,6
pat.setDoc(m_Doc);
PageItem* currItem = tmpSel->itemAt(0);
currItem->setItemName(currentPatternDefName);
currItem->AutoName = false;
m_Doc->DoDrawing = true;
QImage tmpImg = currItem->DrawObj_toImage(qMax(qRound(patternX2 - patternX1), qRound(patternY2 - patternY1)));
if (!tmpImg.isNull())
2642,7 → 2641,6
pat.setDoc(m_Doc);
PageItem* currItem = tmpSel->itemAt(0);
currItem->setItemName(currentPatternDefName);
currItem->AutoName = false;
m_Doc->DoDrawing = true;
pat.pattern = currItem->DrawObj_toImage(qMax(tmpSel->width(), tmpSel->height()));
if (!pat.pattern.isNull())
/trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
693,7 → 693,6
neu->setItemName(e.attribute("id"));
else
neu->setItemName( tr("Group%1").arg(m_Doc->GroupCounter));
neu->AutoName = false;
}
return elements;
}
962,10 → 961,7
ite->setLineTransparency(oostyle.strokeTrans);
ite->setTextFlowMode(PageItem::TextFlowDisabled);
if (!drawID.isEmpty())
{
ite->setItemName(drawID);
ite->AutoName = false;
}
ite = parseTextP(n.toElement(), ite);
elements.append(ite);
}
1199,10 → 1195,7
if (oostyle.dashes.count() != 0)
item->DashValues = oostyle.dashes;
if (!drawID.isEmpty())
{
item->setItemName(drawID);
item->AutoName = false;
}
if (elm.hasAttribute("draw:transform"))
{
parseTransform(&item->PoLine, elm.attribute("draw:transform"));
/trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
671,10 → 671,7
{
QString nodeId = e.toElement().attribute("id");
if( !nodeId.isEmpty() )
{
item->setItemName(" "+nodeId);
item->AutoName = false;
}
}
item->setFillTransparency( 1 - gc->FillOpacity * gc->Opacity );
item->setLineTransparency( 1 - gc->StrokeOpacity * gc->Opacity );
1202,7 → 1199,6
neu->setItemName(e.attribute("id"));
else
neu->setItemName( tr("Group%1").arg(m_Doc->GroupCounter));
neu->AutoName = false;
neu->setFillTransparency(1 - gc->Opacity);
neu->gXpos = neu->xPos() - gx;
neu->gYpos = neu->yPos() - gy;