r23798 by craig - More asBlahFrame etc conversions
scribus-commit
scribus-commit at lists.scribus.net
Tue May 12 22:29:38 UTC 2020
Author: craig
Date: Tue May 12 22:29:38 2020
New Revision: 23798
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23798
Log:
More asBlahFrame etc conversions
Modified:
trunk/Scribus/scribus/canvasmode.cpp
trunk/Scribus/scribus/collect4output.cpp
trunk/Scribus/scribus/documentbuilder.cpp
trunk/Scribus/scribus/hyphenator.cpp
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
trunk/Scribus/scribus/plugins/scripter/api_document.cpp
trunk/Scribus/scribus/plugins/scripter/api_imageitem.cpp
trunk/Scribus/scribus/plugins/scripter/api_layer.cpp
trunk/Scribus/scribus/plugins/scripter/api_page.cpp
trunk/Scribus/scribus/plugins/scripter/api_textitem.cpp
trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp
trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdannotations.cpp
trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdmani.cpp
trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdtext.cpp
trunk/Scribus/scribus/plugins/short-words/parse.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusdoc.h
trunk/Scribus/scribus/ui/contextmenu.cpp
trunk/Scribus/scribus/ui/outlinepalette.cpp
trunk/Scribus/scribus/ui/picstatus.cpp
trunk/Scribus/scribus/ui/propertiespalette.cpp
trunk/Scribus/scribus/ui/propertiespalette_image.cpp
trunk/Scribus/scribus/ui/propertiespalette_line.cpp
trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
trunk/Scribus/scribus/ui/propertywidget_dropcap.cpp
trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp
trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp
trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
trunk/Scribus/scribus/ui/storyeditor.cpp
trunk/Scribus/scribus/util.cpp
Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Tue May 12 22:29:38 2020
@@ -1140,7 +1140,7 @@
double radRotation = rotationFC * M_PI / 180.0;
bool moveImage = false;
- if ((currItem->isImageFrame() || currItem->asLatexFrame() || currItem->asOSGFrame()) && currItem->imageIsAvailable && !currItem->fitImageToFrame())
+ if ((currItem->isImageFrame() || currItem->isLatexFrame() || currItem->isOSGFrame()) && currItem->imageIsAvailable && !currItem->fitImageToFrame())
moveImage = true;
switch (kk)
Modified: trunk/Scribus/scribus/collect4output.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/collect4output.cpp
==============================================================================
--- trunk/Scribus/scribus/collect4output.cpp (original)
+++ trunk/Scribus/scribus/collect4output.cpp Tue May 12 22:29:38 2020
@@ -263,7 +263,7 @@
void CollectForOutput::processItem(PageItem *ite)
{
- if (ite->asImageFrame())
+ if (ite->isImageFrame())
{
/* hack for subsequent c4o "./" -> "/doc/full/path" */
if (!ite->isInlineImage)
@@ -286,7 +286,7 @@
}
}
#ifdef HAVE_OSG
- if (ite->asOSGFrame())
+ if (ite->isOSGFrame())
{
PageItem_OSGFrame *osgframe = ite->asOSGFrame();
QString ofName(osgframe->modelFile);
@@ -303,7 +303,7 @@
}
}
#endif
- if (ite->asTextFrame())
+ if (ite->isTextFrame())
{
if (ite->isAnnotation())
{
Modified: trunk/Scribus/scribus/documentbuilder.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/documentbuilder.cpp
==============================================================================
--- trunk/Scribus/scribus/documentbuilder.cpp (original)
+++ trunk/Scribus/scribus/documentbuilder.cpp Tue May 12 22:29:38 2020
@@ -109,7 +109,7 @@
PageItem* DocumentBuilder::finishPageItem(PageItem* newItem)
{
- if (newItem->asImageFrame() || newItem->asLatexFrame())
+ if (newItem->isImageFrame() || newItem->isLatexFrame())
{
if (!newItem->Pfile.isEmpty())
{
Modified: trunk/Scribus/scribus/hyphenator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/hyphenator.cpp
==============================================================================
--- trunk/Scribus/scribus/hyphenator.cpp (original)
+++ trunk/Scribus/scribus/hyphenator.cpp Tue May 12 22:29:38 2020
@@ -133,7 +133,7 @@
void Hyphenator::slotHyphenate(PageItem* it)
{
- if (!(it->asTextFrame()) || (it->itemText.length() == 0))
+ if (!(it->isTextFrame()) || (it->itemText.length() == 0))
return;
m_doc->DoDrawing = false;
@@ -340,7 +340,7 @@
void Hyphenator::slotDeHyphenate(PageItem* it)
{
- if (!(it->asTextFrame()) || (it ->itemText.length() == 0))
+ if (!(it->isTextFrame()) || (it ->itemText.length() == 0))
return;
if (it->itemText.isSelected())
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Tue May 12 22:29:38 2020
@@ -2531,7 +2531,7 @@
delete painter;
m_Doc->guidesPrefs().framesShown = savedFlag;
isEmbedded = isEmbedded_Old;
- if ((isEmbedded_Old != isEmbedded) && (asTextFrame() || asPathText()))
+ if ((isEmbedded_Old != isEmbedded) && (isTextFrame() || isPathText()))
{
invalid = true;
layout();
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Tue May 12 22:29:38 2020
@@ -2095,7 +2095,7 @@
}
if (tName == "LATEX")
{
- if (newItem->asLatexFrame())
+ if (newItem->isLatexFrame())
{
readLatexInfo(newItem->asLatexFrame(), reader);
}
@@ -2596,7 +2596,7 @@
currItem->setImageXYScale(scx, scy);
currItem->setImageXYOffset(attrs.valueAsDouble("LOCALX"), attrs.valueAsDouble("LOCALY"));
currItem->setImageRotation(attrs.valueAsDouble("LOCALROT", 0));
- if (!currItem->asLatexFrame())
+ if (!currItem->isLatexFrame())
{
bool inlineF = attrs.valueAsBool("isInlineImage", false);
QString dat = attrs.valueAsString("ImageData", "");
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Tue May 12 22:29:38 2020
@@ -4167,7 +4167,7 @@
currentView.addedTransparency = tAtt.valueAsDouble("trans");
currentView.colorAC = QColor(tAtt.valueAsString("colorAC"));
currentView.colorFC = QColor(tAtt.valueAsString("colorFC"));
- if (newItem->asOSGFrame())
+ if (newItem->isOSGFrame())
newItem->asOSGFrame()->viewMap.insert(tAtt.valueAsString("viewName"), currentView);
}
#endif
@@ -4191,7 +4191,7 @@
}
if (tName == "LATEX")
{
- if (newItem->asLatexFrame())
+ if (newItem->isLatexFrame())
{
readLatexInfo(newItem->asLatexFrame(), reader);
}
@@ -4207,7 +4207,7 @@
}
if ((tName == "PAGEOBJECT") || (tName == "ITEM"))
{
- if (newItem->asGroupFrame())
+ if (newItem->isGroup())
{
// bool success = true;
QList<PageItem*>* docItems = doc->Items;
@@ -5004,7 +5004,7 @@
currItem->setImageXYScale(imageXScale, imageYScale);
currItem->setImageXYOffset(imageXOffset, imageYOffset);
currItem->setImageRotation(attrs.valueAsDouble("LOCALROT"));
-// if (!currItem->asLatexFrame())
+// if (!currItem->isLatexFrame())
#ifdef HAVE_OSG
if ((currItem->isImageFrame() || currItem->isOSGFrame()) && (!currItem->isLatexFrame()))
#else
Modified: trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp Tue May 12 22:29:38 2020
@@ -959,7 +959,7 @@
cmdText += "DRW Colortable";
if (currentItem != nullptr)
{
- if (currentItem->asImageFrame())
+ if (currentItem->isImageFrame())
{
QString fileName = currentItem->Pfile;
if (!fileName.isEmpty())
Modified: trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp Tue May 12 22:29:38 2020
@@ -1116,7 +1116,7 @@
parseCharStyle(newStyle, n.isElement() ? e : elm);
item->itemText.applyCharStyle(pos, chars.length(), newStyle);
}
- if (!item->asPolyLine() && !item->asTextFrame())
+ if (!item->asPolyLine() && !item->isTextFrame())
item = m_Doc->convertItemTo(item, PageItem::TextFrame);
firstSpan = false;
}
Modified: trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp (original)
+++ trunk/Scribus/scribus/plugins/picbrowser/picturebrowser.cpp Tue May 12 22:29:38 2020
@@ -207,7 +207,7 @@
for (int ii = 0; ii < allItems.count(); ii++)
{
pItem = allItems.at(ii);
- if ((pItem->itemType() == PageItem::ImageFrame) && (!pItem->asLatexFrame()))
+ if ((pItem->itemType() == PageItem::ImageFrame) && (!pItem->isLatexFrame()))
{
QString itemText;
if (pItem->imageIsAvailable)
@@ -230,7 +230,7 @@
for (int ii = 0; ii < allItems.count(); ii++)
{
pItem = allItems.at(ii);
- if ((pItem->itemType() == PageItem::ImageFrame) && (!pItem->asLatexFrame()))
+ if ((pItem->itemType() == PageItem::ImageFrame) && (!pItem->isLatexFrame()))
{
QString itemText;
if (pItem->imageIsAvailable)
@@ -615,7 +615,7 @@
for (int ii = 0; ii < allItems.count(); ii++)
{
pItem = allItems.at(ii);
- if ((pItem->itemType() == PageItem::ImageFrame) && (pItem->imageIsAvailable) && (!pItem->asLatexFrame()))
+ if ((pItem->itemType() == PageItem::ImageFrame) && (pItem->imageIsAvailable) && (!pItem->isLatexFrame()))
{
if ((id == 0) || ((id - 1) == pItem->OwnPage))
{
@@ -635,7 +635,7 @@
for (int ii = 0; ii < allItems.count(); ii++)
{
pItem = allItems.at(ii);
- if ((pItem->itemType() == PageItem::ImageFrame) && (pItem->imageIsAvailable) && (!pItem->asLatexFrame()))
+ if ((pItem->itemType() == PageItem::ImageFrame) && (pItem->imageIsAvailable) && (!pItem->isLatexFrame()))
{
if ((id == 0) || ((id - 1) == pItem->OwnPage))
{
Modified: trunk/Scribus/scribus/plugins/scripter/api_document.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/scripter/api_document.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scripter/api_document.cpp (original)
+++ trunk/Scribus/scribus/plugins/scripter/api_document.cpp Tue May 12 22:29:38 2020
@@ -195,12 +195,12 @@
else
{
PageItem* item = ScCore->primaryMainWindow()->doc->m_Selection->itemAt(0);
- if(item->asTextFrame())
+ if(item->isTextFrame())
{
TextAPI *textItem = new TextAPI(item->asTextFrame());
return textItem;
}
- else if(item->asImageFrame())
+ else if(item->isImageFrame())
{
ImageAPI *imageItem = new ImageAPI(item->asImageFrame());
return imageItem;
@@ -238,12 +238,12 @@
* the text operations
*/
PageItem *item = sel->itemAt(i);
- if (item->asTextFrame())
+ if (item->isTextFrame())
{
TextAPI *textItem = new TextAPI(item->asTextFrame());
l.append(qVariantFromValue((QObject *)(textItem)));
}
- else if(item->asImageFrame())
+ else if(item->isImageFrame())
{
ImageAPI *imageItem = new ImageAPI(item->asImageFrame());
l.append(qVariantFromValue((QObject *)(imageItem)));
@@ -281,12 +281,12 @@
for (int i = 0; i<ScCore->primaryMainWindow()->doc->Items->count(); ++i)
{
PageItem *item = ScCore->primaryMainWindow()->doc->Items->at(i);
- if (item->asTextFrame())
+ if (item->isTextFrame())
{
TextAPI *textItem = new TextAPI(item->asTextFrame());
l.append(qVariantFromValue((QObject *)(textItem)));
}
- else if(item->asImageFrame())
+ else if(item->isImageFrame())
{
ImageAPI *imageItem = new ImageAPI(item->asImageFrame());
l.append(qVariantFromValue((QObject *)(imageItem)));
Modified: trunk/Scribus/scribus/plugins/scripter/api_imageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/scripter/api_imageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scripter/api_imageitem.cpp (original)
+++ trunk/Scribus/scribus/plugins/scripter/api_imageitem.cpp Tue May 12 22:29:38 2020
@@ -69,7 +69,7 @@
RAISE("No document open");
if (item == nullptr)
return;
- if (! item->asImageFrame())
+ if (! item->isImageFrame())
{
RAISE("Specified item not an image frame.");
return;
@@ -90,7 +90,7 @@
RAISE("No document open");
if (item == nullptr)
return;
- if (!item->asImageFrame())
+ if (!item->isImageFrame())
{
RAISE("Target is not an image frame.");
return;
@@ -104,7 +104,7 @@
RAISE("No document open");
if (item == nullptr)
return;
- if (! item->asImageFrame())
+ if (! item->isImageFrame())
{
RAISE("Specified item not an image frame.");
return;
@@ -132,7 +132,7 @@
RAISE("No document open");
if (item == nullptr)
return;
- if (! item->asImageFrame())
+ if (! item->isImageFrame())
{
RAISE("Specified item not an image frame.");
return;
@@ -167,7 +167,7 @@
RAISE("No document open");
if (item == nullptr)
return ;
- if (! item->asImageFrame())
+ if (! item->isImageFrame())
{
RAISE("Specified item not an image frame.");
return;
@@ -190,7 +190,7 @@
RAISE("No document open.");
if (item == nullptr)
return;
- if (! item->asImageFrame())
+ if (! item->isImageFrame())
{
RAISE("Specified item not an image frame.");
return;
Modified: trunk/Scribus/scribus/plugins/scripter/api_layer.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/scripter/api_layer.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scripter/api_layer.cpp (original)
+++ trunk/Scribus/scribus/plugins/scripter/api_layer.cpp Tue May 12 22:29:38 2020
@@ -142,12 +142,12 @@
PageItem *item = ScCore->primaryMainWindow()->doc->Items->at(i);
if (item->LayerID == this->getID())
{
- if (item->asTextFrame())
+ if (item->isTextFrame())
{
TextAPI *textItem = new TextAPI(item->asTextFrame());
l.append(qVariantFromValue((QObject *)(textItem)));
}
- else if (item->asImageFrame())
+ else if (item->isImageFrame())
{
ImageAPI *imageItem = new ImageAPI(item->asImageFrame());
l.append(qVariantFromValue((QObject *)(imageItem)));
Modified: trunk/Scribus/scribus/plugins/scripter/api_page.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/scripter/api_page.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scripter/api_page.cpp (original)
+++ trunk/Scribus/scribus/plugins/scripter/api_page.cpp Tue May 12 22:29:38 2020
@@ -92,7 +92,7 @@
* it onto TextWrapper class, which can effectively perform all
* the text operations
*/
- if (item->asTextFrame())
+ if (item->isTextFrame())
{
l.append(qVariantFromValue((QObject *)(new TextAPI(item->asTextFrame()))));
}
@@ -123,7 +123,7 @@
PageItem *item = sel->itemAt(i);
if (num == item->OwnPage)
{
- if (item->asTextFrame())
+ if (item->isTextFrame())
{
l.append(qVariantFromValue((QObject*)(new TextAPI(item->asTextFrame()))));
}
Modified: trunk/Scribus/scribus/plugins/scripter/api_textitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/scripter/api_textitem.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scripter/api_textitem.cpp (original)
+++ trunk/Scribus/scribus/plugins/scripter/api_textitem.cpp Tue May 12 22:29:38 2020
@@ -392,7 +392,7 @@
PageItem *toitem = GetUniqueItem(name2);
if (toitem == nullptr)
return;
- if (!(toitem->asTextFrame()))
+ if (!(toitem->isTextFrame()))
{
RAISE("Can only link text frames.");
}
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdannotations.cpp Tue May 12 22:29:38 2020
@@ -658,7 +658,7 @@
{
if (item == nullptr)
return false;
- if (!item->asTextFrame())
+ if (!item->isTextFrame())
{
PyErr_SetString(WrongFrameTypeError,
QObject::tr("Can't set annotation on a non-text frame", "python error").toLocal8Bit().constData());
Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdannotations.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdannotations.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdannotations.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdannotations.cpp Tue May 12 22:29:38 2020
@@ -657,7 +657,7 @@
{
if (item == nullptr)
return false;
- if (!item->asTextFrame())
+ if (!item->isTextFrame())
{
PyErr_SetString(WrongFrameTypeError,
QObject::tr("Can't set annotation on a non-text frame", "python error").toLocal8Bit().constData());
Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdmani.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdmani.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdmani.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdmani.cpp Tue May 12 22:29:38 2020
@@ -27,7 +27,7 @@
PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
if (item == nullptr)
return nullptr;
- if (!item->asImageFrame())
+ if (!item->isImageFrame())
{
PyErr_SetString(WrongFrameTypeError, QObject::tr("Target is not an image frame.","python error").toLocal8Bit().constData());
return nullptr;
@@ -47,7 +47,7 @@
PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
if (item == nullptr)
return nullptr;
- if (! item->asImageFrame())
+ if (! item->isImageFrame())
{
PyErr_SetString(ScribusException, QObject::tr("Specified item not an image frame.","python error").toLocal8Bit().constData());
return nullptr;
@@ -89,7 +89,7 @@
PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
if (item == nullptr)
return nullptr;
- if (!item->asImageFrame())
+ if (!item->isImageFrame())
{
PyErr_SetString(ScribusException, QObject::tr("Specified item not an image frame.","python error").toLocal8Bit().constData());
return nullptr;
@@ -132,7 +132,7 @@
PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
if (item == nullptr)
return nullptr;
- if (!item->asImageFrame())
+ if (!item->isImageFrame())
{
PyErr_SetString(ScribusException, QObject::tr("Specified item not an image frame.","python error").toLocal8Bit().constData());
return nullptr;
@@ -176,7 +176,7 @@
PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
if (item == nullptr)
return nullptr;
- if (! item->asImageFrame())
+ if (! item->isImageFrame())
{
PyErr_SetString(ScribusException, QObject::tr("Specified item not an image frame.","python error").toLocal8Bit().constData());
return nullptr;
@@ -204,7 +204,7 @@
PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
if (item == nullptr)
return nullptr;
- if (! item->asImageFrame())
+ if (! item->isImageFrame())
{
PyErr_SetString(ScribusException, QObject::tr("Specified item not an image frame.","python error").toLocal8Bit().constData());
return nullptr;
@@ -538,7 +538,7 @@
PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
if (item == nullptr)
return nullptr;
- if (!item->asImageFrame())
+ if (!item->isImageFrame())
{
PyErr_SetString(WrongFrameTypeError, QObject::tr("Specified item not an image frame.","python error").toLocal8Bit().constData());
return nullptr;
@@ -565,7 +565,7 @@
PageItem *item = GetUniqueItem(QString::fromUtf8(name));
if (item == nullptr)
return nullptr;
- if (! item->asImageFrame())
+ if (! item->isImageFrame())
{
PyErr_SetString(ScribusException, QObject::tr("Specified item not an image frame.","python error").toLocal8Bit().constData());
return nullptr;
Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdtext.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdtext.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdtext.cpp Tue May 12 22:29:38 2020
@@ -277,7 +277,7 @@
PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
if (item == nullptr)
return nullptr;
- if (!item->asTextFrame())
+ if (!item->isTextFrame())
{
PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot get line space of non-text frame.","python error").toLocal8Bit().constData());
return nullptr;
@@ -480,7 +480,7 @@
PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
if (item == nullptr)
return nullptr;
- if (!item->asTextFrame())
+ if (!item->isTextFrame())
{
PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set text alignment on a non-text frame.","python error").toLocal8Bit().constData());
return nullptr;
@@ -515,7 +515,7 @@
PageItem *item = GetUniqueItem(QString::fromUtf8(Name));
if (item == nullptr)
return nullptr;
- if (!item->asTextFrame())
+ if (!item->isTextFrame())
{
PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot set text direction on a non-text frame.","python error").toLocal8Bit().constData());
return nullptr;
@@ -1126,7 +1126,7 @@
PageItem *item = GetUniqueItem(QString::fromUtf8(name));
if (item == nullptr)
return nullptr;
- if (!item->asTextFrame())
+ if (!item->isTextFrame())
{
PyErr_SetString(WrongFrameTypeError, QObject::tr("Cannot unlink a non-text frame.","python error").toLocal8Bit().constData());
return nullptr;
Modified: trunk/Scribus/scribus/plugins/short-words/parse.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/plugins/short-words/parse.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/short-words/parse.cpp (original)
+++ trunk/Scribus/scribus/plugins/short-words/parse.cpp Tue May 12 22:29:38 2020
@@ -53,7 +53,7 @@
SWConfig *cfg = new SWConfig();
// just textframes processed
- if (!aFrame->asTextFrame())
+ if (!aFrame->isTextFrame())
return;
// an ugly hack to get the language code from the item language property
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue May 12 22:29:38 2020
@@ -2555,7 +2555,7 @@
for (int ii = 0; ii < allItems.count(); ii++)
{
PageItem* item = allItems.at(ii);
- if ((item->itemType() == PageItem::ImageFrame) && (!item->asLatexFrame()) && (!item->asOSGFrame()))
+ if ((item->itemType() == PageItem::ImageFrame) && (!item->isLatexFrame()) && (!item->isOSGFrame()))
{
enablePicManager = true;
break;
@@ -3485,7 +3485,7 @@
for (int i = oldItemsCount; i < docItemsCount; ++i)
{
PageItem *ite = doc->Items->at(i);
- if ((ite->asTextFrame()) && (ite->isBookmark))
+ if ((ite->isTextFrame()) && (ite->isBookmark))
AddBookMark(ite);
}
propertiesPalette->updateColorList();
@@ -4050,7 +4050,7 @@
PageItem *currItem = doc->m_Selection->itemAt(0);
- if (!currItem->asTextFrame())
+ if (!currItem->isTextFrame())
return; // not a text frame
ScGTPluginManager::instance()->run();
@@ -6580,12 +6580,12 @@
if (doc->m_Selection->itemAt(0) != ite)
selectItemsFromOutlines(ite, ite->isGroup());
}
- if (ite->asLatexFrame())
+ if (ite->isLatexFrame())
{
if (ite->imageVisible())
view->requestMode(modeEdit);
}
- else if (ite->asOSGFrame())
+ else if (ite->isOSGFrame())
view->requestMode(submodeEditExternal);
else if ((ite->itemType() == PageItem::Polygon) || (ite->itemType() == PageItem::PolyLine) || (ite->itemType() == PageItem::Group) || (ite->itemType() == PageItem::ImageFrame) || (ite->itemType() == PageItem::PathText))
{
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Tue May 12 22:29:38 2020
@@ -6455,7 +6455,7 @@
if (removedFromSelection)
m_Selection->addItem(newItem);
// If converting a text frame to another object, drop links
- if (oldItem->asTextFrame() && (newType != PageItem::TextFrame))
+ if (oldItem->isTextFrame() && (newType != PageItem::TextFrame))
oldItem->dropLinks();
// If converting text to path, delete the bezier
if (newType == PageItem::PathText)
@@ -11401,7 +11401,7 @@
int id = Items->indexOf(currItem) - 1;
for (int tIdx = id; tIdx >= 0; --tIdx)
{
- if ( (Items->at(tIdx)->asTextFrame())
+ if ( (Items->at(tIdx)->isTextFrame())
&& (!itemSelection->containsItem(Items->at(tIdx)))
&& (currItem->getBoundingRect().intersects(Items->at(tIdx)->getBoundingRect()))
&& (!textInteractionItems.contains(Items->at(tIdx))) )
@@ -16431,7 +16431,7 @@
for (int i = 0; i < selectedItemCount; ++i)
{
PageItem *currItem = itemSelection->itemAt(i);
- if (!currItem || !currItem->asTextFrame())
+ if (!currItem || !currItem->isTextFrame())
continue;
if (currItem->nextInChain() || currItem->prevInChain())
currItem->unlinkWithText();
Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h (original)
+++ trunk/Scribus/scribus/scribusdoc.h Tue May 12 22:29:38 2020
@@ -1149,7 +1149,7 @@
bool fvo = item->imageFlippedV();
if (m_applyNewRes)
item->pixm.imgInfo.lowResType = m_lowResType;
- if (item->asLatexFrame())
+ if (item->isLatexFrame())
item->asLatexFrame()->rerunApplication(false);
else
item->loadImage(item->Pfile, true, -1, false);
Modified: trunk/Scribus/scribus/ui/contextmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/contextmenu.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/contextmenu.cpp (original)
+++ trunk/Scribus/scribus/ui/contextmenu.cpp Tue May 12 22:29:38 2020
@@ -103,7 +103,7 @@
//<-- Add Info
//Test new method with image frames first
- if (selectedItemCount==1 && currItem->asImageFrame())
+ if (selectedItemCount==1 && currItem->isImageFrame())
{
QAction *act = addMenu(menuInfo);
act->setText( tr("In&fo"));
@@ -174,7 +174,7 @@
}
if (m_actionList.contains("fileImportImage"))
menuEditContent->addAction(m_ScMW->scrActions["fileImportImage"]);
- if (selectedItemCount==1 && currItem->asImageFrame())
+ if (selectedItemCount==1 && currItem->isImageFrame())
{
if (QApplication::clipboard()->mimeData()->hasImage())
menuEditContent->addAction(m_ScMW->scrActions["editPasteImageFromClipboard"]);
@@ -305,7 +305,7 @@
menuImage->addAction(m_ScMW->scrActions["styleImageEffects"]);
if (m_actionList.contains("editEditWithImageEditor"))
menuImage->addAction(m_ScMW->scrActions["editEditWithImageEditor"]);
- if (selectedItemCount==1 && currItem->asImageFrame())
+ if (selectedItemCount==1 && currItem->isImageFrame())
{
if (currItem->imageIsAvailable)
{
@@ -346,7 +346,7 @@
}
}
- if ((selectedItemCount==1) && currItem->asTextFrame())
+ if ((selectedItemCount==1) && currItem->isTextFrame())
{
if (currItem->itemText.length() > 0)
m_ScMW->scrActions["itemAdjustFrameHeightToText"]->setEnabled(true);
Modified: trunk/Scribus/scribus/ui/outlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/outlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outlinepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/outlinepalette.cpp Tue May 12 22:29:38 2020
@@ -354,9 +354,9 @@
switch (pgItem->itemType())
{
case PageItem::ImageFrame:
- if (pgItem->asLatexFrame())
+ if (pgItem->isLatexFrame())
tipText += CommonStrings::itemType_LatexFrame;
- else if (pgItem->asOSGFrame())
+ else if (pgItem->isOSGFrame())
tipText += CommonStrings::itemType_OSGFrame;
else
tipText += CommonStrings::itemType_ImageFrame;
@@ -804,9 +804,9 @@
switch (pgItem->itemType())
{
case PageItem::ImageFrame:
- if (pgItem->asLatexFrame())
+ if (pgItem->isLatexFrame())
item->setIcon( 0, latexIcon );
- else if (pgItem->asOSGFrame())
+ else if (pgItem->isOSGFrame())
item->setIcon( 0, annot3DIcon );
else
item->setIcon( 0, imageIcon );
Modified: trunk/Scribus/scribus/ui/picstatus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/picstatus.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/picstatus.cpp (original)
+++ trunk/Scribus/scribus/ui/picstatus.cpp Tue May 12 22:29:38 2020
@@ -152,7 +152,7 @@
Iname = tr("Embedded Image");
else
Iname = fi.fileName();
- if ((item->itemType() == PageItem::ImageFrame) && (!item->asLatexFrame()))
+ if ((item->itemType() == PageItem::ImageFrame) && (!item->isLatexFrame()))
tempItem = new PicItem(imageViewArea, Iname, createImgIcon(item), item);
if (firstItem == nullptr)
firstItem = tempItem;
@@ -176,7 +176,7 @@
Iname = tr("Embedded Image");
else
Iname = fi.fileName();
- if ((item->itemType() == PageItem::ImageFrame) && (!item->asLatexFrame()))
+ if ((item->itemType() == PageItem::ImageFrame) && (!item->isLatexFrame()))
tempItem = new PicItem(imageViewArea, Iname, createImgIcon(item), item);
// if an image is selected in a doc, Manage Pictures should
// display the selected image and its values
Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp Tue May 12 22:29:38 2020
@@ -357,7 +357,7 @@
colorPalette->handleSelectionChanged();
}
- if (m_item->asOSGFrame())
+ if (m_item->isOSGFrame())
{
TabStack->setItemEnabled(idXYZItem, true);
TabStack->setItemEnabled(idShadowItem, true);
Modified: trunk/Scribus/scribus/ui/propertiespalette_image.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/propertiespalette_image.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_image.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_image.cpp Tue May 12 22:29:38 2020
@@ -473,7 +473,7 @@
bool setter = m_item->ScaleType;
freeScale->setChecked(setter);
frameScale->setChecked(!setter);
- if ((m_item->asLatexFrame()) || (m_item->asOSGFrame()))
+ if ((m_item->isLatexFrame()) || (m_item->isOSGFrame()))
{
freeScale->setEnabled(false);
frameScale->setEnabled(false);
Modified: trunk/Scribus/scribus/ui/propertiespalette_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/propertiespalette_line.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_line.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_line.cpp Tue May 12 22:29:38 2020
@@ -330,9 +330,9 @@
showLineWidth(m_item->lineWidth());
showLineValues(m_item->lineStyle(), m_item->lineEnd(), m_item->lineJoin());
- if (m_item->asOSGFrame())
+ if (m_item->isOSGFrame())
setEnabled(false);
- if (m_item->asSymbol())
+ if (m_item->isSymbol())
setEnabled(false);
}
Modified: trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shape.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shape.cpp Tue May 12 22:29:38 2020
@@ -363,7 +363,7 @@
roundRect->setEnabled(true);
else
{
- roundRect->setEnabled ((m_item->asPolygon()) && (!m_item->ClipEdited) && ((m_item->FrameType == 0) || (m_item->FrameType == 2)));
+ roundRect->setEnabled ((m_item->isPolygon()) && (!m_item->ClipEdited) && ((m_item->FrameType == 0) || (m_item->FrameType == 2)));
}
if (m_item->isOSGFrame())
{
Modified: trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp Tue May 12 22:29:38 2020
@@ -369,7 +369,7 @@
doUnGroup->setEnabled(m_item->isGroup());
if ((m_doc->appMode == modeEditClip) && (m_item->isGroup()))
doUnGroup->setEnabled(false);
- if (m_item->asOSGFrame())
+ if (m_item->isOSGFrame())
{
setEnabled(true);
rotationSpin->setEnabled(false);
Modified: trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_advanced.cpp (original)
+++ trunk/Scribus/scribus/ui/propertywidget_advanced.cpp Tue May 12 22:29:38 2020
@@ -146,7 +146,7 @@
enabled = true;
if ((m_item->isGroup()) && (!m_item->isSingleSel))
enabled = false;
- if (m_item->asOSGFrame() || m_item->asSymbol())
+ if (m_item->isOSGFrame() || m_item->isSymbol())
enabled = false;
if (m_doc->m_Selection->count() > 1)
enabled = false;
Modified: trunk/Scribus/scribus/ui/propertywidget_dropcap.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/propertywidget_dropcap.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_dropcap.cpp (original)
+++ trunk/Scribus/scribus/ui/propertywidget_dropcap.cpp Tue May 12 22:29:38 2020
@@ -78,7 +78,7 @@
if (!m_item) return;
- if (m_item->asTextFrame() || m_item->asPathText() || m_item->asTable())
+ if (m_item->isTextFrame() || m_item->isPathText() || m_item->isTable())
{
ParagraphStyle parStyle = m_item->itemText.defaultStyle();
if (m_doc->appMode == modeEdit)
Modified: trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp (original)
+++ trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp Tue May 12 22:29:38 2020
@@ -634,7 +634,7 @@
enabled = true;
if ((m_item->isGroup()) && (!m_item->isSingleSel))
enabled = false;
- if (m_item->asOSGFrame() || m_item->asSymbol())
+ if (m_item->isOSGFrame() || m_item->asSymbol())
enabled = false;
if (m_doc->m_Selection->count() > 1)
enabled = false;
Modified: trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp (original)
+++ trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp Tue May 12 22:29:38 2020
@@ -173,7 +173,7 @@
enabled = true;
if ((m_item->isGroup()) && (!m_item->isSingleSel))
enabled = false;
- if (m_item->asOSGFrame() || m_item->asSymbol())
+ if (m_item->isOSGFrame() || m_item->isSymbol())
enabled = false;
if (m_doc->m_Selection->count() > 1)
enabled = false;
Modified: trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp (original)
+++ trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp Tue May 12 22:29:38 2020
@@ -164,7 +164,7 @@
enabled = true;
if ((m_item->isGroup()) && (!m_item->isSingleSel))
enabled = false;
- if (m_item->asOSGFrame() || m_item->asSymbol())
+ if (m_item->isOSGFrame() || m_item->isSymbol())
enabled = false;
if (m_doc->m_Selection->count() > 1)
enabled = false;
Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp Tue May 12 22:29:38 2020
@@ -3068,7 +3068,7 @@
Editor->saveItemText(nextItem);
// #9180 : force relayout here, it appears that relayout is sometime disabled
// to speed up selection, but re layout() cannot be avoided here
- if (nextItem->asTextFrame())
+ if (nextItem->isTextFrame())
nextItem->asTextFrame()->invalidateLayout(true);
nextItem->layout();
#if 0
Modified: trunk/Scribus/scribus/util.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23798&path=/trunk/Scribus/scribus/util.cpp
==============================================================================
--- trunk/Scribus/scribus/util.cpp (original)
+++ trunk/Scribus/scribus/util.cpp Tue May 12 22:29:38 2020
@@ -1144,7 +1144,7 @@
while (!gpL.isEmpty())
{
PageItem* item = gpL.takeFirst();
- if (item->asTextFrame())
+ if (item->isTextFrame())
item->dropLinks();
delete item;
}
More information about the scribus-commit
mailing list