r20812 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sat Jan 30 21:48:06 UTC 2016


Author: jghali
Date: Sat Jan 30 21:48:06 2016
New Revision: 20812

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20812
Log:
coverity #1350538: big parameter passed by value

Modified:
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/scribusdoc.h

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20812&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Sat Jan 30 21:48:06 2016
@@ -5648,6 +5648,9 @@
 			newItem->setFillShade(m_docPrefsData.itemToolPrefs.textFillColorShade);
 			newItem->setLineColor(m_docPrefsData.itemToolPrefs.textLineColor);
 			newItem->setLineShade(m_docPrefsData.itemToolPrefs.textLineColorShade);
+			defaultParagraphStyle.setParent(CommonStrings::DefaultParagraphStyle);
+			defaultParagraphStyle.charStyle().setParent(CommonStrings::DefaultCharacterStyle);
+			newItem->itemText.setDefaultStyle(defaultParagraphStyle);
 			break;
 		case PageItem::Line:
 			newItem->PLineArt = Qt::PenStyle(m_docPrefsData.itemToolPrefs.lineStyle);
@@ -17659,7 +17662,7 @@
 	}
 }
 
-void ScribusDoc::updateItemNotesFramesStyles(PageItem* item, ParagraphStyle newStyle)
+void ScribusDoc::updateItemNotesFramesStyles(PageItem* item, const ParagraphStyle& newStyle)
 {
 	if (item->isTextFrame() && !item->isNoteFrame())
 	{

Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20812&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h	(original)
+++ trunk/Scribus/scribus/scribusdoc.h	Sat Jan 30 21:48:06 2016
@@ -1764,7 +1764,7 @@
 	//renumber notes with given notes style for given frame starting from number num
 	void updateItemNotesNums(PageItem_TextFrame *frame, NotesStyle* nStyle, int &num);
 	//update notesframes text styles
-	void updateItemNotesFramesStyles(PageItem *item, ParagraphStyle newStyle);
+	void updateItemNotesFramesStyles(PageItem *item, const ParagraphStyle& newStyle);
 	
 	//not used?
 	bool updateEndNotesNums(); //return true if doc needs update




More information about the scribus-commit mailing list