r20806 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sat Jan 30 21:27:18 UTC 2016


Author: jghali
Date: Sat Jan 30 21:27:17 2016
New Revision: 20806

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20806
Log:
coverity: "array compared against 0" errors in pageitem_*.cpp

Modified:
    trunk/Scribus/scribus/pageitem_imageframe.cpp
    trunk/Scribus/scribus/pageitem_latexframe.cpp
    trunk/Scribus/scribus/pageitem_textframe.cpp

Modified: trunk/Scribus/scribus/pageitem_imageframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20806&path=/trunk/Scribus/scribus/pageitem_imageframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_imageframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_imageframe.cpp	Sat Jan 30 21:27:17 2016
@@ -214,7 +214,7 @@
 	if (UndoManager::undoEnabled())
 	{
 		ScItemState<ScImageEffectList> *is = new ScItemState<ScImageEffectList>(Um::ClearImage + "\n" + Pfile, "");
-		is->set("CLEAR_IMAGE", "clear_image");
+		is->set("CLEAR_IMAGE");
 		is->set("CI_PFILE", Pfile);
 		is->set("CI_FLIPPH",imageFlippedH());
 		is->set("CI_FLIPPV",imageFlippedV());

Modified: trunk/Scribus/scribus/pageitem_latexframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20806&path=/trunk/Scribus/scribus/pageitem_latexframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_latexframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_latexframe.cpp	Sat Jan 30 21:27:17 2016
@@ -383,7 +383,7 @@
 	if (UndoManager::undoEnabled() && undoable)
 	{
 		SimpleState *ss = new SimpleState(Um::ChangeFormula, "", Um::IChangeFormula);
-		ss->set("CHANGE_FORMULA", "change_formula");
+		ss->set("CHANGE_FORMULA");
 		ss->set("OLD_FORMULA", formulaText);
 		ss->set("NEW_FORMULA", formula);
 		undoManager->action(this, ss);

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20806&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Sat Jan 30 21:27:17 2016
@@ -4372,7 +4372,7 @@
 						ss->set("TEXT_STR",ss->get("TEXT_STR") + QString(QChar(conv)));
 					else {
 						ss = new SimpleState(Um::InsertText,"",Um::ICreate);
-						ss->set("INSERT_FRAMETEXT", "insert_frametext");
+						ss->set("INSERT_FRAMETEXT");
 						ss->set("ETEA", QString("insert_frametext"));
 						ss->set("TEXT_STR", QString(QChar(conv)));
 						ss->set("START", itemText.cursorPosition());
@@ -4839,7 +4839,7 @@
 				else
 				{
 					ss = new SimpleState(Um::InsertText,"",Um::ICreate);
-					ss->set("INSERT_FRAMETEXT", "insert_frametext");
+					ss->set("INSERT_FRAMETEXT");
 					ss->set("ETEA", QString("insert_frametext"));
 					ss->set("TEXT_STR", QString(SpecialChars::TAB));
 					ss->set("START", itemText.cursorPosition());
@@ -4863,13 +4863,13 @@
 			{
 				SimpleState *ss = dynamic_cast<SimpleState*>(undoManager->getLastUndo());
 				if (ss && ss->get("ETEA") == "insert_frametext")
-					ss->set("TEXT_STR",ss->get("TEXT_STR") + uc);
+					ss->set("TEXT_STR", ss->get("TEXT_STR") + uc);
 				else
 				{
 					ss = new SimpleState(Um::InsertText,"",Um::ICreate);
-					ss->set("INSERT_FRAMETEXT", "insert_frametext");
+					ss->set("INSERT_FRAMETEXT");
 					ss->set("ETEA", QString("insert_frametext"));
-					ss->set("TEXT_STR",uc);
+					ss->set("TEXT_STR", uc);
 					ss->set("START", itemText.cursorPosition());
 					UndoObject * undoTarget = this;
 					if (isNoteFrame())
@@ -5026,7 +5026,7 @@
 					if (i - lastPos > 0)
 					{
 						is = new ScItemState<CharStyle>(Um::DeleteText, "", Um::IDelete);
-						is->set("DELETE_FRAMETEXT", "delete_frametext");
+						is->set("DELETE_FRAMETEXT");
 						is->set("ETEA", eteaString);
 						is->set("TEXT_STR", itemText.text(lastPos, i - lastPos));
 						is->set("START", start);




More information about the scribus-commit mailing list