Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 3627 → Rev 3626

/branches/Version13x/Scribus/scribus/pageitem_imageframe.h
50,8 → 50,6
 
virtual PageItem_ImageFrame * asImageFrame() { return this; }
virtual void clearContents();
protected:
virtual void DrawObj_Item(ScPainter *p, double sc);
 
/branches/Version13x/Scribus/scribus/pageitem.h
184,15 → 184,7
QString Farb2;
Foi* ZFo;
PageItem* embedded;
};
/**
* @brief Clear the contents of a frame.
* WARNING: Currently *they* do not check if the user wants this.
* The view does when these are called.
*/
virtual void clearContents() {};
};
 
ObjAttrVector* getObjectAttributes();
/*!
/branches/Version13x/Scribus/scribus/scribusview.cpp
8309,39 → 8309,11
if (SelItem.count() != 0)
{
PageItem *currItem;
uint selectedItemCount=SelItem.count();
for (uint i = 0; i < selectedItemCount; ++i)
for (uint i = 0; i < SelItem.count(); ++i)
{
currItem = SelItem.at(i);
if (currItem->asImageFrame())
if ((currItem->asImageFrame()) || (currItem->asTextFrame()))
{
if (ScApp->fileWatcher->files().contains(currItem->Pfile) != 0 && currItem->PicAvail)
ScApp->fileWatcher->removeFile(currItem->Pfile);
}
else
if (currItem->asTextFrame())
{
if (currItem->itemText.count() != 0 && (currItem->NextBox == 0 || currItem->BackBox == 0))
{
int t = QMessageBox::warning(this, CommonStrings::trWarning,
tr("Do you really want to clear all your text?"),
QMessageBox::No, QMessageBox::Yes, QMessageBox::NoButton);
if (t == QMessageBox::No)
continue;
}
}
currItem->clearContents();
}
uint frameItemCount=Doc->FrameItems.count();
for (uint i = 0; i < frameItemCount; ++i)
{
Doc->FrameItems.at(i)->ItemNr = i;
}
updateContents();
emit DocChanged();
/*
if ((currItem->itemType() == PageItem::ImageFrame) || (currItem->itemType() == PageItem::TextFrame))
{
if (currItem->asTextFrame())
{
if ((currItem->itemText.count() != 0) && ((currItem->NextBox == 0) || (currItem->BackBox == 0)))
8397,10 → 8369,16
currItem->setFillTransparency(0.0);
currItem->setLineTransparency(0.0);
currItem->imageClip.resize(0);
// emit UpdtObj(Doc->currentPage->pageNr(), currItem->ItemNr);
/* emit UpdtObj(Doc->currentPage->pageNr(), currItem->ItemNr); */
}
for (uint a = 0; a < Doc->FrameItems.count(); ++a)
{
Doc->FrameItems.at(a)->ItemNr = a;
}
updateContents();
emit DocChanged();
}
}*/
}
}
}
 
/branches/Version13x/Scribus/scribus/pageitem_textframe.h
49,8 → 49,6
~PageItem_TextFrame() {};
 
virtual PageItem_TextFrame * asTextFrame() { return this; }
virtual void clearContents();
 
protected:
virtual void DrawObj_Item(ScPainter *p, QRect e, double sc);
/branches/Version13x/Scribus/scribus/scribus.h
91,9 → 91,7
class ScribusWin;
 
class ScribusApp;
class ScribusQApp;
 
extern ScribusQApp* ScQApp;
extern ScribusApp* ScApp;
 
 
/branches/Version13x/Scribus/scribus/pageitem_textframe.cpp
1970,30 → 1970,3
}
Dirty = false;
}
 
void PageItem_TextFrame::clearContents()
{
//FIXME use PageItem_TextFrame pointers
PageItem *nextItem = this;
while (nextItem != 0)
{
if (nextItem->BackBox != 0)
nextItem = nextItem->BackBox;
else
break;
}
while (nextItem != 0)
{
for (ScText *it = nextItem->itemText.first(); it != 0; it = nextItem->itemText.next())
{
if ((it->ch == QChar(25)) && (it->cembedded != 0))
{
Doc->FrameItems.remove(it->cembedded);
delete it->cembedded;
}
}
nextItem->itemText.clear();
nextItem->CPos = 0;
nextItem = nextItem->NextBox;
}
}
/branches/Version13x/Scribus/scribus/pageitem_imageframe.cpp
113,28 → 113,3
}
}
}
 
void PageItem_ImageFrame::clearContents()
{
Pfile = "";
PicAvail = false;
pixm = ScImage();
LocalScX = 1;
LocalScY = 1;
OrigW = 0;
OrigH = 0;
LocalX = 0;
LocalY = 0;
setImageFlippedH(false);
setImageFlippedV(false);
textAlignment = 0;
EmProfile = "";
ScaleType = true;
AspectRatio = true;
setFillTransparency(0.0);
setLineTransparency(0.0);
imageClip.resize(0);
// emit UpdtObj(Doc->currentPage->pageNr(), ItemNr);
}