Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 2446 → Rev 2447

/branches/Version13x/Scribus/scribus/documentchecker.cpp
71,7 → 71,7
for (uint e = 0; e < currItem->itemText.count(); ++e)
{
uint chr = currItem->itemText.at(e)->ch[0].unicode();
if ((chr == 13) || (chr == 32) || (chr == 29))
if ((chr == 13) || (chr == 32) || (chr == 29) || (chr == 28) || (chr == 27) || (chr == 26) || (chr == 25))
continue;
if ((currItem->itemText.at(e)->cstyle & 64) || (currItem->itemText.at(e)->cstyle & 32))
{
160,7 → 160,7
for (uint e = 0; e < currItem->itemText.count(); ++e)
{
uint chr = currItem->itemText.at(e)->ch[0].unicode();
if ((chr == 13) || (chr == 32) || (chr == 29))
if ((chr == 13) || (chr == 32) || (chr == 29) || (chr == 28) || (chr == 27) || (chr == 26) || (chr == 25))
continue;
if ((currItem->itemText.at(e)->cstyle & 64) || (currItem->itemText.at(e)->cstyle & 32))
{
/branches/Version13x/Scribus/scribus/fileloader.cpp
217,6 → 217,36
ret = false;
break;
}
for (uint d = 0; d < app->doc->MasterItems.count(); ++d)
{
PageItem *it = app->doc->MasterItems.at(d);
if ((it->itemType() == PageItem::TextFrame) || (it->itemType() == PageItem::PathText))
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
ScText *hl = it->itemText.at(e);
if ((hl->ch == QChar(25)) && ((int)hl->cembedded != -1))
hl->cembedded = app->doc->FrameItems.at((int)hl->cembedded);
else
hl->cembedded = 0;
}
}
}
for (uint d = 0; d < app->doc->DocItems.count(); ++d)
{
PageItem *it = app->doc->DocItems.at(d);
if ((it->itemType() == PageItem::TextFrame) || (it->itemType() == PageItem::PathText))
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
ScText *hl = it->itemText.at(e);
if ((hl->ch == QChar(25)) && ((int)hl->cembedded != -1))
hl->cembedded = app->doc->FrameItems.at((int)hl->cembedded);
else
hl->cembedded = 0;
}
}
}
if (ReplacedFonts.count() != 0)
{
if ((app->Prefs.askBeforeSubstituite) || (newReplacement))
971,9 → 1001,9
else
Apage->XGuides.clear();
}
if ((pg.tagName()=="PAGEOBJECT") || (pg.tagName()=="MASTEROBJECT"))
if ((pg.tagName()=="PAGEOBJECT") || (pg.tagName()=="MASTEROBJECT") || (pg.tagName()=="FRAMEOBJECT"))
{
if (pg.tagName()=="PAGEOBJECT")
if ((pg.tagName()=="PAGEOBJECT") || (pg.tagName()=="FRAMEOBJECT"))
{
doc->Items = doc->DocItems;
doc->Pages = doc->DocPages;
1066,7 → 1096,8
Neu->fill_gradient.addStop(doc->PageColors[doc->toolSettings.dPen].getRGBColor(), 1.0, 0.5, 1.0, doc->toolSettings.dPen, 100);
}
Neu->Language = app->GetLang(pg.attribute("LANGUAGE", doc->Language));
Neu->isAutoText=static_cast<bool>(QStoInt(pg.attribute("AUTOTEXT")));
Neu->isAutoText = static_cast<bool>(QStoInt(pg.attribute("AUTOTEXT")));
Neu->isEmbedded = static_cast<bool>(QStoInt(pg.attribute("isInline","0")));
if (Neu->LineSpMode == 3)
{
doc->docParagraphStyles[0].BaseAdj = true;
1080,8 → 1111,13
TableItems.append(Neu);
TableID.insert(QStoInt(pg.attribute("OwnLINK","0")), Neu->ItemNr);
}
if (pg.tagName()=="PAGEOBJECT")
if (pg.tagName()=="FRAMEOBJECT")
{
doc->FrameItems.append(doc->Items.take(Neu->ItemNr));
Neu->ItemNr = doc->FrameItems.count()-1;
}
if ((pg.tagName()=="PAGEOBJECT") || (pg.tagName()=="FRAMEOBJECT"))
{
doc->DocItems = doc->Items;
doc->DocPages = doc->Pages;
}
1230,6 → 1266,7
int ulw = qRound(QStodouble(it->attribute("CULW","-0.1")) * 10);
int stp = qRound(QStodouble(it->attribute("CSTP","-0.1")) * 10);
int stw = qRound(QStodouble(it->attribute("CSTW","-0.1")) * 10);
int iobj = QStoInt(it->attribute("COBJ","-1"));
for (uint cxx=0; cxx<tmp2.length(); ++cxx)
{
hg = new ScText;
1266,7 → 1303,7
hg->PRot = 0;
hg->PtransX = 0;
hg->PtransY = 0;
hg->cembedded = 0;
hg->cembedded = (PageItem*)iobj;
obj->itemText.append(hg);
}
return;
1327,7 → 1364,7
IT=IT.nextSibling();
}
if (currItem->Pfile != "")
view->LoadPict(currItem->Pfile, z);
view->loadPict(currItem->Pfile, currItem, false);
currItem->LocalScX = scx;
currItem->LocalScY = scy;
clPath = obj->attribute("ImageClip", "");
/branches/Version13x/Scribus/scribus/gtaction.cpp
79,10 → 79,14
for (ScText *it = textFrame->itemText.first(); it != 0; it = textFrame->itemText.next())
{
if ((it->ch == QChar(25)) && (it->cembedded != 0))
ScApp->doc->Items.remove(it->cembedded);
ScApp->doc->FrameItems.remove(it->cembedded);
}
textFrame->itemText.clear();
textFrame->CPos = 0;
for (uint a = 0; a < ScApp->doc->FrameItems.count(); ++a)
{
ScApp->doc->FrameItems.at(a)->ItemNr = a;
}
}
 
void gtAction::write(const QString& text, gtStyle *style)
99,7 → 103,7
for (ScText *itx = nextItem->itemText.first(); itx != 0; itx = nextItem->itemText.next())
{
if ((itx->ch == QChar(25)) && (itx->cembedded != 0))
ScApp->doc->Items.remove(itx->cembedded);
ScApp->doc->FrameItems.remove(itx->cembedded);
}
nextItem->itemText.clear();
nextItem->CPos = 0;
109,10 → 113,14
for (ScText *itx = it->itemText.first(); itx != 0; itx = it->itemText.next())
{
if ((itx->ch == QChar(25)) && (itx->cembedded != 0))
ScApp->doc->Items.remove(itx->cembedded);
ScApp->doc->FrameItems.remove(itx->cembedded);
}
it->itemText.clear();
it->CPos = 0;
for (uint a = 0; a < ScApp->doc->FrameItems.count(); ++a)
{
ScApp->doc->FrameItems.at(a)->ItemNr = a;
}
}
}
int paragraphStyle = -1;
/branches/Version13x/Scribus/scribus/serializer.cpp
71,12 → 71,16
for (ScText *it = nextItem->itemText.first(); it != 0; it = nextItem->itemText.next())
{
if ((it->ch == QChar(25)) && (it->cembedded != 0))
doku->Items.remove(it->cembedded);
doku->FrameItems.remove(it->cembedded);
}
nextItem->itemText.clear();
nextItem->CPos = 0;
nextItem = nextItem->NextBox;
}
for (uint a = 0; a < doku->FrameItems.count(); ++a)
{
doku->FrameItems.at(a)->ItemNr = a;
}
}
for (a=0; a<Objekt.length(); ++a)
{
/branches/Version13x/Scribus/scribus/about.cpp
51,7 → 51,7
tabLayout1->addWidget( pixmapLabel1 );
buildID = new QLabel( tab, "BB" );
buildID->setAlignment(Qt::AlignCenter);
QString bu = tr("%1 %2 %3 ").arg("12").arg("June").arg("2005");
QString bu = tr("%1 %2 %3 ").arg("13").arg("June").arg("2005");
#ifdef HAVE_CMS
bu += "C";
#else
/branches/Version13x/Scribus/scribus/scribusdoc.cpp
269,6 → 269,7
Items.clear();
MasterItems.clear();
DocItems.clear();
FrameItems.clear();
ScratchLeft = prefsData->ScratchLeft;
ScratchRight = prefsData->ScratchRight;
ScratchTop = prefsData->ScratchTop;
/branches/Version13x/Scribus/scribus/scribusXml.h
39,7 → 39,7
QMap<QString,QString> &FontSub, ApplicationPrefs *Prefs, ScribusView *view);
bool ReadDoc(QString fileName, SCFonts &avail, ScribusDoc *docu, ScribusView *viewx, QProgressBar *dia2);
void WritePages(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, QProgressBar *dia2, uint maxC, bool master);
void WriteObjects(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, QProgressBar *dia2, uint maxC, bool master);
void WriteObjects(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, QProgressBar *dia2, uint maxC, int master);
bool WriteDoc(QString fileName, ScribusDoc *docu, QProgressBar *dia2);
void WritePref(ApplicationPrefs *Vor, QString ho);
bool ReadPref(struct ApplicationPrefs *Vorein, QString ho, SplashScreen *splash, bool import12);
/branches/Version13x/Scribus/scribus/scribusXml.cpp
2742,9 → 2742,9
}
}
 
void ScriXmlDoc::WriteObjects(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, QProgressBar *dia2, uint maxC, bool master)
void ScriXmlDoc::WriteObjects(ScribusDoc *doc, QDomDocument *docu, QDomElement *dc, QProgressBar *dia2, uint maxC, int master)
{
int te, te2, tsh, tsh2, tst, tst2, tsb, tsb2, tshs, tshs2;
int te, te2, tsh, tsh2, tst, tst2, tsb, tsb2, tshs, tshs2, tobj, tobj2;
QString text, tf, tf2, tc, tc2, tcs, tcs2, tmp, tmpy, Ndir;
double ts, ts2, tsc, tsc2, tscv, tscv2, tb, tb2, tsx, tsx2, tsy, tsy2, tout, tout2, tulp, tulp2, tulw, tulw2, tstp, tstp2, tstw, tstw2;
uint ObCount = maxC;
2751,29 → 2751,43
PageItem *item;
QDomElement ob;
uint objects;
if (master)
objects = doc->MasterItems.count();
else
objects = doc->DocItems.count();
switch (master)
{
case 0:
objects = doc->MasterItems.count();
break;
case 1:
objects = doc->DocItems.count();
break;
case 2:
objects = doc->FrameItems.count();
break;
}
for(uint j = 0; j < objects;++j)
{
ObCount++;
if (dia2 != 0)
dia2->setProgress(ObCount);
if (master)
switch (master)
{
item = doc->MasterItems.at(j);
ob = docu->createElement("MASTEROBJECT");
case 0:
item = doc->MasterItems.at(j);
ob = docu->createElement("MASTEROBJECT");
break;
case 1:
item = doc->DocItems.at(j);
ob = docu->createElement("PAGEOBJECT");
break;
case 2:
item = doc->FrameItems.at(j);
ob = docu->createElement("FRAMEOBJECT");
break;
}
else
{
item = doc->DocItems.at(j);
ob = docu->createElement("PAGEOBJECT");
}
SetItemProps(&ob, item, true);
ob.setAttribute("OnMasterPage", item->OnMasterPage);
ob.setAttribute("ImageClip", item->pixm.imgInfo.usedPath);
ob.setAttribute("ImageRes", item->pixm.imgInfo.lowResType);
ob.setAttribute("isInline", static_cast<int>(item->isEmbedded));
if (item->GrType != 0)
{
QPtrVector<VColorStop> cstops = item->fill_gradient.colorStops();
2840,6 → 2854,10
tulw = item->itemText.at(k)->cunderwidth / 10.0;
tstp = item->itemText.at(k)->cstrikepos / 10.0;
tstw = item->itemText.at(k)->cstrikewidth / 10.0;
if ((item->itemText.at(k)->ch == QChar(25)) && (item->itemText.at(k)->cembedded != 0))
tobj = item->itemText.at(k)->cembedded->ItemNr;
else
tobj = -1;
if (item->itemText.at(k)->ch == QChar(13))
text = QChar(5);
else if (item->itemText.at(k)->ch == QChar(9))
2869,6 → 2887,8
it.setAttribute("CULW",tulw);
it.setAttribute("CSTP",tstp);
it.setAttribute("CSTW",tstw);
if (tobj != -1)
it.setAttribute("COBJ", tobj);
ob.appendChild(it);
break;
}
2891,6 → 2911,10
tulw2 = item->itemText.at(k)->cunderwidth / 10.0;
tstp2 = item->itemText.at(k)->cstrikepos / 10.0;
tstw2 = item->itemText.at(k)->cstrikewidth / 10.0;
if ((item->itemText.at(k)->ch == QChar(25)) && (item->itemText.at(k)->cembedded != 0))
tobj2 = item->itemText.at(k)->cembedded->ItemNr;
else
tobj2 = -1;
while ((ts2 == ts)
&& (tsb2 == tsb)
&& (tf2 == tf)
2909,6 → 2933,7
&& (tulw2 == tulw)
&& (tstp2 == tstp)
&& (tstw2 == tstw)
&& (tobj2 == tobj)
&& (tst2 == tst))
{
if (item->itemText.at(k)->ch == QChar(13))
2939,6 → 2964,10
tulw2 = item->itemText.at(k)->cunderwidth / 10.0;
tstp2 = item->itemText.at(k)->cstrikepos / 10.0;
tstw2 = item->itemText.at(k)->cstrikewidth / 10.0;
if ((item->itemText.at(k)->ch == QChar(25)) && (item->itemText.at(k)->cembedded != 0))
tobj = item->itemText.at(k)->cembedded->ItemNr;
else
tobj = -1;
}
it.setAttribute("CH",text);
it.setAttribute("CSIZE",ts);
2960,6 → 2989,8
it.setAttribute("CULW",tulw);
it.setAttribute("CSTP",tstp);
it.setAttribute("CSTW",tstw);
if (tobj != -1)
it.setAttribute("COBJ", tobj);
k--;
ob.appendChild(it);
}
3399,13 → 3430,14
dc.appendChild(tocElem);
if (dia2 != 0)
{
dia2->setTotalSteps(doc->DocPages.count()+doc->MasterPages.count()+doc->DocItems.count()+doc->MasterItems.count());
dia2->setTotalSteps(doc->DocPages.count()+doc->MasterPages.count()+doc->DocItems.count()+doc->MasterItems.count()+doc->FrameItems.count());
dia2->setProgress(0);
}
WritePages(doc, &docu, &dc, dia2, 0, true);
WritePages(doc, &docu, &dc, dia2, doc->MasterPages.count(), false);
WriteObjects(doc, &docu, &dc, dia2, doc->MasterPages.count()+doc->DocPages.count(), true);
WriteObjects(doc, &docu, &dc, dia2, doc->MasterPages.count()+doc->DocPages.count()+doc->MasterItems.count(), false);
WriteObjects(doc, &docu, &dc, dia2, doc->MasterPages.count()+doc->DocPages.count(), 0);
WriteObjects(doc, &docu, &dc, dia2, doc->MasterPages.count()+doc->DocPages.count()+doc->MasterItems.count(), 1);
WriteObjects(doc, &docu, &dc, dia2, doc->MasterPages.count()+doc->DocPages.count()+doc->MasterItems.count()+doc->FrameItems.count(), 2);
elem.appendChild(dc);
/**
* changed to enable saving
/branches/Version13x/Scribus/scribus/story.cpp
2691,10 → 2691,19
PageItem* nb2 = nextItem;
while (nb2 != 0)
{
for (ScText *it = nb2->itemText.first(); it != 0; it = nb2->itemText.next())
{
if ((it->ch == QChar(25)) && (it->cembedded != 0))
doc->FrameItems.remove(it->cembedded);
}
nb2->itemText.clear();
nb2->CPos = 0;
nb2->Dirty = false;
nb2 = nb2->NextBox;
for (uint a = 0; a < doc->FrameItems.count(); ++a)
{
doc->FrameItems.at(a)->ItemNr = a;
}
}
Editor->saveItemText(nextItem);
if (doc->docHyphenator->AutoCheck)
/branches/Version13x/Scribus/scribus/pageitem.cpp
521,9 → 521,12
p->translate(hl->xco * p->zoomFactor(), (hl->yco - (hl->embedded->Height * (hl->scalev / 1000.0))) * p->zoomFactor());
if (hl->base != 0)
p->translate(0, -hl->embedded->Height * (hl->base / 1000.0) * p->zoomFactor());
double pws = hl->embedded->Pwidth;
hl->embedded->Pwidth *= QMIN(hl->scale / 1000.0, hl->scalev / 1000.0);
p->scale(hl->scale / 1000.0, hl->scalev / 1000.0);
hl->embedded->DrawObj(p, e);
p->restore();
hl->embedded->Pwidth = pws;
for (int xxx=0; xxx<5; ++xxx)
{
Doc->docParagraphStyles[xxx].LineSpaMode = savedParagraphStyles[xxx].LineSpaMode;
930,7 → 933,7
int LayerLevItem = Layer2Level(Doc, docItem->LayerNr);
if (((docItem->ItemNr > ItemNr) && (docItem->LayerNr == LayerNr)) || (LayerLevItem > LayerLev))
{
if ((docItem->textFlowsAroundFrame()) && (!docItem->isEmbedded))
if (docItem->textFlowsAroundFrame())
{
pp.begin(ScApp->view->viewport());
pp.translate(docItem->Xpos - Mp->Xoffset + Dp->Xoffset, docItem->Ypos - Mp->Yoffset + Dp->Yoffset);
964,7 → 967,7
for (a = 0; a < Doc->Items.count(); ++a)
{
PageItem* docItem = Doc->Items.at(a);
if ((docItem->textFlowsAroundFrame()) && (!docItem->isEmbedded))
if (docItem->textFlowsAroundFrame())
{
pp.begin(ScApp->view->viewport());
pp.translate(docItem->Xpos, docItem->Ypos);
1001,7 → 1004,7
int LayerLevItem = Layer2Level(Doc, docItem->LayerNr);
if (((docItem->ItemNr > ItemNr) && (docItem->LayerNr == LayerNr)) || (LayerLevItem > LayerLev))
{
if ((docItem->textFlowsAroundFrame()) && (!docItem->isEmbedded))
if (docItem->textFlowsAroundFrame())
{
pp.begin(ScApp->view->viewport());
pp.translate(docItem->Xpos, docItem->Ypos);
/branches/Version13x/Scribus/scribus/scribusdoc.h
125,6 → 125,7
QPtrList<PageItem> Items;
QPtrList<PageItem> MasterItems;
QPtrList<PageItem> DocItems;
QPtrList<PageItem> FrameItems;
/** Pagewidth */
double pageWidth;
/** Pageheight */
/branches/Version13x/Scribus/scribus/scribusview.cpp
492,8 → 492,6
for (uint a = 0; a < page->FromMaster.count(); ++a)
{
currItem = page->FromMaster.at(a);
if (currItem->isEmbedded)
continue;
if (currItem->LayerNr != ll.LNr)
continue;
if ((currItem->OwnPage != -1) && (currItem->OwnPage != static_cast<int>(Mp->PageNr)))
614,8 → 612,6
while ( (currItem = docItem.current()) != 0 )
{
++docItem;
if (currItem->isEmbedded)
continue;
if (currItem->LayerNr != ll.LNr)
continue;
if ((previewMode) && (!currItem->isPrintable))
2550,8 → 2546,6
for (uint a = 0; a < Doc->Items.count(); ++a)
{
PageItem* docItem = Doc->Items.at(a);
if (docItem->isEmbedded)
continue;
p.begin(viewport());
Transform(docItem, &p);
QRegion apr = QRegion(p.xForm(docItem->Clip));
7283,11 → 7277,6
currItem = Doc->Items.prev();
continue;
}
if (currItem->isEmbedded)
{
currItem = Doc->Items.prev();
continue;
}
if (currItem->LayerNr == Doc->ActiveLayer)
{
p.begin(this);
8066,7 → 8055,7
for (ScText *it = nextItem->itemText.first(); it != 0; it = nextItem->itemText.next())
{
if ((it->ch == QChar(25)) && (it->cembedded != 0))
Doc->Items.remove(it->cembedded);
Doc->FrameItems.remove(it->cembedded);
}
nextItem->itemText.clear();
nextItem->CPos = 0;
8097,17 → 8086,10
currItem->imageClip.resize(0);
/* emit UpdtObj(Doc->currentPage->PageNr, currItem->ItemNr); */
}
for (uint a = 0; a < Doc->Items.count(); ++a)
for (uint a = 0; a < Doc->FrameItems.count(); ++a)
{
Doc->Items.at(a)->ItemNr = a;
if (Doc->Items.at(a)->isBookmark)
emit NewBMNr(Doc->Items.at(a)->BMnr, a);
Doc->FrameItems.at(a)->ItemNr = a;
}
if (Doc->masterPageMode)
Doc->MasterItems = Doc->Items;
else
Doc->DocItems = Doc->Items;
ScApp->outlinePalette->BuildTree(Doc);
updateContents();
emit DocChanged();
}
8153,7 → 8135,7
for (ScText *it = currItem->itemText.first(); it != 0; it = currItem->itemText.next())
{
if ((it->ch == QChar(25)) && (it->cembedded != 0))
Doc->Items.remove(it->cembedded);
Doc->FrameItems.remove(it->cembedded);
}
if ((currItem->NextBox != 0) || (currItem->BackBox != 0))
{
8215,6 → 8197,10
if (Doc->Items.at(a)->isBookmark)
emit NewBMNr(Doc->Items.at(a)->BMnr, a);
}
for (uint a = 0; a < Doc->FrameItems.count(); ++a)
{
Doc->FrameItems.at(a)->ItemNr = a;
}
 
if (anz > 1)
undoManager->commit();
10932,6 → 10918,19
AdjustPictScale(currItem);
}
}
for (uint a = 0; a < Doc->FrameItems.count(); ++a)
{
PageItem *currItem = Doc->FrameItems.at(a);
if ((currItem->PicAvail) && (currItem->Pfile == name))
{
bool fho = currItem->imageFlippedH();
bool fvo = currItem->imageFlippedV();
LoadPict(currItem->Pfile, currItem->ItemNr, true);
currItem->setImageFlippedH(fho);
currItem->setImageFlippedV(fvo);
AdjustPictScale(currItem);
}
}
updateContents();
emit DocChanged();
}
10964,6 → 10963,19
AdjustPictScale(currItem);
}
}
for (uint a = 0; a < Doc->FrameItems.count(); ++a)
{
PageItem *currItem = Doc->FrameItems.at(a);
if (currItem->PicAvail)
{
bool fho = currItem->imageFlippedH();
bool fvo = currItem->imageFlippedV();
LoadPict(currItem->Pfile, currItem->ItemNr, true);
currItem->setImageFlippedH(fho);
currItem->setImageFlippedV(fvo);
AdjustPictScale(currItem);
}
}
updateContents();
emit DocChanged();
}
10990,6 → 11002,15
currItem->pixm = QImage();
}
}
for (uint a = 0; a < Doc->FrameItems.count(); ++a)
{
PageItem *currItem = Doc->FrameItems.at(a);
if ((currItem->PicAvail) && (currItem->Pfile == name))
{
currItem->PicAvail = false;
currItem->pixm = QImage();
}
}
updateContents();
emit DocChanged();
}
/branches/Version13x/Scribus/scribus/scribus.cpp
1424,7 → 1424,7
{
first = true;
if ((it->ch == QChar(25)) && (it->cembedded != 0))
doc->Items.remove(it->cembedded);
doc->FrameItems.remove(it->cembedded);
currItem->itemText.remove();
it = currItem->itemText.prev();
if (it == 0)
1446,17 → 1446,10
else
currItem->CPos = 0;
currItem->HasSel = false;
for (uint a = 0; a < doc->Items.count(); ++a)
for (uint a = 0; a < doc->FrameItems.count(); ++a)
{
doc->Items.at(a)->ItemNr = a;
if (doc->Items.at(a)->isBookmark)
bookmarkPalette->BView->ChangeItem(doc->Items.at(a)->BMnr, a);
doc->FrameItems.at(a)->ItemNr = a;
}
if (doc->masterPageMode)
doc->MasterItems = doc->Items;
else
doc->DocItems = doc->Items;
outlinePalette->BuildTree(doc);
DisableTxEdit();
}
 
5760,6 → 5753,16
doc->SnapGuides = savedAlignGuides;
PageItem* currItem2 = doc->Items.at(doc->Items.count()-1);
currItem2->isEmbedded = true;
currItem2->isAnnotation = false;
currItem2->isBookmark = false;
currItem2->ItemNr = doc->FrameItems.count();
doc->FrameItems.append(doc->Items.take(doc->Items.count()-1));
if (doc->masterPageMode)
doc->MasterItems = doc->Items;
else
doc->DocItems = doc->Items;
outlinePalette->BuildTree(doc);
outlinePalette->reopenTree(doc->OpenNodes);
hg = new ScText;
hg->ch = QChar(25);
hg->cfont = (*doc->AllFonts)[doc->CurrFont];
5794,6 → 5797,7
hg->cextra = 0;
hg->cembedded = currItem2;
currItem->itemText.insert(currItem->CPos, hg);
currItem->CPos += 1;
}
else
{
10548,6 → 10552,76
it->itemText.at(e)->cfont->RealGlyphs.insert(numco, gly);
}
}
continue;
}
if ((it->itemText.at(e)->cstyle & 64) || (it->itemText.at(e)->cstyle & 32))
{
chx = it->itemText.at(e)->ch;
if (chx.upper() != it->itemText.at(e)->ch)
chx = chx.upper();
chr = chx[0].unicode();
}
if (it->itemText.at(e)->cfont->CharWidth.contains(chr))
{
gly = it->itemText.at(e)->cfont->GlyphArray[chr].Outlines.copy();
it->itemText.at(e)->cfont->RealGlyphs.insert(chr, gly);
}
}
}
}
for (uint d = 0; d < doc->FrameItems.count(); ++d)
{
it = doc->FrameItems.at(d);
if ((it->itemType() == PageItem::TextFrame) || (it->itemType() == PageItem::PathText))
{
for (uint e = 0; e < it->itemText.count(); ++e)
{
Really->insert(it->itemText.at(e)->cfont->SCName, doc->UsedFonts[it->itemText.at(e)->cfont->SCName]);
uint chr = it->itemText.at(e)->ch[0].unicode();
if ((chr == 13) || (chr == 32) || (chr == 29))
continue;
if (chr == 9)
{
for (uint t1 = 0; t1 < doc->docParagraphStyles[it->itemText.at(e)->cab].TabValues.count(); t1++)
{
if (doc->docParagraphStyles[it->itemText.at(e)->cab].TabValues[t1].tabFillChar.isNull())
continue;
chx = QString(doc->docParagraphStyles[it->itemText.at(e)->cab].TabValues[t1].tabFillChar);
if ((it->itemText.at(e)->cstyle & 64) || (it->itemText.at(e)->cstyle & 32))
{
if (chx.upper() != QString(doc->docParagraphStyles[it->itemText.at(e)->cab].TabValues[t1].tabFillChar))
chx = chx.upper();
}
chr = chx[0].unicode();
gly = it->itemText.at(e)->cfont->GlyphArray[chr].Outlines.copy();
it->itemText.at(e)->cfont->RealGlyphs.insert(chr, gly);
}
for (uint t1 = 0; t1 < it->TabValues.count(); t1++)
{
if (it->TabValues[t1].tabFillChar.isNull())
continue;
chx = QString(it->TabValues[t1].tabFillChar);
if ((it->itemText.at(e)->cstyle & 64) || (it->itemText.at(e)->cstyle & 32))
{
if (chx.upper() != QString(it->TabValues[t1].tabFillChar))
chx = chx.upper();
}
chr = chx[0].unicode();
gly = it->itemText.at(e)->cfont->GlyphArray[chr].Outlines.copy();
it->itemText.at(e)->cfont->RealGlyphs.insert(chr, gly);
}
continue;
}
if (chr == 30)
{
for (uint numco = 0x30; numco < 0x3A; ++numco)
{
if (it->itemText.at(e)->cfont->CharWidth.contains(numco))
{
gly = it->itemText.at(e)->cfont->GlyphArray[numco].Outlines.copy();
it->itemText.at(e)->cfont->RealGlyphs.insert(numco, gly);
}
}
continue;
}
if ((it->itemText.at(e)->cstyle & 64) || (it->itemText.at(e)->cstyle & 32))
/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
255,13 → 255,27
PageItem *nextItem = currItem->NextBox;
while (nextItem != 0)
{
for (ScText *itx = nextItem->itemText.first(); itx != 0; itx = nextItem->itemText.next())
{
if ((itx->ch == QChar(25)) && (itx->cembedded != 0))
Carrier->doc->FrameItems.remove(itx->cembedded);
}
nextItem->itemText.clear();
nextItem->CPos = 0;
nextItem = nextItem->NextBox;
}
}
for (ScText *itx = currItem->itemText.first(); itx != 0; itx = currItem->itemText.next())
{
if ((itx->ch == QChar(25)) && (itx->cembedded != 0))
Carrier->doc->FrameItems.remove(itx->cembedded);
}
currItem->itemText.clear();
currItem->CPos = 0;
for (uint a = 0; a < Carrier->doc->FrameItems.count(); ++a)
{
Carrier->doc->FrameItems.at(a)->ItemNr = a;
}
for (uint a = 0; a < Daten.length(); ++a)
{
struct ScText *hg = new ScText;
618,8 → 632,17
Carrier->deleteSelectedTextFromFrame(it);
else
{
for (ScText *itx = it->itemText.first(); itx != 0; itx = it->itemText.next())
{
if ((itx->ch == QChar(25)) && (itx->cembedded != 0))
Carrier->doc->FrameItems.remove(itx->cembedded);
}
it->itemText.clear();
it->CPos = 0;
for (uint a = 0; a < Carrier->doc->FrameItems.count(); ++a)
{
Carrier->doc->FrameItems.at(a)->ItemNr = a;
}
}
Py_INCREF(Py_None);
return Py_None;