r23794 by craig - Use newer boolean isBlahFrame functions instead of forcing pointer/
scribus-commit
scribus-commit at lists.scribus.net
Tue May 12 21:24:49 UTC 2020
Author: craig
Date: Tue May 12 21:24:49 2020
New Revision: 23794
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23794
Log:
Use newer boolean isBlahFrame functions instead of forcing pointer/
boolean conversions where possible
Modified:
trunk/Scribus/scribus/actionmanager.cpp
trunk/Scribus/scribus/appmodehelper.cpp
trunk/Scribus/scribus/canvas.cpp
trunk/Scribus/scribus/canvasgesture_resize.cpp
trunk/Scribus/scribus/canvasmode.cpp
trunk/Scribus/scribus/canvasmode_edit.cpp
trunk/Scribus/scribus/canvasmode_eyedropper.cpp
trunk/Scribus/scribus/canvasmode_framelinks.cpp
trunk/Scribus/scribus/canvasmode_imageimport.cpp
trunk/Scribus/scribus/canvasmode_nodeedit.cpp
trunk/Scribus/scribus/canvasmode_normal.cpp
trunk/Scribus/scribus/canvasmode_rotate.cpp
trunk/Scribus/scribus/documentchecker.cpp
trunk/Scribus/scribus/nodeeditcontext.cpp
trunk/Scribus/scribus/pageitem.h
trunk/Scribus/scribus/pageitem_symbol.h
trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusview.cpp
trunk/Scribus/scribus/ui/contextmenu.cpp
trunk/Scribus/scribus/ui/nodeeditpalette.cpp
trunk/Scribus/scribus/ui/propertiespalette.cpp
trunk/Scribus/scribus/ui/propertiespalette_group.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_text.cpp
trunk/Scribus/scribus/ui/propertiespalette_xyz.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_textcolor.cpp
trunk/Scribus/scribus/ui/storyeditor.cpp
Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp (original)
+++ trunk/Scribus/scribus/actionmanager.cpp Tue May 12 21:24:49 2020
@@ -1437,7 +1437,7 @@
(*scrActions)["itemPDFIsBookmark"]->disconnect();
(*scrActions)["itemPDFIsAnnotation"]->disconnect();
- if (!currItem->asTextFrame())
+ if (!currItem->isTextFrame())
{
(*scrActions)["itemPDFIsAnnotation"]->setEnabled(false);
(*scrActions)["itemPDFIsBookmark"]->setEnabled(false);
Modified: trunk/Scribus/scribus/appmodehelper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/appmodehelper.cpp
==============================================================================
--- trunk/Scribus/scribus/appmodehelper.cpp (original)
+++ trunk/Scribus/scribus/appmodehelper.cpp Tue May 12 21:24:49 2020
@@ -141,7 +141,7 @@
if (currItem != nullptr)
{
currItem->update();
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
enableTextActions(false);
// scrMenuMgr->setMenuEnabled("Item", true);
setTextEditMode(false);
@@ -289,7 +289,7 @@
}
if (ScMimeData::clipboardHasScribusData())
{
- bool textFrameEditMode = ((currItem != nullptr) && (currItem->asTextFrame()));
+ bool textFrameEditMode = ((currItem != nullptr) && (currItem->isTextFrame()));
(*a_scrActions)["editPaste"]->setEnabled( textFrameEditMode || (currItem == nullptr) );
}
setTextEditMode(true);
@@ -350,7 +350,7 @@
a_actMgr->saveActionShortcutsPreEditMode();
// #11938: Paste is not correctly enabled in modeEditTable
if (ScMimeData::clipboardHasScribusData())
- (*a_scrActions)["editPaste"]->setEnabled(currItem->asTable());
+ (*a_scrActions)["editPaste"]->setEnabled(currItem->isTable());
}
}
break;
@@ -459,7 +459,7 @@
(*a_scrActions)["editPasteContents"]->setEnabled(isImageFrame);
(*a_scrActions)["editPasteContentsAbs"]->setEnabled(isImageFrame);
(*a_scrActions)["editEditWithImageEditor"]->setEnabled(isImageFrame && currItem->imageIsAvailable && currItem->isRaster);
- (*a_scrActions)["editEditRenderSource"]->setEnabled(isImageFrame && currItem && (currItem->asLatexFrame() || currItem->asOSGFrame()));
+ (*a_scrActions)["editEditRenderSource"]->setEnabled(isImageFrame && currItem && (currItem->isLatexFrame() || currItem->isOSGFrame()));
(*a_scrActions)["itemAdjustFrameHeightToText"]->setEnabled(SelectedType==PageItem::TextFrame && currItem->itemText.length() >0);
if (!isImageFrame)
{
@@ -650,7 +650,7 @@
{
(*a_scrActions)["editSelectAll"]->setEnabled(true);
(*a_scrActions)["editSelectAllOnLayer"]->setEnabled(false);
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
{
enableTextActions(true, currItem->currentStyle().charStyle().font().scName());
}
@@ -890,7 +890,7 @@
{
(*a_scrActions)["itemUngroup"]->setEnabled(false);
(*a_scrActions)["itemGroupAdjust"]->setEnabled(false);
- (*a_scrActions)["itemSplitPolygons"]->setEnabled( (currItem->asPolygon()) && (currItem->Segments.count() != 0) );
+ (*a_scrActions)["itemSplitPolygons"]->setEnabled( (currItem->isPolygon()) && (currItem->Segments.count() != 0) );
}
bool levelEnabled = true;
if (currItem->locked())
Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp (original)
+++ trunk/Scribus/scribus/canvas.cpp Tue May 12 21:24:49 2020
@@ -1193,11 +1193,11 @@
for (int cg = 0; cg < itemCountG; cg++)
{
currItem = gItem->groupItemList.at(cg);
- if (!(currItem->asLine()))
+ if (!(currItem->isLine()))
currItem->DrawPolyL(pp, currItem->Clip);
else
{
- if (currItem->asLine())
+ if (currItem->isLine())
{
int lw2 = 1;
int lw = 1;
@@ -1515,7 +1515,7 @@
currItem->DrawObj_Decoration(painter);
}
getLinkedFrames(currItem);
-/* if ((currItem->asTextFrame()) && ((currItem->nextInChain() != 0) || (currItem->prevInChain() != 0)))
+/* if ((currItem->isTextFrame()) && ((currItem->nextInChain() != 0) || (currItem->prevInChain() != 0)))
{
PageItem *nextItem = currItem;
while (nextItem != 0)
@@ -1687,7 +1687,7 @@
}
}
- else if ((currItem->asTextFrame()) && ((currItem->nextInChain() != nullptr) || (currItem->prevInChain() != nullptr)))
+ else if ((currItem->isTextFrame()) && ((currItem->nextInChain() != nullptr) || (currItem->prevInChain() != nullptr)))
{
PageItem *nextItem = currItem;
while (nextItem != nullptr)
Modified: trunk/Scribus/scribus/canvasgesture_resize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/canvasgesture_resize.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_resize.cpp (original)
+++ trunk/Scribus/scribus/canvasgesture_resize.cpp Tue May 12 21:24:49 2020
@@ -211,7 +211,7 @@
{
doResize(m->modifiers() & Qt::AltModifier);
m_doc->setRedrawBounding(currItem);
- if (currItem->asImageFrame())
+ if (currItem->isImageFrame())
currItem->adjustPictScale();
}
//add action itemResizeToMargin for right click on item`s handlers
Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Tue May 12 21:24:49 2020
@@ -430,7 +430,7 @@
}
if (drawHandles && !currItem->locked())
{
- if (currItem->asLine())
+ if (currItem->isLine())
{
const double markWidth = 4.0 / m_canvas->scale();
QRectF handleRect = QRectF(0, 0, markWidth, markWidth);
@@ -1140,7 +1140,7 @@
double radRotation = rotationFC * M_PI / 180.0;
bool moveImage = false;
- if ((currItem->asImageFrame() || currItem->asLatexFrame() || currItem->asOSGFrame()) && currItem->imageIsAvailable && !currItem->fitImageToFrame())
+ if ((currItem->isImageFrame() || currItem->asLatexFrame() || currItem->asOSGFrame()) && currItem->imageIsAvailable && !currItem->fitImageToFrame())
moveImage = true;
switch (kk)
Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp Tue May 12 21:24:49 2020
@@ -109,11 +109,11 @@
return;
}
- if (currItem->asImageFrame() && !currItem->locked())
+ if (currItem->isImageFrame() && !currItem->locked())
{
currItem->handleModeEditKey(e, m_keyRepeat);
}
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
{
bool oldKeyRepeat = m_keyRepeat;
@@ -197,7 +197,7 @@
}
drawTextCursor(p, textframe);
}
- else if (currItem->asImageFrame())
+ else if (currItem->isImageFrame())
{
QTransform mm = currItem->getTransform();
p->save();
@@ -410,7 +410,7 @@
return;
if (m_canvas->m_viewMode.m_MouseButtonPressed && (m_doc->appMode == modeEdit))
{
- if (currItem->asImageFrame())
+ if (currItem->isImageFrame())
{
if (m->modifiers() & Qt::ShiftModifier)
{
@@ -435,7 +435,7 @@
Mxp = newX;
Myp = newY;
}
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
{
int refStartSel(currItem->asTextFrame()->itemText.startOfSelection());
int refEndSel(currItem->asTextFrame()->itemText.endOfSelection());
@@ -489,9 +489,9 @@
{
if (hitTest == Canvas::INSIDE)
{
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
m_view->setCursor(QCursor(Qt::IBeamCursor));
- if (currItem->asImageFrame())
+ if (currItem->isImageFrame())
{
if (m->modifiers() & Qt::ShiftModifier)
m_view->setCursor(IconManager::instance().loadCursor("Rotieren2.png"));
@@ -588,7 +588,7 @@
if (SeleItem(m))
{
currItem = m_doc->m_Selection->itemAt(0);
- if ((currItem->asTextFrame()) || (currItem->asImageFrame()))
+ if ((currItem->isTextFrame()) || (currItem->isImageFrame()))
{
m_view->requestMode(modeEdit);
wantNormal = false;
@@ -598,7 +598,7 @@
m_view->requestMode(submodePaintingDone);
m_view->setCursor(QCursor(Qt::ArrowCursor));
}
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
{
m_view->slotSetCurs(m->globalPos().x(), m->globalPos().y());
oldCp = currItem->itemText.cursorPosition();
@@ -620,7 +620,7 @@
}
oldP = currItem->itemText.cursorPosition();
//CB Where we set the cursor for a click in text frame
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
{
inText = m_view->slotSetCurs(m->globalPos().x(), m->globalPos().y());
//CB If we clicked outside a text frame to go out of edit mode and deselect the frame
@@ -712,7 +712,7 @@
if (SeleItem(m))
{
currItem = m_doc->m_Selection->itemAt(0);
- if ((currItem->asTextFrame()) || (currItem->asImageFrame()))
+ if ((currItem->isTextFrame()) || (currItem->isImageFrame()))
{
m_view->requestMode(modeEdit);
}
@@ -758,7 +758,7 @@
m_doc->setRedrawBounding(currItem);
currItem->OwnPage = m_doc->OnPage(currItem);
m_canvas->m_viewMode.operItemResizing = false;
- if (currItem->asLine())
+ if (currItem->isLine())
m_view->updateContents();
}
if (m_canvas->m_viewMode.operItemMoving)
Modified: trunk/Scribus/scribus/canvasmode_eyedropper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/canvasmode_eyedropper.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_eyedropper.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_eyedropper.cpp Tue May 12 21:24:49 2020
@@ -200,7 +200,7 @@
PageItem *currItem = m_doc->m_Selection->itemAt(i);
if (!currItem)
continue;
- if ((m->modifiers() & Qt::ControlModifier) && (currItem->asTextFrame() || currItem->asPathText()))
+ if ((m->modifiers() & Qt::ControlModifier) && (currItem->isTextFrame() || currItem->asPathText()))
m_doc->itemSelection_SetFillColor(colorName); //Text colour
else if (m->modifiers() & Qt::AltModifier) //Line colour
m_doc->itemSelection_SetItemPen(colorName);
Modified: trunk/Scribus/scribus/canvasmode_framelinks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/canvasmode_framelinks.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.cpp Tue May 12 21:24:49 2020
@@ -301,7 +301,7 @@
// #14334: delay selection signals so that (un)link actions get properly enabled/disabled
m_doc->m_Selection->delaySignalsOn();
SeleItem(m);
- if (GetItem(&currItem) && (currItem->asTextFrame()))
+ if (GetItem(&currItem) && (currItem->isTextFrame()))
{
if (currItem->prevInChain() != nullptr)
{
Modified: trunk/Scribus/scribus/canvasmode_imageimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/canvasmode_imageimport.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_imageimport.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_imageimport.cpp Tue May 12 21:24:49 2020
@@ -237,7 +237,7 @@
m_doc->loadPict(fileName, currItem, false, true);
// Call to showScaleAndOffset() is now very likely unnecessary
// due to mecanisms used to update properties in PP in 1.5.x+
- // m_ScMW->contentPalette->update(currItem->asImageFrame());
+ // m_ScMW->contentPalette->update(currItem->isImageFrame());
m_ScMW->repaint();
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
m_view->DrawNew();
Modified: trunk/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.cpp Tue May 12 21:24:49 2020
@@ -678,7 +678,7 @@
}
if (m_doc->nodeEdit.hasNodeSelected())
{
- if (currItem->asPolygon())
+ if (currItem->isPolygon())
{
if ((m_doc->nodeEdit.clre() != 0) && (m_doc->nodeEdit.clre() != (EndInd - 2)))
{
@@ -735,7 +735,7 @@
}
else
{
- if ((currItem->asPolyLine()) || (currItem->asPathText()))
+ if ((currItem->isPolyLine()) || (currItem->isPathText()))
{
if ((m_doc->nodeEdit.clre() > 1) && (m_doc->nodeEdit.clre() < (Clip.size() - 2)))
{
Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Tue May 12 21:24:49 2020
@@ -181,7 +181,7 @@
}
if (GetItem(&currItem))
{
- if (currItem->asLatexFrame())
+ if (currItem->isLatexFrame())
{
if (currItem->locked()) // || (!currItem->ScaleType))
{
@@ -190,7 +190,7 @@
if (currItem->imageVisible())
m_view->requestMode(modeEdit);
}
- else if (currItem->asOSGFrame())
+ else if (currItem->isOSGFrame())
{
m_view->requestMode(submodeEditExternal);
}
@@ -250,24 +250,24 @@
// mousePressEvent(m);
}
}
- else if (currItem->asSymbolFrame())
+ else if (currItem->isSymbol())
{
if (!m_doc->symbolEditMode())
m_view->requestMode(submodeEditSymbol);
}
- else if (currItem->asArc())
+ else if (currItem->isArc())
{
m_view->requestMode(modeEditArc);
}
- else if (currItem->asRegularPolygon())
+ else if (currItem->isRegularPolygon())
{
m_view->requestMode(modeEditPolygon);
}
- else if (currItem->asSpiral())
+ else if (currItem->isSpiral())
{
m_view->requestMode(modeEditSpiral);
}
- else if (currItem->asTable())
+ else if (currItem->isTable())
{
m_view->requestMode(modeEditTable);
m_view->slotSetCurs(m->globalPos().x(), m->globalPos().y());
@@ -522,7 +522,7 @@
erf = true;
currItem = m_doc->m_Selection->itemAt(0);
//Control Alt drag image in frame without being in edit mode
- if ((currItem->asImageFrame()) && (m->modifiers() & Qt::ControlModifier) && (m->modifiers() & Qt::AltModifier))
+ if ((currItem->isImageFrame()) && (m->modifiers() & Qt::ControlModifier) && (m->modifiers() & Qt::AltModifier))
{
QTransform mm1 = currItem->getTransform();
QTransform mm2 = mm1.inverted();
@@ -771,7 +771,7 @@
int how = m_canvas->frameHitTest(QPointF(mousePointDoc.x(),mousePointDoc.y()), currItem);
if (how > 0)
{
- if (currItem->asLine())
+ if (currItem->isLine())
m_view->setCursor(QCursor(Qt::SizeAllCursor));
else if (!currItem->locked() && !currItem->sizeLocked())
{
@@ -837,7 +837,7 @@
if ((GetItem(&currItem)) && (!m_lastPosWasOverGuide))
{
- if ((currItem->asLine()) && (!m_doc->m_Selection->isMultipleSelection()) && (!m_doc->drawAsPreview))
+ if ((currItem->isLine()) && (!m_doc->m_Selection->isMultipleSelection()) && (!m_doc->drawAsPreview))
{
if (!m_lineMoveGesture)
m_lineMoveGesture = new LineMove(this);
@@ -1011,7 +1011,7 @@
m_doc->setRedrawBounding(currItem);
currItem->OwnPage = m_doc->OnPage(currItem);
m_canvas->m_viewMode.operItemResizing = false;
- if (currItem->asLine())
+ if (currItem->isLine())
m_view->updateContents();
}
if (m_canvas->m_viewMode.operItemMoving)
Modified: trunk/Scribus/scribus/canvasmode_rotate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/canvasmode_rotate.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_rotate.cpp Tue May 12 21:24:49 2020
@@ -335,7 +335,7 @@
{
m_doc->setRedrawBounding(currItem);
currItem->OwnPage = m_doc->OnPage(currItem);
- if (currItem->asLine())
+ if (currItem->isLine())
m_view->updateContents();
}
}
@@ -528,7 +528,7 @@
{
m_doc->setRedrawBounding(currItem);
currItem->OwnPage = m_doc->OnPage(currItem);
- if (currItem->asLine())
+ if (currItem->isLine())
m_view->updateContents();
}
}
Modified: trunk/Scribus/scribus/documentchecker.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/documentchecker.cpp
==============================================================================
--- trunk/Scribus/scribus/documentchecker.cpp (original)
+++ trunk/Scribus/scribus/documentchecker.cpp Tue May 12 21:24:49 2020
@@ -281,7 +281,7 @@
itemError.insert(Transparency, 0);
if ((currItem->OwnPage == -1) && (checkerSettings.checkOrphans))
itemError.insert(ObjectNotOnPage, 0);
- if (currItem->asImageFrame() && !currItem->asOSGFrame())
+ if (currItem->isImageFrame() && !currItem->isOSGFrame())
{
// check image vs. frame sizes
@@ -387,7 +387,7 @@
}
}
}
- if ((currItem->asTextFrame()) || (currItem->asPathText()))
+ if ((currItem->isTextFrame()) || (currItem->isPathText()))
{
if ( currItem->frameOverflows() && (checkerSettings.checkOverflow) && (!((currItem->isAnnotation()) && ((currItem->annotation().Type() == Annotation::Combobox) || (currItem->annotation().Type() == Annotation::Listbox)))))
itemError.insert(TextOverflow, 0);
@@ -545,7 +545,7 @@
itemError.insert(PDFAnnotField, 0);
if ((currItem->OwnPage == -1) && (checkerSettings.checkOrphans))
itemError.insert(ObjectNotOnPage, 0);
- if (currItem->asImageFrame() && !currItem->asOSGFrame())
+ if (currItem->isImageFrame() && !currItem->isOSGFrame())
{
// check image vs. frame sizes
@@ -651,7 +651,7 @@
}
}
}
- if ((currItem->asTextFrame()) || (currItem->asPathText()))
+ if ((currItem->isTextFrame()) || (currItem->isPathText()))
{
if ( currItem->frameOverflows() && (checkerSettings.checkOverflow) && (!((currItem->isAnnotation()) && ((currItem->annotation().Type() == Annotation::Combobox) || (currItem->annotation().Type() == Annotation::Listbox)))))
itemError.insert(TextOverflow, 0);
Modified: trunk/Scribus/scribus/nodeeditcontext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/nodeeditcontext.cpp
==============================================================================
--- trunk/Scribus/scribus/nodeeditcontext.cpp (original)
+++ trunk/Scribus/scribus/nodeeditcontext.cpp Tue May 12 21:24:49 2020
@@ -446,7 +446,7 @@
currItem->OldH2 = currItem->height();
if ((Doc->nodeEdit.clre() == StartInd) || (Doc->nodeEdit.clre() == EndInd - 2))
{
- if (currItem->asPolyLine())
+ if (currItem->isPolyLine())
{
if (Doc->nodeEdit.clre() == StartInd)
Clip.setPoint(StartInd + 1, np);
Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Tue May 12 21:24:49 2020
@@ -248,7 +248,7 @@
virtual PageItem_Polygon * asPolygon() { return nullptr; } ///< Return self if Polygon item, otherwise null
virtual PageItem_RegularPolygon * asRegularPolygon() { return nullptr; } ///< Return self if Regular Polygon item, otherwise null
virtual PageItem_Spiral * asSpiral() { return nullptr; } ///< Return self if Spiral item, otherwise null
- virtual PageItem_Symbol * asSymbolFrame() { return nullptr; } ///< Return self if Symbol item, otherwise null
+ virtual PageItem_Symbol * asSymbol() { return nullptr; } ///< Return self if Symbol item, otherwise null
virtual PageItem_Table * asTable() { return nullptr; } ///< Return self if Table item, otherwise null
virtual PageItem_TextFrame * asTextFrame() { return nullptr; } ///< Return self if Text item, otherwise null
Modified: trunk/Scribus/scribus/pageitem_symbol.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/pageitem_symbol.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_symbol.h (original)
+++ trunk/Scribus/scribus/pageitem_symbol.h Tue May 12 21:24:49 2020
@@ -40,7 +40,7 @@
PageItem_Symbol(const PageItem & p) : PageItem(p) {}
~PageItem_Symbol() {};
- PageItem_Symbol * asSymbolFrame() override { return this; }
+ PageItem_Symbol* asSymbol() override { return this; }
bool isSymbol() const override { return true; }
ItemType realItemType() const override { return PageItem::Symbol; }
void applicableActions(QStringList& actionList) override;
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Tue May 12 21:24:49 2020
@@ -567,9 +567,9 @@
}
currItem->ClipEdited = true;
}
- if (currItem->asImageFrame())
+ if (currItem->isImageFrame())
currItem->adjustPictScale();
- if (currItem->asPathText())
+ if (currItem->isPathText())
{
currItem->ClipEdited = true;
currItem->FrameType = 3;
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&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 21:24:49 2020
@@ -2634,7 +2634,7 @@
currItem->UseEmbedded = attrs.valueAsInt("EMBEDDED", 1);
currItem->pixm.imgInfo.lowResType = attrs.valueAsInt("ImageRes", 1);
currItem->pixm.imgInfo.actualPageNumber = attrs.valueAsInt("Pagenumber", 0);
- if (currItem->asLatexFrame())
+ if (currItem->isLatexFrame())
{
currItem->setImageXYOffset(attrs.valueAsDouble("LOCALX") * scx, attrs.valueAsDouble("LOCALY") * scy);
// currItem->setImageXYScale(1.0, 1.0);
@@ -2883,7 +2883,7 @@
currItem->annotation().setIPlace(attrs.valueAsInt("ANPLACE", 1));
currItem->annotation().setScaleW(attrs.valueAsInt("ANSCALE", 0));
- if (currItem->asTextFrame() || currItem->asPathText())
+ if (currItem->isTextFrame() || currItem->isPathText())
{
UndoManager::instance()->setUndoEnabled(false);
if (currItem->isAnnotation() && currItem->annotation().UseIcons())
@@ -3047,7 +3047,7 @@
currItem->asLine()->setLineClip();
}
- if (currItem->asPathText())
+ if (currItem->isPathText())
currItem->updatePolyClip();
currItem->GrType = attrs.valueAsInt("GRTYP", 0);
QString GrColor;
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp Tue May 12 21:24:49 2020
@@ -1812,7 +1812,7 @@
currItem->annotation().setIPlace(obj->attribute("ANPLACE", "1").toInt());
currItem->annotation().setScaleW(obj->attribute("ANSCALE", "0").toInt());
- if (currItem->asTextFrame() || currItem->asPathText())
+ if (currItem->isTextFrame() || currItem->isPathText())
{
UndoManager::instance()->setUndoEnabled(false);
if (currItem->isAnnotation() && currItem->annotation().UseIcons())
@@ -1945,9 +1945,9 @@
currItem->setHeight(1.0);
currItem->asLine()->setLineClip();
}
- if (currItem->asImageFrame())
+ if (currItem->isImageFrame())
currItem->adjustPictScale();
- if (currItem->asPathText())
+ if (currItem->isPathText())
currItem->updatePolyClip();
currItem->GrType = obj->attribute("GRTYP", "0").toInt();
QString GrColor;
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&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 21:24:49 2020
@@ -5006,9 +5006,9 @@
currItem->setImageRotation(attrs.valueAsDouble("LOCALROT"));
// if (!currItem->asLatexFrame())
#ifdef HAVE_OSG
- if ((currItem->asImageFrame() || currItem->asOSGFrame()) && (!currItem->asLatexFrame()))
+ if ((currItem->isImageFrame() || currItem->isOSGFrame()) && (!currItem->isLatexFrame()))
#else
- if ((currItem->asImageFrame()) && (!currItem->asLatexFrame()))
+ if ((currItem->isImageFrame()) && (!currItem->isLatexFrame()))
#endif
{
bool inlineF = attrs.valueAsBool("isInlineImage", false);
@@ -5041,7 +5041,7 @@
else
currItem->Pfile = Relative2Path(attrs.valueAsString("PFILE"), baseDir);
#ifdef HAVE_OSG
- if (currItem->asOSGFrame())
+ if (currItem->isOSGFrame())
{
PageItem_OSGFrame *osgframe = currItem->asOSGFrame();
osgframe->modelFile = Relative2Path(attrs.valueAsString("modelFile"), baseDir);
@@ -5379,7 +5379,7 @@
currItem->annotation().setIcon(attrs.valueAsInt("ANITYP", 0));
currItem->annotation().setAnOpen(attrs.valueAsBool("ANOPEN", false) );
- if (currItem->asTextFrame() || currItem->asPathText())
+ if (currItem->isTextFrame() || currItem->isPathText())
{
UndoManager::instance()->setUndoEnabled(false);
if (currItem->isAnnotation() && currItem->annotation().UseIcons())
@@ -5405,7 +5405,7 @@
UndoManager::instance()->setUndoEnabled(true);
}
- if (currItem->asTable())
+ if (currItem->isTable())
{
doc->dontResize = true;
PageItem_Table *tableitem = currItem->asTable();
@@ -5527,7 +5527,7 @@
currItem->DashValues.clear();
currItem->DashOffset = attrs.valueAsDouble("DASHOFF", 0.0);
- if (currItem->asRegularPolygon())
+ if (currItem->isRegularPolygon())
{
PageItem_RegularPolygon *regitem = currItem->asRegularPolygon();
regitem->polyCorners = attrs.valueAsInt("POLYC", 4);
@@ -5539,7 +5539,7 @@
regitem->polyUseFactor = attrs.valueAsBool("POLYS", false);
regitem->recalcPath();
}
- else if (currItem->asArc())
+ else if (currItem->isArc())
{
PageItem_Arc *arcitem = currItem->asArc();
arcitem->arcHeight = attrs.valueAsDouble("arcHeight", 1.0);
@@ -5548,7 +5548,7 @@
arcitem->arcSweepAngle = attrs.valueAsDouble("arcSweepAngle", 300.0);
arcitem->recalcPath();
}
- else if (currItem->asSpiral())
+ else if (currItem->isSpiral())
{
PageItem_Spiral *arcitem = currItem->asSpiral();
arcitem->FrameType = 3; // Workaround for old docs, otherwise undo breaks spirals
@@ -5621,7 +5621,7 @@
currItem->asLine()->setLineClip();
}
- if (currItem->asPathText())
+ if (currItem->isPathText())
currItem->updatePolyClip();
currItem->GrType = attrs.valueAsInt("GRTYP", 0);
QString GrColor;
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue May 12 21:24:49 2020
@@ -2862,7 +2862,7 @@
{
setTBvals(currItem);
charPalette->setEnabled(true, currItem);
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
{
appModeHelper->enableTextActions(true, currItem->currentStyle().charStyle().font().scName());
currItem->asTextFrame()->toggleEditModeActions();
@@ -3982,7 +3982,7 @@
cii->setImageList(fileNames);
}
}
- else if (currItem->asTextFrame())
+ else if (currItem->isTextFrame())
{
gtGetText* gt = new gtGetText(doc);
ImportSetup impsetup=gt->run();
@@ -4632,7 +4632,7 @@
for (int i = 0; i < docSelectionCount; ++i)
{
currItem = doc->m_Selection->itemAt(i);
- if ((currItem->asTextFrame() || currItem->asPathText()) && currItem==storyEditor->currentItem() && doc==storyEditor->currentDocument())
+ if ((currItem->isTextFrame() || currItem->isPathText()) && currItem==storyEditor->currentItem() && doc==storyEditor->currentDocument())
{
ScMessageBox::critical(this, tr("Cannot Cut In-Use Item"), tr("The item %1 is currently being edited by Story Editor. The cut operation will be cancelled").arg(currItem->itemName()));
return;
@@ -5221,7 +5221,7 @@
PageItem *currItem = doc->m_Selection->itemAt(0);
if (doc->appMode == modeEditTable)
currItem = currItem->asTable()->activeCell().textFrame();
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
{
currItem->itemText.deselectAll();
doc->regionsChanged()->update(currItem->getBoundingRect());
@@ -5246,8 +5246,8 @@
{
PageItem *currItem = nullptr;
currItem = doc->m_Selection->itemAt(0);
- textFrameEditMode = ((doc->appMode == modeEdit) && (currItem->asTextFrame()));
- tableEditMode = ((doc->appMode == modeEditTable) && (currItem->asTable()));
+ textFrameEditMode = ((doc->appMode == modeEdit) && (currItem->isTextFrame()));
+ tableEditMode = ((doc->appMode == modeEditTable) && (currItem->isTable()));
}
scrActions["editPaste"]->setEnabled(HaveDoc && (hasScribusData || textFrameEditMode || tableEditMode || hasExternalData));
}
@@ -6053,7 +6053,7 @@
nodePalette->ResetContClip->setEnabled(false);
nodePalette->PolyStatus(currItem->itemType(), currItem->PoLine.size());
nodePalette->setDefaults(currItem);
- if ((currItem->asImageFrame()) && (!currItem->imageClip.empty()))
+ if ((currItem->isImageFrame()) && (!currItem->imageClip.empty()))
{
nodePalette->ResetContClip->setSizePolicy(QSizePolicy(static_cast<QSizePolicy::Policy>(3), static_cast<QSizePolicy::Policy>(3)));
nodePalette->ResetContClip->show();
@@ -6618,7 +6618,7 @@
view->requestMode(modeEdit);
}
}
- else if (ite->asSymbolFrame())
+ else if (ite->asSymbol())
{
if (!doc->symbolEditMode())
view->requestMode(submodeEditSymbol);
@@ -8555,13 +8555,13 @@
// - IMHO ScribusMainWindow has way to many slots already
// - my code here is short and without sideeffects
PageItem *currItem = doc->m_Selection->itemAt(0);
- if (currItem->asLatexFrame())
+ if (currItem->isLatexFrame())
{
currItem->asLatexFrame()->runEditor();
return; //Don't process the functions for imageframes!
}
#ifdef HAVE_OSG
- if (currItem->asOSGFrame())
+ if (currItem->isOSGFrame())
{
OSGEditorDialog *dia = new OSGEditorDialog(this, currItem->asOSGFrame(), m_osgFilterString);
dia->exec();
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Tue May 12 21:24:49 2020
@@ -480,7 +480,7 @@
currItem = allItems.at(j);
if (currItem->imageIsAvailable)
ScCore->fileWatcher->removeFile(currItem->Pfile);
- if ((currItem->asImageFrame()) && (!currItem->Pfile.isEmpty()))
+ if ((currItem->isImageFrame()) && (!currItem->Pfile.isEmpty()))
{
QFileInfo fi(currItem->Pfile);
ScCore->fileWatcher->removeDir(fi.absolutePath());
@@ -500,7 +500,7 @@
currItem = allItems.at(j);
if (currItem->imageIsAvailable)
ScCore->fileWatcher->removeFile(currItem->Pfile);
- if ((currItem->asImageFrame()) && (!currItem->Pfile.isEmpty()))
+ if ((currItem->isImageFrame()) && (!currItem->Pfile.isEmpty()))
{
QFileInfo fi(currItem->Pfile);
ScCore->fileWatcher->removeDir(fi.absolutePath());
@@ -520,7 +520,7 @@
currItem = allItems.at(ii);
if (currItem->imageIsAvailable)
ScCore->fileWatcher->removeFile(currItem->Pfile);
- if ((currItem->asImageFrame()) && (!currItem->Pfile.isEmpty()))
+ if ((currItem->isImageFrame()) && (!currItem->Pfile.isEmpty()))
{
QFileInfo fi(currItem->Pfile);
ScCore->fileWatcher->removeDir(fi.absolutePath());
@@ -7729,9 +7729,9 @@
//cb moved to setlinewidth
//currItem->m_oldLineWidth = currItem->lineWidth();
currItem->setLineWidth(w);
- if (currItem->asPolyLine() || currItem->asSpiral())
+ if (currItem->isPolyLine() || currItem->isSpiral())
currItem->setPolyClip(qRound(qMax(currItem->lineWidth() / 2, 1.0)));
- if (currItem->asLine())
+ if (currItem->isLine())
currItem->asLine()->setLineClip();
QRectF newRect = currItem->getVisualBoundingRect();
//currItem->update();
@@ -7943,7 +7943,7 @@
for (int i = 0; i < selectedItemCount; ++i)
{
currItem = itemSelection->itemAt(i);
- if ((currItem->asLine()) && (color == CommonStrings::None))
+ if ((currItem->isLine()) && (color == CommonStrings::None))
continue;
currItem->setLineColor(color);
@@ -8910,7 +8910,7 @@
if (UndoManager::undoEnabled())
activeTransaction = m_undoManager->beginTransaction();
PageItem* currItem = itemSelection->itemAt(i);
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
{
if (currItem->OwnPage != -1)
{
@@ -8954,7 +8954,7 @@
if (UndoManager::undoEnabled())
activeTransaction = m_undoManager->beginTransaction();
PageItem* currItem = itemSelection->itemAt(i);
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
{
bool old = currItem->isBookmark;
currItem->setIsAnnotation(!currItem->isAnnotation());
@@ -9028,7 +9028,7 @@
else
currItem->itemText.setDefaultStyle(newStyle);
}
- if (currItem->asPathText())
+ if (currItem->isPathText())
currItem->updatePolyClip();
}
if (activeTransaction)
@@ -9116,7 +9116,7 @@
setNotesChanged(true);
}
currItem->invalid = true;
- if (currItem->asPathText())
+ if (currItem->isPathText())
currItem->updatePolyClip();
if (currItem->isNoteFrame())
currItem->asNoteFrame()->updateNotesText();
@@ -9274,7 +9274,7 @@
currItem->itemText.applyStyle(stop, newStyle, rmDirectFormatting);
currItem->invalid = true;
}
- if (currItem->asPathText())
+ if (currItem->isPathText())
currItem->updatePolyClip();
if (currItem->isNoteFrame())
currItem->asNoteFrame()->updateNotesText();
@@ -9414,7 +9414,7 @@
else if (currItem->isTextFrame())
updateItemNotesFramesStyles(currItem, dstyle);
}
- if (currItem->asPathText())
+ if (currItem->isPathText())
currItem->updatePolyClip();
if (currItem->isNoteFrame())
currItem->asNoteFrame()->updateNotesText();
@@ -9494,7 +9494,7 @@
else if (currItem->isTextFrame())
updateItemNotesFramesStyles(currItem, dstyle);
}
- if (currItem->asPathText())
+ if (currItem->isPathText())
currItem->updatePolyClip();
if (currItem->isNoteFrame())
currItem->asNoteFrame()->updateNotesText();
@@ -9599,7 +9599,7 @@
else if (currItem->isTextFrame())
updateItemNotesFramesStyles(currItem, defStyle);
}
- if (currItem->asPathText())
+ if (currItem->isPathText())
currItem->updatePolyClip();
if (currItem->isNoteFrame())
currItem->asNoteFrame()->updateNotesText();
@@ -9638,7 +9638,7 @@
ma.scale(-1, 1);
currItem->PoLine.map(ma);
currItem->PoLine.translate(currItem->width(), 0);
- if (currItem->asPathText())
+ if (currItem->isPathText())
currItem->updatePolyClip();
else
currItem->Clip = flattenPath(currItem->PoLine, currItem->Segments);
@@ -9681,7 +9681,7 @@
ma.scale(1, -1);
currItem->PoLine.map(ma);
currItem->PoLine.translate(0, currItem->height());
- if (currItem->asPathText())
+ if (currItem->isPathText())
currItem->updatePolyClip();
else
currItem->Clip = flattenPath(currItem->PoLine, currItem->Segments);
@@ -10183,7 +10183,7 @@
double imgY = currItem->imageYOffset();
if (applyNewRes)
currItem->pixm.imgInfo.lowResType = m_docPrefsData.itemToolPrefs.imageLowResType;
- if (currItem->asLatexFrame())
+ if (currItem->isLatexFrame())
currItem->asLatexFrame()->rerunApplication(false);
else
loadPict(currItem->Pfile, currItem, true);
@@ -10217,7 +10217,7 @@
double imgY = currItem->imageYOffset();
if (applyNewRes)
currItem->pixm.imgInfo.lowResType = m_docPrefsData.itemToolPrefs.imageLowResType;
- if (currItem->asLatexFrame())
+ if (currItem->isLatexFrame())
currItem->asLatexFrame()->rerunApplication(false);
else
loadPict(currItem->Pfile, currItem, true);
@@ -10252,7 +10252,7 @@
double imgY = currItem->imageYOffset();
if (applyNewRes)
currItem->pixm.imgInfo.lowResType = m_docPrefsData.itemToolPrefs.imageLowResType;
- if (currItem->asLatexFrame())
+ if (currItem->isLatexFrame())
currItem->asLatexFrame()->rerunApplication(false);
else
loadPict(currItem->Pfile, currItem, true);
@@ -10291,7 +10291,7 @@
double imgY = currItem->imageYOffset();
if (applyNewRes)
currItem->pixm.imgInfo.lowResType = m_docPrefsData.itemToolPrefs.imageLowResType;
- if (currItem->asLatexFrame())
+ if (currItem->isLatexFrame())
currItem->asLatexFrame()->rerunApplication(false);
else
loadPict(currItem->Pfile, currItem, true);
@@ -10453,13 +10453,13 @@
if (!currItem)
continue;
m_updateManager.setUpdatesDisabled();
- if (currItem->asLatexFrame())
+ if (currItem->isLatexFrame())
{
PageItem_LatexFrame *latexframe = currItem->asLatexFrame();
latexframe->rerunApplication();
toUpdate = true;
}
- else if ((currItem->asImageFrame()) || (currItem->asOSGFrame()))
+ else if ((currItem->isImageFrame()) || (currItem->isOSGFrame()))
{
if (currItem->imageIsAvailable)
{
@@ -11152,7 +11152,7 @@
currItem = allItems.at(ii);
if (currItem != nullptr)
{
- if (currItem->asImageFrame())
+ if (currItem->isImageFrame())
{
currItem->pixm.imgInfo.lowResType = id;
if (!found)
@@ -11174,7 +11174,7 @@
currItem = allItems.at(ii);
if (currItem != nullptr)
{
- if (currItem->asImageFrame())
+ if (currItem->isImageFrame())
{
currItem->pixm.imgInfo.lowResType = id;
if (!found)
@@ -11196,7 +11196,7 @@
currItem = allItems.at(ii);
if (currItem != nullptr)
{
- if (currItem->asImageFrame())
+ if (currItem->isImageFrame())
{
currItem->pixm.imgInfo.lowResType = id;
if (!found)
@@ -11308,7 +11308,7 @@
for (int i = 0; i < selectedItemCount; ++i)
{
PageItem *currItem = itemSelection->itemAt(i);
- if (currItem->asImageFrame())
+ if (currItem->isImageFrame())
{
if ((ScCore->fileWatcher->files().contains(currItem->Pfile) != 0) && (currItem->imageIsAvailable))
ScCore->fileWatcher->removeFile(currItem->Pfile);
@@ -11385,7 +11385,7 @@
if(currItem->isGroupChild())
continue;
//CB FIXME remove this and include of storyeditor.h too
- if ((currItem->asTextFrame() || currItem->asPathText()) && currItem==m_ScMW->storyEditor->currentItem() && this==m_ScMW->storyEditor->currentDocument())
+ if ((currItem->isTextFrame() || currItem->isPathText()) && currItem==m_ScMW->storyEditor->currentItem() && this==m_ScMW->storyEditor->currentDocument())
{
if (forceDeletion)
m_ScMW->storyEditor->setCurrentDocumentAndItem(this, nullptr);
@@ -11432,7 +11432,7 @@
itemList = groupOfItem(Items, currItem);
if (itemList == nullptr)
continue;
- if ((currItem->asImageFrame()) && ((ScCore->fileWatcher->files().contains(currItem->Pfile) != 0) && (currItem->imageIsAvailable)))
+ if ((currItem->isImageFrame()) && ((ScCore->fileWatcher->files().contains(currItem->Pfile) != 0) && (currItem->imageIsAvailable)))
ScCore->fileWatcher->removeFile(currItem->Pfile);
//delete marks pointed to that item
for (int a=0; a < m_docMarksList.count(); a++)
@@ -11463,14 +11463,14 @@
}
else
{
- if (currItem->asTextFrame() && !currItem->isInChain())
+ if (currItem->isTextFrame() && !currItem->isInChain())
{
currItem->itemText.selectAll();
currItem->asTextFrame()->removeMarksFromText(true);
currItem->asTextFrame()->delAllNoteFrames(false);
currItem->itemText.deselectAll();
}
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
currItem->dropLinks();
}
if (currItem->isWelded())
@@ -13807,7 +13807,7 @@
for (int i = 0; i < selectedItemCount; ++i)
{
PageItem *currItem = itemSelection->itemAt(i);
- if (!(currItem->asLine() || currItem->asPolyLine() || currItem->asSpiral()))
+ if (!(currItem->isLine() || currItem->asPolyLine() || currItem->asSpiral()))
continue;
updateRect = updateRect.united(currItem->getBoundingRect());
if (startArrowID != -1)
@@ -13858,7 +13858,7 @@
for (int i = 0; i < selectedItemCount; ++i)
{
PageItem *currItem = itemSelection->itemAt(i);
- if (!(currItem->asLine() || currItem->asPolyLine() || currItem->asSpiral()))
+ if (!(currItem->isLine() || currItem->isPolyLine() || currItem->isSpiral()))
continue;
if (startArrowSc != -1)
currItem->setStartArrowScale(startArrowSc);
@@ -14162,7 +14162,7 @@
getClosestGuides(0, currItem->yPos(), &xout, &yout);
if (currItem->yPos() != yout)
currItem->setYPos(yout);
- if (currItem->asLine())
+ if (currItem->isLine())
{
QTransform ma;
ma.translate(currItem->xPos(), currItem->yPos());
@@ -14181,7 +14181,7 @@
getClosestGuides(currItem->xPos(), 0, &xout, &yout);
if (currItem->xPos() != xout)
currItem->setXPos(xout);
- if (currItem->asLine())
+ if (currItem->isLine())
{
QTransform ma;
ma.translate(currItem->xPos(), currItem->yPos());
@@ -14393,11 +14393,11 @@
// currItem->setWidthHeight(newW, newH, true);
currItem->setWidthHeight(newW, newH);
- if ((currItem->asImageFrame()) && (!currItem->Sizing) && (appMode != modeEditClip))
+ if ((currItem->isImageFrame()) && (!currItem->Sizing) && (appMode != modeEditClip))
{
currItem->adjustPictScale();
}
- if (currItem->asLine())
+ if (currItem->isLine())
{
int ph = static_cast<int>(qMax(1.0, currItem->lineWidth() / 2.0));
if (!fromMP)
@@ -14500,7 +14500,7 @@
bool ScribusDoc::moveSizeItem(const FPoint& newX, const FPoint& newY, PageItem* currItem, bool fromMP, bool constrainRotation)
{
QRectF oldR(currItem->getBoundingRect());
- if (currItem->asLine())
+ if (currItem->isLine())
{
QTransform ma;
ma.translate(currItem->xPos(), currItem->yPos());
@@ -14621,9 +14621,9 @@
currItem->ClipEdited = true;
currItem->OldB2 = currItem->width();
currItem->OldH2 = currItem->height();
- if (currItem->asPolyLine() || currItem->asSpiral())
+ if (currItem->isPolyLine() || currItem->asSpiral())
currItem->setPolyClip(qRound(qMax(currItem->lineWidth() / 2, 1.0)));
- else if (currItem->asPathText())
+ else if (currItem->isPathText())
currItem->updatePolyClip();
else
currItem->Clip = flattenPath(currItem->PoLine, currItem->Segments);
@@ -15991,7 +15991,7 @@
PageItem *currItem = itemSelection->itemAt(i);
if (currItem != nullptr)
{
- if (currItem->asImageFrame() && currItem->imageIsAvailable)
+ if (currItem->isImageFrame() && currItem->imageIsAvailable)
currItem->setImageScalingMode(false, true);
}
}
@@ -16016,7 +16016,7 @@
PageItem *currItem = itemSelection->itemAt(i);
if (currItem != nullptr)
{
- if (currItem->asTextFrame() && (currItem->itemText.length() > 0) && !currItem->isTableItem)
+ if (currItem->isTextFrame() && (currItem->itemText.length() > 0) && !currItem->isTableItem)
currItem ->asTextFrame()->setTextFrameHeight();
}
}
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Tue May 12 21:24:49 2020
@@ -1240,7 +1240,7 @@
{
bb = pasted.at(dre);
currItem = m_doc->m_Selection->itemAt(dre);
- if ((currItem->asTextFrame()) && ((currItem->nextInChain() != nullptr) || (currItem->prevInChain() != nullptr)))
+ if ((currItem->isTextFrame()) && ((currItem->nextInChain() != nullptr) || (currItem->prevInChain() != nullptr)))
{
PageItem* before = currItem->prevInChain();
PageItem* after = currItem->nextInChain();
@@ -1642,7 +1642,7 @@
double x = ma2.m11() * n.x() + ma2.m21() * n.y() + ma2.dx();
double y = ma2.m22() * n.y() + ma2.m12() * n.x() + ma2.dy();
m_doc->moveItem(x-oldPos.x(), y-oldPos.y(), currItem);
- if (currItem->asPathText())
+ if (currItem->isPathText())
currItem->updatePolyClip();
m_doc->setRedrawBounding(currItem);
m_doc->regionsChanged()->update(QRect());
@@ -1851,7 +1851,7 @@
for (int i = 0; i < m_doc->m_Selection->count(); ++i)
{
currItem = m_doc->m_Selection->itemAt(i);
- if ((currItem->asTextFrame()) && (currItem->isBookmark))
+ if ((currItem->isTextFrame()) && (currItem->isBookmark))
emit ChBMText(currItem);
}
if (!m_doc->m_Selection->isMultipleSelection())
@@ -2911,7 +2911,7 @@
PageItem* currItem = m_doc->m_Selection->itemAt(0);
PageItem *polyLineItem;
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
polyLineItem = m_doc->m_Selection->itemAt(1);
else
{
@@ -3138,7 +3138,7 @@
{
PageItem *currItem = tmpSelection.itemAt(offset);
bool cont = false;
- if ((!((currItem->asTextFrame()) || (currItem->asPathText()))) || (currItem->locked()) || currItem->itemText.length() == 0)
+ if ((!((currItem->isTextFrame()) || (currItem->isPathText()))) || (currItem->locked()) || currItem->itemText.length() == 0)
cont = true;
if (currItem == m_ScMW->storyEditor->currentItem() && m_doc == m_ScMW->storyEditor->currentDocument())
{
@@ -3162,7 +3162,7 @@
if (textLen > 1)
undoManager->setUndoEnabled(true);
- if ((currItem->asPathText()) && (currItem->PoShow))
+ if ((currItem->isPathText()) && (currItem->PoShow))
{
int z = m_doc->itemAdd(PageItem::PolyLine, PageItem::Unspecified, currItem->xPos(), currItem->yPos(), currItem->width(), currItem->height(), currItem->lineWidth(), CommonStrings::None, currItem->lineColor());
PageItem *bb = m_doc->Items->at(z);
@@ -3177,7 +3177,7 @@
undoManager->setUndoEnabled(true);
newGroupedItems.append(m_doc->Items->takeAt(z));
}
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
{
if ((!currItem->NamedLStyle.isEmpty()) || (currItem->lineColor() != CommonStrings::None) || (!currItem->strokePattern().isEmpty()) || (!currItem->strokeGradient().isEmpty()))
{
Modified: trunk/Scribus/scribus/ui/contextmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/ui/contextmenu.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/contextmenu.cpp (original)
+++ trunk/Scribus/scribus/ui/contextmenu.cpp Tue May 12 21:24:49 2020
@@ -107,7 +107,7 @@
{
QAction *act = addMenu(menuInfo);
act->setText( tr("In&fo"));
- if (currItem->asImageFrame())
+ if (currItem->isImageFrame())
{
QLabel* menuLabel = new QLabel("<html>" + currItem->infoDescription() + "</html>", this);
menuLabel->setFrameShape(QFrame::NoFrame);
@@ -185,7 +185,7 @@
menuEditContent->addAction(m_ScMW->scrActions["editCopyContents"]);
if (m_actionList.contains("editPasteContents"))
menuEditContent->addAction(m_ScMW->scrActions["editPasteContents"]);
- if (currItem->asImageFrame() && m_actionList.contains("editPasteContentsAbs"))
+ if (currItem->isImageFrame() && m_actionList.contains("editPasteContentsAbs"))
menuEditContent->addAction(m_ScMW->scrActions["editPasteContentsAbs"]);
}
if (m_actionList.contains("editClearContents"))
Modified: trunk/Scribus/scribus/ui/nodeeditpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/ui/nodeeditpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/nodeeditpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/nodeeditpalette.cpp Tue May 12 21:24:49 2020
@@ -816,7 +816,7 @@
cc = currItem->ContourLine.size();
else
cc = currItem->PoLine.size();
- if (currItem->asPolyLine())
+ if (currItem->isPolyLine())
{
if (cc < 5)
leaveEd = true;
Modified: trunk/Scribus/scribus/ui/propertiespalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/ui/propertiespalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette.cpp Tue May 12 21:24:49 2020
@@ -366,7 +366,7 @@
TabStack->setItemEnabled(idColorsItem, true);
TabStack->setItemEnabled(idTransparencyItem, false);
}
- if (m_item->asSymbolFrame())
+ if (m_item->asSymbol())
{
TabStack->setItemEnabled(idXYZItem, true);
TabStack->setItemEnabled(idShadowItem, true);
@@ -420,7 +420,7 @@
case PageItem::ImageFrame:
case PageItem::LatexFrame:
case PageItem::OSGFrame:
- if (currItem->asOSGFrame())
+ if (currItem->isOSGFrame())
{
TabStack->setItemEnabled(idXYZItem, true);
TabStack->setItemEnabled(idShadowItem, true);
Modified: trunk/Scribus/scribus/ui/propertiespalette_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&path=/trunk/Scribus/scribus/ui/propertiespalette_group.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_group.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_group.cpp Tue May 12 21:24:49 2020
@@ -197,7 +197,7 @@
clipGroups->setChecked(m_item->groupClipping());
- if (((m_item->isGroup()) && (!m_item->isSingleSel)) || m_item->asSymbolFrame())
+ if (((m_item->isGroup()) && (!m_item->isSingleSel)) || m_item->asSymbol())
setEnabled(true);
else
setEnabled(false);
Modified: trunk/Scribus/scribus/ui/propertiespalette_image.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&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 21:24:49 2020
@@ -531,7 +531,7 @@
{
setEnabled(false);
}
- if (m_item->asSymbolFrame())
+ if (m_item->asSymbol())
{
setEnabled(false);
}
Modified: trunk/Scribus/scribus/ui/propertiespalette_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&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 21:24:49 2020
@@ -332,7 +332,7 @@
if (m_item->asOSGFrame())
setEnabled(false);
- if (m_item->asSymbolFrame())
+ if (m_item->asSymbol())
setEnabled(false);
}
Modified: trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&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 21:24:49 2020
@@ -232,7 +232,7 @@
case PageItem::ImageFrame:
case PageItem::LatexFrame:
case PageItem::OSGFrame:
- if (currItem->asOSGFrame())
+ if (currItem->isOSGFrame())
{
setEnabled(false);
roundRect->setEnabled(false);
@@ -372,7 +372,7 @@
editShape->setEnabled(false);
customShape->setEnabled(false);
}
- if (m_item->asSymbolFrame())
+ if (m_item->asSymbol())
{
setEnabled(false);
}
Modified: trunk/Scribus/scribus/ui/propertiespalette_text.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&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 21:24:49 2020
@@ -348,7 +348,7 @@
{
setEnabled(false);
}
- if (m_item->asSymbolFrame())
+ if (m_item->asSymbol())
{
setEnabled(false);
}
Modified: trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&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 21:24:49 2020
@@ -374,7 +374,7 @@
setEnabled(true);
rotationSpin->setEnabled(false);
}
- if (m_item->asSymbolFrame())
+ if (m_item->asSymbol())
{
setEnabled(true);
}
@@ -497,7 +497,7 @@
case PageItem::ImageFrame:
case PageItem::LatexFrame:
case PageItem::OSGFrame:
- if (currItem->asOSGFrame())
+ if (currItem->isOSGFrame())
{
setEnabled(true);
rotationSpin->setEnabled(false);
Modified: trunk/Scribus/scribus/ui/propertywidget_advanced.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&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 21:24:49 2020
@@ -146,7 +146,7 @@
enabled = true;
if ((m_item->isGroup()) && (!m_item->isSingleSel))
enabled = false;
- if (m_item->asOSGFrame() || m_item->asSymbolFrame())
+ if (m_item->asOSGFrame() || m_item->asSymbol())
enabled = false;
if (m_doc->m_Selection->count() > 1)
enabled = false;
Modified: trunk/Scribus/scribus/ui/propertywidget_fontfeatures.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23794&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 21:24:49 2020
@@ -634,7 +634,7 @@
enabled = true;
if ((m_item->isGroup()) && (!m_item->isSingleSel))
enabled = false;
- if (m_item->asOSGFrame() || m_item->asSymbolFrame())
+ if (m_item->asOSGFrame() || 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=23794&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 21:24:49 2020
@@ -173,7 +173,7 @@
enabled = true;
if ((m_item->isGroup()) && (!m_item->isSingleSel))
enabled = false;
- if (m_item->asOSGFrame() || m_item->asSymbolFrame())
+ if (m_item->asOSGFrame() || m_item->asSymbol())
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=23794&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 21:24:49 2020
@@ -164,7 +164,7 @@
enabled = true;
if ((m_item->isGroup()) && (!m_item->isSingleSel))
enabled = false;
- if (m_item->asOSGFrame() || m_item->asSymbolFrame())
+ if (m_item->asOSGFrame() || m_item->asSymbol())
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=23794&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp Tue May 12 21:24:49 2020
@@ -3086,7 +3086,7 @@
FrameItemsDel.clear();
#endif
#if 0
- if (currItem->asTextFrame())
+ if (currItem->isTextFrame())
{
nextItem->layout();
nb2 = nextItem;
More information about the scribus-commit
mailing list