r22979 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Sat May 18 21:23:49 UTC 2019


Author: jghali
Date: Sat May 18 21:23:49 2019
New Revision: 22979

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22979
Log:
#15690: Replace Color function skips paragraph background color

Modified:
    trunk/Scribus/scribus/styles/charstyle.cpp
    trunk/Scribus/scribus/styles/paragraphstyle.cpp

Modified: trunk/Scribus/scribus/styles/charstyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22979&path=/trunk/Scribus/scribus/styles/charstyle.cpp
==============================================================================
--- trunk/Scribus/scribus/styles/charstyle.cpp	(original)
+++ trunk/Scribus/scribus/styles/charstyle.cpp	Sat May 18 21:23:49 2019
@@ -405,7 +405,7 @@
 
 void CharStyle::replaceNamedResources(ResourceCollection& newNames)
 {
-	QMap<QString,QString>::ConstIterator it;
+	QMap<QString, QString>::ConstIterator it;
 
 	if (!inh_FillColor && (it = newNames.colors().find(fillColor())) != newNames.colors().end())
 		setFillColor(it.value());

Modified: trunk/Scribus/scribus/styles/paragraphstyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22979&path=/trunk/Scribus/scribus/styles/paragraphstyle.cpp
==============================================================================
--- trunk/Scribus/scribus/styles/paragraphstyle.cpp	(original)
+++ trunk/Scribus/scribus/styles/paragraphstyle.cpp	Sat May 18 21:23:49 2019
@@ -236,6 +236,8 @@
 		lists.collectStyle(sty->name());
 	charStyle().getNamedResources(lists);
 
+	lists.collectColor(backgroundColor());
+
 	QString parEffectStyle = peCharStyleName();
 	if (parEffectStyle.length() > 0)
 	{
@@ -249,13 +251,17 @@
 
 void ParagraphStyle::replaceNamedResources(ResourceCollection& newNames)
 {
-	QMap<QString,QString>::ConstIterator it;
+	QMap<QString, QString>::ConstIterator it;
 	
 	if (hasParent() && (it = (newNames.styles().find(parent()))) != newNames.styles().end())
 	{
 		setParent(it.value());
 		repairImplicitCharStyleInheritance();
 	}
+
+	if (!inh_BackgroundColor && (it = newNames.colors().find(backgroundColor())) != newNames.colors().end())
+		setBackgroundColor(it.value());
+
 	if ((it = (newNames.charStyles().find(peCharStyleName()))) != newNames.charStyles().end())
 		setPeCharStyleName(it.value());
 	m_cstyle.replaceNamedResources(newNames);




More information about the scribus-commit mailing list