r22672 by jghali - remove lots of #ifdef HAVE_OSG where they are not strictly needed
scribus-commit
scribus-commit at lists.scribus.net
Wed Sep 5 19:09:39 UTC 2018
Author: jghali
Date: Wed Sep 5 19:09:39 2018
New Revision: 22672
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22672
Log:
remove lots of #ifdef HAVE_OSG where they are not strictly needed
Modified:
trunk/Scribus/scribus/appmodehelper.cpp
trunk/Scribus/scribus/canvasmode_create.cpp
trunk/Scribus/scribus/canvasmode_normal.cpp
trunk/Scribus/scribus/documentchecker.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/ui/outlinepalette.cpp
trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
Modified: trunk/Scribus/scribus/appmodehelper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22672&path=/trunk/Scribus/scribus/appmodehelper.cpp
==============================================================================
--- trunk/Scribus/scribus/appmodehelper.cpp (original)
+++ trunk/Scribus/scribus/appmodehelper.cpp Wed Sep 5 19:09:39 2018
@@ -467,11 +467,7 @@
(*a_scrActions)["editPasteContents"]->setEnabled(SelectedType==PageItem::ImageFrame);
(*a_scrActions)["editPasteContentsAbs"]->setEnabled(SelectedType==PageItem::ImageFrame);
(*a_scrActions)["editEditWithImageEditor"]->setEnabled(SelectedType==PageItem::ImageFrame && currItem->imageIsAvailable && currItem->isRaster);
-#ifdef HAVE_OSG
(*a_scrActions)["editEditRenderSource"]->setEnabled(SelectedType==PageItem::ImageFrame && currItem && (currItem->asLatexFrame() || currItem->asOSGFrame()));
-#else
- (*a_scrActions)["editEditRenderSource"]->setEnabled(SelectedType==PageItem::ImageFrame && currItem && (currItem->asLatexFrame()));
-#endif
(*a_scrActions)["itemAdjustFrameHeightToText"]->setEnabled(SelectedType==PageItem::TextFrame && currItem->itemText.length() >0);
if (SelectedType!=PageItem::ImageFrame)
{
Modified: trunk/Scribus/scribus/canvasmode_create.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22672&path=/trunk/Scribus/scribus/canvasmode_create.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_create.cpp Wed Sep 5 19:09:39 2018
@@ -571,12 +571,10 @@
itemType = (int) PageItem::Table;
frameType = (int) PageItem::Unspecified;
break;
-#ifdef HAVE_OSG
case modeInsertPDF3DAnnotation:
itemType = (int) PageItem::OSGFrame;
frameType = (int) PageItem::Unspecified;
break;
-#endif
}
}
Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22672&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp Wed Sep 5 19:09:39 2018
@@ -203,12 +203,10 @@
if (currItem->imageVisible())
m_view->requestMode(modeEdit);
}
-#ifdef HAVE_OSG
else if (currItem->asOSGFrame())
{
m_view->requestMode(submodeEditExternal);
}
-#endif
else if ((currItem->itemType() == PageItem::Polygon) || (currItem->itemType() == PageItem::PolyLine) || (currItem->itemType() == PageItem::Group) || (currItem->itemType() == PageItem::ImageFrame) || (currItem->itemType() == PageItem::PathText))
{
if (currItem->locked()) //|| (!currItem->ScaleType))
Modified: trunk/Scribus/scribus/documentchecker.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22672&path=/trunk/Scribus/scribus/documentchecker.cpp
==============================================================================
--- trunk/Scribus/scribus/documentchecker.cpp (original)
+++ trunk/Scribus/scribus/documentchecker.cpp Wed Sep 5 19:09:39 2018
@@ -253,11 +253,7 @@
itemError.insert(Transparency, 0);
if ((currItem->OwnPage == -1) && (checkerSettings.checkOrphans))
itemError.insert(ObjectNotOnPage, 0);
- #ifdef HAVE_OSG
if (currItem->asImageFrame() && !currItem->asOSGFrame())
- #else
- if (currItem->asImageFrame())
- #endif
{
// check image vs. frame sizes
@@ -502,11 +498,7 @@
itemError.insert(PDFAnnotField, 0);
if ((currItem->OwnPage == -1) && (checkerSettings.checkOrphans))
itemError.insert(ObjectNotOnPage, 0);
- #ifdef HAVE_OSG
if (currItem->asImageFrame() && !currItem->asOSGFrame())
- #else
- if (currItem->asImageFrame())
- #endif
{
// check image vs. frame sizes
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22672&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Wed Sep 5 19:09:39 2018
@@ -2474,11 +2474,7 @@
for (int ii = 0; ii < allItems.count(); ii++)
{
PageItem* item = allItems.at(ii);
-#ifdef HAVE_OSG
- if ((item->itemType() == PageItem::ImageFrame) && (!((item->asLatexFrame()) || (item->asOSGFrame()))))
-#else
- if ((item->itemType() == PageItem::ImageFrame) && (!(item->asLatexFrame())))
-#endif
+ if ((item->itemType() == PageItem::ImageFrame) && (!item->asLatexFrame()) && (!item->asOSGFrame()))
{
enablePicManager = true;
break;
@@ -6493,10 +6489,8 @@
if (ite->imageVisible())
view->requestMode(modeEdit);
}
-#ifdef HAVE_OSG
else if (ite->asOSGFrame())
view->requestMode(submodeEditExternal);
-#endif
else if ((ite->itemType() == PageItem::Polygon) || (ite->itemType() == PageItem::PolyLine) || (ite->itemType() == PageItem::Group) || (ite->itemType() == PageItem::ImageFrame) || (ite->itemType() == PageItem::PathText))
{
if (ite->itemType() == PageItem::ImageFrame)
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22672&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Wed Sep 5 19:09:39 2018
@@ -5606,7 +5606,7 @@
{
ParagraphStyle defaultParagraphStyle;
Q_ASSERT(newItem->realItemType()==itemType);
- switch( itemType )
+ switch (itemType)
{
case PageItem::ImageFrame:
newItem->setImageXYScale(m_docPrefsData.itemToolPrefs.imageScaleX, m_docPrefsData.itemToolPrefs.imageScaleY);
@@ -5618,9 +5618,7 @@
newItem->setLineShade(m_docPrefsData.itemToolPrefs.imageStrokeColorShade);
break;
case PageItem::LatexFrame:
-#ifdef HAVE_OSG
case PageItem::OSGFrame:
-#endif
newItem->setFillShade(m_docPrefsData.itemToolPrefs.imageFillColorShade);
newItem->setLineShade(m_docPrefsData.itemToolPrefs.imageStrokeColorShade);
break;
@@ -10470,11 +10468,7 @@
latexframe->rerunApplication();
toUpdate = true;
}
-#ifdef HAVE_OSG
else if ((currItem->asImageFrame()) || (currItem->asOSGFrame()))
-#else
- else if (currItem->asImageFrame())
-#endif
{
if (currItem->imageIsAvailable)
{
Modified: trunk/Scribus/scribus/ui/outlinepalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22672&path=/trunk/Scribus/scribus/ui/outlinepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/outlinepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/outlinepalette.cpp Wed Sep 5 19:09:39 2018
@@ -356,10 +356,8 @@
case PageItem::ImageFrame:
if (pgItem->asLatexFrame())
tipText += CommonStrings::itemType_LatexFrame;
-#ifdef HAVE_OSG
else if (pgItem->asOSGFrame())
tipText += CommonStrings::itemType_OSGFrame;
-#endif
else
tipText += CommonStrings::itemType_ImageFrame;
break;
@@ -826,10 +824,8 @@
case PageItem::ImageFrame:
if (pgItem->asLatexFrame())
item->setIcon( 0, latexIcon );
-#ifdef HAVE_OSG
else if (pgItem->asOSGFrame())
item->setIcon( 0, annot3DIcon );
-#endif
else
item->setIcon( 0, imageIcon );
break;
Modified: trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22672&path=/trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_xyz.cpp Wed Sep 5 19:09:39 2018
@@ -524,13 +524,11 @@
case PageItem::ImageFrame:
case PageItem::LatexFrame:
case PageItem::OSGFrame:
-#ifdef HAVE_OSG
if (currItem->asOSGFrame())
{
setEnabled(true);
rotationSpin->setEnabled(false);
}
-#endif
break;
case PageItem::Line:
basePointWidget->setEnabled(false);
More information about the scribus-commit
mailing list