Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 9855 → Rev 9856

/trunk/Scribus/scribus/serializer.cpp
46,7 → 46,7
 
struct Collection
{
Q3PtrList<PageItem> items;
QList<PageItem*> items;
ColorList colors;
StyleSet<ParagraphStyle> pstyles;
StyleSet<CharStyle> cstyles;
352,7 → 352,7
 
//TODO: patterns
Q3PtrList<PageItem>* objects = &(coll->items);
QList<PageItem*>* objects = &(coll->items);
// qDebug(QString("deserialize: objects %1").arg((ulong)objects));
/trunk/Scribus/scribus/page.cpp
57,14 → 57,14
Page::~Page()
{
// Clean up any modified template items (unused)
for (PageItem *currItem = FromMaster.first(); currItem; currItem = FromMaster.next())
{
if (currItem->ChangedMasterItem)
{
FromMaster.remove(currItem);
delete currItem;
}
}
// for (PageItem *currItem = FromMaster.first(); currItem; currItem = FromMaster.next())
// {
// if (currItem->ChangedMasterItem)
// {
// FromMaster.remove(currItem);
// delete currItem;
// }
// }
FromMaster.clear();
}
 
294,7 → 294,7
m_Doc->setMasterPageMode(!oldItem->OnMasterPage.isEmpty());
if (isUndo)
{
m_Doc->Items->take(newItem->ItemNr);
m_Doc->Items->takeAt(newItem->ItemNr);
m_Doc->Items->append(oldItem);
oldItem->ItemNr = m_Doc->Items->count()-1;
oldItem->updatePolyClip();
302,7 → 302,7
}
else
{
m_Doc->Items->take(oldItem->ItemNr);
m_Doc->Items->takeAt(oldItem->ItemNr);
m_Doc->Items->append(newItem);
newItem->ItemNr = m_Doc->Items->count()-1;
}
/trunk/Scribus/scribus/scribusview.h
177,7 → 177,7
//CB This MUST now be called AFTER a call to doc->addPage or doc->addMasterPage as it
//does NOT create a page anymore.
Page* addPage(int nr, bool mov = true);
Q3PtrList<PageItem> linkedFramesToShow;
QList<PageItem*> linkedFramesToShow;
QList<int> SelNode;
 
/trunk/Scribus/scribus/scribusXml.cpp
603,7 → 603,7
QMap<int,int> TableID;
QMap<int,int> arrowID;
QMap<PageItem*, int> groupID;
Q3PtrList<PageItem> TableItems;
QList<PageItem*> TableItems;
bool VorLFound = false;
bool newVersion = false;
int x;
916,7 → 916,7
pat.pattern = currItem->DrawObj_toImage();
for (uint as = ac; as < ae; ++as)
{
PageItem* Neu = doc->Items->take(ac);
PageItem* Neu = doc->Items->takeAt(ac);
Neu->ItemNr = pat.items.count();
pat.items.append(Neu);
}
1084,7 → 1084,7
}
if (TableItems.count() != 0)
{
for (uint ttc = 0; ttc < TableItems.count(); ++ttc)
for (int ttc = 0; ttc < TableItems.count(); ++ttc)
{
PageItem* ta = TableItems.at(ttc);
if (ta->TopLinkID != -1)
1367,7 → 1367,7
pat.setAttribute("scaleY", pa.scaleY);
pat.setAttribute("width", pa.width);
pat.setAttribute("height", pa.height);
for (uint o = 0; o < pa.items.count(); o++)
for (int o = 0; o < pa.items.count(); o++)
{
QDir::setCurrent(QDir::homeDirPath());
item = pa.items.at(o);
/trunk/Scribus/scribus/picstatus.cpp
112,8 → 112,9
QPixmap pm(128, 128);
QPainter p;
imageViewArea->clear();
for (item = m_Doc->MasterItems.first(); item; item = m_Doc->MasterItems.next())
for (int it = 0; it < m_Doc->MasterItems.count(); ++it)
{
item = m_Doc->MasterItems.at(it);
QFileInfo fi = QFileInfo(item->Pfile);
if (item->itemType() == PageItem::ImageFrame)
{
121,8 → 122,9
ite->setDragEnabled(false);
}
}
for (item = m_Doc->Items->first(); item; item = m_Doc->Items->next())
for (int it = 0; it < m_Doc->Items->count(); ++it)
{
item = m_Doc->Items->at(it);
QFileInfo fi = QFileInfo(item->Pfile);
if (item->itemType() == PageItem::ImageFrame)
{
/trunk/Scribus/scribus/scpageoutput.cpp
665,7 → 665,7
{
if (!cembedded)
return;
Q3PtrList<PageItem> emG;
QList<PageItem*> emG;
Q3PtrStack<PageItem> groupStack;
emG.clear();
emG.append(cembedded);
679,7 → 679,7
{
if (m_doc->FrameItems.at(ga)->ItemNr != cembedded->ItemNr)
{
if (emG.find(m_doc->FrameItems.at(ga)) == -1)
if (!emG.contains(m_doc->FrameItems.at(ga)))
emG.append(m_doc->FrameItems.at(ga));
}
}
686,7 → 686,7
}
}
}
for (uint em = 0; em < emG.count(); ++em)
for (int em = 0; em < emG.count(); ++em)
{
PageItem* embedded = emG.at(em);
p->save();
/trunk/Scribus/scribus/pageitem.cpp
1181,13 → 1181,13
return;
if (!m_Doc->DoDrawing)
return;
Q3PtrList<PageItem> emG;
QList<PageItem*> emG;
Q3PtrStack<PageItem> groupStack;
emG.clear();
emG.append(cembedded);
if (cembedded->Groups.count() != 0)
{
for (uint ga=0; ga<m_Doc->FrameItems.count(); ++ga)
for (int ga=0; ga<m_Doc->FrameItems.count(); ++ga)
{
if (m_Doc->FrameItems.at(ga)->Groups.count() != 0)
{
1195,7 → 1195,7
{
if (m_Doc->FrameItems.at(ga)->ItemNr != cembedded->ItemNr)
{
if (emG.find(m_Doc->FrameItems.at(ga)) == -1)
if (!emG.contains(m_Doc->FrameItems.at(ga)))
emG.append(m_Doc->FrameItems.at(ga));
}
}
1202,7 → 1202,7
}
}
}
for (uint em = 0; em < emG.count(); ++em)
for (int em = 0; em < emG.count(); ++em)
{
PageItem* embedded = emG.at(em);
p->save();
1378,7 → 1378,7
 
QImage PageItem::DrawObj_toImage()
{
Q3PtrList<PageItem> emG;
QList<PageItem*> emG;
emG.clear();
double minx = 99999.9;
double miny = 99999.9;
1386,13 → 1386,13
double maxy = -99999.9;
if (Groups.count() != 0)
{
for (uint ga=0; ga<m_Doc->Items->count(); ++ga)
for (int ga=0; ga<m_Doc->Items->count(); ++ga)
{
if (m_Doc->Items->at(ga)->Groups.count() != 0)
{
if (m_Doc->Items->at(ga)->Groups.top() == Groups.top())
{
if (emG.find(m_Doc->Items->at(ga)) == -1)
if (!emG.contains(m_Doc->Items->at(ga)))
{
emG.append(m_Doc->Items->at(ga));
PageItem *currItem = m_Doc->Items->at(ga);
1422,7 → 1422,7
}
}
}
for (uint em = 0; em < emG.count(); ++em)
for (int em = 0; em < emG.count(); ++em)
{
PageItem* currItem = emG.at(em);
currItem->gXpos = currItem->xPos() - minx;
1464,7 → 1464,7
return DrawObj_toImage(emG);
}
 
QImage PageItem::DrawObj_toImage(Q3PtrList<PageItem> &emG)
QImage PageItem::DrawObj_toImage(QList<PageItem*> &emG)
{
QImage retImg = QImage(qRound(gWidth), qRound(gHeight), QImage::Format_ARGB32);
retImg.fill( qRgba(255, 255, 255, 0) );
/trunk/Scribus/scribus/scribusview.cpp
899,7 → 899,7
PageItem *nextItem = currItem;
if (Doc->guidesSettings.linkShown)
{
for (uint lks = 0; lks < linkedFramesToShow.count(); ++lks)
for (int lks = 0; lks < linkedFramesToShow.count(); ++lks)
{
nextItem = linkedFramesToShow.at(lks);
while (nextItem != 0)
1423,10 → 1423,13
{
if ((layerCount > 1) || (ll.transparency != 1.0))
painter->beginLayer(ll.transparency, ll.blendMode);
Q3PtrListIterator<PageItem> docItem(*Doc->Items);
while ( (currItem = docItem.current()) != 0)
// Q3PtrListIterator<PageItem> docItem(*Doc->Items);
// while ( (currItem = docItem.current()) != 0)
// {
// ++docItem;
for (int it = 0; it < Doc->Items->count(); ++it)
{
++docItem;
currItem = Doc->Items->at(it);
if (currItem->LayerNr != ll.LNr)
continue;
if ((previewMode) && (!currItem->printEnabled()))
1472,7 → 1475,7
else
break;
}
if (linkedFramesToShow.find(nextItem) == -1)
if (!linkedFramesToShow.contains(nextItem))
linkedFramesToShow.append(nextItem);
}
if ((Doc->appMode == modeEdit) && (currItem->isSelected()) && (currItem->itemType() == PageItem::TextFrame))
1521,10 → 1524,13
}
}
}
Q3PtrListIterator<PageItem> docItem2(*Doc->Items);
while ( (currItem = docItem2.current()) != 0 )
// Q3PtrListIterator<PageItem> docItem2(*Doc->Items);
// while ( (currItem = docItem2.current()) != 0 )
// {
// ++docItem2;
for (int it = 0; it < Doc->Items->count(); ++it)
{
++docItem2;
currItem = Doc->Items->at(it);
if (currItem->LayerNr != ll.LNr)
continue;
if (!currItem->isTableItem)
1908,7 → 1914,7
int pscx=qRound(e->pos().x()/Scale), pscy=qRound(e->pos().y()/Scale);
//Loop through all items and see which one(s) were under the drop point on the current layer
//Should make a nice function for this.
for (uint i=0; i<Doc->Items->count(); ++i)
for (int i=0; i<Doc->Items->count(); ++i)
{
if (Doc->Items->at(i)->LayerNr==Doc->activeLayer())
{
2046,7 → 2052,7
emit LoadElem(QString(text), ex, ey, false, false, Doc, this);
Selection tmpSelection(this, false);
tmpSelection.copy(*Doc->m_Selection, false, true);
for (uint as = oldDocItemCount; as < Doc->Items->count(); ++as)
for (int as = oldDocItemCount; as < Doc->Items->count(); ++as)
{
currItem = Doc->Items->at(as);
Doc->setRedrawBounding(currItem);
2089,9 → 2095,9
}
if ((re == 1) || (Doc->leaveDrag))
{
Q3PtrList<PageItem> pasted;
QList<PageItem*> pasted;
emit LoadElem(QString(text), ex, ey, false, false, Doc, this);
for (uint as = oldDocItemCount; as < Doc->Items->count(); ++as)
for (int as = oldDocItemCount; as < Doc->Items->count(); ++as)
{
pasted.append(Doc->Items->at(as));
}
2147,7 → 2153,7
Doc->DragElements.clear();
Selection tmpSelection(this, false);
tmpSelection.copy(*Doc->m_Selection, false, true);
for (uint as = oldDocItemCount; as < Doc->Items->count(); ++as)
for (int as = oldDocItemCount; as < Doc->Items->count(); ++as)
{
currItem = Doc->Items->at(as);
Doc->setRedrawBounding(currItem);
3350,7 → 3356,7
else
{
Deselect(false);
Doc->Items->remove(currItem->ItemNr);
Doc->Items->removeAt(currItem->ItemNr);
}
delete dia;
}
4620,7 → 4626,7
if (currItem->PoLine.size() < 4)
{
// emit DelObj(Doc->currentPage->pageNr(), currItem->ItemNr);
Doc->Items->remove(currItem->ItemNr);
Doc->Items->removeAt(currItem->ItemNr);
Doc->m_Selection->removeFirst();
emit HaveSel(-1);
}
6104,7 → 6110,7
bb->setRotation(currItem->rotation());
Doc->AdjustItemSize(bb);
bb->ClipEdited = true;
PageItem *bx = Doc->Items->take(bb->ItemNr);
PageItem *bx = Doc->Items->takeAt(bb->ItemNr);
Doc->Items->insert(bb->ItemNr-1, bx);
}
currItem->PoLine = cli.copy();
6814,7 → 6820,7
if (bb->ItemNr < currItem->ItemNr)
{
Doc->Items->insert(currItem->ItemNr+1, bb);
bb = Doc->Items->take(bb->ItemNr);
bb = Doc->Items->takeAt(bb->ItemNr);
Doc->renumberItemsInListOrder();
}
updateContents();
8554,7 → 8560,7
 
void ScribusView::SelectItemNr(uint nr, bool draw, bool single)
{
if (nr < Doc->Items->count())
if (nr < static_cast<uint>(Doc->Items->count()))
SelectItem(Doc->Items->at(nr), draw, single);
}
 
8581,7 → 8587,7
else
Doc->m_Selection->addItem(currItem);
for (uint ga=0; ga<Doc->Items->count(); ++ga)
for (int ga=0; ga<Doc->Items->count(); ++ga)
{
if (Doc->Items->at(ga)->Groups.count() != 0)
{
8722,7 → 8728,7
currItem = Doc->m_Selection->itemAt(0);
else
currItem = Doc->Items->last();
uint a;
int a;
if (!Doc->masterPageMode())
{
int pgNum = -1;
8783,6 → 8789,7
{
Page* Mp = Doc->MasterPages.at(Doc->MasterNames[Doc->currentPage()->MPageNam]);
currItem = Doc->currentPage()->FromMaster.last();
int currNr = Doc->currentPage()->FromMaster.count()-1;
for (a = 0; a < Doc->currentPage()->FromMaster.count(); ++a)
{
p = QMatrix();
8814,7 → 8821,7
Doc->m_Selection->addItem(currItem, true);
if (m->state() != (Qt::ControlButton | Qt::AltButton))
{
for (uint ga=0; ga<Doc->Items->count(); ++ga)
for (int ga=0; ga<Doc->Items->count(); ++ga)
{
if (Doc->Items->at(ga)->Groups.count() != 0)
{
8891,11 → 8898,13
currItem->setXYPos(OldX, OldY);
}
}
currItem = Doc->currentPage()->FromMaster.prev();
currNr--;
currItem = Doc->currentPage()->FromMaster.at(currNr);
}
}
if ((m->state() == (Qt::ControlButton | Qt::ShiftButton)) && (Doc->m_Selection->count() != 0))
{
int currNr = Doc->Items->count();
for (a = 0; a < Doc->Items->count(); ++a)
{
if (currItem->isSelected())
8905,14 → 8914,17
currItem = Doc->Items->last();
break;
}
currItem = Doc->Items->prev();
currNr--;
currItem = Doc->Items->at(currNr);
break;
}
currItem = Doc->Items->prev();
currNr--;
currItem = Doc->Items->at(currNr);
}
}
Doc->m_Selection->setIsGUISelection(false);
//Where all basic selection occurs having found the click location and the current page
int currNr = Doc->Items->count();
for (a = 0; a < Doc->Items->count(); ++a)
{
if (currItem == NULL)
8925,7 → 8937,8
}
if ((Doc->masterPageMode()) && (!((currItem->OwnPage == -1) || (currItem->OwnPage == static_cast<int>(Doc->currentPage()->pageNr())))))
{
currItem = Doc->Items->prev();
currNr--;
currItem = Doc->Items->at(currNr);
continue;
}
if ((currItem->LayerNr == Doc->activeLayer()) && (!Doc->layerLocked(currItem->LayerNr)))
8953,7 → 8966,7
//CB This is where we add the items of an unselected group
if (m->state() != (Qt::ControlButton | Qt::AltButton))
{
for (uint ga=0; ga<Doc->Items->count(); ++ga)
for (int ga=0; ga<Doc->Items->count(); ++ga)
{
if (Doc->Items->at(ga)->Groups.count() != 0)
{
9036,7 → 9049,8
return true;
}
}
currItem = Doc->Items->prev();
currNr--;
currItem = Doc->Items->at(currNr);
}
if ((Doc->guidesSettings.guidesShown) && (Doc->appMode == modeNormal) && (!Doc->GuideLock) && (Doc->OnPage(MxpS, MypS) != -1) && (Doc->m_Selection->count() == 0))
{
9381,10 → 9395,10
{
currItem = Doc->m_Selection->itemAt(c);
ObjOrder.insert(currItem->ItemNr, c);
d = Doc->Items->findRef(currItem);
Doc->Items->take(d);
d = Doc->Items->indexOf(currItem);
Doc->Items->takeAt(d);
}
d = Doc->Items->findRef(b2);
d = Doc->Items->indexOf(b2);
QList<uint> Oindex = ObjOrder.values();
for (int c = static_cast<int>(Oindex.count()-1); c > -1; c--)
{
9423,7 → 9437,7
low = qMin(currItem->ItemNr, low);
high = qMax(currItem->ItemNr, high);
}
if (high == Doc->Items->count()-1)
if (high == static_cast<uint>(Doc->Items->count()-1))
return;
bool wasGUISelection=Doc->m_Selection->isGUISelection();
if (wasGUISelection)
9439,13 → 9453,13
{
currItem = Doc->m_Selection->itemAt(c);
ObjOrder.insert(currItem->ItemNr, c);
d = Doc->Items->findRef(currItem);
Doc->Items->take(d);
d = Doc->Items->indexOf(currItem);
Doc->Items->takeAt(d);
}
QList<uint> Oindex = ObjOrder.values();
for (int c = 0; c <static_cast<int>(Oindex.count()); ++c)
{
d = Doc->Items->findRef(b2);
d = Doc->Items->indexOf(b2);
if (d==-1)
d=0;
Doc->Items->insert(d, Doc->m_Selection->itemAt(Oindex[c]));
9466,7 → 9480,7
//CB Remove emit/start pasting objects
void ScribusView::PasteToPage()
{
uint ac = Doc->Items->count();
int ac = Doc->Items->count();
if (UndoManager::undoEnabled())
undoManager->beginTransaction(Doc->currentPage()->getUName(), 0, Um::Paste, "", Um::IPaste);
if (m_ScMW->Buffer2.contains("<SCRIBUSFRAGMENT"))
9488,7 → 9502,7
Doc->DragElements.clear();
updateContents();
Selection newObjects(this, false);
for (uint as = ac; as < Doc->Items->count(); ++as)
for (int as = ac; as < Doc->Items->count(); ++as)
{
PageItem* currItem = Doc->Items->at(as);
if (currItem->isBookmark)
9575,12 → 9589,12
loadText(data, &f);
data = f;
}
uint ac = Doc->Items->count();
int ac = Doc->Items->count();
emit LoadElem(data, Mxp / Scale, Myp / Scale, false, false, Doc, this);
Doc->DraggedElem = 0;
Doc->DragElements.clear();
updateContents();
for (uint as = ac; as < Doc->Items->count(); ++as)
for (int as = ac; as < Doc->Items->count(); ++as)
{
PageItem* currItem = Doc->Items->at(as);
if (currItem->isBookmark)
11033,7 → 11047,7
break;
}
}
Q3PtrList<PageItem> delItems,newGroupedItems;
QList<PageItem*> delItems,newGroupedItems;
newGroupedItems.clear();
uint selectedItemCount = tmpSelection.count();
if (selectedItemCount != 0)
11164,7 → 11178,7
bb->ContourLine = bb->PoLine.copy();
bb->ClipEdited = true;
Doc->setRedrawBounding(bb);
newGroupedItems.append(Doc->Items->take(z));
newGroupedItems.append(Doc->Items->takeAt(z));
// CurX += hl->glyph.wide();
}
}
11278,7 → 11292,7
bb->ClipEdited = true;
bb->FrameType = 3;
Doc->setRedrawBounding(bb);
newGroupedItems.append(Doc->Items->take(z));
newGroupedItems.append(Doc->Items->takeAt(z));
}
chma = QMatrix();
chma.scale(hl->glyph.scaleH * charStyle.fontSize() / 100.00, hl->glyph.scaleV * charStyle.fontSize() / 100.0);
11341,7 → 11355,7
bb->ContourLine = bb->PoLine.copy();
bb->ClipEdited = true;
Doc->setRedrawBounding(bb);
newGroupedItems.append(Doc->Items->take(z));
newGroupedItems.append(Doc->Items->takeAt(z));
if (charStyle.effects() & ScStyle_Strikethrough)
{
double st, lw;
11399,7 → 11413,7
bb->ClipEdited = true;
bb->FrameType = 3;
Doc->setRedrawBounding(bb);
newGroupedItems.append(Doc->Items->take(z));
newGroupedItems.append(Doc->Items->takeAt(z));
}
CurX += hl->glyph.wide();
}
11415,7 → 11429,7
bb->setRotation(currItem->rotation());
// bb->setPolyClip(qRound(qMax(bb->lineWidth() / 2, 1)));
Doc->AdjustItemSize(bb);
newGroupedItems.append(Doc->Items->take(z));
newGroupedItems.append(Doc->Items->takeAt(z));
}
delItems.append(tmpSelection.takeItem(offset));
}
11422,7 → 11436,7
tmpSelection.clear();
if (newGroupedItems.count() > 1)
{
for (uint ag = 0; ag < newGroupedItems.count(); ++ag)
for (int ag = 0; ag < newGroupedItems.count(); ++ag)
{
Doc->Items->insert(currItem->ItemNr+1, newGroupedItems.at(ag));
tmpSelection.addItem(newGroupedItems.at(ag));
11435,12 → 11449,12
Doc->Items->insert(currItem->ItemNr+1, newGroupedItems.at(0));
Doc->renumberItemsInListOrder();
}
uint toDeleteItemCount=delItems.count();
int toDeleteItemCount=delItems.count();
if (toDeleteItemCount != 0)
{
tmpSelection.clear();
for(uint i=0; i<toDeleteItemCount; ++i)
tmpSelection.addItem(delItems.take(0)); //yes, 0, remove the first
for(int i=0; i<toDeleteItemCount; ++i)
tmpSelection.addItem(delItems.takeAt(0)); //yes, 0, remove the first
Doc->itemSelection_DeleteItem(&tmpSelection);
}
Doc->m_Selection->copy(tmpSelection, false, true);
/trunk/Scribus/scribus/pageitem_textframe.cpp
128,7 → 128,7
return result;
Mp = m_Doc->MasterPages.at(m_Doc->MasterNames[OnMasterPage]);
Dp = m_Doc->Pages->at(savedOwnPage);
for (uint a = 0; a < m_Doc->MasterItems.count(); ++a)
for (int a = 0; a < m_Doc->MasterItems.count(); ++a)
{
docItem = m_Doc->MasterItems.at(a);
LayerLevItem = m_Doc->layerLevelFromNumber(docItem->LayerNr);
/trunk/Scribus/scribus/scribus.cpp
1268,7 → 1268,7
if (doc->SubMode != -1)
{
view->Deselect(false);
doc->Items->remove(currItem->ItemNr);
doc->Items->removeAt(currItem->ItemNr);
}
else
view->Deselect(false);
1288,7 → 1288,7
if (currItem->PoLine.size() < 4)
{
view->Deselect(false);
doc->Items->remove(currItem->ItemNr);
doc->Items->removeAt(currItem->ItemNr);
}
else
{
1304,7 → 1304,7
break;
default:
view->Deselect(false);
doc->Items->remove(currItem->ItemNr);
doc->Items->removeAt(currItem->ItemNr);
break;
}
}
3329,7 → 3329,7
slotElemRead(data, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), false, true, doc, view);
doc->useRaster = savedAlignGrid;
doc->SnapGuides = savedAlignGuides;
for (uint as = ac; as < doc->Items->count(); ++as)
for (int as = ac; as < doc->Items->count(); ++as)
{
PageItem* currItem = doc->Items->at(as);
if (currItem->isBookmark)
3834,7 → 3834,7
doc->setMasterPageMode(true);
doc->reformPages();
doc->setLoading(false);
for (uint azz=0; azz<doc->MasterItems.count(); ++azz)
for (int azz=0; azz<doc->MasterItems.count(); ++azz)
{
PageItem *ite = doc->MasterItems.at(azz);
// TODO fix that for Groups on Masterpages
3845,8 → 3845,8
}
// RestoreBookMarks();
doc->setMasterPageMode(false);
uint docItemsCount=doc->Items->count();
for (uint azz=0; azz<docItemsCount; ++azz)
int docItemsCount=doc->Items->count();
for (int azz=0; azz<docItemsCount; ++azz)
{
PageItem *ite = doc->Items->at(azz);
//CB dont need this as we get it from the loading page in 1.2.x docs. 1.3.x items have this anyway.
3871,7 → 3871,7
bookmarkPalette->BView->ChangeItem(ite->BMnr, ite->ItemNr);
} */
}
for (uint azz=0; azz<doc->FrameItems.count(); ++azz)
for (int azz=0; azz<doc->FrameItems.count(); ++azz)
{
PageItem *ite = doc->FrameItems.at(azz);
// qDebug(QString("load F: %1 %2 %3").arg(azz).arg((uint)ite).arg(ite->itemType()));
3998,7 → 3998,7
delete gt;
if (doc->docHyphenator->AutoCheck)
doc->docHyphenator->slotHyphenate(currItem);
for (uint a = 0; a < doc->Items->count(); ++a)
for (int a = 0; a < doc->Items->count(); ++a)
{
if (doc->Items->at(a)->isBookmark)
bookmarkPalette->BView->ChangeText(doc->Items->at(a));
4022,7 → 4022,7
ScGTPluginManager::instance()->run();
if (doc->docHyphenator->AutoCheck)
doc->docHyphenator->slotHyphenate(currItem);
for (uint a = 0; a < doc->Items->count(); ++a)
for (int a = 0; a < doc->Items->count(); ++a)
{
if (doc->Items->at(a)->isBookmark)
bookmarkPalette->BView->ChangeText(doc->Items->at(a));
4219,19 → 4219,19
disconnect(doc->WinHan, SIGNAL(AutoSaved()), this, SLOT(slotAutoSaved()));
disconnect(ScCore->fileWatcher, SIGNAL(fileChanged(QString )), doc, SLOT(updatePict(QString)));
disconnect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString )), doc, SLOT(removePict(QString)));
for (uint a = 0; a < doc->DocItems.count(); ++a)
for (int a = 0; a < doc->DocItems.count(); ++a)
{
PageItem *currItem = doc->DocItems.at(a);
if (currItem->PicAvail)
ScCore->fileWatcher->removeFile(currItem->Pfile);
}
for (uint a = 0; a < doc->MasterItems.count(); ++a)
for (int a = 0; a < doc->MasterItems.count(); ++a)
{
PageItem *currItem = doc->MasterItems.at(a);
if (currItem->PicAvail)
ScCore->fileWatcher->removeFile(currItem->Pfile);
}
for (uint a = 0; a < doc->FrameItems.count(); ++a)
for (int a = 0; a < doc->FrameItems.count(); ++a)
{
PageItem *currItem = doc->FrameItems.at(a);
if (currItem->PicAvail)
4241,7 → 4241,7
for (int c = 0; c < patterns.count(); ++c)
{
ScPattern pa = doc->docPatterns[patterns[c]];
for (uint o = 0; o < pa.items.count(); o++)
for (int o = 0; o < pa.items.count(); o++)
{
PageItem *currItem = pa.items.at(o);
if (currItem->PicAvail)
4985,7 → 4985,7
{
bool savedAlignGrid = doc->useRaster;
bool savedAlignGuides = doc->SnapGuides;
uint ac = doc->Items->count();
int ac = doc->Items->count();
bool isGroup = false;
double gx, gy, gh, gw;
FPoint minSize = doc->minCanvasCoordinate;
5009,7 → 5009,7
doc->m_Selection->clear();
if (doc->Items->count() - ac > 1)
isGroup = true;
for (uint as = ac; as < doc->Items->count(); ++as)
for (int as = ac; as < doc->Items->count(); ++as)
{
doc->m_Selection->addItem(doc->Items->at(as));
if (isGroup)
5020,7 → 5020,7
doc->m_Selection->setGroupRect();
doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
PageItem* currItem3 = doc->Items->at(ac);
for (uint as = ac; as < doc->Items->count(); ++as)
for (int as = ac; as < doc->Items->count(); ++as)
{
PageItem* currItem2 = doc->Items->at(as);
currItem2->isEmbedded = true;
5033,10 → 5033,10
currItem2->ItemNr = doc->FrameItems.count();
doc->FrameItems.append(currItem2);
}
uint acc = doc->Items->count();
for (uint as = ac; as < acc; ++as)
int acc = doc->Items->count();
for (int as = ac; as < acc; ++as)
{
doc->Items->take(ac);
doc->Items->takeAt(ac);
}
doc->m_Selection->clear();
//doc->m_Selection->restoreFromTempList(0, tempList);
5099,7 → 5099,7
doc->useRaster = savedAlignGrid;
doc->SnapGuides = savedAlignGuides;
for (uint as = ac; as < doc->Items->count(); ++as)
for (int as = ac; as < doc->Items->count(); ++as)
{
PageItem* currItem = doc->Items->at(as);
if (currItem->isBookmark)
5610,7 → 5610,7
if (doc)
{
doc->guidesSettings.showPic = !doc->guidesSettings.showPic;
for (uint b=0; b<doc->Items->count(); ++b)
for (int b=0; b<doc->Items->count(); ++b)
{
if (doc->Items->at(b)->asImageFrame())
doc->Items->at(b)->setImageShown(doc->guidesSettings.showPic);
6349,7 → 6349,7
/* if (!doc->masterPageMode)
disconnect(doc->currentPage, SIGNAL(DelObj(uint, uint)), outlinePalette, SLOT(slotRemoveElement(uint, uint))); */
doc->m_Selection->clear();
for (uint d = 0; d < doc->Items->count(); ++d)
for (int d = 0; d < doc->Items->count(); ++d)
{
ite = doc->Items->at(d);
if (ite->OwnPage == pg)
6431,7 → 6431,7
Selection tmpSelection(this, false);
for (int a = to - 1; a >= from - 1; a--)
{
for (uint d = 0; d < doc->Items->count(); ++d)
for (int d = 0; d < doc->Items->count(); ++d)
{
ite = doc->Items->at(d);
if (ite->OwnPage == a)
7432,7 → 7432,7
 
void ScribusMainWindow::selectItemsFromOutlines(PageItem* ite)
{
int d = doc->Items->findRef(ite);
int d = doc->Items->indexOf(ite);
selectItemsFromOutlines(ite->OwnPage, d, true);
}
 
8381,7 → 8381,7
PageItem *high = doc->Items->at(highestItem);
undoManager->setUndoEnabled(false);
int z = doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, doc->toolSettings.dBrush, doc->toolSettings.dPen, true);
PageItem *neu = doc->Items->take(z);
PageItem *neu = doc->Items->takeAt(z);
doc->Items->insert(lowestItem, neu);
neu->setItemName( tr("Group%1").arg(doc->GroupCounter));
neu->AutoName = false;
8394,8 → 8394,8
{
currItem = itemSelection->itemAt(c);
ObjOrder.insert(currItem->ItemNr, c);
int d = doc->Items->findRef(currItem);
doc->Items->take(d);
int d = doc->Items->indexOf(currItem);
doc->Items->takeAt(d);
}
QList<uint> Oindex = ObjOrder.values();
for (int c = static_cast<int>(Oindex.count()-1); c > -1; c--)
8447,7 → 8447,7
if (doc->Items->at(lowestItem)->isGroupControl)
{
itemSelection->removeItem(doc->Items->at(lowestItem));
doc->Items->remove(lowestItem);
doc->Items->removeAt(lowestItem);
doc->renumberItemsInListOrder();
}
docSelectionCount = itemSelection->count();
9591,7 → 9591,7
patternName = patternName.stripWhiteSpace().simplifyWhiteSpace().replace(" ", "_");
ScriXmlDoc *ss = new ScriXmlDoc();
QString objectString = ss->WriteElem(doc, view, doc->m_Selection);
uint ac = doc->Items->count();
int ac = doc->Items->count();
uint oldNum = doc->TotalItems;
bool savedAlignGrid = doc->useRaster;
bool savedAlignGuides = doc->SnapGuides;
9600,7 → 9600,7
slotElemRead(objectString, doc->currentPage()->xOffset(), doc->currentPage()->yOffset(), false, true, doc, view);
doc->useRaster = savedAlignGrid;
doc->SnapGuides = savedAlignGuides;
uint ae = doc->Items->count();
int ae = doc->Items->count();
ScPattern pat = ScPattern();
pat.setDoc(doc);
PageItem* currItem = doc->Items->at(ac);
9607,9 → 9607,9
pat.pattern = currItem->DrawObj_toImage();
pat.width = currItem->gWidth;
pat.height = currItem->gHeight;
for (uint as = ac; as < ae; ++as)
for (int as = ac; as < ae; ++as)
{
pat.items.append(doc->Items->take(ac));
pat.items.append(doc->Items->takeAt(ac));
}
doc->addPattern(patternName, pat);
propertiesPalette->updateColorList();
/trunk/Scribus/scribus/documentchecker.cpp
74,7 → 74,7
if (layerError.count() != 0)
currDoc->docLayerErrors.insert(ll.LNr, layerError);
}
for (uint d = 0; d < currDoc->MasterItems.count(); ++d)
for (int d = 0; d < currDoc->MasterItems.count(); ++d)
{
currItem = currDoc->MasterItems.at(d);
if (!currItem->printEnabled())
192,7 → 192,7
if (itemError.count() != 0)
currDoc->masterItemErrors.insert(currItem->ItemNr, itemError);
}
for (uint d = 0; d < currDoc->DocItems.count(); ++d)
for (int d = 0; d < currDoc->DocItems.count(); ++d)
{
currItem = currDoc->DocItems.at(d);
if (!currItem->printEnabled())
/trunk/Scribus/scribus/mpalette.cpp
4311,7 → 4311,7
return;
}
bool found = false;
for (uint b = 0; b < doc->Items->count(); ++b)
for (int b = 0; b < doc->Items->count(); ++b)
{
if ((NameNew == doc->Items->at(b)->itemName()) && (doc->Items->at(b) != CurItem))
{
/trunk/Scribus/scribus/patterndialog.cpp
277,7 → 277,7
pat.height = currItem->gHeight;
for (uint as = ac; as < ae; ++as)
{
pat.items.append(m_doc->Items->take(ac));
pat.items.append(m_doc->Items->takeAt(ac));
}
if (!dialogPatterns.contains(patNam))
{
342,7 → 342,7
ScPattern *pat = &dialogPatterns[pattern];
QStringList pats;
pats.clear();
for (uint c = 0; c < pat->items.count(); ++c)
for (int c = 0; c < pat->items.count(); ++c)
{
if ((!results.contains(pat->items.at(c)->pattern())) && (pat->items.at(c)->GrType == 8))
pats.append(pat->items.at(c)->pattern());
/trunk/Scribus/scribus/sctextstruct.cpp
85,10 → 85,10
return d->item;
}
 
Q3PtrList<PageItem> InlineFrame::getGroupedItems()
QList<PageItem*> InlineFrame::getGroupedItems()
{
Q3PtrList<PageItem> result;
result.setAutoDelete(false);
QList<PageItem*> result;
// result.setAutoDelete(false);
if (hasItem())
{
PageItem* dItem = d->item;
104,7 → 104,7
{
if (doc.FrameItems.at(ga)->ItemNr != dItem->ItemNr)
{
if (result.find(doc.FrameItems.at(ga)) == -1)
if (!result.contains(doc.FrameItems.at(ga)))
result.append(doc.FrameItems.at(ga));
}
}
/trunk/Scribus/scribus/page.h
87,7 → 87,7
implementation, but in this case it at least lets us guarantee the rest
of the object is unchanged in (eg) pdflib. This should be replaced with
proper access methods later. */
mutable Q3PtrList<PageItem> FromMaster;
mutable QList<PageItem*> FromMaster;
//! \brief Guides lists and basic operations
GuideManagerCore guides;
 
/trunk/Scribus/scribus/scpattern.h
26,7 → 26,7
 
class QString;
class ScribusDoc;
#include <q3ptrlist.h>
#include <QList>
#include <qimage.h>
#include "scribusapi.h"
#include "pageitem.h"
43,7 → 43,7
double scaleY;
double height;
double width;
Q3PtrList<PageItem> items;
QList<PageItem*> items;
ScribusDoc *m_doc;
QImage pattern;
};
/trunk/Scribus/scribus/annot.cpp
25,6 → 25,7
#include <Q3VBoxLayout>
#include <Q3Frame>
#include <QTextEdit>
#include <QList>
#include "colorlistbox.h"
#include "prefsmanager.h"
#include "prefsfile.h"
1119,7 → 1120,7
return;
}
bool found = false;
for (uint b = 0; b < view->Doc->Items->count(); ++b)
for (int b = 0; b < view->Doc->Items->count(); ++b)
{
if ((NameNew == view->Doc->Items->at(b)->itemName()) && (view->Doc->Items->at(b) != item))
{
/trunk/Scribus/scribus/collect4output.cpp
176,7 → 176,7
for (int c = 0; c < patterns.count(); ++c)
{
ScPattern pa = m_Doc->docPatterns[patterns[c]];
for (uint o = 0; o < pa.items.count(); o++)
for (int o = 0; o < pa.items.count(); o++)
{
processItem(pa.items.at(o));
}
/trunk/Scribus/scribus/scribusdoc.cpp
437,16 → 437,24
{
m_guardedObject.nullify();
CloseCMSProfiles();
DocItems.setAutoDelete(true);
// DocItems.setAutoDelete(true);
// FrameItems.setAutoDelete(true);
DocItems.clear();
// DocItems.clear();
while (!DocItems.isEmpty())
{
delete DocItems.takeFirst();
}
FrameItems.clear();
MasterPages.setAutoDelete(true);
DocPages.setAutoDelete(true);
MasterPages.clear();
DocPages.clear();
MasterItems.setAutoDelete(true);
MasterItems.clear();
// MasterItems.setAutoDelete(true);
// MasterItems.clear();
while (!MasterItems.isEmpty())
{
delete MasterItems.takeFirst();
}
QMap<QString,int>::Iterator it3;
for (it3 = UsedFonts.begin(); it3 != UsedFonts.end(); ++it3)
{
791,12 → 799,12
lists.availableFonts = AllFonts;
lists.availableColors = const_cast<ColorList*>(& PageColors);
 
const Q3PtrList<PageItem> * itemlist = & MasterItems;
const QList<PageItem*> * itemlist = & MasterItems;
while (itemlist != NULL)
{
for (uint i=0; i < itemlist->count(); ++i)
for (int i=0; i < itemlist->count(); ++i)
{
const PageItem * currItem = const_cast<Q3PtrList<PageItem>*>(itemlist)->at(i);
const PageItem * currItem = const_cast<QList<PageItem*>*>(itemlist)->at(i);
if (currItem)
currItem->getNamedResources(lists);
}
818,7 → 826,7
for (it = docPatterns.begin(); it != docPatterns.end(); ++it)
{
ScPattern pa = *it;
for (uint o = 0; o < pa.items.count(); o++)
for (int o = 0; o < pa.items.count(); o++)
{
pa.items.at(o)->getNamedResources(lists);
}
837,10 → 845,10
void ScribusDoc::replaceNamedResources(ResourceCollection& newNames)
{
// replace names in items
Q3PtrList<PageItem> * itemlist = & MasterItems;
QList<PageItem*> * itemlist = & MasterItems;
while (itemlist != NULL)
{
for (uint i=0; i < itemlist->count(); ++i)
for (int i=0; i < itemlist->count(); ++i)
{
PageItem * currItem = itemlist->at(i);
if (currItem)
878,7 → 886,7
else
{
ScPattern pa = *it;
for (uint o = 0; o < pa.items.count(); o++)
for (int o = 0; o < pa.items.count(); o++)
{
pa.items.at(o)->replaceNamedResources(newNames);
}
1632,7 → 1640,7
{
int GrMax = GroupCounter;
QMap<int,int> TableID;
Q3PtrList<PageItem> TableItems;
QList<PageItem*> TableItems;
TableID.clear();
TableItems.clear();
uint oldItems = Items->count();
1700,7 → 1708,7
RePos = false;
if (TableItems.count() != 0)
{
for (uint ttc = 0; ttc < TableItems.count(); ++ttc)
for (int ttc = 0; ttc < TableItems.count(); ++ttc)
{
PageItem* ta = TableItems.at(ttc);
if (ta->TopLinkID != -1)
2341,7 → 2349,7
{
QString tooltip = Um::ItemsInvolved + "\n";
//Master Items
for (uint b = 0; b < MasterItems.count(); ++b)
for (int b = 0; b < MasterItems.count(); ++b)
{
if (MasterItems.at(b)->isTagged())
{
2348,7 → 2356,7
}
}
//Doc Items
for (uint b = 0; b < DocItems.count(); ++b)
for (int b = 0; b < DocItems.count(); ++b)
{
if (DocItems.at(b)->isTagged())
{
2461,7 → 2469,7
// {
// docPatterns.insert(it.key(), it.data());
// }
for (uint c=0; c<DocItems.count(); ++c)
for (int c=0; c<DocItems.count(); ++c)
{
PageItem *ite = DocItems.at(c);
if ((!docPatterns.contains(ite->pattern())) && (ite->GrType == 8))
2470,7 → 2478,7
ite->GrType = 0;
}
}
for (uint c=0; c<MasterItems.count(); ++c)
for (int c=0; c<MasterItems.count(); ++c)
{
PageItem *ite = MasterItems.at(c);
if ((!docPatterns.contains(ite->pattern())) && (ite->GrType == 8))
2479,7 → 2487,7
ite->GrType = 0;
}
}
for (uint c=0; c<FrameItems.count(); ++c)
for (int c=0; c<FrameItems.count(); ++c)
{
PageItem *ite = FrameItems.at(c);
if ((!docPatterns.contains(ite->pattern())) && (ite->GrType == 8))
2493,17 → 2501,17
QStringList ScribusDoc::getUsedPatterns()
{
QStringList results;
for (uint c = 0; c < MasterItems.count(); ++c)
for (int c = 0; c < MasterItems.count(); ++c)
{
if ((!results.contains(MasterItems.at(c)->pattern())) && (MasterItems.at(c)->GrType == 8))
results.append(MasterItems.at(c)->pattern());
}
for (uint c = 0; c < DocItems.count(); ++c)
for (int c = 0; c < DocItems.count(); ++c)
{
if ((!results.contains(DocItems.at(c)->pattern())) && (DocItems.at(c)->GrType == 8))
results.append(DocItems.at(c)->pattern());
}
for (uint c = 0; c < FrameItems.count(); ++c)
for (int c = 0; c < FrameItems.count(); ++c)
{
if ((!results.contains(FrameItems.at(c)->pattern())) && (FrameItems.at(c)->GrType == 8))
results.append(FrameItems.at(c)->pattern());
2550,7 → 2558,7
ScPattern *pat = &docPatterns[pattern];
QStringList pats;
pats.clear();
for (uint c = 0; c < pat->items.count(); ++c)
for (int c = 0; c < pat->items.count(); ++c)
{
if (pat->items.at(c)->GrType == 8)
{
2608,7 → 2616,7
for (int c = 0; c < patterns.count(); ++c)
{
ScPattern pa = docPatterns[patterns[c]];
for (uint o = 0; o < pa.items.count(); o++)
for (int o = 0; o < pa.items.count(); o++)
{
checkItemForFonts(pa.items.at(o), Really, 3);
}
2891,17 → 2899,18
const int MpNr = MasterNames[pageName];
Page* Mp = MasterPages.at(MpNr);
PageItem *currItem;
for (currItem = Ap->FromMaster.first(); currItem; currItem = Ap->FromMaster.next())
{
if (currItem->ChangedMasterItem)
{
Ap->FromMaster.remove(currItem);
delete currItem;
}
}
// for (currItem = Ap->FromMaster.first(); currItem; currItem = Ap->FromMaster.next())
// {
// if (currItem->ChangedMasterItem)
// {
// Ap->FromMaster.remove(currItem);
// delete currItem;
// }
// }
Ap->FromMaster.clear();
for (currItem = MasterItems.first(); currItem; currItem = MasterItems.next())
for (int itn = 0; itn < MasterItems.count(); ++itn)
{
currItem = MasterItems.at(itn);
if (currItem->OwnPage == MpNr)
Ap->FromMaster.append(currItem);
}
3086,7 → 3095,7
for (int c = 0; c < patterns.count(); ++c)
{
ScPattern pa = docPatterns[patterns[c]];
for (uint o = 0; o < pa.items.count(); o++)
for (int o = 0; o < pa.items.count(); o++)
{
PageItem *ite = pa.items.at(o);
Q3PtrVector<VColorStop> cstops = ite->fill_gradient.colorStops();
3495,7 → 3504,7
uint ScribusDoc::getItemNrfromUniqueID(uint unique)
{
uint ret = 0;
for (uint a = 0; a < Items->count(); ++a)
for (int a = 0; a < Items->count(); ++a)
{
if (Items->at(a)->uniqueNr == unique)
{
3515,8 → 3524,8
 
void ScribusDoc::renumberItemsInListOrder( )
{
uint itemsCount=Items->count();
for (uint i = 0; i < itemsCount; ++i)
int itemsCount=Items->count();
for (int i = 0; i < itemsCount; ++i)
Items->at(i)->ItemNr = i;
}
 
3697,7 → 3706,7
 
void ScribusDoc::GroupOnPage(PageItem* currItem)
{
Q3PtrList<PageItem> Objects;
QList<PageItem*> Objects;
PageItem* item;
if (currItem->Groups.count() == 0)
return;
4106,7 → 4115,7
if (oldItem->Groups.count() != 0)
{
PageItem *currItem;
for (uint a = 0; a < Items->count(); ++a)
for (int a = 0; a < Items->count(); ++a)
{
currItem = Items->at(a);
if (currItem->isGroupControl)
4584,19 → 4593,19
 
void ScribusDoc::updateAllItemQColors()
{
for (uint c=0; c<DocItems.count(); ++c)
for (int c=0; c<DocItems.count(); ++c)
{
PageItem *ite = DocItems.at(c);
ite->setLineQColor();
ite->setFillQColor();
}
for (uint c=0; c<MasterItems.count(); ++c)
for (int c=0; c<MasterItems.count(); ++c)
{
PageItem *ite = MasterItems.at(c);
ite->setLineQColor();
ite->setFillQColor();
}
for (uint c=0; c<FrameItems.count(); ++c)
for (int c=0; c<FrameItems.count(); ++c)
{
PageItem *ite = FrameItems.at(c);
ite->setLineQColor();
4606,7 → 4615,7
for (int c = 0; c < patterns.count(); ++c)
{
ScPattern pa = docPatterns[patterns[c]];
for (uint o = 0; o < pa.items.count(); o++)
for (int o = 0; o < pa.items.count(); o++)
{
PageItem *ite = pa.items.at(o);
ite->setLineQColor();
4676,8 → 4685,8
if (((currItem->isSingleSel) && (currItem->isGroupControl)) || ((currItem->isSingleSel) && (currItem->isTableItem)))
return false;
ObjOrder.insert(currItem->ItemNr, c);
int d = Items->findRef(currItem);
Items->take(d);
int d = Items->indexOf(currItem);
Items->takeAt(d);
}
QList<uint> Oindex = ObjOrder.values();
for (int c = static_cast<int>(Oindex.count()-1); c > -1; c--)
4703,8 → 4712,8
if (((currItem->isSingleSel) && (currItem->isGroupControl)) || ((currItem->isSingleSel) && (currItem->isTableItem)))
return false;
ObjOrder.insert(currItem->ItemNr, c);
int d = Items->findRef(currItem);
Items->take(d);
int d = Items->indexOf(currItem);
Items->takeAt(d);
}
QList<uint> Oindex = ObjOrder.values();
for (int c = 0; c <static_cast<int>(Oindex.count()); ++c)
5765,7 → 5774,7
//CB Same as RecalcPicturesRes apart from the name checking, which should be able to be removed
void ScribusDoc::updatePict(QString name)
{
for (uint a = 0; a < DocItems.count(); ++a)
for (int a = 0; a < DocItems.count(); ++a)
{
PageItem *currItem = DocItems.at(a);
if ((currItem->PicAvail) && (currItem->Pfile == name))
5778,7 → 5787,7
currItem->AdjustPictScale();
}
}
for (uint a = 0; a < MasterItems.count(); ++a)
for (int a = 0; a < MasterItems.count(); ++a)
{
PageItem *currItem = MasterItems.at(a);
if ((currItem->PicAvail) && (currItem->Pfile == name))
5791,7 → 5800,7
currItem->AdjustPictScale();
}
}
for (uint a = 0; a <FrameItems.count(); ++a)
for (int a = 0; a <FrameItems.count(); ++a)
{
PageItem *currItem = FrameItems.at(a);
if ((currItem->PicAvail) && (currItem->Pfile == name))
5808,7 → 5817,7
for (int c = 0; c < patterns.count(); ++c)
{
ScPattern pa = docPatterns[patterns[c]];
for (uint o = 0; o < pa.items.count(); o++)
for (int o = 0; o < pa.items.count(); o++)
{
PageItem *currItem = pa.items.at(o);
if ((currItem->PicAvail) && (currItem->Pfile == name))
5834,19 → 5843,19
int cc = 0;
int ca = 0;
m_ScMW->mainWindowProgressBar->reset();
for (uint a = 0; a < DocItems.count(); ++a)
for (int a = 0; a < DocItems.count(); ++a)
{
PageItem *currItem = DocItems.at(a);
if (currItem->PicAvail)
cc++;
}
for (uint a = 0; a < MasterItems.count(); ++a)
for (int a = 0; a < MasterItems.count(); ++a)
{
PageItem *currItem = MasterItems.at(a);
if (currItem->PicAvail)
cc++;
}
for (uint a = 0; a < FrameItems.count(); ++a)
for (int a = 0; a < FrameItems.count(); ++a)
{
PageItem *currItem = FrameItems.at(a);
if (currItem->PicAvail)
5856,7 → 5865,7
for (int c = 0; c < patterns.count(); ++c)
{
ScPattern pa = docPatterns[patterns[c]];
for (uint o = 0; o < pa.items.count(); o++)
for (int o = 0; o < pa.items.count(); o++)
{
PageItem *currItem = pa.items.at(o);
if (currItem->PicAvail)
5864,7 → 5873,7
}
}
m_ScMW->mainWindowProgressBar->setTotalSteps(cc);
for (uint a = 0; a < DocItems.count(); ++a)
for (int a = 0; a < DocItems.count(); ++a)
{
PageItem *currItem = DocItems.at(a);
if (currItem->PicAvail)
5882,7 → 5891,7
qApp->processEvents(QEventLoop::ExcludeUserInput);
}
}
for (uint a = 0; a < MasterItems.count(); ++a)
for (int a = 0; a < MasterItems.count(); ++a)
{
PageItem *currItem = MasterItems.at(a);
if (currItem->PicAvail)
5900,7 → 5909,7
qApp->processEvents(QEventLoop::ExcludeUserInput);
}
}
for (uint a = 0; a < FrameItems.count(); ++a)
for (int a = 0; a < FrameItems.count(); ++a)
{
PageItem *currItem = FrameItems.at(a);
if (currItem->PicAvail)
5921,7 → 5930,7
for (int c = 0; c < patterns.count(); ++c)
{
ScPattern pa = docPatterns[patterns[c]];
for (uint o = 0; o < pa.items.count(); o++)
for (int o = 0; o < pa.items.count(); o++)
{
PageItem *currItem = pa.items.at(o);
if (currItem->PicAvail)
5949,7 → 5958,7
 
void ScribusDoc::removePict(QString name)
{
for (uint a = 0; a < DocItems.count(); ++a)
for (int a = 0; a < DocItems.count(); ++a)
{
PageItem *currItem = DocItems.at(a);
if ((currItem->PicAvail) && (currItem->Pfile == name))
5958,7 → 5967,7
currItem->pixm = ScImage();
}
}
for (uint a = 0; a < MasterItems.count(); ++a)
for (int a = 0; a < MasterItems.count(); ++a)
{
PageItem *currItem = MasterItems.at(a);
if ((currItem->PicAvail) && (currItem->Pfile == name))
5967,7 → 5976,7
currItem->pixm = ScImage();
}
}
for (uint a = 0; a < FrameItems.count(); ++a)
for (int a = 0; a < FrameItems.count(); ++a)
{
PageItem *currItem = FrameItems.at(a);
if ((currItem->PicAvail) && (currItem->Pfile == name))
5980,7 → 5989,7
for (int c = 0; c < patterns.count(); ++c)
{
ScPattern pa = docPatterns[patterns[c]];
for (uint o = 0; o < pa.items.count(); o++)
for (int o = 0; o < pa.items.count(); o++)
{
PageItem *currItem = pa.items.at(o);
if ((currItem->PicAvail) && (currItem->Pfile == name))
6029,7 → 6038,7
void ScribusDoc::removeLayer(int l, bool dl)
{
m_View->Deselect();
for (uint b = 0; b < MasterItems.count(); ++b)
for (int b = 0; b < MasterItems.count(); ++b)
{
if (MasterItems.at(b)->LayerNr == l)
{
6045,7 → 6054,7
if (m_Selection->count() != 0)
itemSelection_DeleteItem();
m_Selection->clear();
for (uint b = 0; b < DocItems.count(); ++b)
for (int b = 0; b < DocItems.count(); ++b)
{
if (DocItems.at(b)->LayerNr == l)
{
6365,7 → 6374,7
uint selectedItemCount=itemSelection->count();
if (selectedItemCount == 0)
return;
Q3PtrList<PageItem> delItems;
QList<PageItem*> delItems;
PageItem *currItem;
uint offs = 0;
QString tooltip = Um::ItemsInvolved + "\n";
6808,7 → 6817,7
bool oneLocked=false;
for (uint i = 0; i < alignObjectsCount && !oneLocked; ++i)
for (uint j = 0; j < AObjects[i].Objects.count() && !oneLocked; ++j)
for (int j = 0; j < AObjects[i].Objects.count() && !oneLocked; ++j)
if (AObjects[i].Objects.at(j)->locked())
oneLocked=true;
int t = 2;
6842,7 → 6851,7
if (oneLocked && (t == 0))
{
for (uint i = 0; i < alignObjectsCount; ++i)
for (uint j = 0; j < AObjects[i].Objects.count(); ++j)
for (int j = 0; j < AObjects[i].Objects.count(); ++j)
if (AObjects[i].Objects.at(j)->locked())
AObjects[i].Objects.at(j)->setLocked(false);
}
6895,7 → 6904,7
for (int i = loopStart; i <= loopEnd; ++i)
{
double diff=newX-AObjects[i].x2;
for (uint j = 0; j < AObjects[i].Objects.count(); ++j)
for (int j = 0; j < AObjects[i].Objects.count(); ++j)
if (!AObjects[i].Objects.at(j)->locked())
AObjects[i].Objects.at(j)->moveBy(diff, 0.0);
}
6937,7 → 6946,7
for (int i = loopStart; i <= loopEnd; ++i)
{
double diff=newX-AObjects[i].x1;
for (uint j = 0; j < AObjects[i].Objects.count(); ++j)
for (int j = 0; j < AObjects[i].Objects.count(); ++j)
if (!AObjects[i].Objects.at(j)->locked())
AObjects[i].Objects.at(j)->moveBy(diff, 0.0);
}
6989,7 → 6998,7
for (int i = loopStart; i <= loopEnd; ++i)
{
double diff=newX-AObjects[i].x1-(AObjects[i].width)/2;
for (uint j = 0; j < AObjects[i].Objects.count(); ++j)
for (int j = 0; j < AObjects[i].Objects.count(); ++j)
if (!AObjects[i].Objects.at(j)->locked())
AObjects[i].Objects.at(j)->moveBy(diff, 0.0);
}
7033,7 → 7042,7
for (int i = loopStart; i <= loopEnd; ++i)
{
double diff=newX-AObjects[i].x2;
for (uint j = 0; j < AObjects[i].Objects.count(); ++j)
for (int j = 0; j < AObjects[i].Objects.count(); ++j)
if (!AObjects[i].Objects.at(j)->locked())
AObjects[i].Objects.at(j)->moveBy(diff, 0.0);
}
7077,7 → 7086,7
for (int i = loopStart; i <= loopEnd; ++i)
{
double diff=newX-AObjects[i].x1;
for (uint j = 0; j < AObjects[i].Objects.count(); ++j)
for (int j = 0; j < AObjects[i].Objects.count(); ++j)
if (!AObjects[i].Objects.at(j)->locked())
AObjects[i].Objects.at(j)->moveBy(diff, 0.0);
}
7119,7 → 7128,7
for (int i = loopStart; i <= loopEnd; ++i)
{
double diff=newY-AObjects[i].y2;
for (uint j = 0; j < AObjects[i].Objects.count(); ++j)
for (int j = 0; j < AObjects[i].Objects.count(); ++j)
if (!AObjects[i].Objects.at(j)->locked())
AObjects[i].Objects.at(j)->moveBy(0.0, diff);
}
7161,7 → 7170,7
for (int i = loopStart; i <= loopEnd; ++i)
{
double diff=newY-AObjects[i].y1;
for (uint j = 0; j < AObjects[i].Objects.count(); ++j)
for (int j = 0; j < AObjects[i].Objects.count(); ++j)
if (!AObjects[i].Objects.at(j)->locked())
AObjects[i].Objects.at(j)->moveBy(0.0, diff);
}
7214,7 → 7223,7
for (int i = loopStart; i <= loopEnd; ++i)
{
double diff=newY-AObjects[i].y1-(AObjects[i].height)/2;
for (uint j = 0; j < AObjects[i].Objects.count(); ++j)
for (int j = 0; j < AObjects[i].Objects.count(); ++j)
if (!AObjects[i].Objects.at(j)->locked())
AObjects[i].Objects.at(j)->moveBy(0.0, diff);
}
7259,7 → 7268,7
for (int i = loopStart; i <= loopEnd; ++i)
{
double diff=newY-AObjects[i].y2;
for (uint j = 0; j < AObjects[i].Objects.count(); ++j)
for (int j = 0; j < AObjects[i].Objects.count(); ++j)
if (!AObjects[i].Objects.at(j)->locked())
AObjects[i].Objects.at(j)->moveBy(0.0, diff);
}
7303,7 → 7312,7
for (int i = loopStart; i <= loopEnd; ++i)
{
double diff=newY-AObjects[i].y1;
for (uint j = 0; j < AObjects[i].Objects.count(); ++j)
for (int j = 0; j < AObjects[i].Objects.count(); ++j)
if (!AObjects[i].Objects.at(j)->locked())
AObjects[i].Objects.at(j)->moveBy(0.0, diff);
}
7340,7 → 7349,7
for ( QMap<double,uint>::Iterator it = Xsorted.begin(); it != Xsorted.end(); ++it )
{
double diff=minX + i*separation-AObjects[it.data()].x1;
for (uint j = 0; j < AObjects[it.data()].Objects.count(); ++j)
for (int j = 0; j < AObjects[it.data()].Objects.count(); ++j)
if (!AObjects[it.data()].Objects.at(j)->locked())
AObjects[it.data()].Objects.at(j)->moveBy(diff, 0.0);
i++;
7377,7 → 7386,7
for ( QMap<double,uint>::Iterator it = Xsorted.begin(); it != Xsorted.end(); ++it )
{
double diff=minX + i*separation-AObjects[it.data()].x1-(AObjects[it.data()].width)/2;
for (uint j = 0; j < AObjects[it.data()].Objects.count(); ++j)
for (int j = 0; j < AObjects[it.data()].Objects.count(); ++j)
if (!AObjects[it.data()].Objects.at(j)->locked())
AObjects[it.data()].Objects.at(j)->moveBy(diff, 0.0);
i++;
7414,7 → 7423,7
for ( QMap<double,uint>::Iterator it = Xsorted.begin(); it != Xsorted.end(); ++it )
{
double diff=minX + i*separation-AObjects[it.data()].x2;
for (uint j = 0; j < AObjects[it.data()].Objects.count(); ++j)
for (int j = 0; j < AObjects[it.data()].Objects.count(); ++j)
if (!AObjects[it.data()].Objects.at(j)->locked())
AObjects[it.data()].Objects.at(j)->moveBy(diff, 0.0);
i++;
7468,7 → 7477,7
currX+=separation;
 
double diff=currX-AObjects[it.data()].x1;
for (uint j = 0; j < AObjects[it.data()].Objects.count(); ++j)
for (int j = 0; j < AObjects[it.data()].Objects.count(); ++j)
if (!AObjects[it.data()].Objects.at(j)->locked())
AObjects[it.data()].Objects.at(j)->moveBy(diff, 0.0);
currX+=AObjects[it.data()].width;
7505,7 → 7514,7
for ( QMap<double,uint>::Iterator it = Ysorted.begin(); it != Ysorted.end(); ++it )
{
double diff=minY + i*separation-AObjects[it.data()].y2;
for (uint j = 0; j < AObjects[it.data()].Objects.count(); ++j)
for (int j = 0; j < AObjects[it.data()].Objects.count(); ++j)
if (!AObjects[it.data()].Objects.at(j)->locked())
AObjects[it.data()].Objects.at(j)->moveBy(0.0, diff);
i++;
7542,7 → 7551,7
for ( QMap<double,uint>::Iterator it = Ysorted.begin(); it != Ysorted.end(); ++it )
{
double diff=minY + i*separation-AObjects[it.data()].y1-(AObjects[it.data()].height)/2;
for (uint j = 0; j < AObjects[it.data()].Objects.count(); ++j)
for (int j = 0; j < AObjects[it.data()].Objects.count(); ++j)
if (!AObjects[it.data()].Objects.at(j)->locked())
AObjects[it.data()].Objects.at(j)->moveBy(0.0, diff);
i++;
7579,7 → 7588,7
for ( QMap<double,uint>::Iterator it = Ysorted.begin(); it != Ysorted.end(); ++it )
{
double diff=minY + i*separation-AObjects[it.data()].y1;
for (uint j = 0; j < AObjects[it.data()].Objects.count(); ++j)
for (int j = 0; j < AObjects[it.data()].Objects.count(); ++j)
if (!AObjects[it.data()].Objects.at(j)->locked())
AObjects[it.data()].Objects.at(j)->moveBy(0.0,diff);
i++;
7633,7 → 7642,7
currY+=separation;
 
double diff=currY-AObjects[it.data()].y1;
for (uint j = 0; j < AObjects[it.data()].Objects.count(); ++j)
for (int j = 0; j < AObjects[it.data()].Objects.count(); ++j)
if (!AObjects[it.data()].Objects.at(j)->locked())
AObjects[it.data()].Objects.at(j)->moveBy(0.0,diff);
currY+=AObjects[it.data()].height;
7684,7 → 7693,7
{
currX+=separation;
double diff=currX-AObjects[it.data()].x1;
for (uint j = 0; j < AObjects[it.data()].Objects.count(); ++j)
for (int j = 0; j < AObjects[it.data()].Objects.count(); ++j)
if (!AObjects[it.data()].Objects.at(j)->locked())
AObjects[it.data()].Objects.at(j)->moveBy(diff, 0.0);
currX+=AObjects[it.data()].width;
7733,7 → 7742,7
{
currY+=separation;
double diff=currY-AObjects[it.data()].y1;
for (uint j = 0; j < AObjects[it.data()].Objects.count(); ++j)
for (int j = 0; j < AObjects[it.data()].Objects.count(); ++j)
if (!AObjects[it.data()].Objects.at(j)->locked())
AObjects[it.data()].Objects.at(j)->moveBy(0.0, diff);
currY+=AObjects[it.data()].height;
/trunk/Scribus/scribus/pdflib.cpp
689,7 → 689,7
size_t ar = sizeof(tmpf) / sizeof(*tmpf);
for (uint ax = 0; ax < ar; ++ax)
ind2PDFabr[ax] = tmpf[ax];
for (uint c = 0; c < doc.FrameItems.count(); ++c)
for (int c = 0; c < doc.FrameItems.count(); ++c)
{
pgit = doc.FrameItems.at(c);
if ((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText))
707,7 → 707,7
}
}
}
for (uint c = 0; c < doc.MasterItems.count(); ++c)
for (int c = 0; c < doc.MasterItems.count(); ++c)
{
pgit = doc.MasterItems.at(c);
if ((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText))
725,7 → 725,7
}
}
}
for (uint d = 0; d < doc.Items->count(); ++d)
for (int d = 0; d < doc.Items->count(); ++d)
{
pgit = doc.Items->at(d);
if ((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText))
751,7 → 751,7
for (int c = 0; c < patterns.count(); ++c)
{
ScPattern pa = doc.docPatterns[patterns[c]];
for (uint o = 0; o < pa.items.count(); o++)
for (int o = 0; o < pa.items.count(); o++)
{
pgit = pa.items.at(o);
if ((pgit->itemType() == PageItem::TextFrame) || (pgit->itemType() == PageItem::PathText))
1515,7 → 1515,7
QString tmp;
ActPageP = pag;
PageItem* ite;
Q3PtrList<PageItem> PItems;
QList<PageItem*> PItems;
int Lnr = 0;
struct Layer ll;
ll.isPrintable = false;
1530,7 → 1530,7
{
if ((Options.Version == 15) && (Options.useLayers))
PutPage("/OC /"+OCGEntries[ll.Name].Name+" BDC\n");
for (uint a = 0; a < PItems.count(); ++a)
for (int a = 0; a < PItems.count(); ++a)
{
Inhalt = "";
ite =PItems.at(a);
2449,7 → 2449,7
QString tmp;
ActPageP = pag;
PageItem* ite;
Q3PtrList<PageItem> PItems;
QList<PageItem*> PItems;
int Lnr = 0;
struct Layer ll;
ll.isPrintable = false;
2524,7 → 2524,7
{
if ((Options.Version == 15) && (Options.useLayers))
PutPage("/OC /"+OCGEntries[ll.Name].Name+" BDC\n");
for (uint am = 0; am < pag->FromMaster.count(); ++am)
for (int am = 0; am < pag->FromMaster.count(); ++am)
{
ite = pag->FromMaster.at(am);
if ((ite->LayerNr != ll.LNr) || (!ite->printEnabled()))
2574,7 → 2574,7
}
}
}
for (uint am = 0; am < pag->FromMaster.count(); ++am)
for (int am = 0; am < pag->FromMaster.count(); ++am)
{
ite = pag->FromMaster.at(am);
if ((ite->LayerNr != ll.LNr) || (!ite->printEnabled()))
2621,7 → 2621,7
QString inh = "";
if ((Options.Version == 15) && (Options.useLayers))
PutPage("/OC /"+OCGEntries[ll.Name].Name+" BDC\n");
for (uint a = 0; a < PItems.count() && !abortExport; ++a)
for (int a = 0; a < PItems.count() && !abortExport; ++a)
{
if (usingGUI)
{
2697,7 → 2697,7
}
}
}
for (uint a = 0; a < PItems.count() && !abortExport; ++a)
for (int a = 0; a < PItems.count() && !abortExport; ++a)
{
if (usingGUI)
{
4210,9 → 4210,9
tmp += "ET\n"+tmp2;
tmp2 = "";
}
Q3PtrList<PageItem> emG = embedded.getGroupedItems();
QList<PageItem*> emG = embedded.getGroupedItems();
Q3PtrStack<PageItem> groupStack;
for (uint em = 0; em < emG.count(); ++em)
for (int em = 0; em < emG.count(); ++em)
{
PageItem* embedded = emG.at(em);
if (embedded->isGroupControl)
4933,7 → 4933,7
Q3PtrStack<PageItem> groupStack;
QString tmp2 = "";
ScPattern *pat = &doc.docPatterns[currItem->pattern()];
for (uint em = 0; em < pat->items.count(); ++em)
for (int em = 0; em < pat->items.count(); ++em)
{
PageItem* item = pat->items.at(em);
if (item->isGroupControl)
6736,7 → 6736,7
Threads.clear();
if (Options.Articles)
{
for (uint ele = 0; ele < doc.Items->count(); ++ele)
for (int ele = 0; ele < doc.Items->count(); ++ele)
{
PageItem* tel = doc.Items->at(ele);
if ((tel->asTextFrame()) && (tel->prevInChain() == 0) && (tel->nextInChain() != 0) &&
6800,7 → 6800,7
}
}
}
for (uint ele = 0; ele < doc.Items->count(); ++ele)
for (int ele = 0; ele < doc.Items->count(); ++ele)
doc.Items->at(ele)->inPdfArticle = false;
}
XRef[7] = bytesWritten();
/trunk/Scribus/scribus/sctextstruct.h
106,7 → 106,7
bool hasItem();
bool isShared();
PageItem* getItem();
Q3PtrList<PageItem> getGroupedItems();
QList<PageItem*> getGroupedItems();
private:
InlineFrameData* d;
};
/trunk/Scribus/scribus/pageitem.h
235,7 → 235,7
virtual void DrawObj_Post(ScPainter *p);
virtual void DrawObj_Item(ScPainter *p, QRect e, double sc) = 0;
QImage DrawObj_toImage();
QImage DrawObj_toImage(Q3PtrList<PageItem> &emG);
QImage DrawObj_toImage(QList<PageItem*> &emG);
protected:
void DrawObj_ImageFrame(ScPainter *p, double sc);
//void DrawObj_TextFrame(ScPainter *p, QRect e, double sc);
/trunk/Scribus/scribus/scribusstructs.h
428,7 → 428,7
double y2;
double width;
double height;
Q3PtrList<PageItem> Objects;
QList<PageItem*> Objects;
};
 
/*! \brief Human readable orientations */
/trunk/Scribus/scribus/scribusdoc.h
856,10 → 856,10
/** \brief Mapping Master Page Name to Master Page numbers */
QMap<QString,int> MasterNames;
/** \brief List of Objects */
Q3PtrList<PageItem>* Items;
Q3PtrList<PageItem> MasterItems;
Q3PtrList<PageItem> DocItems;
Q3PtrList<PageItem> FrameItems;
QList<PageItem*>* Items;
QList<PageItem*> MasterItems;
QList<PageItem*> DocItems;
QList<PageItem*> FrameItems;
Selection* const m_Selection;
/** \brief Pagewidth */
double pageWidth;
/trunk/Scribus/scribus/plugins/svgimplugin/svgplugin.cpp
311,7 → 311,7
matrix.scale(viewScaleX, viewScaleY);
m_gc.current()->matrix = matrix;
}
Q3PtrList<PageItem> Elements = parseGroup( docElem );
QList<PageItem*> Elements = parseGroup( docElem );
if (flags & LoadSavePlugin::lfCreateDoc)
{
m_Doc->documentInfo.setTitle(docTitle);
335,7 → 335,7
int firstElem = -1;
if (Elements.at(0)->Groups.count() != 0)
firstElem = Elements.at(0)->Groups.top();
for (uint bx = 0; bx < Elements.count(); ++bx)
for (int bx = 0; bx < Elements.count(); ++bx)
{
PageItem* bxi = Elements.at(bx);
if (bxi->Groups.count() != 0)
354,7 → 354,7
double maxy = -99999.9;
uint lowestItem = 999999;
uint highestItem = 0;
for (uint a = 0; a < Elements.count(); ++a)
for (int a = 0; a < Elements.count(); ++a)
{
Elements.at(a)->Groups.push(m_Doc->GroupCounter);
PageItem* currItem = Elements.at(a);
391,13 → 391,13
double gh = maxy - miny;
PageItem *high = m_Doc->Items->at(highestItem);
int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->toolSettings.dBrush, m_Doc->toolSettings.dPen, true);
PageItem *neu = m_Doc->Items->take(z);
PageItem *neu = m_Doc->Items->takeAt(z);
m_Doc->Items->insert(lowestItem, neu);
neu->Groups.push(m_Doc->GroupCounter);
neu->setItemName( tr("Group%1").arg(neu->Groups.top()));
neu->isGroupControl = true;
neu->groupsLastItem = high;
for (uint a = 0; a < m_Doc->Items->count(); ++a)
for (int a = 0; a < m_Doc->Items->count(); ++a)
{
m_Doc->Items->at(a)->ItemNr = a;
}
420,7 → 420,7
m_Doc->setLoading(false);
m_Doc->changed();
m_Doc->setLoading(loadF);
for (uint dre=0; dre<Elements.count(); ++dre)
for (int dre=0; dre<Elements.count(); ++dre)
{
m_Doc->m_Selection->addItem(Elements.at(dre), true);
}
433,7 → 433,7
m_Doc->DragP = true;
m_Doc->DraggedElem = 0;
m_Doc->DragElements.clear();
for (uint dre=0; dre<Elements.count(); ++dre)
for (int dre=0; dre<Elements.count(); ++dre)
{
m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
tmpSel->addItem(Elements.at(dre), true);
786,10 → 786,10
}
}
 
Q3PtrList<PageItem> SVGPlug::parseGroup(const QDomElement &e)
QList<PageItem*> SVGPlug::parseGroup(const QDomElement &e)
{
FPointArray clipPath;
Q3PtrList<PageItem> GElements, gElements;
QList<PageItem*> GElements, gElements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
groupLevel++;
806,8 → 806,8
parseStyle( &svgStyle, b );
if (!svgStyle.Display)
continue;
Q3PtrList<PageItem> el = parseElement(b);
for (uint ec = 0; ec < el.count(); ++ec)
QList<PageItem*> el = parseElement(b);
for (int ec = 0; ec < el.count(); ++ec)
gElements.append(el.at(ec));
}
groupLevel--;
814,13 → 814,13
SvgStyle *gc = m_gc.current();
if (gElements.count() < 2 && (clipPath.size() == 0) && (gc->Opacity == 1.0))
{
m_Doc->Items->take(z);
m_Doc->Items->takeAt(z);
delete neu;
for (uint a = 0; a < m_Doc->Items->count(); ++a)
for (int a = 0; a < m_Doc->Items->count(); ++a)
{
m_Doc->Items->at(a)->ItemNr = a;
}
for (uint gr = 0; gr < gElements.count(); ++gr)
for (int gr = 0; gr < gElements.count(); ++gr)
{
GElements.append(gElements.at(gr));
}
832,7 → 832,7
double maxx = -99999.9;
double maxy = -99999.9;
GElements.append(neu);
for (uint gr = 0; gr < gElements.count(); ++gr)
for (int gr = 0; gr < gElements.count(); ++gr)
{
PageItem* currItem = gElements.at(gr);
double lw = currItem->lineWidth() / 2.0;
890,7 → 890,7
else
neu->setItemName( tr("Group%1").arg(neu->Groups.top()));
neu->setFillTransparency(1 - gc->Opacity);
for (uint gr = 0; gr < gElements.count(); ++gr)
for (int gr = 0; gr < gElements.count(); ++gr)
{
gElements.at(gr)->Groups.push(m_Doc->GroupCounter);
GElements.append(gElements.at(gr));
903,9 → 903,9
return GElements;
}
 
Q3PtrList<PageItem> SVGPlug::parseElement(const QDomElement &e)
QList<PageItem*> SVGPlug::parseElement(const QDomElement &e)
{
Q3PtrList<PageItem> GElements;
QList<PageItem*> GElements;
if (e.hasAttribute("id"))
m_nodeMap.insert(e.attribute("id"), e);
QString STag = e.tagName();
962,9 → 962,9
return GElements;
}
 
Q3PtrList<PageItem> SVGPlug::parseCircle(const QDomElement &e)
QList<PageItem*> SVGPlug::parseCircle(const QDomElement &e)
{
Q3PtrList<PageItem> CElements;
QList<PageItem*> CElements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
double r = parseUnit( e.attribute( "r" ) );
985,9 → 985,9
return CElements;
}
 
Q3PtrList<PageItem> SVGPlug::parseEllipse(const QDomElement &e)
QList<PageItem*> SVGPlug::parseEllipse(const QDomElement &e)
{
Q3PtrList<PageItem> EElements;
QList<PageItem*> EElements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
double rx = parseUnit( e.attribute( "rx" ) );
1009,10 → 1009,10
return EElements;
}
 
Q3PtrList<PageItem> SVGPlug::parseImage(const QDomElement &e)
QList<PageItem*> SVGPlug::parseImage(const QDomElement &e)
{
FPointArray clipPath;
Q3PtrList<PageItem> IElements;
QList<PageItem*> IElements;
QString fname = e.attribute("xlink:href");
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
1036,9 → 1036,9
return IElements;
}
 
Q3PtrList<PageItem> SVGPlug::parseLine(const QDomElement &e)
QList<PageItem*> SVGPlug::parseLine(const QDomElement &e)
{
Q3PtrList<PageItem> LElements;
QList<PageItem*> LElements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
double x1 = e.attribute( "x1" ).isEmpty() ? 0.0 : parseUnit( e.attribute( "x1" ) );
1060,10 → 1060,10
return LElements;
}
 
Q3PtrList<PageItem> SVGPlug::parsePath(const QDomElement &e)
QList<PageItem*> SVGPlug::parsePath(const QDomElement &e)
{
FPointArray pArray;
Q3PtrList<PageItem> PElements;
QList<PageItem*> PElements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
setupNode(e);
1090,10 → 1090,10
return PElements;
}
 
Q3PtrList<PageItem> SVGPlug::parsePolyline(const QDomElement &e)
QList<PageItem*> SVGPlug::parsePolyline(const QDomElement &e)
{
int z;
Q3PtrList<PageItem> PElements;
QList<PageItem*> PElements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
setupNode(e);
1142,9 → 1142,9
return PElements;
}
 
Q3PtrList<PageItem> SVGPlug::parseRect(const QDomElement &e)
QList<PageItem*> SVGPlug::parseRect(const QDomElement &e)
{
Q3PtrList<PageItem> RElements;
QList<PageItem*> RElements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
double x = parseUnit( e.attribute( "x" ) );
1174,9 → 1174,9
return RElements;
}
 
Q3PtrList<PageItem> SVGPlug::parseText(const QDomElement &e)
QList<PageItem*> SVGPlug::parseText(const QDomElement &e)
{
Q3PtrList<PageItem> GElements;
QList<PageItem*> GElements;
setupNode(e);
QDomNode c = e.firstChild();
//double x = e.attribute( "x" ).isEmpty() ? 0.0 : parseUnit(e.attribute("x"));
1193,8 → 1193,8
parseStyle(gc, tspan);
if (!gc->Display)
continue;
Q3PtrList<PageItem> el = parseTextElement(x, y, tspan);
for (uint ec = 0; ec < el.count(); ++ec)
QList<PageItem*> el = parseTextElement(x, y, tspan);
for (int ec = 0; ec < el.count(); ++ec)
GElements.append(el.at(ec));
delete( m_gc.pop() );
}
1202,8 → 1202,8
else
{
// SvgStyle *gc = m_gc.current();
Q3PtrList<PageItem> el = parseTextElement(x, y, e);
for (uint ec = 0; ec < el.count(); ++ec)
QList<PageItem*> el = parseTextElement(x, y, e);
for (int ec = 0; ec < el.count(); ++ec)
GElements.append(el.at(ec));
}
delete( m_gc.pop() );
1210,9 → 1210,9
return GElements;
}
 
Q3PtrList<PageItem> SVGPlug::parseTextElement(double x, double y, const QDomElement &e)
QList<PageItem*> SVGPlug::parseTextElement(double x, double y, const QDomElement &e)
{
Q3PtrList<PageItem> GElements;
QList<PageItem*> GElements;
// QFont ff(m_Doc->UsedFonts[m_gc.current()->Family]);
QFont ff(m_gc.current()->Family);
ff.setPointSize(qMax(qRound(m_gc.current()->FontSize / 10.0), 1));
1385,11 → 1385,11
return GElements;
}
 
Q3PtrList<PageItem> SVGPlug::parseSwitch(const QDomElement &e)
QList<PageItem*> SVGPlug::parseSwitch(const QDomElement &e)
{
QString href;
QStringList hrefs;
Q3PtrList<PageItem> SElements;
QList<PageItem*> SElements;
for (QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling())
{
QDomElement de = n.toElement();
1430,9 → 1430,9
return SElements;
}
 
Q3PtrList<PageItem> SVGPlug::parseSymbol(const QDomElement &e)
QList<PageItem*> SVGPlug::parseSymbol(const QDomElement &e)
{
Q3PtrList<PageItem> SElements;
QList<PageItem*> SElements;
QString id = e.attribute(id);
if( !id.isEmpty() )
m_nodeMap.insert(id, e);
1439,9 → 1439,9
return SElements;
}
 
Q3PtrList<PageItem> SVGPlug::parseUse(const QDomElement &e)
QList<PageItem*> SVGPlug::parseUse(const QDomElement &e)
{
Q3PtrList<PageItem> UElements;
QList<PageItem*> UElements;
QDomElement ue = getNodeFromUseElement(e);
if (!ue.isNull())
UElements = parseElement(ue);
/trunk/Scribus/scribus/plugins/svgimplugin/svgplugin.h
197,20 → 197,20
void parseDefs(const QDomElement &e);
void parseClipPath(const QDomElement &e);
void parseClipPathAttr(const QDomElement &e, FPointArray& clipPath);
Q3PtrList<PageItem> parseGroup(const QDomElement &e);
Q3PtrList<PageItem> parseElement(const QDomElement &e);
Q3PtrList<PageItem> parseCircle(const QDomElement &e);
Q3PtrList<PageItem> parseEllipse(const QDomElement &e);
Q3PtrList<PageItem> parseImage(const QDomElement &e);
Q3PtrList<PageItem> parseLine(const QDomElement &e);
Q3PtrList<PageItem> parsePath(const QDomElement &e);
Q3PtrList<PageItem> parsePolyline(const QDomElement &e);
Q3PtrList<PageItem> parseRect(const QDomElement &e);
Q3PtrList<PageItem> parseText(const QDomElement &e);
Q3PtrList<PageItem> parseTextElement(double x, double y, const QDomElement &e);
Q3PtrList<PageItem> parseSwitch(const QDomElement &e);
Q3PtrList<PageItem> parseSymbol(const QDomElement &e);
Q3PtrList<PageItem> parseUse(const QDomElement &e);
QList<PageItem*> parseGroup(const QDomElement &e);
QList<PageItem*> parseElement(const QDomElement &e);
QList<PageItem*> parseCircle(const QDomElement &e);
QList<PageItem*> parseEllipse(const QDomElement &e);
QList<PageItem*> parseImage(const QDomElement &e);
QList<PageItem*> parseLine(const QDomElement &e);
QList<PageItem*> parsePath(const QDomElement &e);
QList<PageItem*> parsePolyline(const QDomElement &e);
QList<PageItem*> parseRect(const QDomElement &e);
QList<PageItem*> parseText(const QDomElement &e);
QList<PageItem*> parseTextElement(double x, double y, const QDomElement &e);
QList<PageItem*> parseSwitch(const QDomElement &e);
QList<PageItem*> parseSymbol(const QDomElement &e);
QList<PageItem*> parseUse(const QDomElement &e);
QDomElement getNodeFromUseElement(const QDomElement &e);
QDomElement getReferencedNode(const QDomElement &e);
double fromPercentage( const QString &s );
/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
212,7 → 212,7
bool newVersion = false;
QString tmp, tmpf, tmp2, tmp3, tmp4, PgNam, Defont, tmf;
QMap<int,int> TableID;
Q3PtrList<PageItem> TableItems;
QList<PageItem*> TableItems;
int x, a;
// double xf, xf2;
PageItem *Neu;
651,7 → 651,7
}
if (TableItems.count() != 0)
{
for (uint ttc = 0; ttc < TableItems.count(); ++ttc)
for (int ttc = 0; ttc < TableItems.count(); ++ttc)
{
PageItem* ta = TableItems.at(ttc);
if (ta->TopLinkID != -1)
682,7 → 682,7
QDomElement pg=PAGE.toElement();
if(pg.tagName()=="Bookmark")
{
uint elem = pg.attribute("Element").toInt();
int elem = pg.attribute("Element").toInt();
if (elem < m_Doc->Items->count())
{
bok.Title = pg.attribute("Title");
963,7 → 963,7
itemNext.clear();
QString tmV, tmp, tmpf, tmp2, tmp3, tmp4, PgNam, Defont, tmf;
QMap<int,int> TableID;
Q3PtrList<PageItem> TableItems;
QList<PageItem*> TableItems;
int x, a, counter, baseobj;
bool newVersion = false;
bool VorLFound = false;
1259,7 → 1259,7
}
if (TableItems.count() != 0)
{
for (uint ttc = 0; ttc < TableItems.count(); ++ttc)
for (int ttc = 0; ttc < TableItems.count(); ++ttc)
{
PageItem* ta = TableItems.at(ttc);
if (ta->TopLinkID != -1)
1307,7 → 1307,7
QDomElement pg=PAGE.toElement();
if(pg.tagName()=="Bookmark")
{
uint elem = pg.attribute("Element").toInt();
int elem = pg.attribute("Element").toInt();
if (elem < m_Doc->Items->count())
{
bok.Title = pg.attribute("Title");
/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
164,11 → 164,11
QString tmp, tmpf, tmp2, tmp3, tmp4, PgNam, Defont, tmf;
QFont fo;
QMap<int,int> TableID;
Q3PtrList<PageItem> TableItems;
QList<PageItem*> TableItems;
QMap<int,int> TableIDM;
Q3PtrList<PageItem> TableItemsM;
QList<PageItem*> TableItemsM;
QMap<int,int> TableIDF;
Q3PtrList<PageItem> TableItemsF;
QList<PageItem*> TableItemsF;
int a;
PageItem *Neu;
Page* Apage;
964,7 → 964,7
m_Doc->LastAuto = Neu;
if (pg.tagName()=="FRAMEOBJECT")
{
m_Doc->FrameItems.append(m_Doc->Items->take(Neu->ItemNr));
m_Doc->FrameItems.append(m_Doc->Items->takeAt(Neu->ItemNr));
Neu->ItemNr = m_Doc->FrameItems.count()-1;
}
if (Neu->isTableItem)
1009,7 → 1009,7
QDomElement pg=PAGE.toElement();
if(pg.tagName()=="Bookmark")
{
uint elem = pg.attribute("Element").toInt();
int elem = pg.attribute("Element").toInt();
if (elem < m_Doc->Items->count())
{
bok.Title = pg.attribute("Title");
1031,7 → 1031,7
}
if (TableItemsF.count() != 0)
{
for (uint ttc = 0; ttc < TableItemsF.count(); ++ttc)
for (int ttc = 0; ttc < TableItemsF.count(); ++ttc)
{
PageItem* ta = TableItemsF.at(ttc);
if (ta->TopLinkID != -1)
1054,7 → 1054,7
}
if (TableItemsM.count() != 0)
{
for (uint ttc = 0; ttc < TableItemsM.count(); ++ttc)
for (int ttc = 0; ttc < TableItemsM.count(); ++ttc)
{
PageItem* ta = TableItemsM.at(ttc);
if (ta->TopLinkID != -1)
1077,7 → 1077,7
}
if (TableItems.count() != 0)
{
for (uint ttc = 0; ttc < TableItems.count(); ++ttc)
for (int ttc = 0; ttc < TableItems.count(); ++ttc)
{
PageItem* ta = TableItems.at(ttc);
if (ta->TopLinkID != -1)
2512,7 → 2512,7
ReplacedFonts.clear();
newReplacement = false;
QMap<int,int> TableID;
Q3PtrList<PageItem> TableItems;
QList<PageItem*> TableItems;
int a, counter, baseobj;
double pageX = 0, pageY = 0;
bool newVersion = false;
2854,7 → 2854,7
}
if (pg.tagName()=="FRAMEOBJECT")
{
m_Doc->FrameItems.append(m_Doc->Items->take(Neu->ItemNr));
m_Doc->FrameItems.append(m_Doc->Items->takeAt(Neu->ItemNr));
Neu->ItemNr = m_Doc->FrameItems.count()-1;
}
}
2868,7 → 2868,7
QDomElement pg=PAGE.toElement();
if(pg.tagName()=="Bookmark")
{
uint elem = pg.attribute("Element").toInt();
int elem = pg.attribute("Element").toInt();
if (elem < m_Doc->Items->count())
{
bok.Title = pg.attribute("Title");
2890,7 → 2890,7
}
if (TableItems.count() != 0)
{
for (uint ttc = 0; ttc < TableItems.count(); ++ttc)
for (int ttc = 0; ttc < TableItems.count(); ++ttc)
{
PageItem* ta = TableItems.at(ttc);
if (ta->TopLinkID != -1)
2919,7 → 2919,7
{
if (itemRemap[lc.data()] >= 0)
{
if ((static_cast<uint>(lc.key()) < m_Doc->Items->count()) && (static_cast<uint>(itemRemap[lc.data()]) < m_Doc->Items->count()))
if ((lc.key() < m_Doc->Items->count()) && (itemRemap[lc.data()] < m_Doc->Items->count()))
{
PageItem * Its = m_Doc->Items->at(lc.key());
PageItem * Itn = m_Doc->Items->at(itemRemap[lc.data()]);
/trunk/Scribus/scribus/plugins/fileloader/oodraw/oodrawimp.cpp
14,7 → 14,6
//Added by qt3to4:
#include <QDrag>
#include <QMimeData>
#include <Q3PtrList>
#include <cmath>
 
#include "oodrawimp.h"
278,7 → 277,7
bool isOODraw2 = false;
QDomNode drawPagePNode;
int PageCounter = 0;
Q3PtrList<PageItem> Elements;
QList<PageItem*> Elements;
createStyleMap( inpStyles );
QDomElement docElem = inpContents.documentElement();
QDomNode automaticStyles = docElem.namedItem( "office:automatic-styles" );
394,8 → 393,8
PageCounter++;
m_styleStack.clear();
fillStyleStack( dpg );
Q3PtrList<PageItem> el = parseGroup( dpg );
for (uint ec = 0; ec < el.count(); ++ec)
QList<PageItem*> el = parseGroup( dpg );
for (int ec = 0; ec < el.count(); ++ec)
Elements.append(el.at(ec));
if ((interactive) && (PageCounter == 1))
break;
419,7 → 418,7
int firstElem = -1;
if (Elements.at(0)->Groups.count() != 0)
firstElem = Elements.at(0)->Groups.top();
for (uint bx = 0; bx < Elements.count(); ++bx)
for (int bx = 0; bx < Elements.count(); ++bx)
{
PageItem* bxi = Elements.at(bx);
if (bxi->Groups.count() != 0)
438,7 → 437,7
double maxy = -99999.9;
uint lowestItem = 999999;
uint highestItem = 0;
for (uint a = 0; a < Elements.count(); ++a)
for (int a = 0; a < Elements.count(); ++a)
{
Elements.at(a)->Groups.push(m_Doc->GroupCounter);
PageItem* currItem = Elements.at(a);
475,7 → 474,7
double gh = maxy - miny;
PageItem *high = m_Doc->Items->at(highestItem);
int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->toolSettings.dBrush, m_Doc->toolSettings.dPen, true);
PageItem *neu = m_Doc->Items->take(z);
PageItem *neu = m_Doc->Items->takeAt(z);
m_Doc->Items->insert(lowestItem, neu);
neu->Groups.push(m_Doc->GroupCounter);
neu->setItemName( tr("Group%1").arg(neu->Groups.top()));
482,7 → 481,7
neu->isGroupControl = true;
neu->groupsLastItem = high;
neu->setTextFlowMode(PageItem::TextFlowUsesFrameShape);
for (uint a = 0; a < m_Doc->Items->count(); ++a)
for (int a = 0; a < m_Doc->Items->count(); ++a)
{
m_Doc->Items->at(a)->ItemNr = a;
}
503,7 → 502,7
m_Doc->setLoading(false);
m_Doc->changed();
m_Doc->setLoading(loadF);
for (uint dre=0; dre<Elements.count(); ++dre)
for (int dre=0; dre<Elements.count(); ++dre)
{
m_Doc->m_Selection->addItem(Elements.at(dre), true);
}
516,7 → 515,7
m_Doc->DragP = true;
m_Doc->DraggedElem = 0;
m_Doc->DragElements.clear();
for (uint dre=0; dre<Elements.count(); ++dre)
for (int dre=0; dre<Elements.count(); ++dre)
{
m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
tmpSel->addItem(Elements.at(dre), true);
574,11 → 573,11
return true;
}
 
Q3PtrList<PageItem> OODPlug::parseGroup(const QDomElement &e)
QList<PageItem*> OODPlug::parseGroup(const QDomElement &e)
{
OODrawStyle oostyle;
FPointArray ImgClip;
Q3PtrList<PageItem> elements, cElements;
QList<PageItem*> elements, cElements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
storeObjectStyles(e);
591,19 → 590,19
QDomElement b = n.toElement();
if( b.isNull() )
continue;
Q3PtrList<PageItem> el = parseElement(b);
for (uint ec = 0; ec < el.count(); ++ec)
QList<PageItem*> el = parseElement(b);
for (int ec = 0; ec < el.count(); ++ec)
cElements.append(el.at(ec));
}
if (cElements.count() < 2)
{
m_Doc->Items->take(zn);
m_Doc->Items->takeAt(zn);
delete neu;
for (uint a = 0; a < m_Doc->Items->count(); ++a)
for (int a = 0; a < m_Doc->Items->count(); ++a)
{
m_Doc->Items->at(a)->ItemNr = a;
}
for (uint gr = 0; gr < cElements.count(); ++gr)
for (int gr = 0; gr < cElements.count(); ++gr)
{
elements.append(cElements.at(gr));
}
615,7 → 614,7
double maxx = -99999.9;
double maxy = -99999.9;
elements.append(neu);
for (uint gr = 0; gr < cElements.count(); ++gr)
for (int gr = 0; gr < cElements.count(); ++gr)
{
PageItem* currItem = cElements.at(gr);
double lw = currItem->lineWidth() / 2.0;
663,7 → 662,7
else
neu->setItemName( tr("Group%1").arg(neu->Groups.top()));
// neu->setFillTransparency(1 - gc->Opacity);
for (uint gr = 0; gr < cElements.count(); ++gr)
for (int gr = 0; gr < cElements.count(); ++gr)
{
cElements.at(gr)->Groups.push(m_Doc->GroupCounter);
elements.append(cElements.at(gr));
674,9 → 673,9
return elements;
}
 
Q3PtrList<PageItem> OODPlug::parseElement(const QDomElement &e)
QList<PageItem*> OODPlug::parseElement(const QDomElement &e)
{
Q3PtrList<PageItem> GElements;
QList<PageItem*> GElements;
QString STag = e.tagName();
if ( STag == "draw:g" )
{
710,10 → 709,10
return GElements;
}
 
Q3PtrList<PageItem> OODPlug::parseRect(const QDomElement &e)
QList<PageItem*> OODPlug::parseRect(const QDomElement &e)
{
OODrawStyle style;
Q3PtrList<PageItem> elements;
QList<PageItem*> elements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
double x = parseUnit(e.attribute("svg:x"));
736,10 → 735,10
return elements;
}
 
Q3PtrList<PageItem> OODPlug::parseEllipse(const QDomElement &e)
QList<PageItem*> OODPlug::parseEllipse(const QDomElement &e)
{
OODrawStyle style;
Q3PtrList<PageItem> elements;
QList<PageItem*> elements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
double x = parseUnit(e.attribute("svg:x"));
755,10 → 754,10
return elements;
}
 
Q3PtrList<PageItem> OODPlug::parseLine(const QDomElement &e)
QList<PageItem*> OODPlug::parseLine(const QDomElement &e)
{
OODrawStyle style;
Q3PtrList<PageItem> elements;
QList<PageItem*> elements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
double x1 = e.attribute( "svg:x1" ).isEmpty() ? 0.0 : parseUnit( e.attribute( "svg:x1" ) );
788,10 → 787,10
return elements;
}
 
Q3PtrList<PageItem> OODPlug::parsePolygon(const QDomElement &e)
QList<PageItem*> OODPlug::parsePolygon(const QDomElement &e)
{
OODrawStyle style;
Q3PtrList<PageItem> elements;
QList<PageItem*> elements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
storeObjectStyles(e);
814,10 → 813,10
return elements;
}
 
Q3PtrList<PageItem> OODPlug::parsePolyline(const QDomElement &e)
QList<PageItem*> OODPlug::parsePolyline(const QDomElement &e)
{
OODrawStyle style;
Q3PtrList<PageItem> elements;
QList<PageItem*> elements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
storeObjectStyles(e);
840,11 → 839,11
return elements;
}
 
Q3PtrList<PageItem> OODPlug::parsePath(const QDomElement &e)
QList<PageItem*> OODPlug::parsePath(const QDomElement &e)
{
OODrawStyle style;
FPointArray pArray;
Q3PtrList<PageItem> elements;
QList<PageItem*> elements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
storeObjectStyles(e);
891,10 → 890,10
return elements;
}
 
Q3PtrList<PageItem> OODPlug::parseTextBox(const QDomElement &e)
QList<PageItem*> OODPlug::parseTextBox(const QDomElement &e)
{
OODrawStyle style;
Q3PtrList<PageItem> elements;
QList<PageItem*> elements;
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
double x = parseUnit(e.attribute("svg:x"));
912,10 → 911,10
return elements;
}
 
Q3PtrList<PageItem> OODPlug::parseFrame(const QDomElement &e)
QList<PageItem*> OODPlug::parseFrame(const QDomElement &e)
{
OODrawStyle oostyle;
Q3PtrList<PageItem> elements;
QList<PageItem*> elements;
QString drawID = e.attribute("draw:name");
double BaseX = m_Doc->currentPage()->xOffset();
double BaseY = m_Doc->currentPage()->yOffset();
943,9 → 942,9
return elements;
}
 
Q3PtrList<PageItem> OODPlug::parseConnector(const QDomElement &e)
QList<PageItem*> OODPlug::parseConnector(const QDomElement &e)
{
Q3PtrList<PageItem> elements;
QList<PageItem*> elements;
if (e.hasAttribute("svg:x1") && e.hasAttribute("svg:x2") && e.hasAttribute("svg:y1") && e.hasAttribute("svg:y2"))
{
elements = parseLine(e);
/trunk/Scribus/scribus/plugins/fileloader/oodraw/oodrawimp.h
9,7 → 9,6
 
#include <qobject.h>
#include <q3dict.h>
#include <q3ptrlist.h>
//Added by qt3to4:
#include <QList>
#include "pluginapi.h"
107,17 → 106,17
protected:
 
bool convert(int flags);
Q3PtrList<PageItem> parseGroup(const QDomElement &e);
Q3PtrList<PageItem> parseElement(const QDomElement &e);
Q3PtrList<PageItem> parseRect(const QDomElement &e);
Q3PtrList<PageItem> parseEllipse(const QDomElement &e);
Q3PtrList<PageItem> parseLine(const QDomElement &e);
Q3PtrList<PageItem> parsePolygon(const QDomElement &e);
Q3PtrList<PageItem> parsePolyline(const QDomElement &e);
Q3PtrList<PageItem> parsePath(const QDomElement &e);
Q3PtrList<PageItem> parseTextBox(const QDomElement &e);
Q3PtrList<PageItem> parseFrame(const QDomElement &e);
Q3PtrList<PageItem> parseConnector(const QDomElement &e);
QList<PageItem*> parseGroup(const QDomElement &e);
QList<PageItem*> parseElement(const QDomElement &e);
QList<PageItem*> parseRect(const QDomElement &e);
QList<PageItem*> parseEllipse(const QDomElement &e);
QList<PageItem*> parseLine(const QDomElement &e);
QList<PageItem*> parsePolygon(const QDomElement &e);
QList<PageItem*> parsePolyline(const QDomElement &e);
QList<PageItem*> parsePath(const QDomElement &e);
QList<PageItem*> parseTextBox(const QDomElement &e);
QList<PageItem*> parseFrame(const QDomElement &e);
QList<PageItem*> parseConnector(const QDomElement &e);
void parseStyle(OODrawStyle& style, const QDomElement &e);
void parseCharStyle(CharStyle& style, const QDomElement &e);
void parseParagraphStyle(ParagraphStyle& style, const QDomElement &e);
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.h
77,7 → 77,7
void writePatterns(QDomDocument & docu);
void writeContent(QDomDocument & docu);
void WritePages(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, Q3ProgressBar *dia2, uint maxC, bool master);
void WriteObjects(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, Q3ProgressBar *dia2, uint maxC, int master, Q3PtrList<PageItem> *items = 0);
void WriteObjects(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, Q3ProgressBar *dia2, uint maxC, int master, QList<PageItem*> *items = 0);
void SetItemProps(QDomElement *ob, PageItem* item, bool newFormat);
QMap<int, int> itemRemap;
QMap<int, int> itemNext;
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
1008,10 → 1008,10
}
}
 
void Scribus134Format::WriteObjects(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, Q3ProgressBar *dia2, uint maxC, int master, Q3PtrList<PageItem> *some_items)
void Scribus134Format::WriteObjects(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, Q3ProgressBar *dia2, uint maxC, int master, QList<PageItem*> *some_items)
{
uint ObCount = maxC;
Q3PtrList<PageItem> *items = NULL;
QList<PageItem*> *items = NULL;
PageItem *item = NULL;
QDomElement ob;
uint objects = 0;
/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
164,11 → 164,11
QString tmp, tmpf, tmp2, tmp3, tmp4, PgNam, Defont, tmf;
QFont fo;
QMap<int,int> TableID;
Q3PtrList<PageItem> TableItems;
QList<PageItem*> TableItems;
QMap<int,int> TableIDM;
Q3PtrList<PageItem> TableItemsM;
QList<PageItem*> TableItemsM;
QMap<int,int> TableIDF;
Q3PtrList<PageItem> TableItemsF;
QList<PageItem*> TableItemsF;
QMap<PageItem*, int> groupID;
QMap<PageItem*, int> groupIDM;
QMap<PageItem*, int> groupIDF;
1083,7 → 1083,7
 
if (pg.tagName()=="FRAMEOBJECT")
{
m_Doc->FrameItems.append(m_Doc->Items->take(Neu->ItemNr));
m_Doc->FrameItems.append(m_Doc->Items->takeAt(Neu->ItemNr));
Neu->ItemNr = m_Doc->FrameItems.count()-1;
}
if (Neu->isTableItem)
1133,7 → 1133,7
QDomElement pg=PAGE.toElement();
if(pg.tagName()=="Bookmark")
{
uint elem = pg.attribute("Element").toInt();
int elem = pg.attribute("Element").toInt();
if (elem < m_Doc->Items->count())
{
bok.Title = pg.attribute("Title");
1153,7 → 1153,7
{
QMap<PageItem*, int> groupID2;
QMap<int,int> TableID2;
Q3PtrList<PageItem> TableItems2;
QList<PageItem*> TableItems2;
ScPattern pat;
QDomNode pa = PAGE.firstChild();
uint ac = m_Doc->Items->count();
1289,7 → 1289,7
}
if (TableItems2.count() != 0)
{
for (uint ttc = 0; ttc < TableItems2.count(); ++ttc)
for (int ttc = 0; ttc < TableItems2.count(); ++ttc)
{
PageItem* ta = TableItems2.at(ttc);
if (ta->TopLinkID != -1)
1318,7 → 1318,7
pat.pattern = currItem->DrawObj_toImage();
for (uint as = ac; as < ae; ++as)
{
Neu = m_Doc->Items->take(ac);
Neu = m_Doc->Items->takeAt(ac);
Neu->ItemNr = pat.items.count();
pat.items.append(Neu);
}
1334,7 → 1334,7
}
if (TableItemsF.count() != 0)
{
for (uint ttc = 0; ttc < TableItemsF.count(); ++ttc)
for (int ttc = 0; ttc < TableItemsF.count(); ++ttc)
{
PageItem* ta = TableItemsF.at(ttc);
if (ta->TopLinkID != -1)
1357,7 → 1357,7
}
if (TableItemsM.count() != 0)
{
for (uint ttc = 0; ttc < TableItemsM.count(); ++ttc)
for (int ttc = 0; ttc < TableItemsM.count(); ++ttc)
{
PageItem* ta = TableItemsM.at(ttc);
if (ta->TopLinkID != -1)
1380,7 → 1380,7
}
if (TableItems.count() != 0)
{
for (uint ttc = 0; ttc < TableItems.count(); ++ttc)
for (int ttc = 0; ttc < TableItems.count(); ++ttc)
{
PageItem* ta = TableItems.at(ttc);
if (ta->TopLinkID != -1)
2518,7 → 2518,7
QString tmV, tmp, tmpf, tmp2, tmp3, tmp4, PgNam, Defont, tmf;
QFont fo;
QMap<int,int> TableID;
Q3PtrList<PageItem> TableItems;
QList<PageItem*> TableItems;
QMap<PageItem*, int> groupID;
int a, counter, baseobj;
double pageX = 0, pageY = 0;
2926,7 → 2926,7
}
if (pg.tagName()=="FRAMEOBJECT")
{
m_Doc->FrameItems.append(m_Doc->Items->take(Neu->ItemNr));
m_Doc->FrameItems.append(m_Doc->Items->takeAt(Neu->ItemNr));
Neu->ItemNr = m_Doc->FrameItems.count()-1;
}
}
2940,7 → 2940,7
QDomElement pg=PAGE.toElement();
if(pg.tagName()=="Bookmark")
{
uint elem = pg.attribute("Element").toInt();
int elem = pg.attribute("Element").toInt();
if (elem < m_Doc->Items->count())
{
bok.Title = pg.attribute("Title");
3086,7 → 3086,7
pat.pattern = currItem->DrawObj_toImage();
for (uint as = ac; as < ae; ++as)
{
Neu = m_Doc->Items->take(ac);
Neu = m_Doc->Items->takeAt(ac);
Neu->ItemNr = pat.items.count();
pat.items.append(Neu);
}
3102,7 → 3102,7
}
if (TableItems.count() != 0)
{
for (uint ttc = 0; ttc < TableItems.count(); ++ttc)
for (int ttc = 0; ttc < TableItems.count(); ++ttc)
{
PageItem* ta = TableItems.at(ttc);
if (ta->TopLinkID != -1)
3140,7 → 3140,7
{
if (itemRemap[lc.data()] >= 0)
{
if ((static_cast<uint>(lc.key()) < m_Doc->Items->count()) && (static_cast<uint>(itemRemap[lc.data()]) < m_Doc->Items->count()))
if ((lc.key() < m_Doc->Items->count()) && (itemRemap[lc.data()] < m_Doc->Items->count()))
{
PageItem * Its = m_Doc->DocItems.at(lc.key());
PageItem * Itn = m_Doc->DocItems.at(itemRemap[lc.data()]);
3161,7 → 3161,7
{
if (itemRemapM[lc.data()] >= 0)
{
if ((static_cast<uint>(lc.key()) < m_Doc->MasterItems.count()) && (static_cast<uint>(itemRemapM[lc.data()]) < m_Doc->MasterItems.count()))
if ((lc.key() < m_Doc->MasterItems.count()) && (itemRemapM[lc.data()] < m_Doc->MasterItems.count()))
{
PageItem * Its = m_Doc->MasterItems.at(lc.key());
PageItem * Itn = m_Doc->MasterItems.at(itemRemapM[lc.data()]);
/trunk/Scribus/scribus/plugins/svgexplugin/svgexplugin.cpp
27,6 → 27,7
#include <QList>
#include <QByteArray>
#include <Q3PtrList>
#include <QList>
 
#include "svgexplugin.h"
 
245,7 → 246,7
PageItem *Item;
gradi = "Grad";
Clipi = "Clip";
Q3PtrList<PageItem> Items;
QList<PageItem*> Items;
Page* SavedAct = m_Doc->currentPage();
m_Doc->setCurrentPage(Seite);
if (Seite->pageName().isEmpty())
/trunk/Scribus/scribus/plugins/psimport/importps.h
94,7 → 94,7
QString parseColor(QString vals, bool eps, colorModel model = colorModelCMYK);
bool Image(QString vals);
Q3PtrList<PageItem> Elements;
QList<PageItem*> Elements;
ColorList CustColors;
double LineW, Opacity, DashOffset, baseX, baseY;
QList<double> DashPattern;
/trunk/Scribus/scribus/plugins/psimport/importps.cpp
232,7 → 232,7
int firstElem = -1;
if (Elements.at(0)->Groups.count() != 0)
firstElem = Elements.at(0)->Groups.top();
for (uint bx = 0; bx < Elements.count(); ++bx)
for (int bx = 0; bx < Elements.count(); ++bx)
{
PageItem* bxi = Elements.at(bx);
if (bxi->Groups.count() != 0)
251,7 → 251,7
double maxy = -99999.9;
uint lowestItem = 999999;
uint highestItem = 0;
for (uint a = 0; a < Elements.count(); ++a)
for (int a = 0; a < Elements.count(); ++a)
{
Elements.at(a)->Groups.push(m_Doc->GroupCounter);
PageItem* currItem = Elements.at(a);
288,7 → 288,7
double gh = maxy - miny;
PageItem *high = m_Doc->Items->at(highestItem);
int z = m_Doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, gx, gy, gw, gh, 0, m_Doc->toolSettings.dBrush, m_Doc->toolSettings.dPen, true);
PageItem *neu = m_Doc->Items->take(z);
PageItem *neu = m_Doc->Items->takeAt(z);
m_Doc->Items->insert(lowestItem, neu);
neu->Groups.push(m_Doc->GroupCounter);
neu->setItemName( tr("Group%1").arg(neu->Groups.top()));
295,7 → 295,7
neu->isGroupControl = true;
neu->groupsLastItem = high;
neu->setTextFlowMode(PageItem::TextFlowUsesFrameShape);
for (uint a = 0; a < m_Doc->Items->count(); ++a)
for (int a = 0; a < m_Doc->Items->count(); ++a)
{
m_Doc->Items->at(a)->ItemNr = a;
}
315,7 → 315,7
m_Doc->setLoading(false);
m_Doc->changed();
m_Doc->setLoading(loadF);
for (uint dre=0; dre<Elements.count(); ++dre)
for (int dre=0; dre<Elements.count(); ++dre)
{
m_Doc->m_Selection->addItem(Elements.at(dre), true);
}
327,7 → 327,7
m_Doc->DragP = true;
m_Doc->DraggedElem = 0;
m_Doc->DragElements.clear();
for (uint dre=0; dre<Elements.count(); ++dre)
for (int dre=0; dre<Elements.count(); ++dre)
{
m_Doc->DragElements.append(Elements.at(dre)->ItemNr);
tmpSel->addItem(Elements.at(dre), true);
554,7 → 554,7
tmp = ts.readLine();
if (progressDialog && (++line_cnt % 100 == 0)) {
int fPos = f.at();
int progress = ceil(fPos / (double) fSize * 100);
int progress = static_cast<int>(ceil(fPos / (double) fSize * 100));
if (progress > fProgress)
{
progressDialog->setProgress("GI", fPos);
748,7 → 748,7
if (gsStack.count() < static_cast<int>(gsStackMarks.top()))
{
PageItem *ite = groupStack.pop();
uint count = elemCount.pop();
int count = elemCount.pop();
if (count == Elements.count())
{
m_Doc->Items->removeLast();
839,7 → 839,7
while (!groupStack.isEmpty())
{
PageItem *ite = groupStack.pop();
uint count = elemCount.pop();
int count = elemCount.pop();
if (count == Elements.count())
{
m_Doc->Items->removeLast();
/trunk/Scribus/scribus/pslib.cpp
32,6 → 32,7
//Added by qt3to4:
#include <QList>
#include <Q3PtrList>
#include <QList>
#include <cstdlib>
#include <qregexp.h>
#include <qbuffer.h>
407,7 → 408,7
for (int c = 0; c < patterns.count(); ++c)
{
ScPattern pa = m_Doc->docPatterns[patterns[c]];
for (uint em = 0; em < pa.items.count(); ++em)
for (int em = 0; em < pa.items.count(); ++em)
{
PageItem* item = pa.items.at(em);
if ((item->asImageFrame()) && (item->PicAvail) && (!item->Pfile.isEmpty()) && (item->printEnabled()) && (!sep) && (farb))
429,7 → 430,7
b.open( QIODevice::WriteOnly );
spoolStream.setDevice(&b);
Q3PtrStack<PageItem> groupStack;
for (uint em = 0; em < pa.items.count(); ++em)
for (int em = 0; em < pa.items.count(); ++em)
{
PageItem* item = pa.items.at(em);
if (item->isGroupControl)
1761,7 → 1762,7
Level2Layer(Doc, &ll, Lnr);
if (ll.isPrintable)
{
for (uint api = 0; api < Doc->MasterItems.count(); ++api)
for (int api = 0; api < Doc->MasterItems.count(); ++api)
{
QString tmps;
PageItem *it = Doc->MasterItems.at(api);
1866,7 → 1867,7
Level2Layer(Doc, &ll, Lnr);
if (ll.isPrintable)
{
for (uint am = 0; am < Doc->Pages->at(a)->FromMaster.count(); ++am)
for (int am = 0; am < Doc->Pages->at(a)->FromMaster.count(); ++am)
{
QString tmps;
PageItem *ite = Doc->Pages->at(a)->FromMaster.at(am);
2056,7 → 2057,7
}
}
}
for (uint am = 0; am < Doc->Pages->at(a)->FromMaster.count(); ++am)
for (int am = 0; am < Doc->Pages->at(a)->FromMaster.count(); ++am)
{
PageItem *ite = Doc->Pages->at(a)->FromMaster.at(am);
if (!ite->isTableItem)
2629,9 → 2630,9
PS_translate(0, -c->BaseOffs);
if (style.scaleH() != 1000)
PS_scale(style.scaleH() / 1000.0, 1);
Q3PtrList<PageItem> emG = hl->embedded.getGroupedItems();
QList<PageItem*> emG = hl->embedded.getGroupedItems();
Q3PtrStack<PageItem> groupStack;
for (uint em = 0; em < emG.count(); ++em)
for (int em = 0; em < emG.count(); ++em)
{
PageItem* embedded = emG.at(em);
if (embedded->isGroupControl)
2819,12 → 2820,12
 
void PSLib::ProcessPage(ScribusDoc* Doc, Page* a, uint PNr, bool sep, bool farb, bool ic, bool gcr)
{
uint b;
int b;
int h, s, v, k;
QByteArray chstrc;
QString chstr, chglyph, tmp;
PageItem *c;
Q3PtrList<PageItem> PItems;
QList<PageItem*> PItems;
Q3PtrStack<PageItem> groupStack;
int Lnr = 0;
struct Layer ll;
3641,9 → 3642,9
*/
if ((hl->ch == SpecialChars::OBJECT) && (hl->embedded.hasItem()))
{
Q3PtrList<PageItem> emG = hl->embedded.getGroupedItems();
QList<PageItem*> emG = hl->embedded.getGroupedItems();
Q3PtrStack<PageItem> groupStack;
for (uint em = 0; em < emG.count(); ++em)
for (int em = 0; em < emG.count(); ++em)
{
PageItem* embedded = emG.at(em);
if (embedded->isGroupControl)
/trunk/Scribus/scribus/story.h
57,6 → 57,7
#include <QCloseEvent>
#include <QWidgetAction>
#include <QMenu>
#include <QList>
 
#include "scribusapi.h"
#include "pageitem.h"
101,7 → 102,7
void copyStyledText();
 
StoryText StyledText;
Q3PtrList<PageItem> FrameItems;
QList<PageItem*> FrameItems;
ScribusDoc* doc;
bool unicodeTextEditMode;
bool wasMod;