Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 3718 → Rev 3717

/branches/Version13x/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
491,15 → 491,16
return NULL;
if ((item->itemType() == PageItem::TextFrame) || (item->itemType() == PageItem::PathText))
{
// First, find the style number associated with the requested style
// by scanning through the styles looking for the name. If
// we can't find it, raise PyExc_Exception.
// FIXME: Should use a more specific exception.
/*
* First, find the style number associated with the requested style
* by scanning through the styles looking for the name. If
* we can't find it, raise PyExc_Exception.
* FIXME: Should use a more specific exception.
*/
bool found = false;
uint styleid = 0;
// We start at zero here because it's OK to match an internal name
uint docParagraphStylesCount=ScApp->doc->docParagraphStyles.count();
for (uint i=0; i < docParagraphStylesCount; ++i)
for (uint i=0; i < ScApp->doc->docParagraphStyles.count(); ++i)
{
if (ScApp->doc->docParagraphStyles[i].Vname == QString::fromUtf8(style)) {
found = true;
514,7 → 515,7
}
// quick hack to always apply on the right frame - pv
ScApp->view->Deselect(true);
ScApp->view->SelectItem(item, false);
ScApp->view->SelectItemNr(item->ItemNr);
// Now apply the style.
ScApp->setNewAbStyle(styleid);
}