r20895 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Wed Feb 3 07:11:15 UTC 2016


Author: jghali
Date: Wed Feb  3 07:11:15 2016
New Revision: 20895

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20895
Log:
coverity #1350290/300: unsigned compared against 0

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20895&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdobj.cpp	Wed Feb  3 07:11:15 2016
@@ -37,7 +37,7 @@
 								ScCore->primaryMainWindow()->doc->itemToolPrefs().shapeLineWidth,
 								ScCore->primaryMainWindow()->doc->itemToolPrefs().shapeFillColor, ScCore->primaryMainWindow()->doc->itemToolPrefs().shapeLineColor);
 //	ScCore->primaryMainWindow()->doc->setRedrawBounding(ScCore->primaryMainWindow()->doc->Items->at(i));
-	if (strlen(Name) >= 0)
+	if (strlen(Name) > 0)
 	{
 		QString objName = QString::fromUtf8(Name);
 		if (!ItemExists(objName))
@@ -63,7 +63,7 @@
 										ScCore->primaryMainWindow()->doc->itemToolPrefs().shapeLineWidth,
 										ScCore->primaryMainWindow()->doc->itemToolPrefs().shapeFillColor,
 										ScCore->primaryMainWindow()->doc->itemToolPrefs().shapeLineColor);
-	if (strlen(Name) >= 0)
+	if (strlen(Name) > 0)
 	{
 		QString objName = QString::fromUtf8(Name);
 		if (!ItemExists(objName))
@@ -88,7 +88,7 @@
 									ValueToPoint(h),
 									1, ScCore->primaryMainWindow()->doc->itemToolPrefs().imageFillColor,
 									ScCore->primaryMainWindow()->doc->itemToolPrefs().imageStrokeColor);
-	if (strlen(Name) >= 0)
+	if (strlen(Name) > 0)
 	{
 		QString objName = QString::fromUtf8(Name);
 		if (!ItemExists(objName))
@@ -113,7 +113,7 @@
 								ValueToPoint(h),
 								ScCore->primaryMainWindow()->doc->itemToolPrefs().shapeLineWidth, CommonStrings::None,
 								ScCore->primaryMainWindow()->doc->itemToolPrefs().textColor);
-	if (strlen(Name) >= 0)
+	if (strlen(Name) > 0)
 	{
 		QString objName = QString::fromUtf8(Name);
 		if (!ItemExists(objName))
@@ -149,7 +149,7 @@
 	table->insertColumns(0, numColumns - 1);
 	table->adjustTableToFrame();
 	table->adjustFrameToTable();
-	if (strlen(Name) >= 0)
+	if (strlen(Name) > 0)
 	{
 		QString objName = QString::fromUtf8(Name);
 		if (!ItemExists(objName))
@@ -209,7 +209,7 @@
 	ScCore->primaryMainWindow()->view->SizeItem(it->PoLine.WidthHeight().x(),
 						 it->PoLine.WidthHeight().y(), i, false, false, false);
 	ScCore->primaryMainWindow()->view->AdjustItemSize(it);*/
-	if (strlen(Name) >= 0)
+	if (strlen(Name) > 0)
 	{
 		QString objName = QString::fromUtf8(Name);
 		if (!ItemExists(objName))
@@ -286,7 +286,7 @@
 	}
 	ScCore->primaryMainWindow()->doc->sizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), it, false, false, false);
 	ScCore->primaryMainWindow()->doc->adjustItemSize(it);
-	if (strlen(Name) >= 0)
+	if (strlen(Name) > 0)
 	{
 		QString objName = QString::fromUtf8(Name);
 		if (!ItemExists(objName))
@@ -368,7 +368,7 @@
 	}
 	ScCore->primaryMainWindow()->doc->sizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), it, false, false, false);
 	ScCore->primaryMainWindow()->doc->adjustItemSize(it);
-	if (strlen(Name) >= 0)
+	if (strlen(Name) > 0)
 	{
 		QString objName = QString::fromUtf8(Name);
 		if (!ItemExists(objName))
@@ -459,7 +459,7 @@
 	}
 	ScCore->primaryMainWindow()->doc->sizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), it, false, false, false);
 	ScCore->primaryMainWindow()->doc->adjustItemSize(it);
-	if (strlen(Name) >= 0)
+	if (strlen(Name) > 0)
 	{
 		QString objName = QString::fromUtf8(Name);
 		if (!ItemExists(objName))
@@ -500,7 +500,7 @@
 	ScCore->primaryMainWindow()->doc->m_Selection->addItem(ii);
 	ScCore->primaryMainWindow()->view->ToPathText();
 	ScCore->primaryMainWindow()->doc->moveItem(pageUnitXToDocX(x) - i->xPos(), pageUnitYToDocY(y) - i->yPos(), i);
-	if (strlen(Name) >= 0)
+	if (strlen(Name) > 0)
 	{
 		QString objName = QString::fromUtf8(Name);
 		if (!ItemExists(objName))




More information about the scribus-commit mailing list