View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001609 | Scribus | Internal | public | 2005-02-01 09:28 | 2005-06-28 18:18 |
| Reporter | Assigned To | Tsoots | |||
| Priority | normal | Severity | tweak | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | x86 Linux | OS | Fedora Core | OS Version | 1 |
| Product Version | 1.3.0cvs | ||||
| Fixed in Version | 1.3.0cvs | ||||
| Summary | 0001609: [PATCH] Minor PageItem cleanups | ||||
| Description | The attached patch: - renames PageItem::setName() to PageItem::setItemName() to avoid a conflict with parent class's QObject::setName() . - Makes PageItem::AnName protected - Adds PageItem::itemName() getter for AnName - Converts all usage of the old names and members to the new ones. - Makes all PageItem private members protected instead This prevents the original QObject::setName() method from being hidden, means that all writes to AnName must now go through PageItem::setItemName(), and makes it possible to make the pageitem name a property. The change from private to protected is because of the various plans for subclassing PageItem in the future. | ||||
| Tags | No tags attached. | ||||
| Attached Files | pageitem_AnName_protected.diff (23,170 bytes)
Index: annot.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/annot.cpp,v
retrieving revision 1.24.2.4
diff -u -r1.24.2.4 annot.cpp
--- annot.cpp 19 Jan 2005 02:26:05 -0000 1.24.2.4
+++ annot.cpp 1 Feb 2005 10:08:56 -0000
@@ -92,9 +92,9 @@
Layout60->addWidget( Tip, 1, 1 );
Name = new NameWidget(GroupBox10);
- Name->setText(item->AnName);
+ Name->setText(item->itemName());
Layout60->addWidget( Name, 0, 1 );
- OldName = item->AnName;
+ OldName = item->itemName();
TextLabel30 = new QLabel( GroupBox10, "TextLabel3" );
TextLabel30->setText( tr( "Tool-Tip:" ) );
@@ -1097,7 +1097,7 @@
bool found = false;
for (uint b = 0; b < view->Doc->Items.count(); ++b)
{
- if ((NameNew == view->Doc->Items.at(b)->AnName) && (view->Doc->Items.at(b) != item))
+ if ((NameNew == view->Doc->Items.at(b)->itemName()) && (view->Doc->Items.at(b) != item))
{
found = true;
break;
@@ -1271,7 +1271,7 @@
void Annot::SelectFelder()
{
- SelectFields* dia = new SelectFields(this, CalcFields->text(), item->AnName, &view->Doc->Pages, 3);
+ SelectFields* dia = new SelectFields(this, CalcFields->text(), item->itemName(), &view->Doc->Pages, 3);
if (dia->exec())
CalcFields->setText(dia->S_Fields);
delete dia;
@@ -1694,7 +1694,7 @@
item->AnType = ComboBox1->currentItem()+2;
if (Name->text() != OldName)
{
- item->setName(Name->text());
+ item->setItemName(Name->text());
item->AutoName = false;
}
item->AnToolTip = Tip->text();
Index: checkDocument.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/Attic/checkDocument.cpp,v
retrieving revision 1.1.2.8
diff -u -r1.1.2.8 checkDocument.cpp
--- checkDocument.cpp 27 Jan 2005 00:42:27 -0000 1.1.2.8
+++ checkDocument.cpp 1 Feb 2005 10:08:56 -0000
@@ -254,7 +254,7 @@
bool itemError = false;
QListViewItem * object = new QListViewItem( page, 0 );
templateItemMap.insert(object, doc->MasterItems.at(it2.key())->ItemNr);
- object->setText(0, doc->MasterItems.at(it2.key())->AnName);
+ object->setText(0, doc->MasterItems.at(it2.key())->itemName());
errorCodes::Iterator it3;
if (it2.data().count() == 1)
{
@@ -382,7 +382,7 @@
hasError = true;
bool itemError = false;
QListViewItem * object = new QListViewItem( page, 0 );
- object->setText(0, doc->DocItems.at(it2.key())->AnName);
+ object->setText(0, doc->DocItems.at(it2.key())->itemName());
itemMap.insert(object, doc->DocItems.at(it2.key())->ItemNr);
errorCodes::Iterator it3;
if (it2.data().count() == 1)
@@ -517,7 +517,7 @@
{
hasError = true;
QListViewItem * object = new QListViewItem( page, 0 );
- object->setText(0, doc->DocItems.at(it2.key())->AnName);
+ object->setText(0, doc->DocItems.at(it2.key())->itemName());
itemMap.insert(object, doc->DocItems.at(it2.key())->ItemNr);
errorCodes::Iterator it3;
if (it2.data().count() == 1)
Index: gtaction.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/gtaction.cpp,v
retrieving revision 1.8.2.11
diff -u -r1.8.2.11 gtaction.cpp
--- gtaction.cpp 15 Jan 2005 01:22:28 -0000 1.8.2.11
+++ gtaction.cpp 1 Feb 2005 10:08:56 -0000
@@ -462,7 +462,7 @@
QString gtAction::getFrameName()
{
- return QString(textFrame->AnName);
+ return QString(textFrame->itemName());
}
bool gtAction::getUpdateParagraphStyles()
Index: mpalette.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/mpalette.cpp,v
retrieving revision 1.110.2.21
diff -u -r1.110.2.21 mpalette.cpp
--- mpalette.cpp 1 Feb 2005 02:09:19 -0000 1.110.2.21
+++ mpalette.cpp 1 Feb 2005 10:08:57 -0000
@@ -1066,7 +1066,7 @@
startArrow->setEnabled(false);
endArrow->setEnabled(false);
}
- NameEdit->setText(i->AnName);
+ NameEdit->setText(i->itemName());
RoundRect->setValue(i->RadRect*UmReFaktor);
QString tm;
LevelTxt->setText(tm.setNum(i->ItemNr));
@@ -3249,7 +3249,7 @@
{
if (ScApp->ScriptRunning)
return;
- QString NameOld = CurItem->AnName;
+ QString NameOld = CurItem->itemName();
QString NameNew = NameEdit->text();
if (NameNew == "")
{
@@ -3259,7 +3259,7 @@
bool found = false;
for (uint b = 0; b < doc->Items.count(); ++b)
{
- if ((NameNew == doc->Items.at(b)->AnName) && (doc->Items.at(b) != CurItem))
+ if ((NameNew == doc->Items.at(b)->itemName()) && (doc->Items.at(b) != CurItem))
{
found = true;
break;
@@ -3273,9 +3273,9 @@
}
else
{
- if (CurItem->AnName != NameEdit->text())
+ if (CurItem->itemName() != NameEdit->text())
{
- CurItem->setName(NameEdit->text());
+ CurItem->setItemName(NameEdit->text());
CurItem->AutoName = false;
emit DocChanged();
}
Index: pageitem.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/pageitem.cpp,v
retrieving revision 1.121.2.42
diff -u -r1.121.2.42 pageitem.cpp
--- pageitem.cpp 1 Feb 2005 09:08:59 -0000 1.121.2.42
+++ pageitem.cpp 1 Feb 2005 10:08:57 -0000
@@ -2253,7 +2253,12 @@
}
}
-void PageItem::setName(const QString& newName)
+const QString PageItem::itemName()
+{
+ return AnName;
+}
+
+void PageItem::setItemName(const QString& newName)
{
if (UndoManager::undoEnabled())
{
@@ -2675,9 +2680,9 @@
QString oldName = state->get("OLD_NAME");
QString newName = state->get("NEW_NAME");
if (isUndo)
- setName(oldName);
+ setItemName(oldName);
else
- setName(newName);
+ setItemName(newName);
}
void PageItem::select()
Index: pageitem.h
===================================================================
RCS file: /cvs/Scribus/scribus/pageitem.h,v
retrieving revision 1.26.2.18
diff -u -r1.26.2.18 pageitem.h
--- pageitem.h 1 Feb 2005 09:08:59 -0000 1.26.2.18
+++ pageitem.h 1 Feb 2005 10:08:57 -0000
@@ -215,7 +215,6 @@
QString An_F_act;
QString An_V_act;
QString An_C_act;
- QString AnName;
bool AutoName;
QString AnToolTip;
QString AnRollOver;
@@ -305,12 +304,22 @@
/** @brief Manages undostack and is where all undo actions/states are sent. */
UndoManager *undoManager;
- /**
+ /** @brief Get name of the item
+ *
+ * This is unrelated to QObject::name(); the pageItem's name is independent
+ * of its Qt name.
+ * See also PageItem::setItemName()
+ */
+ const QString itemName();
+ /**
* @brief Set name of the item
* @param newName name for the item
* @author Riku Leino
+ *
+ * Note that this is unrelated to QObject::setName()
+ * See also PageItem::itemName()
*/
- void setName(const QString& newName);
+ void setItemName(const QString& newName);
/**
* @brief Set the fill color of the object.
* @param newColor fill color for the object
@@ -362,7 +371,8 @@
/*@}*/
/** @brief Required by the UndoObject */
void restore(UndoState *state, bool isUndo);
-private:
+
+protected:
/**
* @name Restore helper methods
* Split the restore method for easier handling.
@@ -391,6 +401,15 @@
bool shouldCheck();
/** @brief Clears the current selection and selects this PageItem. */
void select();
+
+ // Protected members
+
+ /**
+ * @brief Item name. Unicode. User visible (outline, property palette, etc).
+ *
+ * See PageItem::itemName(), PageItem::setItemName()
+ * */
+ QString AnName;
};
#endif
Index: scribusXml.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/scribusXml.cpp,v
retrieving revision 1.83.2.41
diff -u -r1.83.2.41 scribusXml.cpp
--- scribusXml.cpp 29 Jan 2005 16:44:00 -0000 1.83.2.41
+++ scribusXml.cpp 1 Feb 2005 10:08:57 -0000
@@ -273,7 +273,7 @@
}
else
ob->setAttribute("ANNOTATION",0);
- ob->setAttribute("ANNAME", !item->AutoName ? item->AnName : QString(""));
+ ob->setAttribute("ANNAME", !item->AutoName ? item->itemName() : QString(""));
ob->setAttribute("TEXTFLOW", item->Textflow ? 1 : 0);
ob->setAttribute("TEXTFLOW2", item->Textflow2 ? 1 : 0);
ob->setAttribute("TEXTFLOW3", item->UseContour ? 1 : 0);
Index: scribusview.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/scribusview.cpp,v
retrieving revision 1.76.2.80
diff -u -r1.76.2.80 scribusview.cpp
--- scribusview.cpp 1 Feb 2005 05:25:59 -0000 1.76.2.80
+++ scribusview.cpp 1 Feb 2005 10:08:58 -0000
@@ -10711,11 +10711,11 @@
{
if (!drag)
{
- if (b->AnName == Buffer->AnName)
+ if (b->itemName() == Buffer->AnName)
b->AutoName = true;
else
{
- b->setName(Buffer->AnName);
+ b->setItemName(Buffer->AnName);
b->AutoName = false;
}
}
@@ -10724,16 +10724,16 @@
bool found = false;
for (uint c = 0; c < Doc->Items.count(); ++c)
{
- if (Buffer->AnName == Doc->Items.at(c)->AnName)
+ if (Buffer->AnName == Doc->Items.at(c)->itemName())
{
found = true;
break;
}
}
if (found)
- b->setName(tr("Copy of")+" "+Buffer->AnName);
+ b->setItemName(tr("Copy of")+" "+Buffer->AnName);
else
- b->setName(Buffer->AnName);
+ b->setItemName(Buffer->AnName);
b->AutoName = false;
}
}
@@ -11241,7 +11241,7 @@
bb->LockRes = b->LockRes;
bb->Locked = b->Locked;
bb->NamedLStyle = b->NamedLStyle;
- bb->setName(b->AnName+"+"+ccounter.setNum(a));
+ bb->setItemName(b->itemName()+"+"+ccounter.setNum(a));
bb->AutoName = false;
bb->PoLine = pts.copy();
bb->Rot = b->Rot;
Index: util.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/util.cpp,v
retrieving revision 1.52.2.15
diff -u -r1.52.2.15 util.cpp
--- util.cpp 15 Jan 2005 11:08:22 -0000 1.52.2.15
+++ util.cpp 1 Feb 2005 10:08:59 -0000
@@ -1837,7 +1837,7 @@
Buffer->An_C_act = b->An_C_act;
Buffer->An_Extern = b->An_Extern;
Buffer->AnZiel = b->AnZiel;
- Buffer->AnName = b->AnName;
+ Buffer->AnName = b->itemName();
Buffer->AnActType = b->AnActType;
Buffer->AnToolTip = b->AnToolTip;
Buffer->AnBwid = b->AnBwid;
Index: libpdf/pdflib.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/libpdf/pdflib.cpp,v
retrieving revision 1.78.2.21
diff -u -r1.78.2.21 pdflib.cpp
--- libpdf/pdflib.cpp 3 Jan 2005 14:08:42 -0000 1.78.2.21
+++ libpdf/pdflib.cpp 1 Feb 2005 10:08:59 -0000
@@ -3605,7 +3605,7 @@
case 6:
Seite.FormObjects.append(ObjCounter-1);
PutDoc("/Subtype /Widget\n");
- PutDoc("/T "+EncString("("+ite->AnName+")",ObjCounter-1)+"\n");
+ PutDoc("/T "+EncString("("+ite->itemName()+")",ObjCounter-1)+"\n");
if (ite->AnToolTip != "")
PutDoc("/TU "+EncString("("+PDFEncode(ite->AnToolTip)+")",ObjCounter-1)+"\n");
PutDoc("/F ");
Index: libpostscript/pslib.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/libpostscript/pslib.cpp,v
retrieving revision 1.24.2.14
diff -u -r1.24.2.14 pslib.cpp
--- libpostscript/pslib.cpp 6 Jan 2005 20:21:19 -0000 1.24.2.14
+++ libpostscript/pslib.cpp 1 Feb 2005 10:09:00 -0000
@@ -1072,7 +1072,7 @@
if ((it->OwnPage != static_cast<int>(Doc->MasterPages.at(ap)->PageNr)) && (it->OwnPage != -1))
continue;
if ((it->PType == 2) && (it->PicAvail) && (it->Pfile != "") && (it->isPrintable) && (!sep) && (farb))
- PS_ImageData(it->InvPict, it->Pfile, it->AnName, it->IProfile, it->UseEmbedded, Ic);
+ PS_ImageData(it->InvPict, it->Pfile, it->itemName(), it->IProfile, it->UseEmbedded, Ic);
PS_TemplateStart(Doc->MasterPages.at(ap)->PageNam + tmps.setNum(it->ItemNr), Doc->PageB, Doc->PageH);
ProcessItem(Doc, Doc->MasterPages.at(ap), it, ap+1, sep, farb, Ic, gcr, true);
PS_TemplateEnd();
@@ -1180,7 +1180,7 @@
{
PS_translate(0, -ite->BBoxH*ite->LocalScY);
if ((!sep) && (farb))
- PS_image(ite->InvPict, -ite->BBoxX+ite->LocalX, -ite->LocalY, ite->Pfile, ite->LocalScX, ite->LocalScY, ite->IProfile, ite->UseEmbedded, Ic, ite->AnName);
+ PS_image(ite->InvPict, -ite->BBoxX+ite->LocalX, -ite->LocalY, ite->Pfile, ite->LocalScX, ite->LocalScY, ite->IProfile, ite->UseEmbedded, Ic, ite->itemName());
else
PS_image(ite->InvPict, -ite->BBoxX+ite->LocalX, -ite->LocalY, ite->Pfile, ite->LocalScX, ite->LocalScY, ite->IProfile, ite->UseEmbedded, Ic);
}
@@ -1656,7 +1656,7 @@
{
PS_translate(0, -c->BBoxH*c->LocalScY);
if ((a->PageNam != "") && (!sep) && (farb))
- PS_image(c->InvPict, -c->BBoxX+c->LocalX, -c->LocalY, c->Pfile, c->LocalScX, c->LocalScY, c->IProfile, c->UseEmbedded, ic, c->AnName);
+ PS_image(c->InvPict, -c->BBoxX+c->LocalX, -c->LocalY, c->Pfile, c->LocalScX, c->LocalScY, c->IProfile, c->UseEmbedded, ic, c->itemName());
else
PS_image(c->InvPict, -c->BBoxX+c->LocalX, -c->LocalY, c->Pfile, c->LocalScX, c->LocalScY, c->IProfile, c->UseEmbedded, ic);
}
Index: plugins/fileloader/oodraw/oodrawimp.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/fileloader/oodraw/oodrawimp.cpp,v
retrieving revision 1.1.2.19
diff -u -r1.1.2.19 oodrawimp.cpp
--- plugins/fileloader/oodraw/oodrawimp.cpp 19 Jan 2005 19:29:22 -0000 1.1.2.19
+++ plugins/fileloader/oodraw/oodrawimp.cpp 1 Feb 2005 10:09:00 -0000
@@ -625,7 +625,7 @@
if (dashes.count() != 0)
ite->DashValues = dashes;
if (drawID != "")
- ite->setName(drawID);
+ ite->setItemName(drawID);
if (b.hasAttribute("draw:transform"))
{
parseTransform(&ite->PoLine, b.attribute("draw:transform"));
Index: plugins/scriptplugin/cmdgetprop.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp,v
retrieving revision 1.8.2.13
diff -u -r1.8.2.13 cmdgetprop.cpp
--- plugins/scriptplugin/cmdgetprop.cpp 20 Jan 2005 16:35:54 -0000 1.8.2.13
+++ plugins/scriptplugin/cmdgetprop.cpp 1 Feb 2005 10:09:00 -0000
@@ -211,12 +211,12 @@
{
if (Carrier->doc->Items.at(lam)->PType == typ)
{
- PyList_SetItem(l, counter2, PyString_FromString(Carrier->doc->Items.at(lam)->AnName.utf8()));
+ PyList_SetItem(l, counter2, PyString_FromString(Carrier->doc->Items.at(lam)->itemName().utf8()));
counter2++;
}
}
else
- PyList_SetItem(l, lam, PyString_FromString(Carrier->doc->Items.at(lam)->AnName.utf8()));
+ PyList_SetItem(l, lam, PyString_FromString(Carrier->doc->Items.at(lam)->itemName().utf8()));
}
return l;
}
Index: plugins/scriptplugin/cmdmani.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp,v
retrieving revision 1.7.2.15
diff -u -r1.7.2.15 cmdmani.cpp
--- plugins/scriptplugin/cmdmani.cpp 26 Jan 2005 22:29:11 -0000 1.7.2.15
+++ plugins/scriptplugin/cmdmani.cpp 1 Feb 2005 10:09:00 -0000
@@ -229,7 +229,7 @@
if(!checkHaveDocument())
return NULL;
if ((i < static_cast<int>(Carrier->view->SelItem.count())) && (i > -1))
- return PyString_FromString(Carrier->view->SelItem.at(i)->AnName.utf8());
+ return PyString_FromString(Carrier->view->SelItem.at(i)->itemName().utf8());
else
// FIXME: Should probably return None if no selection?
return PyString_FromString("");
Index: plugins/scriptplugin/cmdobj.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp,v
retrieving revision 1.11.2.18
diff -u -r1.11.2.18 cmdobj.cpp
--- plugins/scriptplugin/cmdobj.cpp 26 Jan 2005 22:29:12 -0000 1.11.2.18
+++ plugins/scriptplugin/cmdobj.cpp 1 Feb 2005 10:09:00 -0000
@@ -22,8 +22,8 @@
Carrier->doc->toolSettings.dPen);
Carrier->view->SetRectFrame(Carrier->doc->Items.at(i));
if (Name != "")
- Carrier->doc->Items.at(i)->setName(QString::fromUtf8(Name));
- return PyString_FromString(Carrier->doc->Items.at(i)->AnName.utf8());
+ Carrier->doc->Items.at(i)->setItemName(QString::fromUtf8(Name));
+ return PyString_FromString(Carrier->doc->Items.at(i)->itemName().utf8());
}
@@ -46,8 +46,8 @@
}
Carrier->view->SetOvalFrame(Carrier->doc->Items.at(i));
if (Name != "")
- Carrier->doc->Items.at(i)->setName(QString::fromUtf8(Name));
- return PyString_FromString(Carrier->doc->Items.at(i)->AnName.utf8());
+ Carrier->doc->Items.at(i)->setItemName(QString::fromUtf8(Name));
+ return PyString_FromString(Carrier->doc->Items.at(i)->itemName().utf8());
}
@@ -68,8 +68,8 @@
}
Carrier->view->SetRectFrame(Carrier->doc->Items.at(i));
if (Name != "")
- Carrier->doc->Items.at(i)->setName(QString::fromUtf8(Name));
- return PyString_FromString(Carrier->doc->Items.at(i)->AnName.utf8());
+ Carrier->doc->Items.at(i)->setItemName(QString::fromUtf8(Name));
+ return PyString_FromString(Carrier->doc->Items.at(i)->itemName().utf8());
}
@@ -91,8 +91,8 @@
}
Carrier->view->SetRectFrame(Carrier->doc->Items.at(i));
if (Name != "")
- Carrier->doc->Items.at(i)->setName(QString::fromUtf8(Name));
- return PyString_FromString(Carrier->doc->Items.at(i)->AnName.utf8());
+ Carrier->doc->Items.at(i)->setItemName(QString::fromUtf8(Name));
+ return PyString_FromString(Carrier->doc->Items.at(i)->itemName().utf8());
}
@@ -134,8 +134,8 @@
Carrier->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), i, false, false);
Carrier->view->AdjustItemSize(it);
if (Name != "")
- it->setName(QString::fromUtf8(Name));
- return PyString_FromString(it->AnName.utf8());
+ it->setItemName(QString::fromUtf8(Name));
+ return PyString_FromString(it->itemName().utf8());
}
@@ -208,9 +208,9 @@
Carrier->view->AdjustItemSize(it);
if (Name != "")
{
- it->setName(QString::fromUtf8(Name));
+ it->setItemName(QString::fromUtf8(Name));
}
- return PyString_FromString(it->AnName.utf8());
+ return PyString_FromString(it->itemName().utf8());
}
@@ -287,8 +287,8 @@
Carrier->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false);
Carrier->view->AdjustItemSize(it);
if (Name != "")
- it->setName(QString::fromUtf8(Name));
- return PyString_FromString(it->AnName.utf8());
+ it->setItemName(QString::fromUtf8(Name));
+ return PyString_FromString(it->itemName().utf8());
}
PyObject *scribus_bezierline(PyObject */*self*/, PyObject* args)
@@ -373,8 +373,8 @@
Carrier->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false);
Carrier->view->AdjustItemSize(it);
if (Name != "")
- it->setName(QString::fromUtf8(Name));
- return PyString_FromString(it->AnName.utf8());
+ it->setItemName(QString::fromUtf8(Name));
+ return PyString_FromString(it->itemName().utf8());
}
@@ -411,8 +411,8 @@
Carrier->view->ToPathText();
Carrier->view->MoveItem(pageUnitXToDocX(x) - it->Xpos, pageUnitYToDocY(y) - it->Ypos, it);
if (Name != "")
- it->setName(QString::fromUtf8(Name));
- return PyString_FromString(it->AnName.utf8());
+ it->setItemName(QString::fromUtf8(Name));
+ return PyString_FromString(it->itemName().utf8());
}
Index: plugins/scriptplugin/cmdpage.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp,v
retrieving revision 1.11.2.14
diff -u -r1.11.2.14 cmdpage.cpp
--- plugins/scriptplugin/cmdpage.cpp 3 Jan 2005 14:08:44 -0000 1.11.2.14
+++ plugins/scriptplugin/cmdpage.cpp 1 Feb 2005 10:09:00 -0000
@@ -125,7 +125,7 @@
for (uint i = 0; i<Carrier->doc->Items.count(); ++i)
{
row = Py_BuildValue((char*)"(sii)",
- Carrier->doc->Items.at(i)->AnName.ascii(),
+ Carrier->doc->Items.at(i)->itemName().ascii(),
Carrier->doc->Items.at(i)->PType,
Carrier->doc->Items.at(i)->ItemNr
);
Index: plugins/scriptplugin/cmdtext.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp,v
retrieving revision 1.19.2.15
diff -u -r1.19.2.15 cmdtext.cpp
--- plugins/scriptplugin/cmdtext.cpp 20 Jan 2005 16:35:54 -0000 1.19.2.15
+++ plugins/scriptplugin/cmdtext.cpp 1 Feb 2005 10:09:00 -0000
@@ -176,7 +176,7 @@
// Scan backwards to find the first frame in a linked series
while (it->BackBox != 0)
{
- is = GetUniqueItem(it->BackBox->AnName);
+ is = GetUniqueItem(it->BackBox->itemName());
if (is == NULL)
{
// While GetUniqueItem has already set an exception, we'll
@@ -204,7 +204,7 @@
// Scan forward through linked frames and ... what?
while (it->NextBox != 0)
{
- is = GetUniqueItem(it->NextBox->AnName);
+ is = GetUniqueItem(it->NextBox->itemName());
if (is == NULL)
{
// While GetUniqueItem has already set an exception, we'll
Index: plugins/scriptplugin/cmdutil.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/scriptplugin/cmdutil.cpp,v
retrieving revision 1.6.2.9
diff -u -r1.6.2.9 cmdutil.cpp
--- plugins/scriptplugin/cmdutil.cpp 26 Jan 2005 22:29:12 -0000 1.6.2.9
+++ plugins/scriptplugin/cmdutil.cpp 1 Feb 2005 10:09:00 -0000
@@ -72,7 +72,7 @@
{
for (uint a = 0; a < Carrier->doc->Items.count(); a++)
{
- if (Carrier->doc->Items.at(a)->AnName == Name)
+ if (Carrier->doc->Items.at(a)->itemName() == Name)
return static_cast<int>(a);
}
}
@@ -158,7 +158,7 @@
}
for (uint j = 0; j<Carrier->doc->Items.count(); j++)
{
- if (name==Carrier->doc->Items.at(j)->AnName)
+ if (name==Carrier->doc->Items.at(j)->itemName())
return Carrier->doc->Items.at(j);
} // for items
PyErr_SetString(NoValidObjectError, QString("Object not found"));
@@ -177,7 +177,7 @@
return false;
for (uint j = 0; j<Carrier->doc->Items.count(); j++)
{
- if (name==Carrier->doc->Items.at(j)->AnName)
+ if (name==Carrier->doc->Items.at(j)->itemName())
return true;
} // for items
return false;
Index: plugins/svgimplugin/svgplugin.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp,v
retrieving revision 1.31.2.20
diff -u -r1.31.2.20 svgplugin.cpp
--- plugins/svgimplugin/svgplugin.cpp 21 Jan 2005 17:55:55 -0000 1.31.2.20
+++ plugins/svgimplugin/svgplugin.cpp 1 Feb 2005 10:09:00 -0000
@@ -587,7 +587,7 @@
}
}
if( !b.attribute("id").isEmpty() )
- ite->AnName += " "+b.attribute("id");
+ ite->setItemName(" "+b.attribute("id"));
ite->Transparency = gc->Transparency;
ite->TranspStroke = gc->TranspStroke;
ite->PLineEnd = gc->PLineEnd;
@@ -1976,7 +1976,7 @@
Prog->view->Deselect();
ite->Ypos -= asce * mm.m22();
if( !e.attribute("id").isEmpty() )
- ite->AnName += " "+e.attribute("id");
+ ite->setItemName(" "+e.attribute("id"));
ite->Transparency = gc->Transparency;
ite->TranspStroke = gc->TranspStroke;
ite->PLineEnd = gc->PLineEnd;
@@ -2044,7 +2044,7 @@
}
Prog->view->SetRectFrame(ite);
if( !e.attribute("id").isEmpty() )
- ite->AnName += " "+e.attribute("id");
+ ite->setItemName(" "+e.attribute("id"));
ite->Transparency = gc->Transparency;
ite->TranspStroke = gc->TranspStroke;
ite->PLineEnd = gc->PLineEnd;
| ||||
| Patch | |||||
| child of | 0001653 | confirmed | Convert all PageItem direct member access to use getters and setters |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2005-02-01 09:28 |
|
New Issue | |
| 2005-02-01 09:28 |
|
File Added: pageitem_AnName_protected.diff | |
| 2005-02-01 09:32 | cbradney | Status | new => assigned |
| 2005-02-01 09:32 | cbradney | Assigned To | => Tsoots |
| 2005-02-01 09:41 |
|
Status | assigned => closed |
| 2005-02-01 09:41 |
|
Note Added: 0003570 | |
| 2005-02-01 09:41 |
|
Fixed in Version | => 1.3.0cvs |
| 2005-02-01 10:18 | Tsoots | Status | closed => resolved |
| 2005-02-01 10:18 | Tsoots | Resolution | open => fixed |
| 2005-02-01 13:40 | cbradney | Status | resolved => closed |
| 2005-02-09 05:57 |
|
Relationship added | child of 0001653 |
| 2005-06-28 18:18 | cbradney | Category | - => Internal |