r23797 by jghali - Use newer boolean isBlahFrame() functions instead of forcing pointer/boolean conversions where possible

scribus-commit scribus-commit at lists.scribus.net
Tue May 12 22:10:07 UTC 2020


Author: jghali
Date: Tue May 12 22:10:07 2020
New Revision: 23797

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23797
Log:
Use newer boolean isBlahFrame() functions instead of forcing pointer/boolean conversions where possible

Modified:
    trunk/Scribus/scribus/appmodehelper.cpp
    trunk/Scribus/scribus/canvasmode_edit.cpp
    trunk/Scribus/scribus/canvasmode_editgradient.cpp
    trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
    trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
    trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
    trunk/Scribus/scribus/canvasmode_framelinks.cpp
    trunk/Scribus/scribus/canvasmode_normal.cpp
    trunk/Scribus/scribus/pdflib_core.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
    trunk/Scribus/scribus/pslib.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/ui/loremipsum.cpp
    trunk/Scribus/scribus/ui/propertiespalette_image.cpp
    trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
    trunk/Scribus/scribus/ui/propertiespalette_text.cpp
    trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
    trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp
    trunk/Scribus/scribus/ui/propertywidget_hyphenation.cpp
    trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp
    trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
    trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
    trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
    trunk/Scribus/scribus/ui/storyeditor.cpp

Modified: trunk/Scribus/scribus/appmodehelper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/appmodehelper.cpp
==============================================================================
--- trunk/Scribus/scribus/appmodehelper.cpp	(original)
+++ trunk/Scribus/scribus/appmodehelper.cpp	Tue May 12 22:10:07 2020
@@ -281,7 +281,7 @@
 					scmw->setTBvals(currItem);
 				}
 				(*a_scrActions)["editPaste"]->setEnabled(false);
-				if (currItem != nullptr && currItem->asTextFrame())
+				if (currItem != nullptr && currItem->isTextFrame())
 				{
 					scmw->charPalette->setEnabled(true, currItem);
 					enableTextActions(true, currItem->currentCharStyle().font().scName());
@@ -445,7 +445,7 @@
 	}
 	(*a_scrActions)["itemDetachTextFromPath"]->setEnabled(false);
 	bool isImageFrame = SelectedType==PageItem::ImageFrame;
-	(*a_scrActions)["itemUpdateImage"]->setEnabled(isImageFrame && (currItem->imageIsAvailable || currItem->asLatexFrame()));
+	(*a_scrActions)["itemUpdateImage"]->setEnabled(isImageFrame && (currItem->imageIsAvailable || currItem->isLatexFrame()));
 	(*a_scrActions)["itemAdjustFrameToImage"]->setEnabled(isImageFrame && currItem->imageIsAvailable);
 	(*a_scrActions)["itemAdjustImageToFrame"]->setEnabled(isImageFrame && currItem->imageIsAvailable);
 	(*a_scrActions)["itemExtendedImageProperties"]->setEnabled(isImageFrame && currItem->imageIsAvailable && currItem->pixm.imgInfo.valid);
@@ -469,7 +469,7 @@
 		(*a_scrActions)["itemPreviewLow"]->setChecked(false);
 	}
 
-	if ((SelectedType==-1) || (SelectedType!=-1 && !currItem->asTextFrame()))
+	if ((SelectedType==-1) || (SelectedType!=-1 && !currItem->isTextFrame()))
 		enableTextActions(false);
 	(*a_scrActions)["insertSampleText"]->setEnabled(false);
 
@@ -833,7 +833,7 @@
 		for (int i = 0; i < docSelectionCount; ++i)
 		{
 			PageItem* it = doc->m_Selection->itemAt(i);
-			if ((!it->asPolygon()) && (!it->asPolyLine()))
+			if ((!it->isPolygon()) && (!it->isPolyLine()))
 				hPoly = false;
 		}
 		(*a_scrActions)["itemCombinePolygons"]->setEnabled(hPoly);
@@ -851,9 +851,9 @@
 			bool canAttachTextToPath = false;
 			PageItem* item1 = doc->m_Selection->itemAt(0);
 			PageItem* item2 = doc->m_Selection->itemAt(1);
-			if (!item1->asTextFrame() || !(item2->asPolygon() || item2->asPolyLine() || item2->asSpiral() || item2->asArc() || item2->asRegularPolygon()))
+			if (!item1->isTextFrame() || !(item2->isPolygon() || item2->isPolyLine() || item2->isSpiral() || item2->isArc() || item2->isRegularPolygon()))
 				std::swap(item1, item2);
-			if (item1->asTextFrame() && (item2->asPolygon() || item2->asPolyLine() || item2->asSpiral() || item2->asArc() || item2->asRegularPolygon()))
+			if (item1->isTextFrame() && (item2->isPolygon() || item2->isPolyLine() || item2->isSpiral() || item2->isArc() || item2->isRegularPolygon()))
 			{
 				canAttachTextToPath  = true;
 				canAttachTextToPath &= (item1->nextInChain() == nullptr);

Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp	Tue May 12 22:10:07 2020
@@ -287,7 +287,7 @@
 	PageItem * it(nullptr);
 	if (GetItem(&it))
 	{
-		if (it->asTextFrame())
+		if (it->isTextFrame())
 		{
 			m_canvas->setupEditHRuler(it, true);
 			if (m_doc->appMode == modeEdit)
@@ -318,7 +318,7 @@
 	m_canvas->m_viewMode.m_MouseButtonPressed = false;
 	m_canvas->resetRenderMode();
 	PageItem *currItem = nullptr;
-	if (GetItem(&currItem) && (m_doc->appMode == modeEdit) && currItem->asTextFrame())
+	if (GetItem(&currItem) && (m_doc->appMode == modeEdit) && currItem->isTextFrame())
 	{
 		//CB if annotation, open the annotation dialog
 		if (currItem->isAnnotation())
@@ -577,7 +577,7 @@
 	if (GetItem(&currItem))
 	{
 //		m_view->slotDoCurs(false);
-		if ((!currItem->locked() || currItem->isTextFrame()) && !currItem->asLine())
+		if ((!currItem->locked() || currItem->isTextFrame()) && !currItem->isLine())
 		{
 			FPoint canvasPoint = m_canvas->globalToCanvas(m->globalPos());
 			if (m_canvas->frameHitTest(QPointF(canvasPoint.x(), canvasPoint.y()), currItem) < 0)
@@ -706,7 +706,7 @@
 				}
 			}
 		}
-		else if (!currItem->asImageFrame() || m_canvas->frameHitTest(QPointF(mousePointDoc.x(),mousePointDoc.y()), currItem) < 0)
+		else if (!currItem->isImageFrame() || m_canvas->frameHitTest(QPointF(mousePointDoc.x(),mousePointDoc.y()), currItem) < 0)
 		{
 			m_view->deselectItems(true);
 			if (SeleItem(m))
@@ -941,7 +941,7 @@
 		currItem = m_doc->m_Selection->itemAt(0);
 		m_doc->nodeEdit.finishTransaction(currItem);
 	}
-	if (GetItem(&currItem) && currItem->asTextFrame())
+	if (GetItem(&currItem) && currItem->isTextFrame())
 		m_ScMW->setCopyCutEnabled(currItem->itemText.isSelected());
 }
 

Modified: trunk/Scribus/scribus/canvasmode_editgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/canvasmode_editgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editgradient.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editgradient.cpp	Tue May 12 22:10:07 2020
@@ -296,7 +296,7 @@
 			}
 			return;
 		}
-		if (!(GetItem(&currItem) && (m_doc->appMode == modeEdit) && currItem->asTextFrame()))
+		if (!(GetItem(&currItem) && (m_doc->appMode == modeEdit) && currItem->isTextFrame()))
 		{
 			mousePressEvent(m);
 			return;

Modified: trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp	Tue May 12 22:10:07 2020
@@ -554,7 +554,7 @@
 			}
 			return;
 		}
-		if (!(GetItem(&currItem) && (m_doc->appMode == modeEdit) && currItem->asTextFrame()))
+		if (!(GetItem(&currItem) && (m_doc->appMode == modeEdit) && currItem->isTextFrame()))
 		{
 			mousePressEvent(m);
 			return;

Modified: trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp	Tue May 12 22:10:07 2020
@@ -551,7 +551,7 @@
 			}
 			return;
 		}
-		if (!(GetItem(&m_currItem) && (m_doc->appMode == modeEdit) && m_currItem->asTextFrame()))
+		if (!(GetItem(&m_currItem) && (m_doc->appMode == modeEdit) && m_currItem->isTextFrame()))
 		{
 			mousePressEvent(m);
 			return;

Modified: trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editweldpoint.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editweldpoint.cpp	Tue May 12 22:10:07 2020
@@ -332,7 +332,7 @@
 			}
 			return;
 		}
-		if (!(GetItem(&m_currItem) && (m_doc->appMode == modeEdit) && m_currItem->asTextFrame()))
+		if (!(GetItem(&m_currItem) && (m_doc->appMode == modeEdit) && m_currItem->isTextFrame()))
 		{
 			mousePressEvent(m);
 			return;

Modified: trunk/Scribus/scribus/canvasmode_framelinks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/canvasmode_framelinks.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.cpp	Tue May 12 22:10:07 2020
@@ -95,8 +95,8 @@
 			{
 				PageItem* item1 = m_doc->m_Selection->itemAt(i);
 				PageItem* item2 = m_doc->m_Selection->itemAt(i+1);
-				if ((item1 != nullptr && item1->asTextFrame()) &&
-					(item2 != nullptr && item2->asTextFrame()) &&
+				if ((item1 != nullptr && item1->isTextFrame()) &&
+					(item2 != nullptr && item2->isTextFrame()) &&
 				     item1->canBeLinkedTo(item2))
 				{
 					item1->link(item2);
@@ -196,7 +196,7 @@
 			// #14334: delay selection signals so that (un)link actions get properly enabled/disabled
 			m_doc->m_Selection->delaySignalsOn();
 			SeleItem(m);
-			if (GetItem(&bb) && (bb->asTextFrame()))
+			if (GetItem(&bb) && (bb->isTextFrame()))
 			{
 				PageItem* bblast = bb;
 				while (bblast->nextInChain())

Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp	Tue May 12 22:10:07 2020
@@ -424,7 +424,7 @@
 			}
 			else
 			{
-				if (hoveredItem->asTextFrame() && hoveredItem->frameOverflows())
+				if (hoveredItem->isTextFrame() && hoveredItem->frameOverflows())
 				{
 					if (m_canvas->cursorOverTextFrameControl(m->globalPos(), hoveredItem))
 					{
@@ -988,7 +988,7 @@
 	//<<#10116: Click on overflow icon to get into link frame mode
 	PageItem* clickedItem = nullptr;
 	clickedItem = m_canvas->itemUnderCursor(m->globalPos(), clickedItem, m->modifiers());
-	if (clickedItem && clickedItem->asTextFrame() && (!clickedItem->isAnnotation()) && (!m_doc->drawAsPreview))
+	if (clickedItem && clickedItem->isTextFrame() && (!clickedItem->isAnnotation()) && (!m_doc->drawAsPreview))
 	{
 		if (clickedItem->frameOverflows())
 		{
@@ -1022,7 +1022,7 @@
 			PageItem* underItem( m_canvas->itemUnderItem(currItem, itemIndex) );
 			while (underItem)
 			{
-				if (underItem->asTextFrame())
+				if (underItem->isTextFrame())
 					underItem->asTextFrame()->invalidateLayout(false);
 				else
 					underItem->invalidateLayout();

Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp	(original)
+++ trunk/Scribus/scribus/pdflib_core.cpp	Tue May 12 22:10:07 2020
@@ -3872,7 +3872,7 @@
 		QByteArray name = QByteArray("/master_page_obj_%1_%2")
 			                            .replace("%1", Pdf::toPdf(mPageIndex))
 			                            .replace("%2", Pdf::toPdf(qHash(ite)));
-		if ((!ite->asTextFrame()) && (!ite->asPathText()) && (!ite->asTable()))
+		if ((!ite->isTextFrame()) && (!ite->isPathText()) && (!ite->isTable()))
 		{
 			if (((layer.transparency != 1) || (layer.blendMode != 0)) && Options.supportsTransparency())
 				content += (name + " Do\n");
@@ -4493,7 +4493,7 @@
 		case PageItem::LatexFrame:
 		case PageItem::OSGFrame:
 #ifdef HAVE_OSG
-			if (ite->asOSGFrame())
+			if (ite->isOSGFrame())
 			{
 				if (Options.Version != PDFVersion::PDF_X3)
 				{
@@ -10296,7 +10296,7 @@
 		ImInfo2 = SharedImages[fn];
 	if ((!SharedImages.contains(fn))
 		 || (fromAN)
-		 || (c->asLatexFrame())
+		 || (c->isLatexFrame())
 		 || (c->effectsInUse.count() != 0)
 		 || ((ImInfo2.origXsc != ImInfo.origXsc) || (ImInfo2.origYsc != ImInfo.origYsc))
 		 || (ImInfo2.RequestProps != c->pixm.imgInfo.RequestProps)
@@ -10893,7 +10893,7 @@
 			embedPre  = "0 g 0 G";
 			embedPre += " 1 w 0 J 0 j [] 0 d\n"; // add default graphics stack parameters pdftex relies on them
 		}
-		if (c->asLatexFrame())
+		if (c->isLatexFrame())
 		{
 			ImInfo.sxa *= 1.0 / c->imageXScale();
 			ImInfo.sya *= 1.0 / c->imageYScale();
@@ -11175,7 +11175,7 @@
 	for (int ele = 0; ele < doc.Items->count(); ++ele)
 	{
 		PageItem* tel = doc.Items->at(ele);
-		if ((tel->asTextFrame()) && (tel->prevInChain() == nullptr) && (tel->nextInChain() != nullptr) && (!tel->inPdfArticle))
+		if ((tel->isTextFrame()) && (tel->prevInChain() == nullptr) && (tel->nextInChain() != nullptr) && (!tel->inPdfArticle))
 		{
 			Beads.clear();
 			PdfBead bd;

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&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:10:07 2020
@@ -2129,7 +2129,7 @@
 
 	if (newItem->asPathText())
 		newItem->updatePolyClip();
-	if (newItem->asImageFrame() || newItem->asLatexFrame())
+	if (newItem->isImageFrame() || newItem->isLatexFrame())
 	{
 		if (!newItem->Pfile.isEmpty())
 		{

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&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:10:07 2020
@@ -4236,7 +4236,7 @@
 		}
 		if (tName == "MARK")
 		{
-			if (newItem->asTextFrame())
+			if (newItem->isTextFrame())
 			{
 				QString l = tAtt.valueAsString("label");
 				MarkType t = (MarkType) tAtt.valueAsInt("type");
@@ -4341,12 +4341,12 @@
 		newItem->createConicalMesh();
 	}
 
-	if (newItem->asPathText())
+	if (newItem->isPathText())
 		newItem->updatePolyClip();
 #ifdef HAVE_OSG
-	if (newItem->asImageFrame() || newItem->asLatexFrame() || newItem->asOSGFrame())
+	if (newItem->isImageFrame() || newItem->isLatexFrame() || newItem->isOSGFrame())
 #else
-	if (newItem->asImageFrame() || newItem->asLatexFrame())
+	if (newItem->isImageFrame() || newItem->isLatexFrame())
 #endif
 	{
 		if (!newItem->Pfile.isEmpty())
@@ -5043,7 +5043,7 @@
 #ifdef HAVE_OSG
 			if (currItem->isOSGFrame())
 			{
-				PageItem_OSGFrame *osgframe = currItem->asOSGFrame();
+				PageItem_OSGFrame *osgframe = currItem->isOSGFrame();
 				osgframe->modelFile = Relative2Path(attrs.valueAsString("modelFile"), baseDir);
 				osgframe->currentView = attrs.valueAsString("currentViewName", "");
 				osgframe->loadModel();
@@ -5611,7 +5611,7 @@
 	else
 		currItem->ContourLine = currItem->PoLine.copy();
 
-	if (!currItem->asLine())
+	if (!currItem->isLine())
 		currItem->Clip = flattenPath(currItem->PoLine, currItem->Segments);
 	else
 	{

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	Tue May 12 22:10:07 2020
@@ -74,7 +74,7 @@
 		PageItem *currItem = selection->itemAt(i);
 		currItem->getNamedResources(lists);
 		emG.append(currItem);
-		if ((!currItem->asTextFrame()) && (!currItem->asPathText()))
+		if ((!currItem->isTextFrame()) && (!currItem->isPathText()))
 			continue;
 		//for notes frames text should not be saved
 		if (currItem->isNoteFrame())
@@ -2060,7 +2060,7 @@
 		if (item->isBookmark)
 			docu.writeAttribute("BOOKMARK", 1);
 
-		if (item->asTextFrame() || item->asPathText() || item->asImageFrame())
+		if (item->isTextFrame() || item->isPathText() || item->isImageFrame())
 		{
 			if (item->nextInChain() != nullptr)
 				docu.writeAttribute("NEXTITEM", qHash(item->nextInChain()) & 0x7FFFFFFF);
@@ -2083,7 +2083,7 @@
 				docu.writeAttribute("BACKITEM", -1);
 				if (item->isNoteFrame())
 					docu.writeAttribute("isNoteFrame", 1);
-				else if (item->asTextFrame() || item->asPathText())
+				else if (item->isTextFrame() || item->isPathText())
 					writeStoryText(doc, docu, item);
 			}
 		}
@@ -2117,7 +2117,7 @@
 				docu.writeAttribute("Param", item->effectsInUse.at(a).effectParameters);
 			}
 		}
-		if (((item->asImageFrame()) || (item->asTextFrame())) && (!item->Pfile.isEmpty()) && (item->pixm.imgInfo.layerInfo.count() != 0) && (item->pixm.imgInfo.isRequest))
+		if (((item->isImageFrame()) || (item->isTextFrame())) && (!item->Pfile.isEmpty()) && (item->pixm.imgInfo.layerInfo.count() != 0) && (item->pixm.imgInfo.isRequest))
 		{
 			for (auto it2 = item->pixm.imgInfo.RequestProps.begin(); it2 != item->pixm.imgInfo.RequestProps.end(); ++it2)
 			{
@@ -2245,7 +2245,7 @@
 			}
 		}
 
-		if (item->asLatexFrame())
+		if (item->isLatexFrame())
 		{
 			docu.writeStartElement("LATEX");
 			PageItem_LatexFrame *latexitem = item->asLatexFrame();
@@ -2269,7 +2269,7 @@
 			ob.appendChild(latexinfo);*/
 		}
 #ifdef HAVE_OSG
-		if (item->asOSGFrame())
+		if (item->isOSGFrame())
 		{
 			PageItem_OSGFrame *osgitem = item->asOSGFrame();
 			if (!item->Pfile.isEmpty())
@@ -2316,7 +2316,7 @@
 			}
 		}
 #endif
-		if (item->asGroupFrame())
+		if (item->isGroup())
 		{
 			WriteObjects(m_Doc, docu, baseDir, nullptr, 0, ItemSelectionGroup, &item->groupItemList);
 		}
@@ -2592,7 +2592,7 @@
 			docu.writeAttribute("WeldSource", qHash(item) & 0x7FFFFFFF);
 		}
 	}
-	if (item->asRegularPolygon())
+	if (item->isRegularPolygon())
 	{
 		PageItem_RegularPolygon *regitem = item->asRegularPolygon();
 		docu.writeAttribute("POLYC", regitem->polyCorners);
@@ -2603,7 +2603,7 @@
 		docu.writeAttribute("POLYOCUR", regitem->polyOuterCurvature);
 		docu.writeAttribute("POLYS", static_cast<int>(regitem->polyUseFactor));
 	}
-	if (item->asArc())
+	if (item->isArc())
 	{
 		PageItem_Arc *arcitem = item->asArc();
 		docu.writeAttribute("arcHeight", arcitem->arcHeight);
@@ -2611,7 +2611,7 @@
 		docu.writeAttribute("arcStartAngle", arcitem->arcStartAngle);
 		docu.writeAttribute("arcSweepAngle", arcitem->arcSweepAngle);
 	}
-	if (item->asSpiral())
+	if (item->isSpiral())
 	{
 		PageItem_Spiral *arcitem = item->asSpiral();
 		docu.writeAttribute("spiralStartAngle", arcitem->spiralStartAngle);
@@ -2670,7 +2670,7 @@
 //	docu.writeAttribute("TEXTFLOW" , item->textFlowAroundObject() ? 1 : 0);
 //	docu.writeAttribute("TEXTFLOW2", item->textFlowUsesBoundingBox() ? 1 : 0);
 //	docu.writeAttribute("TEXTFLOW3", item->textFlowUsesContourLine() ? 1 : 0);
-	if (item->asTextFrame() || item->asPathText() || item->asImageFrame())
+	if (item->isTextFrame() || item->isPathText() || item->isImageFrame())
 	{
 		docu.writeAttribute("LOCALSCX", item->imageXScale());
 		docu.writeAttribute("LOCALSCY", item->imageYScale());
@@ -2681,7 +2681,7 @@
 		docu.writeAttribute("SCALETYPE", item->ScaleType ? 1 : 0);
 		docu.writeAttribute("RATIO", item->AspectRatio ? 1 : 0);
 	}
-	if (item->asTextFrame() || item->asPathText())
+	if (item->isTextFrame() || item->isPathText())
 	{
 		docu.writeAttribute("COLUMNS", item->columns());
 		docu.writeAttribute("COLGAP", item->columnGap());
@@ -2698,9 +2698,9 @@
 		docu.writeAttribute("textPathFlipped", static_cast<int>(item->textPathFlipped));
 	}
 #ifdef HAVE_OSG
-	if (((item->asImageFrame() && !(item->asLatexFrame() || item->asOSGFrame())) || (item->asTextFrame())) && (!item->Pfile.isEmpty()))
+	if (((item->isImageFrame() && !(item->isLatexFrame() || item->isOSGFrame())) || (item->isTextFrame())) && (!item->Pfile.isEmpty()))
 #else
-	if (((item->asImageFrame() && !(item->asLatexFrame())) || (item->asTextFrame())) && (!item->Pfile.isEmpty()))
+	if (((item->isImageFrame() && !(item->isLatexFrame())) || (item->isTextFrame())) && (!item->Pfile.isEmpty()))
 #endif
 	{
 		docu.writeAttribute("Pagenumber", item->pixm.imgInfo.actualPageNumber);
@@ -2722,7 +2722,7 @@
 			docu.writeAttribute("PFILE",Path2Relative(item->Pfile, baseDir));
 	}
 #ifdef HAVE_OSG
-	else if (item->asOSGFrame())
+	else if (item->isOSGFrame())
 	{
 		if (!item->Pfile.isEmpty())
 		{
@@ -2755,7 +2755,7 @@
 		docu.writeAttribute("EPROF", item->EmbeddedProfile);
 	if (!item->UseEmbedded)
 		docu.writeAttribute("EMBEDDED", 0);
-	if (item->asImageFrame())
+	if (item->isImageFrame())
 	{
 		if (item->OverrideCompressionMethod)
 			docu.writeAttribute("COMPRESSIONMETHOD", item->CompressionMethodIndex);
@@ -2792,7 +2792,7 @@
 	if (item->isTable())
 	{
 		//PTYPE == PageItem::Table or 16 (pageitem.h)
-		PageItem_Table* tableItem=item->asTable();
+		PageItem_Table* tableItem = item->asTable();
 		docu.writeAttribute("Rows", tableItem->rows());
 		docu.writeAttribute("Columns", tableItem->columns());
 
@@ -2849,7 +2849,7 @@
 	QString colp = item->ContourLine.svgPath(true);
 	if (!colp.isEmpty())
 		docu.writeAttribute("copath", colp);
-	if (item->asLine() || item->asPolyLine())
+	if (item->isLine() || item->isPolyLine())
 	{
 		if (item->startArrowIndex() != 0)
 			docu.writeAttribute("startArrowIndex", item->startArrowIndex());

Modified: trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp	Tue May 12 22:10:07 2020
@@ -757,7 +757,7 @@
 	QTransform gcm  = m_context.worldMatrix();
 	double coeff1 = sqrt(gcm.m11() * gcm.m11() + gcm.m12() * gcm.m12());
 	double coeff2 = sqrt(gcm.m21() * gcm.m21() + gcm.m22() * gcm.m22());
-	if (item->asImageFrame())
+	if (item->isImageFrame())
 	{
 		item->moveBy(gcm.dx(), gcm.dy());
 		item->setWidthHeight(item->width() * gcm.m11(), item->height() * gcm.m22());
@@ -765,7 +765,7 @@
 		if (item->imageIsAvailable)
 			item->setImageXYScale(item->width() / item->pixm.width(), item->height() / item->pixm.height());
 	}
-	else if (item->asTextFrame())
+	else if (item->isTextFrame())
 	{
 		item->setLineWidth(qMax(item->lineWidth() * (coeff1 + coeff2) / 2.0, 0.25));
 	}

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdmani.cpp	Tue May 12 22:10:07 2020
@@ -26,7 +26,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;
@@ -46,7 +46,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;
@@ -88,7 +88,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;
@@ -131,7 +131,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;
@@ -175,7 +175,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;
@@ -203,7 +203,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/cmdtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdtext.cpp	Tue May 12 22:10:07 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;
@@ -535,7 +535,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;
@@ -570,7 +570,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;
@@ -1143,7 +1143,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/pslib.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/pslib.cpp
==============================================================================
--- trunk/Scribus/scribus/pslib.cpp	(original)
+++ trunk/Scribus/scribus/pslib.cpp	Tue May 12 22:10:07 2020
@@ -646,7 +646,7 @@
 		for (int j = 0; j < pa.items.count(); ++j)
 		{
 			PageItem* item = pa.items.at(j);
-			if ((item->asImageFrame()) && (item->imageIsAvailable) && (!item->Pfile.isEmpty()) && (item->printEnabled()) && (!Options.outputSeparations) && (Options.useColor))
+			if ((item->isImageFrame()) && (item->imageIsAvailable) && (!item->Pfile.isEmpty()) && (item->printEnabled()) && (!Options.outputSeparations) && (Options.useColor))
 			{
 				if (!PS_ImageData(item, item->Pfile, item->itemName(), item->ImageProfile, item->UseEmbedded))
 					return false;
@@ -728,7 +728,7 @@
 					continue;
 				if ((it->OwnPage != m_Doc->MasterPages.at(ap)->pageNr()) && (it->OwnPage != -1))
 					continue;
-				if ((m_optimization == OptimizeSize) && it->asImageFrame() && it->imageIsAvailable && (!it->Pfile.isEmpty()) && it->printEnabled() && (!Options.outputSeparations) && Options.useColor)
+				if ((m_optimization == OptimizeSize) && it->isImageFrame() && it->imageIsAvailable && (!it->Pfile.isEmpty()) && it->printEnabled() && (!Options.outputSeparations) && Options.useColor)
 				{
 					errorOccured = !PS_ImageData(it, it->Pfile, it->itemName(), it->ImageProfile, it->UseEmbedded);
 					if (errorOccured) break;
@@ -2608,13 +2608,13 @@
 				ScQApp->processEvents();
 			if (item->m_layerID != ll.ID)
 				continue;
-			if ((!page->pageNameEmpty()) && (item->asTextFrame()))
+			if ((!page->pageNameEmpty()) && (item->isTextFrame()))
 				continue;
-			if ((!page->pageNameEmpty()) && (item->asPathText()))
+			if ((!page->pageNameEmpty()) && (item->isPathText()))
 				continue;
-			if ((!page->pageNameEmpty()) && (item->asTable()))
+			if ((!page->pageNameEmpty()) && (item->isTable()))
 				continue;
-			if ((!page->pageNameEmpty()) && (item->asImageFrame()) && ((Options.outputSeparations) || (!Options.useColor)))
+			if ((!page->pageNameEmpty()) && (item->isImageFrame()) && ((Options.outputSeparations) || (!Options.useColor)))
 				continue;
 			//if ((!Art) && (view->SelItem.count() != 0) && (!item->Select))
 			if ((m_outputFormat == OutputEPS) && (!item->isSelected()) && (m_Doc->m_Selection->count() != 0))
@@ -2656,19 +2656,19 @@
 				ScQApp->processEvents();
 			if ((ite->m_layerID != layer.ID) || (!ite->printEnabled()))
 				continue;
-			if (!(ite->asTextFrame()) && !(ite->asImageFrame()) && !(ite->asPathText()) && !(ite->asTable()))
+			if (!(ite->asTextFrame()) && !(ite->isImageFrame()) && !(ite->isPathText()) && !(ite->isTable()))
 			{
 				int mpIndex = m_Doc->MasterNames[page->masterPageName()];
 				PS_UseTemplate(QString("mp_obj_%1_%2").arg(mpIndex).arg(qHash(ite)));
 			}
-			else if (ite->asImageFrame())
+			else if (ite->isImageFrame())
 			{
 				PS_save();
 				// JG : replace what seems mostly duplicate code by corresponding function call (#3936)
 				success &= ProcessItem(mPage, ite, PNr, false, false, true);
 				PS_restore();
 			}
-			else if (ite->asTable())
+			else if (ite->isTable())
 			{
 				PS_save();
 				PS_translate(ite->xPos() - mPage->xOffset(), mPage->height() - (ite->yPos() - mPage->yOffset()));
@@ -3032,13 +3032,13 @@
 			ScQApp->processEvents();
 		if (item->m_layerID != layer.ID)
 			continue;
-		if ((!page->pageNameEmpty()) && (item->asTextFrame()))
+		if ((!page->pageNameEmpty()) && (item->isTextFrame()))
 			continue;
-		if ((!page->pageNameEmpty()) && (item->asPathText()))
+		if ((!page->pageNameEmpty()) && (item->isPathText()))
 			continue;
-		if ((!page->pageNameEmpty()) && (item->asTable()))
+		if ((!page->pageNameEmpty()) && (item->isTable()))
 			continue;
-		if ((!page->pageNameEmpty()) && (item->asImageFrame()) && ((Options.outputSeparations) || (!Options.useColor)))
+		if ((!page->pageNameEmpty()) && (item->isImageFrame()) && ((Options.outputSeparations) || (!Options.useColor)))
 			continue;
 		//if ((!Art) && (view->SelItem.count() != 0) && (!item->Select))
 		if ((m_outputFormat == OutputEPS) && (!item->isSelected()) && (m_Doc->m_Selection->count() != 0))

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Tue May 12 22:10:07 2020
@@ -5744,7 +5744,7 @@
 		for (int j = 0; j < allItems.count(); j++)
 		{
 			PageItem* item = allItems.at(j);
-			if (item->asImageFrame())
+			if (item->isImageFrame())
 				item->setImageVisible(doc->guidesPrefs().showPic);
 		}
 	}
@@ -5758,7 +5758,7 @@
 		for (int j = 0; j < allItems.count(); j++)
 		{
 			PageItem* item = allItems.at(j);
-			if (item->asImageFrame())
+			if (item->isImageFrame())
 				item->setImageVisible(doc->guidesPrefs().showPic);
 		}
 	}
@@ -8937,7 +8937,7 @@
 	if (contentsBuffer.sourceType != PageItem::ImageFrame || currItem->itemType() != PageItem::ImageFrame)
 		return;
 
-	PageItem_ImageFrame* imageItem=currItem->asImageFrame();
+	PageItem_ImageFrame* imageItem = currItem->asImageFrame();
 	int i=QMessageBox::Yes;
 	if (imageItem->imageIsAvailable)
 		i = ScMessageBox::warning(this, CommonStrings::trWarning,

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Tue May 12 22:10:07 2020
@@ -5085,7 +5085,7 @@
 				cstops = ite->mask_gradient.colorStops();
 				for (int cst = 0; cst < ite->mask_gradient.stops(); ++cst)
 					ite->SetQColor(&cstops.at(cst)->color, cstops.at(cst)->name, cstops.at(cst)->shade);
-				if (ite->asImageFrame())
+				if (ite->isImageFrame())
 					loadPict(ite->Pfile, ite, true, false);
 				if (ite->GrType == 13)
 					ite->createConicalMesh();
@@ -9959,7 +9959,7 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			currItem = allItems.at(ii);
-			if (!currItem->asImageFrame() || currItem->imageIsAvailable || currItem->Pfile.isEmpty())
+			if (!currItem->isImageFrame() || currItem->imageIsAvailable || currItem->Pfile.isEmpty())
 				continue;
 			QFileInfo fi(currItem->Pfile);
 			if ((fi.absolutePath() != name) || !fi.exists())
@@ -9988,7 +9988,7 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			currItem = allItems.at(ii);
-			if (!currItem->asImageFrame() || currItem->imageIsAvailable || currItem->Pfile.isEmpty())
+			if (!currItem->isImageFrame() || currItem->imageIsAvailable || currItem->Pfile.isEmpty())
 				continue;
 			QFileInfo fi(currItem->Pfile);
 			if ((fi.absolutePath() != name) || !fi.exists())
@@ -10017,7 +10017,7 @@
 		for (int ii = 0; ii < allItems.count(); ii++)
 		{
 			currItem = allItems.at(ii);
-			if (!currItem->asImageFrame() || currItem->imageIsAvailable || currItem->Pfile.isEmpty())
+			if (!currItem->isImageFrame() || currItem->imageIsAvailable || currItem->Pfile.isEmpty())
 				continue;
 			QFileInfo fi(currItem->Pfile);
 			if ((fi.absolutePath() != name) || !fi.exists())
@@ -10052,7 +10052,7 @@
 			for (int ii = 0; ii < allItems.count(); ii++)
 			{
 				currItem = allItems.at(ii);
-				if (!currItem->asImageFrame() || currItem->imageIsAvailable || currItem->Pfile.isEmpty())
+				if (!currItem->isImageFrame() || currItem->imageIsAvailable || currItem->Pfile.isEmpty())
 					continue;
 				QFileInfo fi(currItem->Pfile);
 				if ((fi.absolutePath() != name) || !fi.exists())
@@ -10618,7 +10618,7 @@
 		m_updateManager.setUpdatesDisabled();
 		for (int a = 0; a < m_Selection->count(); ++a)
 		{
-			PageItem_ImageFrame* imageItem=m_Selection->itemAt(a)->asImageFrame();
+			PageItem_ImageFrame* imageItem = m_Selection->itemAt(a)->asImageFrame();
 			if (imageItem == nullptr)
 				continue;
 			imageItem->setImageVisible(!imageItem->imageVisible());
@@ -15924,7 +15924,7 @@
 		PageItem *currItem = itemSelection->itemAt(i);
 		if (!currItem)
 			continue;
-		if (!currItem->asImageFrame() || !currItem->imageIsAvailable)
+		if (!currItem->isImageFrame() || !currItem->imageIsAvailable)
 			continue;
 
 		double w = currItem->OrigW * currItem->imageXScale();

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Tue May 12 22:10:07 2020
@@ -2693,7 +2693,7 @@
 				itemList = currItem->getChildren() + itemList;
 				continue;
 			}
-			if (!currItem->asImageFrame() || !currItem->imageIsAvailable)
+			if (!currItem->isImageFrame() || !currItem->imageIsAvailable)
 				continue;
 			if (currItem->pixm.imgInfo.lowResType == 0)
 				continue;
@@ -2730,7 +2730,7 @@
 			QRectF boundingRect = currItem->getTransform().mapRect(QRectF(x, y, w, h));
 			if (!cullingArea.intersects(boundingRect.adjusted(0.0, 0.0, 1.0, 1.0)))
 				continue;
-			if (!currItem->asImageFrame() || !currItem->imageIsAvailable)
+			if (!currItem->isImageFrame() || !currItem->imageIsAvailable)
 				continue;
 			if (currItem->pixm.imgInfo.lowResType == 0)
 				continue;

Modified: trunk/Scribus/scribus/ui/loremipsum.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/ui/loremipsum.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/loremipsum.cpp	(original)
+++ trunk/Scribus/scribus/ui/loremipsum.cpp	Tue May 12 22:10:07 2020
@@ -295,7 +295,7 @@
 		PageItem *i2 = currItem;
 		if (m_Doc->appMode == modeEditTable)
 			i2 = currItem->asTable()->activeCell().textFrame();
-		if (!i2->asTextFrame())
+		if (!i2->isTextFrame())
 			continue;
 		UndoTransaction activeTransaction;
 		if (!appendCheckBox->isChecked() && i2->itemText.length() != 0)

Modified: trunk/Scribus/scribus/ui/propertiespalette_image.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&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:10:07 2020
@@ -446,7 +446,7 @@
 	m_haveItem = false;
 	m_item = item;
 
-	if (m_item->asImageFrame())
+	if (m_item->isImageFrame())
 	{
 		imagePageNumber->blockSignals(true);
 		if(m_item->imageIsAvailable)
@@ -523,15 +523,15 @@
 		rrR = 360 - rrR;
 	imageRotation->showValue(fabs(rrR));
 
-	if (m_item->asImageFrame())
+	if (m_item->isImageFrame())
 	{
 		updateProfileList();
 	}
-	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=23797&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:10:07 2020
@@ -154,7 +154,7 @@
 	{
 		enableCustomShape();
 		enableEditShape();
-		if (((m_item->asTextFrame()) || (m_item->asImageFrame()) || (m_item->asPolygon())) &&  (!m_item->ClipEdited) && ((m_item->FrameType == 0) || (m_item->FrameType == 2)))
+		if (((m_item->isTextFrame()) || (m_item->isImageFrame()) || (m_item->isPolygon())) &&  (!m_item->ClipEdited) && ((m_item->FrameType == 0) || (m_item->FrameType == 2)))
 			roundRect->setEnabled(!isLocked);
 		else
 			roundRect->setEnabled(false);
@@ -341,7 +341,7 @@
 	roundRect->setValue(m_item->cornerRadius()*m_unitRatio);
 	showTextFlowMode(m_item->textFlowMode());
 
-	if (m_item->asPathText() || m_item->asTextFrame() || m_item->asImageFrame())
+	if (m_item->isPathText() || m_item->isTextFrame() || m_item->isImageFrame())
 	{
 		nonZero->setChecked(false);
 		nonZero->setEnabled(false);
@@ -359,24 +359,24 @@
 
 	// Frame type 3 is obsolete: CR 2005-02-06
 	//if (((i->itemType() == PageItem::TextFrame) || (i->itemType() == PageItem::ImageFrame) || (i->itemType() == 3)) &&  (!i->ClipEdited))
-	if (((m_item->asTextFrame()) || (m_item->asImageFrame())) &&  (!m_item->ClipEdited) && ((m_item->FrameType == 0) || (m_item->FrameType == 2)))
+	if (((m_item->isTextFrame()) || (m_item->isImageFrame())) &&  (!m_item->ClipEdited) && ((m_item->FrameType == 0) || (m_item->FrameType == 2)))
 		roundRect->setEnabled(true);
 	else
 	{
 		roundRect->setEnabled ((m_item->asPolygon()) &&  (!m_item->ClipEdited)  && ((m_item->FrameType == 0) || (m_item->FrameType == 2)));
 	}
-	if (m_item->asOSGFrame())
+	if (m_item->isOSGFrame())
 	{
 		setEnabled(false);
 		roundRect->setEnabled(false);
 		editShape->setEnabled(false);
 		customShape->setEnabled(false);
 	}
-	if (m_item->asSymbol())
+	if (m_item->isSymbol())
 	{
 		setEnabled(false);
 	}
-	if (m_item->asTable())
+	if (m_item->isTable())
 	{
 		setEnabled(true);
 		roundRect->setEnabled(false);
@@ -513,7 +513,7 @@
 		textFlowUsesContourLine->setChecked(true);
 	else if (mode == PageItem::TextFlowUsesImageClipping)
 		textFlowUsesImageClipping->setChecked(true);
-	if ((m_item->asImageFrame()) && (!m_item->imageClip.empty()))
+	if ((m_item->isImageFrame()) && (!m_item->imageClip.empty()))
 		textFlowUsesImageClipping->setEnabled(true);
 	else
 		textFlowUsesImageClipping->setEnabled(false);

Modified: trunk/Scribus/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/ui/propertiespalette_text.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_text.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertiespalette_text.cpp	Tue May 12 22:10:07 2020
@@ -337,7 +337,7 @@
 		parEffectWidgets->handleSelectionChanged();
 	}
 
-	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 || m_doc->appMode == modeEditTable)

Modified: trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&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:10:07 2020
@@ -102,7 +102,7 @@
 
 	if (m_item)
 	{
-		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 || m_doc->appMode == modeEditTable)
@@ -142,7 +142,7 @@
 	bool enabled = false;
 	if (m_item && m_doc)
 	{
-		if (m_item->asPathText() || m_item->asTextFrame() || m_item->asTable())
+		if (m_item->isPathText() || m_item->isTextFrame() || m_item->isTable())
 			enabled = true;
 		if ((m_item->isGroup()) && (!m_item->isSingleSel))
 			enabled = false;

Modified: trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&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:10:07 2020
@@ -630,7 +630,7 @@
 	bool enabled = false;
 	if (m_item && m_doc)
 	{
-		if (m_item->asPathText() || m_item->asTextFrame() || m_item->asTable())
+		if (m_item->isPathText() || m_item->isTextFrame() || m_item->isTable())
 			enabled = true;
 		if ((m_item->isGroup()) && (!m_item->isSingleSel))
 			enabled = false;
@@ -713,7 +713,7 @@
 
 	if (m_item)
 	{
-		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_hyphenation.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&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:10:07 2020
@@ -169,7 +169,7 @@
 	bool enabled = false;
 	if (m_item && m_doc)
 	{
-		if (m_item->asPathText() || m_item->asTextFrame() || m_item->asTable())
+		if (m_item->isPathText() || m_item->isTextFrame() || m_item->isTable())
 			enabled = true;
 		if ((m_item->isGroup()) && (!m_item->isSingleSel))
 			enabled = false;
@@ -196,7 +196,7 @@
 
 	if (m_item)
 	{
-		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_optmargins.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_optmargins.cpp	Tue May 12 22:10:07 2020
@@ -82,7 +82,7 @@
 
 	if (m_item)
 	{
-		if (m_item->asTextFrame() || m_item->asPathText())
+		if (m_item->isTextFrame() || m_item->isPathText())
 		{
 			ParagraphStyle parStyle =  m_item->itemText.defaultStyle();
 			if (m_doc->appMode == modeEdit || m_doc->appMode == modeEditTable)

Modified: trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_pareffect.cpp	Tue May 12 22:10:07 2020
@@ -97,7 +97,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())
 	{
 		configureWidgets();
 		ParagraphStyle parStyle =  m_item->itemText.defaultStyle();
@@ -351,7 +351,7 @@
 		PageItem_TextFrame *textItem = m_item->asTextFrame();
 		if (m_doc->appMode == modeEditTable)
 			textItem = m_item->asTable()->activeCell().textFrame();
-		if (textItem || m_item->asPathText())
+		if (textItem || m_item->isPathText())
 			enabled = true;
 	}
 	setEnabled(enabled);

Modified: trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp	(original)
+++ trunk/Scribus/scribus/ui/propertywidget_pathtext.cpp	Tue May 12 22:10:07 2020
@@ -96,7 +96,7 @@
 
 	if (m_item)
 	{
-		if (m_item->asPathText())
+		if (m_item->isPathText())
 		{
 			pathTextType->setCurrentIndex(m_item->textPathType);
 			flippedPathText->setChecked(m_item->textPathFlipped);

Modified: trunk/Scribus/scribus/ui/propertywidget_textcolor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&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:10:07 2020
@@ -104,10 +104,10 @@
 
 	if (m_item == nullptr)
 		return;
-	if (!m_item->isTable() && !m_item->isTextFrame() && !m_item->asPathText())
-		return;
-
-	if (m_item->asTextFrame() || m_item->asPathText() || m_item->asTable())
+	if (!m_item->isTable() && !m_item->isTextFrame() && !m_item->isPathText())
+		return;
+
+	if (m_item->isTextFrame() || m_item->isPathText() || m_item->isTable())
 	{
 		ParagraphStyle parStyle =  m_item->itemText.defaultStyle();
 		if (m_doc->appMode == modeEdit || m_doc->appMode == modeEditTable)
@@ -160,7 +160,7 @@
 	bool enabled = false;
 	if (m_item && m_doc)
 	{
-		if (m_item->asPathText() || m_item->asTextFrame() || m_item->asTable())
+		if (m_item->isPathText() || m_item->isTextFrame() || m_item->isTable())
 			enabled = true;
 		if ((m_item->isGroup()) && (!m_item->isSingleSel))
 			enabled = false;

Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23797&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp	(original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp	Tue May 12 22:10:07 2020
@@ -3010,7 +3010,7 @@
 		return;
 	PageItem *nextItem = m_item;
 //#if 0
-	if (m_item->asTextFrame())
+	if (m_item->isTextFrame())
 	{
 		while (nextItem != nullptr)
 		{
@@ -3025,7 +3025,7 @@
 	PageItem* nb2 = nextItem;
 	nb2->itemText.clear();
 #if 0
-	if (m_item->asTextFrame())
+	if (m_item->isTextFrame())
 	{
 		while (nb2 != 0)
 		{




More information about the scribus-commit mailing list