r23881 by craig - Code cleanup

scribus-commit scribus-commit at lists.scribus.net
Thu Jun 4 16:43:54 UTC 2020


Author: craig
Date: Thu Jun  4 16:43:53 2020
New Revision: 23881

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23881
Log:
Code cleanup

Modified:
    trunk/Scribus/scribus/actionsearch.cpp
    trunk/Scribus/scribus/canvasmode.cpp
    trunk/Scribus/scribus/canvasmode_drawbezier.cpp
    trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
    trunk/Scribus/scribus/fonts/sfnt.cpp
    trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp
    trunk/Scribus/scribus/langmgr.cpp
    trunk/Scribus/scribus/langmgr.h
    trunk/Scribus/scribus/loadsaveplugin.cpp
    trunk/Scribus/scribus/loadsaveplugin.h
    trunk/Scribus/scribus/marks.cpp
    trunk/Scribus/scribus/marks.h
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/pluginmanager.cpp
    trunk/Scribus/scribus/pluginmanager.h
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/ui/inspage.cpp
    trunk/Scribus/scribus/ui/smtextstyles.cpp
    trunk/Scribus/scribus/ui/smtextstyles.h

Modified: trunk/Scribus/scribus/actionsearch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/actionsearch.cpp
==============================================================================
--- trunk/Scribus/scribus/actionsearch.cpp	(original)
+++ trunk/Scribus/scribus/actionsearch.cpp	Thu Jun  4 16:43:53 2020
@@ -17,7 +17,7 @@
 #include <QStringList>
 
 ActionSearch::ActionSearch(QMenuBar *menuBar)
-            : menuBar{menuBar}
+	: menuBar{menuBar}
 {
 
 }
@@ -55,7 +55,7 @@
 		menus.prepend(title);
 		currentMenu = dynamic_cast<QMenu*>(currentMenu->parentWidget());
 	}
-	QString menuName = menus.join(" > ");
+	QString menuName(menus.join(" > "));
 
 	for (auto action: menu->actions())
 	{

Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode.cpp	Thu Jun  4 16:43:53 2020
@@ -893,13 +893,13 @@
 	if (m_keyRepeat)
 		return;
 	m_keyRepeat = true;
-	int keyMod=0;
-	if (e->modifiers() & Qt::ShiftModifier)
-		keyMod |= Qt::SHIFT;
-	if (e->modifiers() & Qt::ControlModifier)
-		keyMod |= Qt::CTRL;
-	if (e->modifiers() & Qt::AltModifier)
-		keyMod |= Qt::ALT;
+//	int keyMod=0;
+//	if (e->modifiers() & Qt::ShiftModifier)
+//		keyMod |= Qt::SHIFT;
+//	if (e->modifiers() & Qt::ControlModifier)
+//		keyMod |= Qt::CTRL;
+//	if (e->modifiers() & Qt::AltModifier)
+//		keyMod |= Qt::ALT;
 	//User presses escape and we have a doc open, and we have an item selected
 	if (kk == Qt::Key_Escape)
 	{

Modified: trunk/Scribus/scribus/canvasmode_drawbezier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.cpp	Thu Jun  4 16:43:53 2020
@@ -272,8 +272,6 @@
 		{
 			if ((m_mouseButtonPressed) && (m->buttons() & Qt::LeftButton))
 			{
-				double newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
-				double newY = qRound(mousePointDoc.y()); //m_view->translateToDoc(m->x(), m->y()).y());
 				QPoint startP = m_canvas->canvasToGlobal(QPointF(m_xp, m_yp));
 				m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
 				m_view->setRedrawMarkerShown(true);

Modified: trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp	Thu Jun  4 16:43:53 2020
@@ -629,8 +629,10 @@
 					m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
 					if (m_view->editStrokeGradient == 9)
 					{
-						FPoint mp, mp_orig;
-						double xx, yy;
+						FPoint mp;
+						FPoint mp_orig;
+						double xx = 0.0;
+						double yy = 0.0;
 						if (m_patchPoint == useTL)
 						{
 							mp_orig = m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].TL.gridPoint;

Modified: trunk/Scribus/scribus/fonts/sfnt.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/fonts/sfnt.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/sfnt.cpp	(original)
+++ trunk/Scribus/scribus/fonts/sfnt.cpp	Thu Jun  4 16:43:53 2020
@@ -100,330 +100,330 @@
 
 
 
-const uint post_format10_names_count = 258;
-
-
-static const char* post_format10_names[] = {
-	".notdef",
-	".null",
-	"nonmarkingreturn",
-	"space",
-	"exclam",
-	"quotedbl",
-	"numbersign",
-	"dollar",
-	"percent",
-	"ampersand",
-	"quotesingle",
-	"parenleft",
-	"parenright",
-	"asterisk",
-	"plus",
-	"comma",
-	"hyphen",
-	"period",
-	"slash",
-	"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
-	"colon",
-	"semicolon",
-	"less",
-	"equal",
-	"greater",
-	"question",
-	"at",
-	"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
-	"bracketleft",
-	"backslash",
-	"bracketright",
-	"asciicircum",
-	"underscore",
-	"grave",
-	"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
-	"braceleft",
-	"bar",
-	"braceright",
-	"asciitilde",
-	"Adieresis",
-	"Aring",
-	"Ccedilla",
-	"Eacute",
-	"Ntilde",
-	"Odieresis",
-	"Udieresis",
-	"aacute",
-	"agrave",
-	"acircumflex",
-	"adieresis",
-	"atilde",
-	"aring",
-	"ccedilla",
-	"eacute",
-	"egrave",
-	"ecircumflex",
-	"edieresis",
-	"iacute",
-	"igrave",
-	"icircumflex",
-	"idieresis",
-	"ntilde",
-	"oacute",
-	"ograve",
-	"ocircumflex",
-	"odieresis",
-	"otilde",
-	"uacute",
-	"ugrave",
-	"ucircumflex",
-	"udieresis",
-	"dagger",
-	"degree",
-	"cent",
-	"sterling",
-	"section",
-	"bullet",
-	"paragraph",
-	"germandbls",
-	"registered",
-	"copyright",
-	"trademark",
-	"acute",
-	"dieresis",
-	"notequal",
-	"AE",
-	"Oslash",
-	"infinity",
-	"plusminus",
-	"lessequal",
-	"greaterequal",
-	"yen",
-	"mu",
-	"partialdiff",
-	"summation",
-	"product",
-	"pi",
-	"integral",
-	"ordfeminine",
-	"ordmasculine",
-	"Omega",
-	"ae",
-	"oslash",
-	"questiondown",
-	"exclamdown",
-	"logicalnot",
-	"radical",
-	"florin",
-	"approxequal",
-	"Delta",
-	"guillemotleft",
-	"guillemotright",
-	"ellipsis",
-	"nonbreakingspace",
-	"Agrave",
-	"Atilde",
-	"Otilde",
-	"OE",
-	"oe",
-	"endash",
-	"emdash",
-	"quotedblleft",
-	"quotedblright",
-	"quoteleft",
-	"quoteright",
-	"divide",
-	"lozenge",
-	"ydieresis",
-	"Ydieresis",
-	"fraction",
-	"currency",
-	"guilsinglleft",
-	"guilsinglright",
-	"fi",
-	"fl",
-	"daggerdbl",
-	"periodcentered",
-	"quotesinglbase",
-	"quotedblbase",
-	"perthousand",
-	"Acircumflex",
-	"Ecircumflex",
-	"Aacute",
-	"Edieresis",
-	"Egrave",
-	"Iacute",
-	"Icircumflex",
-	"Idieresis",
-	"Igrave",
-	"Oacute",
-	"Ocircumflex",
-	"apple",
-	"Ograve",
-	"Uacute",
-	"Ucircumflex",
-	"Ugrave",
-	"dotlessi",
-	"circumflex",
-	"tilde",
-	"macron",
-	"breve",
-	"dotaccent",
-	"ring",
-	"cedilla",
-	"hungarumlaut",
-	"ogonek",
-	"caron",
-	"Lslash",
-	"lslash",
-	"Scaron",
-	"scaron",
-	"Zcaron",
-	"zcaron",
-	"brokenbar",
-	"Eth",
-	"eth",
-	"Yacute",
-	"yacute",
-	"Thorn",
-	"thorn",
-	"minus",
-	"multiply",
-	"onesuperior",
-	"twosuperior",
-	"threesuperior",
-	"onehalf",
-	"onequarter",
-	"threequarters",
-	"franc",
-	"Gbreve",
-	"gbreve",
-	"Idotaccent",
-	"Scedilla",
-	"scedilla",
-	"Cacute",
-	"cacute",
-	"Ccaron",
-	"ccaron",
-	"dcroat"
-};
-
-
-
-bool PostTable::usable() const
-{
-    return m_usable;
-}
-
-void PostTable::setUsable(bool usable)
-{
-    m_usable = usable;
-}
-
-QString PostTable::errorMsg() const
-{
-    return m_errorMsg;
-}
-
-void PostTable::setErrorMsg(const QString& errorMsg)
-{
-    m_errorMsg = errorMsg;
-}
-
-uint PostTable::numberOfGlyphs() const
-{
-    if (m_names.length() > 0)
-        return m_names.length();
-    return post_format10_names_count;
-}
-
-QString PostTable::nameFor(uint glyph) const
-{
-	if (glyph < (uint) m_names.length())
-		return m_names[glyph];
-	if (glyph < sfnt::post_format10_names_count)
-		return post_format10_names[glyph];
-	return ".notdef";
-}
-
-
-void PostTable::readFrom(FT_Face face)
-{
-	QByteArray postData;
-	FT_ULong size = 0;
-	int error = FT_Load_Sfnt_Table ( face, TTAG_post , 0, nullptr, &size );
-	//qDebug() << "load post" << error << size;
-	if (error || size == 0)
-	{
-		m_errorMsg = "no post table";
-		m_usable = false;
-		return;
-	}
-	postData.resize(size);
-	error = FT_Load_Sfnt_Table ( face, TTAG_post , 0, reinterpret_cast<FT_Byte*>(postData.data()), &size );
-	if (error)
-	{
-		m_errorMsg = "can't load post table";
-		m_usable = false;
-		return;
-	}
-	
-	switch (sfnt::word(postData, ttf_post_format))
-	{
-		case sfnt::post_format10:
-			m_usable = true;
-			m_names.clear();
-			return;
-		case sfnt::post_format20:
-			break;
-		case sfnt::post_format30:
-			m_errorMsg = QString("post table has no glyph names");
+	const uint post_format10_names_count = 258;
+
+
+	static const char* post_format10_names[] = {
+		".notdef",
+		".null",
+		"nonmarkingreturn",
+		"space",
+		"exclam",
+		"quotedbl",
+		"numbersign",
+		"dollar",
+		"percent",
+		"ampersand",
+		"quotesingle",
+		"parenleft",
+		"parenright",
+		"asterisk",
+		"plus",
+		"comma",
+		"hyphen",
+		"period",
+		"slash",
+		"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine",
+		"colon",
+		"semicolon",
+		"less",
+		"equal",
+		"greater",
+		"question",
+		"at",
+		"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
+		"bracketleft",
+		"backslash",
+		"bracketright",
+		"asciicircum",
+		"underscore",
+		"grave",
+		"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
+		"braceleft",
+		"bar",
+		"braceright",
+		"asciitilde",
+		"Adieresis",
+		"Aring",
+		"Ccedilla",
+		"Eacute",
+		"Ntilde",
+		"Odieresis",
+		"Udieresis",
+		"aacute",
+		"agrave",
+		"acircumflex",
+		"adieresis",
+		"atilde",
+		"aring",
+		"ccedilla",
+		"eacute",
+		"egrave",
+		"ecircumflex",
+		"edieresis",
+		"iacute",
+		"igrave",
+		"icircumflex",
+		"idieresis",
+		"ntilde",
+		"oacute",
+		"ograve",
+		"ocircumflex",
+		"odieresis",
+		"otilde",
+		"uacute",
+		"ugrave",
+		"ucircumflex",
+		"udieresis",
+		"dagger",
+		"degree",
+		"cent",
+		"sterling",
+		"section",
+		"bullet",
+		"paragraph",
+		"germandbls",
+		"registered",
+		"copyright",
+		"trademark",
+		"acute",
+		"dieresis",
+		"notequal",
+		"AE",
+		"Oslash",
+		"infinity",
+		"plusminus",
+		"lessequal",
+		"greaterequal",
+		"yen",
+		"mu",
+		"partialdiff",
+		"summation",
+		"product",
+		"pi",
+		"integral",
+		"ordfeminine",
+		"ordmasculine",
+		"Omega",
+		"ae",
+		"oslash",
+		"questiondown",
+		"exclamdown",
+		"logicalnot",
+		"radical",
+		"florin",
+		"approxequal",
+		"Delta",
+		"guillemotleft",
+		"guillemotright",
+		"ellipsis",
+		"nonbreakingspace",
+		"Agrave",
+		"Atilde",
+		"Otilde",
+		"OE",
+		"oe",
+		"endash",
+		"emdash",
+		"quotedblleft",
+		"quotedblright",
+		"quoteleft",
+		"quoteright",
+		"divide",
+		"lozenge",
+		"ydieresis",
+		"Ydieresis",
+		"fraction",
+		"currency",
+		"guilsinglleft",
+		"guilsinglright",
+		"fi",
+		"fl",
+		"daggerdbl",
+		"periodcentered",
+		"quotesinglbase",
+		"quotedblbase",
+		"perthousand",
+		"Acircumflex",
+		"Ecircumflex",
+		"Aacute",
+		"Edieresis",
+		"Egrave",
+		"Iacute",
+		"Icircumflex",
+		"Idieresis",
+		"Igrave",
+		"Oacute",
+		"Ocircumflex",
+		"apple",
+		"Ograve",
+		"Uacute",
+		"Ucircumflex",
+		"Ugrave",
+		"dotlessi",
+		"circumflex",
+		"tilde",
+		"macron",
+		"breve",
+		"dotaccent",
+		"ring",
+		"cedilla",
+		"hungarumlaut",
+		"ogonek",
+		"caron",
+		"Lslash",
+		"lslash",
+		"Scaron",
+		"scaron",
+		"Zcaron",
+		"zcaron",
+		"brokenbar",
+		"Eth",
+		"eth",
+		"Yacute",
+		"yacute",
+		"Thorn",
+		"thorn",
+		"minus",
+		"multiply",
+		"onesuperior",
+		"twosuperior",
+		"threesuperior",
+		"onehalf",
+		"onequarter",
+		"threequarters",
+		"franc",
+		"Gbreve",
+		"gbreve",
+		"Idotaccent",
+		"Scedilla",
+		"scedilla",
+		"Cacute",
+		"cacute",
+		"Ccaron",
+		"ccaron",
+		"dcroat"
+	};
+
+
+
+	bool PostTable::usable() const
+	{
+		return m_usable;
+	}
+
+	void PostTable::setUsable(bool usable)
+	{
+		m_usable = usable;
+	}
+
+	QString PostTable::errorMsg() const
+	{
+		return m_errorMsg;
+	}
+
+	void PostTable::setErrorMsg(const QString& errorMsg)
+	{
+		m_errorMsg = errorMsg;
+	}
+
+	uint PostTable::numberOfGlyphs() const
+	{
+		if (m_names.length() > 0)
+			return m_names.length();
+		return post_format10_names_count;
+	}
+
+	QString PostTable::nameFor(uint glyph) const
+	{
+		if (glyph < (uint) m_names.length())
+			return m_names[glyph];
+		if (glyph < sfnt::post_format10_names_count)
+			return post_format10_names[glyph];
+		return ".notdef";
+	}
+
+
+	void PostTable::readFrom(FT_Face face)
+	{
+		QByteArray postData;
+		FT_ULong size = 0;
+		int error = FT_Load_Sfnt_Table ( face, TTAG_post , 0, nullptr, &size );
+		//qDebug() << "load post" << error << size;
+		if (error || size == 0)
+		{
+			m_errorMsg = "no post table";
 			m_usable = false;
 			return;
-		case sfnt::post_format25:
-		case sfnt::post_format40:
-		default:
-			m_errorMsg = QString("unsupported post format %1").arg(sfnt::word(postData,0));
+		}
+		postData.resize(size);
+		error = FT_Load_Sfnt_Table ( face, TTAG_post , 0, reinterpret_cast<FT_Byte*>(postData.data()), &size );
+		if (error)
+		{
+			m_errorMsg = "can't load post table";
 			m_usable = false;
 			return;
-			
-	}
-	QMap<QString,uint> usedNames;
-	QList<QByteArray> pascalStrings;
-	
-	uint nrOfGlyphs = sfnt::word16(postData, ttf_post_header_length);
-	uint stringPos = ttf_post_header_length + 2 + 2 * nrOfGlyphs;
-	while (stringPos < (uint) postData.length())
-	{
-		int strLen = byte(postData, stringPos);
-		++stringPos;
-		pascalStrings.append(postData.mid(stringPos, strLen));
-		stringPos += strLen;
-	}
-	uint pos = ttf_post_header_length + 2;
-	for (uint gid = 0; gid < nrOfGlyphs; ++gid)
-	{
-		uint nameIndex = sfnt::word16(postData, pos);
-		pos += 2;
-		QString name;
-		if (nameIndex < sfnt::post_format10_names_count)
-			name = sfnt::post_format10_names[nameIndex];
-		else if (nameIndex < pascalStrings.length() + sfnt::post_format10_names_count)
-			name = pascalStrings[nameIndex - sfnt::post_format10_names_count];
-		else {
-			m_usable = false;
-			m_errorMsg = QString("missing name %1 for glyph %2").arg(nameIndex).arg(gid);
-			return;
-		}
-		if (name != ".notdef" && name[0] != QChar(0) && usedNames.contains(name))
-		{
-			m_usable = false;
-			m_errorMsg = QString("duplicate name %1 used for glyphs %2 and %3").arg(name).arg(gid).arg(usedNames[name]);
-			return;
-		}
-		usedNames[name] = gid;
-		m_names.append(name);
-	}
-	m_errorMsg = "";
-	m_usable = true;
-}
+		}
+
+		switch (sfnt::word(postData, ttf_post_format))
+		{
+			case sfnt::post_format10:
+				m_usable = true;
+				m_names.clear();
+				return;
+			case sfnt::post_format20:
+				break;
+			case sfnt::post_format30:
+				m_errorMsg = QString("post table has no glyph names");
+				m_usable = false;
+				return;
+			case sfnt::post_format25:
+			case sfnt::post_format40:
+			default:
+				m_errorMsg = QString("unsupported post format %1").arg(sfnt::word(postData,0));
+				m_usable = false;
+				return;
+
+		}
+		QMap<QString,uint> usedNames;
+		QList<QByteArray> pascalStrings;
+
+		uint nrOfGlyphs = sfnt::word16(postData, ttf_post_header_length);
+		uint stringPos = ttf_post_header_length + 2 + 2 * nrOfGlyphs;
+		while (stringPos < (uint) postData.length())
+		{
+			int strLen = byte(postData, stringPos);
+			++stringPos;
+			pascalStrings.append(postData.mid(stringPos, strLen));
+			stringPos += strLen;
+		}
+		uint pos = ttf_post_header_length + 2;
+		for (uint gid = 0; gid < nrOfGlyphs; ++gid)
+		{
+			uint nameIndex = sfnt::word16(postData, pos);
+			pos += 2;
+			QString name;
+			if (nameIndex < sfnt::post_format10_names_count)
+				name = sfnt::post_format10_names[nameIndex];
+			else if (nameIndex < pascalStrings.length() + sfnt::post_format10_names_count)
+				name = pascalStrings[nameIndex - sfnt::post_format10_names_count];
+			else {
+				m_usable = false;
+				m_errorMsg = QString("missing name %1 for glyph %2").arg(nameIndex).arg(gid);
+				return;
+			}
+			if (name != ".notdef" && name[0] != QChar(0) && usedNames.contains(name))
+			{
+				m_usable = false;
+				m_errorMsg = QString("duplicate name %1 used for glyphs %2 and %3").arg(name).arg(gid).arg(usedNames[name]);
+				return;
+			}
+			usedNames[name] = gid;
+			m_names.append(name);
+		}
+		m_errorMsg = "";
+		m_usable = true;
+	}
 
 
 
@@ -446,65 +446,64 @@
 	}
 
 
-QByteArray extractFace(const QByteArray& coll, int faceIndex)
-{
-	QByteArray result;
-	
-	const int numFonts = word(coll, ttc_numFonts);
-	if (faceIndex >= static_cast<int>(numFonts))
-	{
-		return result;
-	}
-
-	uint faceOffset = sfnt::word(coll, ttc_OffsetTables + 4 * faceIndex);
-	uint nTables	= sfnt::word16(coll, faceOffset + ttf_numtables);
-	
-	//qDebug() << QObject::tr("extracting face %1 from font %2 (offset=%3, nTables=%4)").arg(faceIndex).arg("collection").arg(faceOffset).arg(nTables);
-	
-	uint headerLength = ttf_TableRecords + ttf_TableRecord_Size * nTables;
-	
-	uint tableLengths = 0;
-	// sum table lengths incl padding
-	for (uint i=0; i < nTables; ++i)
-	{
-		tableLengths += sfnt::word(coll, faceOffset + ttf_TableRecords + ttf_TableRecord_Size * i + ttf_TableRecord_length);
-		tableLengths = (tableLengths+3) & ~3;
-	}
-	result.resize(headerLength + tableLengths);
-	if (!result.data())
-	{
-		result.resize(0);
-		return result;
-	}
-	
-	// write header
-	//		sDebug(QObject::tr("memcpy header: %1 %2 %3").arg(0).arg(faceOffset).arg(headerLength));
-	if (!copy(result, 0, coll, faceOffset, headerLength))
-	{
-		result.resize(0);
-		return result;
-	}
-	uint pos = headerLength;
-	for (uint i=0; i < nTables; ++i)
-	{
-		uint sourceDirEntry = faceOffset + ttf_TableRecords + ttf_TableRecord_Size * i;
-		uint destDirEntry = ttf_TableRecords + ttf_TableRecord_Size * i;
-		
-		int tableSize = copyTable(result, destDirEntry, pos, coll, sourceDirEntry);
-		if (tableSize < 0)
+	QByteArray extractFace(const QByteArray& coll, int faceIndex)
+	{
+		QByteArray result;
+
+		const int numFonts = word(coll, ttc_numFonts);
+		if (faceIndex >= static_cast<int>(numFonts))
+		{
+			return result;
+		}
+
+		uint faceOffset = sfnt::word(coll, ttc_OffsetTables + 4 * faceIndex);
+		uint nTables	= sfnt::word16(coll, faceOffset + ttf_numtables);
+
+		//qDebug() << QObject::tr("extracting face %1 from font %2 (offset=%3, nTables=%4)").arg(faceIndex).arg("collection").arg(faceOffset).arg(nTables);
+
+		uint headerLength = ttf_TableRecords + ttf_TableRecord_Size * nTables;
+
+		uint tableLengths = 0;
+		// sum table lengths incl padding
+		for (uint i=0; i < nTables; ++i)
+		{
+			tableLengths += sfnt::word(coll, faceOffset + ttf_TableRecords + ttf_TableRecord_Size * i + ttf_TableRecord_length);
+			tableLengths = (tableLengths+3) & ~3;
+		}
+		result.resize(headerLength + tableLengths);
+		if (!result.data())
 		{
 			result.resize(0);
 			return result;
 		}
-		pos += tableSize;
-
-		// pad
-		while ((pos & 3) != 0)
-			result.data()[pos++] = '\0';
-	}
-	return result;
-}
-
+
+		// write header
+		//		sDebug(QObject::tr("memcpy header: %1 %2 %3").arg(0).arg(faceOffset).arg(headerLength));
+		if (!copy(result, 0, coll, faceOffset, headerLength))
+		{
+			result.resize(0);
+			return result;
+		}
+		uint pos = headerLength;
+		for (uint i=0; i < nTables; ++i)
+		{
+			uint sourceDirEntry = faceOffset + ttf_TableRecords + ttf_TableRecord_Size * i;
+			uint destDirEntry = ttf_TableRecords + ttf_TableRecord_Size * i;
+
+			int tableSize = copyTable(result, destDirEntry, pos, coll, sourceDirEntry);
+			if (tableSize < 0)
+			{
+				result.resize(0);
+				return result;
+			}
+			pos += tableSize;
+
+			// pad
+			while ((pos & 3) != 0)
+				result.data()[pos++] = '\0';
+		}
+		return result;
+	}
 
 	uint getTableDirEntry(const QByteArray& ttf, const QByteArray& ttfTag)
 	{
@@ -520,7 +519,6 @@
 		}
 		return 0;
 	}
-
 
 	QByteArray getTable(const QByteArray& ttf, const QByteArray& ttfTag)
 	{
@@ -593,7 +591,7 @@
 	{
 		const QByteArray head = getTable(ttf, "head");
 		uint idxToLocFormat = word16(head, ttf_head_indexToLocFormat);
-//		qDebug() << "loca format:" << (void*)idxToLocFormat;
+		//		qDebug() << "loca format:" << (void*)idxToLocFormat;
 		return idxToLocFormat == 1;
 	}
 
@@ -724,84 +722,84 @@
 		switch (format)
 		{
 			case 4:
-			{
-				uint segCount2 = word16(cmaps, startOfUnicodeTable + ttf_cmap4_segCountX2);
-				uint endCodes = startOfUnicodeTable + ttf_cmap4_EndCodes;
-				uint startCodes = endCodes + segCount2 + ttf_cmap4_StartCodes_EndCodes;
-				uint idDeltas = startCodes + segCount2 + ttf_cmap4_IdDeltas_StartCodes;
-				uint idRangeOffsets = idDeltas + segCount2 + ttf_cmap4_IdRangeOffsets_IdDeltas;
-				//uint glyphIndexArray = idRangeOffsets + segCount2 + ttf_cmap4_GlyphIds_IdRangeOffsets;
-				
-				for (uint seg = 0; seg < segCount2; seg+=2)
 				{
-					uint start = word16(cmaps, startCodes + seg);
-					uint end = word16(cmaps, endCodes + seg);
-					uint idDelta = word16(cmaps, idDeltas + seg);
-					uint idRangeOffset = word16(cmaps, idRangeOffsets + seg);
-					for (uint c = start; c <= end; ++c)
+					uint segCount2 = word16(cmaps, startOfUnicodeTable + ttf_cmap4_segCountX2);
+					uint endCodes = startOfUnicodeTable + ttf_cmap4_EndCodes;
+					uint startCodes = endCodes + segCount2 + ttf_cmap4_StartCodes_EndCodes;
+					uint idDeltas = startCodes + segCount2 + ttf_cmap4_IdDeltas_StartCodes;
+					uint idRangeOffsets = idDeltas + segCount2 + ttf_cmap4_IdRangeOffsets_IdDeltas;
+					//uint glyphIndexArray = idRangeOffsets + segCount2 + ttf_cmap4_GlyphIds_IdRangeOffsets;
+
+					for (uint seg = 0; seg < segCount2; seg+=2)
 					{
-						quint16 glyph;
-						if (idRangeOffset > 0)
+						uint start = word16(cmaps, startCodes + seg);
+						uint end = word16(cmaps, endCodes + seg);
+						uint idDelta = word16(cmaps, idDeltas + seg);
+						uint idRangeOffset = word16(cmaps, idRangeOffsets + seg);
+						for (uint c = start; c <= end; ++c)
 						{
-							uint glyphIndexAdress = idRangeOffset + 2*(c-start) + (idRangeOffsets + seg);
-							glyph = word16(cmaps, glyphIndexAdress);
-							if (glyph != 0)
-								glyph += idDelta;
-						}
-						else
-						{
-							glyph = c + idDelta;
-						}
-						if (!result.contains(c))
-						{
-							// search would always find the one in the segment with the lower endcode, i.e. earlier segment
-							if (c < 256 || glyph == 0)
-								//qDebug() << "(" << QChar(c) << "," << glyph << ")";
-							result[c] = glyph;
-						}
-						else
-						{
-							// nothing to do. No idea if fonts with overlapping cmap4 segments exist, though.
+							quint16 glyph;
+							if (idRangeOffset > 0)
+							{
+								uint glyphIndexAdress = idRangeOffset + 2*(c-start) + (idRangeOffsets + seg);
+								glyph = word16(cmaps, glyphIndexAdress);
+								if (glyph != 0)
+									glyph += idDelta;
+							}
+							else
+							{
+								glyph = c + idDelta;
+							}
+							if (!result.contains(c))
+							{
+								// search would always find the one in the segment with the lower endcode, i.e. earlier segment
+								if (c < 256 || glyph == 0)
+									//qDebug() << "(" << QChar(c) << "," << glyph << ")";
+									result[c] = glyph;
+							}
+							else
+							{
+								// nothing to do. No idea if fonts with overlapping cmap4 segments exist, though.
+							}
 						}
 					}
+					break;
 				}
-				break;
-			}
 			case 6:
-			{
-				uint firstCode = word16(cmaps, startOfUnicodeTable + ttf_cmap6_firstCode);
-				uint count = word16(cmaps, startOfUnicodeTable + ttf_cmap6_entryCount);
-				pos = word16(cmaps, startOfUnicodeTable + ttf_cmap6_glyphIndexArray);
-				for (uint i = 0; i < count; ++i)
 				{
-					result[firstCode + i] = word16(cmaps, pos);
-					pos += 2;
+					uint firstCode = word16(cmaps, startOfUnicodeTable + ttf_cmap6_firstCode);
+					uint count = word16(cmaps, startOfUnicodeTable + ttf_cmap6_entryCount);
+					pos = word16(cmaps, startOfUnicodeTable + ttf_cmap6_glyphIndexArray);
+					for (uint i = 0; i < count; ++i)
+					{
+						result[firstCode + i] = word16(cmaps, pos);
+						pos += 2;
+					}
+					break;
 				}
-				break;
-			}
 			case 12:
-			{
-				uint nGroups = word(cmaps, startOfUnicodeTable + ttf_cmap12_nGroups);
-				pos = startOfUnicodeTable + ttf_cmap12_Groups;
-				for (uint grp = 0; grp < nGroups; ++grp)
 				{
-					uint start = word(cmaps, pos + ttf_cmap12_Group_startCharCode);
-					uint end = word(cmaps, pos + ttf_cmap12_Group_endCharCode);
-					uint gid = word(cmaps, pos + ttf_cmap12_Group_startGlyphCode);
-					for (uint c = start; c <= end; ++c)
+					uint nGroups = word(cmaps, startOfUnicodeTable + ttf_cmap12_nGroups);
+					pos = startOfUnicodeTable + ttf_cmap12_Groups;
+					for (uint grp = 0; grp < nGroups; ++grp)
 					{
-						result[c] = gid;
-						++gid;
+						uint start = word(cmaps, pos + ttf_cmap12_Group_startCharCode);
+						uint end = word(cmaps, pos + ttf_cmap12_Group_endCharCode);
+						uint gid = word(cmaps, pos + ttf_cmap12_Group_startGlyphCode);
+						for (uint c = start; c <= end; ++c)
+						{
+							result[c] = gid;
+							++gid;
+						}
+						pos += ttf_cmap12_Group_Size;
 					}
-					pos += ttf_cmap12_Group_Size;
+					break;
 				}
-				break;
-			}
 			default:
-			{
-				qDebug() << "unsupported cmap format" << format;
-				break;
-			}
+				{
+					qDebug() << "unsupported cmap format" << format;
+					break;
+				}
 		}
 		return result;
 	}
@@ -833,7 +831,7 @@
 				chars.append(ch);
 				cmapHasData = true;
 			}
-//			qDebug() << QChar(ch) << QChar::requiresSurrogates(ch) << cit.value();
+			//			qDebug() << QChar(ch) << QChar::requiresSurrogates(ch) << cit.value();
 		}
 		std::sort(chars.begin(), chars.end());
 		
@@ -947,11 +945,11 @@
 		
 		putWord16(result, startOfTable + ttf_cmap4_length, result.size() - startOfTable);
 		return result;
-	 }
+	}
 	
 	
 	QList<uint> copyGlyphComponents(QByteArray& destGlyf, const QByteArray& srcGlyf, uint srcOffset,
-	                                QMap<uint,uint>& newForOldGid, uint& nextFreeGid)
+									QMap<uint,uint>& newForOldGid, uint& nextFreeGid)
 	{
 		QList<uint> result;
 		
@@ -1010,7 +1008,7 @@
 				pos += 2;
 			}
 		} while ( flags & ttf_glyf_ComponentFlag_MORE_COMPONENTS );
-			
+
 		if (haveInstructions)
 		{
 			uint numInstr = word16(srcGlyf, pos);
@@ -1026,8 +1024,8 @@
 	
 
 	QList<uint> copyGlyph(QList<uint>& destLoca, QByteArray& destGlyf, uint destGid,
-	                      const QList<uint>& srcLoca, const QByteArray& srcGlyf, uint srcGid,
-	                      QMap<uint,uint>& newForOldGid, uint& nextFreeGid)
+						  const QList<uint>& srcLoca, const QByteArray& srcGlyf, uint srcGid,
+						  QMap<uint,uint>& newForOldGid, uint& nextFreeGid)
 	{
 		QList<uint> compositeElements;
 		uint glyphStart = srcLoca[srcGid];
@@ -1071,7 +1069,7 @@
 		QMap<QByteArray,QByteArray> tables;
 		
 		
-//		qDebug() << "loca table:" << (void*) oldLoca[0] << (void*) oldLoca[1] << (void*) oldLoca[2] << (void*) oldLoca[3] << (void*) oldLoca[4] << (void*) oldLoca[5] << (void*) oldLoca[6] << (void*) oldLoca[7];
+		//		qDebug() << "loca table:" << (void*) oldLoca[0] << (void*) oldLoca[1] << (void*) oldLoca[2] << (void*) oldLoca[3] << (void*) oldLoca[4] << (void*) oldLoca[5] << (void*) oldLoca[6] << (void*) oldLoca[7];
 		
 
 		QMap<uint,uint> newForOldGid;
@@ -1101,8 +1099,8 @@
 			{
 				uint oldGid = glyphs[i];
 				glyphs.append(copyGlyph(newLoca, newGlyf, i,
-				                        oldLoca, oldGlyf, oldGid,
-				                        newForOldGid, nextFreeGid));
+										oldLoca, oldGlyf, oldGid,
+										newForOldGid, nextFreeGid));
 			}
 			newLoca.append(newGlyf.length());
 			

Modified: trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp	(original)
+++ trunk/Scribus/scribus/imagedataloaders/scimgdataloader_ps.cpp	Thu Jun  4 16:43:53 2020
@@ -671,7 +671,6 @@
 			{
 				m_image.load(tmpFile);
 				x = 0;
-				y = 0;
 				b = m_image.width() / gsRes * 72.0;
 				h = m_image.height() / gsRes * 72.0;
 			}
@@ -904,7 +903,6 @@
 					psdata.resize(psdata.size()+1);
 					psdata[psdata.size()-1] = data;
 				}
-				quintet = 0;
 			}
 			break;
 		}

Modified: trunk/Scribus/scribus/langmgr.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/langmgr.cpp
==============================================================================
--- trunk/Scribus/scribus/langmgr.cpp	(original)
+++ trunk/Scribus/scribus/langmgr.cpp	Thu Jun  4 16:43:53 2020
@@ -747,7 +747,7 @@
 	return -1;
 }
 
-const QString LanguageManager::getLangFromAbbrev(QString langAbbrev, bool getTranslated)
+QString LanguageManager::getLangFromAbbrev(QString langAbbrev, bool getTranslated)
 {
 //	qDebug()<<"Trying to find:"<<langAbbrev;
 	int i=langTableIndex(langAbbrev);
@@ -770,7 +770,7 @@
 	return "";
 }
 
-const QString LanguageManager::getAbbrevFromLang(const QString& lang, bool useInstalled)
+QString LanguageManager::getAbbrevFromLang(const QString& lang, bool useInstalled)
 {
 	for (int i = 0; i < m_langTable.size(); ++i)
 	{
@@ -789,7 +789,7 @@
 	return "";
 }
 
-const QString LanguageManager::getLangFromTransLang(const QString& transLang)
+QString LanguageManager::getLangFromTransLang(const QString& transLang)
 {
 	for (int i = 0; i < m_langTable.size(); ++i)
 	{
@@ -799,7 +799,7 @@
 	return "";
 }
 
-const QString LanguageManager::getTransLangFromLang(const QString& lang)
+QString LanguageManager::getTransLangFromLang(const QString& lang)
 {
 	for (int i = 0; i < m_langTable.size(); ++i)
 	{
@@ -809,7 +809,7 @@
 	return "";
 }
 
-const QString LanguageManager::getShortAbbrevFromAbbrev(QString langAbbrev)
+QString LanguageManager::getShortAbbrevFromAbbrev(QString langAbbrev)
 {
 	//	qDebug()<<"Trying to find:"<<langAbbrev;
 	int i = langTableIndex(langAbbrev);
@@ -828,7 +828,7 @@
 	return "";
 }
 
-const QString LanguageManager::getShortAbbrevFromAbbrevDecomposition(const QString& langAbbrev)
+QString LanguageManager::getShortAbbrevFromAbbrevDecomposition(const QString& langAbbrev)
 {
 	int tIndex = langTableIndex(langAbbrev);
 	if (tIndex >= 0)
@@ -845,7 +845,7 @@
 	return "";
 }
 
-const QString LanguageManager::getAlternativeAbbrevfromAbbrev(const QString& langAbbrev)
+QString LanguageManager::getAlternativeAbbrevfromAbbrev(const QString& langAbbrev)
 {
 	int i=langTableIndex(langAbbrev);
 	if (i != -1)
@@ -1138,7 +1138,7 @@
 	m_langTable.clear();
 }
 
-const QString LanguageManager::getHyphFilename(const QString & langAbbrev)
+QString LanguageManager::getHyphFilename(const QString & langAbbrev)
 {
 	int j = langTableIndex(langAbbrev);
 	if (j != -1 && m_langTable[j].m_hyphAvailable)

Modified: trunk/Scribus/scribus/langmgr.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/langmgr.h
==============================================================================
--- trunk/Scribus/scribus/langmgr.h	(original)
+++ trunk/Scribus/scribus/langmgr.h	Thu Jun  4 16:43:53 2020
@@ -46,13 +46,13 @@
 	void languageChange();
 	QStringList languageList(bool getTranslated=true);
 	
-	const QString getLangFromAbbrev(QString, bool getTranslated=true);
-	const QString getAbbrevFromLang(const QString&, bool useInstalled=true);
-	const QString getLangFromTransLang(const QString& transLang);
-	const QString getTransLangFromLang(const QString& lang);
-	const QString getShortAbbrevFromAbbrev(QString langAbbrev);
-	const QString getShortAbbrevFromAbbrevDecomposition(const QString& langAbbrev);
-	const QString getAlternativeAbbrevfromAbbrev(const QString& langAbbrev);
+	QString getLangFromAbbrev(QString, bool getTranslated=true);
+	QString getAbbrevFromLang(const QString&, bool useInstalled=true);
+	QString getLangFromTransLang(const QString& transLang);
+	QString getTransLangFromLang(const QString& lang);
+	QString getShortAbbrevFromAbbrev(QString langAbbrev);
+	QString getShortAbbrevFromAbbrevDecomposition(const QString& langAbbrev);
+	QString getAlternativeAbbrevfromAbbrev(const QString& langAbbrev);
 	QStringList   getAbbrevDecomposition(const QString& langAbbrev);
 	void fillInstalledStringList(QStringList *stringListToFill);
 	void fillInstalledGUIStringList(QStringList *stringListToFill);
@@ -65,7 +65,7 @@
 	bool findHyphDictionaries(QStringList& sl);
 	void findHyphDictionarySets(QStringList& dictionaryPaths, QMap<QString, QString>& dictionaryMap);
 	
-	const QString getHyphFilename(const QString& langAbbrev);
+	QString getHyphFilename(const QString& langAbbrev);
 	int langTableIndex(const QString& abbrev);
 
 	bool isAvailableTranslation(QString langAbbrev);

Modified: trunk/Scribus/scribus/loadsaveplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/loadsaveplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/loadsaveplugin.cpp	(original)
+++ trunk/Scribus/scribus/loadsaveplugin.cpp	Thu Jun  4 16:43:53 2020
@@ -57,17 +57,17 @@
 	return &(*it);
 }
 
-const QStringList LoadSavePlugin::fileDialogLoadFilter()
+QStringList LoadSavePlugin::fileDialogLoadFilter()
 {
 	return getDialogFilter(true);
 }
 
-const QStringList LoadSavePlugin::fileDialogSaveFilter()
+QStringList LoadSavePlugin::fileDialogSaveFilter()
 {
 	return getDialogFilter(false);
 }
 
-const QStringList LoadSavePlugin::getExtensionsForColors(const int id)
+QStringList LoadSavePlugin::getExtensionsForColors(const int id)
 {
 	QList<FileFormat>::const_iterator it(findFormat(id));
 	QList<FileFormat>::const_iterator itEnd(formats.constEnd());
@@ -103,7 +103,7 @@
 	return filterList;
 }
 
-const QStringList LoadSavePlugin::getExtensionsForImport(const int id)
+QStringList LoadSavePlugin::getExtensionsForImport(const int id)
 {
 	QList<FileFormat>::const_iterator it(findFormat(id));
 	QList<FileFormat>::const_iterator itEnd(formats.constEnd());
@@ -139,7 +139,7 @@
 	return filterList;
 }
 
-const QStringList LoadSavePlugin::getExtensionsForPreview(const int id)
+QStringList LoadSavePlugin::getExtensionsForPreview(const int id)
 {
 	QList<FileFormat>::const_iterator it(findFormat(id));
 	QList<FileFormat>::const_iterator itEnd(formats.constEnd());

Modified: trunk/Scribus/scribus/loadsaveplugin.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/loadsaveplugin.h
==============================================================================
--- trunk/Scribus/scribus/loadsaveplugin.h	(original)
+++ trunk/Scribus/scribus/loadsaveplugin.h	Thu Jun  4 16:43:53 2020
@@ -56,19 +56,19 @@
 		// Static functions:
 
 		// Return a list of file extensions
-		static const QStringList getExtensionsForColors(const int id = 47);
+		static QStringList getExtensionsForColors(const int id = 47);
 		// Return a list of file extensions
-		static const QStringList getExtensionsForImport(const int id = 47);
+		static QStringList getExtensionsForImport(const int id = 47);
 		// Return a list of file extensions
-		static const QStringList getExtensionsForPreview(const int id = 47);
+		static QStringList getExtensionsForPreview(const int id = 47);
 
 		// Return a list of format descriptions suitable for use with
 		// QFileDialog.  You can convert it to QString form with
 		// fileDialogSaveFilter().join(";;")
-		static const QStringList fileDialogLoadFilter();
+		static QStringList fileDialogLoadFilter();
 
 		// Same deal but for save
-		static const QStringList fileDialogSaveFilter();
+		static QStringList fileDialogSaveFilter();
 
 		// Get the highest priority format of a given id, or 0 if
 		// not found / not available.

Modified: trunk/Scribus/scribus/marks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/marks.cpp
==============================================================================
--- trunk/Scribus/scribus/marks.cpp	(original)
+++ trunk/Scribus/scribus/marks.cpp	Thu Jun  4 16:43:53 2020
@@ -46,7 +46,7 @@
 	m_data.destmarkType = t;
 }
 
-const QString Mark::getString() const
+QString Mark::getString() const
 {
 	return m_data.strtxt;
 }

Modified: trunk/Scribus/scribus/marks.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/marks.h
==============================================================================
--- trunk/Scribus/scribus/marks.h	(original)
+++ trunk/Scribus/scribus/marks.h	Thu Jun  4 16:43:53 2020
@@ -69,7 +69,7 @@
 	void setMark(const QString& l, MarkType t);
 	MarkType getMarkType() const { return m_data.markType; }
 	void setMarkType(MarkType t) { m_data.markType = t; }
-	const QString getString() const;
+	QString getString() const;
 	void setString(const QString& str );
 	TextNote* getNotePtr() const { return m_data.notePtr; }
 	void setNotePtr(TextNote *note);

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Thu Jun  4 16:43:53 2020
@@ -1324,9 +1324,7 @@
 	}
 	// If object is placed on a master page, it can be linked only to objects placed on same master page
 	// Same for objects placed on standard pages : they can only be linked to objects placed on standard pages
-	if (OnMasterPage != nxt->OnMasterPage)
-		return false;
-	return true;
+	return OnMasterPage == nxt->OnMasterPage;
 }
 
 void PageItem::link(PageItem* nxt, bool addPARSEP)

Modified: trunk/Scribus/scribus/pluginmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/pluginmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/pluginmanager.cpp	(original)
+++ trunk/Scribus/scribus/pluginmanager.cpp	Thu Jun  4 16:43:53 2020
@@ -681,7 +681,7 @@
 	return (*ScCore->pluginManager);
 }
 
-const QString PluginManager::getPluginPath(const QString & pluginName) const
+QString PluginManager::getPluginPath(const QString & pluginName) const
 {
 	// It is not legal to call this function without a valid
 	// plug in name.

Modified: trunk/Scribus/scribus/pluginmanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/pluginmanager.h
==============================================================================
--- trunk/Scribus/scribus/pluginmanager.h	(original)
+++ trunk/Scribus/scribus/pluginmanager.h	Thu Jun  4 16:43:53 2020
@@ -111,7 +111,7 @@
 
 	/*! \brief Return the path to the file for the named plugin.
 	An invalid plugin name is an error.*/
-	const QString getPluginPath(const QString & pluginName) const;
+	QString getPluginPath(const QString & pluginName) const;
 
 	/*! \brief Whether the given plug-in will be enabled on start-up.
 	Usable as an lvalue. An invalid plugin name is an error. */

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Thu Jun  4 16:43:53 2020
@@ -14098,7 +14098,7 @@
 	}
 	if (currItem->isLine())
 	{
-		int ph = static_cast<int>(qMax(1.0, currItem->lineWidth() / 2.0));
+		//int ph = static_cast<int>(qMax(1.0, currItem->lineWidth() / 2.0));
 		if (!fromMP)
 		{
 			FPoint g(currItem->xPos(), currItem->yPos());

Modified: trunk/Scribus/scribus/ui/inspage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/ui/inspage.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/inspage.cpp	(original)
+++ trunk/Scribus/scribus/ui/inspage.cpp	Thu Jun  4 16:43:53 2020
@@ -296,9 +296,9 @@
 	m_unitRatio = m_doc->unitRatio();
 
 	// signals and slots connections
-	connect( insWhereData, SIGNAL( activated(int) ), this, SLOT( insWherePageDataDisable(int) ) );
-	connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
-	connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
+	connect(insWhereData, SIGNAL( activated(int) ), this, SLOT( insWherePageDataDisable(int) ) );
+	connect(okButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
+	connect(cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
 	connect(orientationQComboBox, SIGNAL(activated(int)), this, SLOT(setOrientation(int)));
 	connect(sizeQComboBox, SIGNAL(activated(const QString &)), this, SLOT(setSize(const QString &)));
 	connect(overrideMPSizingCheckBox, SIGNAL(stateChanged(int)), this, SLOT(enableSizingControls(int)));
@@ -348,10 +348,10 @@
 QStringList InsPage::getMasterPages() const
 {
 	QStringList ret;
-	for (int n = 0; n < masterPageCombos.count(); ++n)
-	{
-		int currentIndex = masterPageCombos.at(n)->currentIndex();
-		QVariant pageVar = masterPageCombos.at(n)->itemData(currentIndex);
+	for (int i = 0; i < masterPageCombos.count(); ++i)
+	{
+		int currentIndex = masterPageCombos.at(i)->currentIndex();
+		QVariant pageVar = masterPageCombos.at(i)->itemData(currentIndex);
 		ret.append(pageVar.toString());
 	}
 	return ret;

Modified: trunk/Scribus/scribus/ui/smtextstyles.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/ui/smtextstyles.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtextstyles.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtextstyles.cpp	Thu Jun  4 16:43:53 2020
@@ -319,11 +319,7 @@
 
 	m_selection[0]->setDefaultStyle(ids);
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 QString SMParagraphStyle::shortcut(const QString &stylename) const
@@ -355,11 +351,7 @@
 
 	m_selection[0]->setShortcut(shortcut);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::deleteStyles(const QList<RemoveItem> &removeList)
@@ -453,11 +445,7 @@
 	if (oldName != newName)
 		m_deleted.append(RemoveItem(oldName, newName));
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::languageChange()
@@ -696,11 +684,7 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->setLineSpacingMode(lsm);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotLineSpacing()
@@ -718,11 +702,7 @@
 			m_selection[i]->setLineSpacing(value);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotSpaceAbove()
@@ -740,11 +720,7 @@
 			m_selection[i]->setGapBefore(value);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotSpaceBelow()
@@ -762,11 +738,7 @@
 			m_selection[i]->setGapAfter(value);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotAlignment()
@@ -779,11 +751,7 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->setAlignment(style);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotDirection()
@@ -796,11 +764,7 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->setDirection(style);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotOpticalMargin(int i)
@@ -813,34 +777,21 @@
 //		for (int i = 0; i < m_selection.count(); ++i)
 //			m_selection[i]->setOpticalMargins(omt);
 //
-//	if (!m_selectionIsDirty)
-//	{
-//		m_selectionIsDirty = true;
-//		emit selectionDirty();
-//	}
+//	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotOpticalMarginSelector()
 {
 	int omt(ParagraphStyle::OM_None);
-	if (false)//(m_pwidget->optMarginCombo->useParentValue())
-	{
-	}
-	else
-	{
-// 		if (m_pwidget->optMarginRadioNone->isChecked()) omt = aragraphStyle::OM_None;
-		if (m_pwidget->optMarginRadioRight->isChecked()) omt = ParagraphStyle::OM_RightHangingPunct;
-		else if (m_pwidget->optMarginRadioLeft->isChecked()) omt = ParagraphStyle::OM_LeftHangingPunct;
-		else if (m_pwidget->optMarginRadioBoth->isChecked()) omt = ParagraphStyle::OM_Default;
-
-		for (int i = 0; i < m_selection.count(); ++i)
-			m_selection[i]->setOpticalMargins(omt);
-	}
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+
+	if (m_pwidget->optMarginRadioRight->isChecked()) omt = ParagraphStyle::OM_RightHangingPunct;
+	else if (m_pwidget->optMarginRadioLeft->isChecked()) omt = ParagraphStyle::OM_LeftHangingPunct;
+	else if (m_pwidget->optMarginRadioBoth->isChecked()) omt = ParagraphStyle::OM_Default;
+
+	for (int i = 0; i < m_selection.count(); ++i)
+		m_selection[i]->setOpticalMargins(omt);
+
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotParentOpticalMargin()
@@ -848,11 +799,7 @@
 	for (int i = 0; i < m_selection.count(); ++i)
 		m_selection[i]->resetOpticalMargins();
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotMinSpace()
@@ -867,11 +814,7 @@
 			m_selection[i]->setMinWordTracking(ms / 100.0);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotMinGlyphExt()
@@ -886,11 +829,7 @@
 			m_selection[i]->setMinGlyphExtension(mge / 100.0);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotMaxGlyphExt()
@@ -905,11 +844,7 @@
 			m_selection[i]->setMaxGlyphExtension(mge / 100.0);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotConsecutiveLines()
@@ -923,11 +858,8 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->setHyphenConsecutiveLines(cL);
 	}
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotDropCap(bool isOn)
@@ -942,11 +874,7 @@
 		}
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotParentParaEffects()
@@ -958,11 +886,7 @@
 		m_selection[i]->resetHasNum();
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotDropCapLines(int lines)
@@ -974,11 +898,7 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->setDropCapLines(lines);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotParEffectOffset()
@@ -997,11 +917,7 @@
 			m_selection[i]->setParEffectOffset(value);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotParEffectIndent(bool isOn)
@@ -1015,11 +931,7 @@
 			m_selection[i]->setParEffectIndent(isOn);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotParEffectCharStyle(int index)
@@ -1036,11 +948,7 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->setPeCharStyleName(name);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotBullet(bool isOn)
@@ -1056,11 +964,7 @@
 		}
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotBulletStr(const QString &str)
@@ -1074,11 +978,7 @@
 	for (int i = 0; i < m_selection.count(); ++i)
 		m_selection[i]->setBulletStr(bstr);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotNumeration(bool isOn)
@@ -1093,11 +993,7 @@
 		}
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotNumName(const QString &str)
@@ -1116,11 +1012,7 @@
 		m_doc->flag_NumUpdateRequest = true;
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotNumNew()
@@ -1133,20 +1025,15 @@
 		m_doc->flag_NumUpdateRequest = true;
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotSelectionDirty()
 {
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	if (m_selectionIsDirty)
+		return;
+	m_selectionIsDirty = true;
+	emit selectionDirty();
 }
 
 void SMParagraphStyle::slotNumFormat(int)
@@ -1161,11 +1048,7 @@
 			m_selection[i]->setNumFormat(numFormat);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotNumLevel(int level)
@@ -1181,11 +1064,8 @@
 	
 	if (level == 0)
 		slotNumHigher(false);
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotNumPrefix(const QString &str)
@@ -1193,11 +1073,7 @@
 	for (int i = 0; i < m_selection.count(); ++i)
 		m_selection[i]->setNumPrefix(str);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotNumSuffix(const QString &str)
@@ -1205,11 +1081,7 @@
 	for (int i = 0; i < m_selection.count(); ++i)
 		m_selection[i]->setNumSuffix(str);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotNumStart(int start)
@@ -1221,11 +1093,7 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->setNumStart(start);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotNumRestart(int restart)
@@ -1239,11 +1107,7 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->setNumRestart(restartRange);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotNumOther(bool isOn)
@@ -1257,11 +1121,7 @@
 			m_selection[i]->setNumOther(isOn);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotNumHigher(bool isOn)
@@ -1275,11 +1135,7 @@
 			m_selection[i]->setNumHigher(isOn);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 
@@ -1295,11 +1151,7 @@
 			m_selection[i]->setKeepLinesStart (value);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::handleKeepLinesEnd()
@@ -1314,11 +1166,7 @@
 			m_selection[i]->setKeepLinesEnd (value);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::handleKeepTogether()
@@ -1333,11 +1181,7 @@
 			m_selection[i]->setKeepTogether (value);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::handleKeepWithNext()
@@ -1352,11 +1196,7 @@
 			m_selection[i]->setKeepWithNext (value);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotTabRuler()
@@ -1373,11 +1213,7 @@
 			m_selection[i]->setTabValues(newTabs);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotLeftIndent()
@@ -1396,11 +1232,7 @@
 			m_selection[i]->setLeftMargin(value);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotRightIndent()
@@ -1419,11 +1251,7 @@
 			m_selection[i]->setRightMargin(value);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotFirstLine()
@@ -1442,11 +1270,7 @@
 			m_selection[i]->setFirstIndent(value);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotFontSize()
@@ -1466,11 +1290,7 @@
 	}
 
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotEffects(int e)
@@ -1530,12 +1350,7 @@
 		}
 	}
 
-
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotEffectProperties()
@@ -1572,11 +1387,7 @@
 		m_selection[i]->charStyle().setStrikethruWidth(qRound(slw));
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotFillColor()
@@ -1592,11 +1403,7 @@
 			m_selection[i]->charStyle().setFillColor(col);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotFillShade()
@@ -1611,11 +1418,7 @@
 			m_selection[i]->charStyle().setFillShade(fs);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotBackPColor()
@@ -1631,11 +1434,7 @@
 			m_selection[i]->setBackgroundColor(col);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotBackPShade()
@@ -1650,11 +1449,7 @@
 			m_selection[i]->setBackgroundShade(fs);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotBackColor()
@@ -1670,11 +1465,7 @@
 			m_selection[i]->charStyle().setBackColor(col);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotBackShade()
@@ -1689,11 +1480,7 @@
 			m_selection[i]->charStyle().setBackShade(fs);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotStrokeColor()
@@ -1709,11 +1496,7 @@
 			m_selection[i]->charStyle().setStrokeColor(col);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotStrokeShade()
@@ -1729,11 +1512,7 @@
 			m_selection[i]->charStyle().setStrokeShade(ss);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotLanguage()
@@ -1754,11 +1533,7 @@
 			m_selection[i]->charStyle().setLanguage(language);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotWordMin()
@@ -1774,11 +1549,7 @@
 			m_selection[i]->charStyle().setHyphenWordMin(wm);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotHyphenChar()
@@ -1794,11 +1565,7 @@
 			m_selection[i]->charStyle().setHyphenChar(ch);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotScaleH()
@@ -1816,11 +1583,7 @@
 			m_selection[i]->charStyle().setScaleH(qRound(value));
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotScaleV()
@@ -1838,11 +1601,7 @@
 			m_selection[i]->charStyle().setScaleV(qRound(value));
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotTracking()
@@ -1860,11 +1619,7 @@
 			m_selection[i]->charStyle().setTracking(qRound(value));
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotWordTracking()
@@ -1882,11 +1637,7 @@
 			m_selection[i]->charStyle().setWordTracking(value);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotBaselineOffset()
@@ -1904,11 +1655,7 @@
 			m_selection[i]->charStyle().setBaselineOffset(qRound(value));
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotFont(const QString& s)
@@ -1923,11 +1670,7 @@
 			m_selection[i]->charStyle().setFont(sf);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotParentChanged(const QString &parent)
@@ -1966,11 +1709,7 @@
 
 	selected(sel);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotCharParentChanged(const QString &parent)
@@ -1990,11 +1729,7 @@
 
 	selected(sel);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotFontFeatures()
@@ -2009,11 +1744,7 @@
 			m_selection[i]->charStyle().setFontFeatures(fontfeatures);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMParagraphStyle::slotCharStylesDeleted(const QList<RemoveItem> &removeList)
@@ -2315,11 +2046,7 @@
 
 	m_selection[0]->setDefaultStyle(ids);
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 QString SMCharacterStyle::shortcut(const QString &stylename) const
@@ -2349,11 +2076,7 @@
 
 	m_selection[0]->setShortcut(shortcut);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::deleteStyles(const QList<RemoveItem> &removeList)
@@ -2453,11 +2176,7 @@
 		emit charStylesDeleted(deletedStyles);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::languageChange()
@@ -2565,11 +2284,7 @@
 			m_selection[i]->setFontSize(qRound(value));
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotEffects(int e)
@@ -2629,12 +2344,7 @@
 		}
 	}
 
-
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotEffectProperties()
@@ -2671,11 +2381,7 @@
 		m_selection[i]->setStrikethruWidth(qRound(slw));
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotFillColor()
@@ -2691,11 +2397,7 @@
 			m_selection[i]->setFillColor(col);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotFillShade()
@@ -2710,11 +2412,7 @@
 			m_selection[i]->setFillShade(fs);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotBackColor()
@@ -2730,11 +2428,7 @@
 			m_selection[i]->setBackColor(col);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotBackShade()
@@ -2749,11 +2443,7 @@
 			m_selection[i]->setBackShade(fs);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotStrokeColor()
@@ -2769,11 +2459,7 @@
 			m_selection[i]->setStrokeColor(col);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotStrokeShade()
@@ -2788,11 +2474,7 @@
 			m_selection[i]->setStrokeShade(ss);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotLanguage()
@@ -2811,12 +2493,7 @@
 			m_selection[i]->setLanguage(language);
 	}
 
-
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotScaleH()
@@ -2835,12 +2512,7 @@
 			m_selection[i]->setScaleH(qRound(value));
 	}
 
-
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotScaleV()
@@ -2859,12 +2531,7 @@
 			m_selection[i]->setScaleV(qRound(value));
 	}
 
-
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotTracking()
@@ -2883,11 +2550,7 @@
 			m_selection[i]->setTracking(qRound(value));
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotWordTracking()
@@ -2906,11 +2569,7 @@
 			m_selection[i]->setWordTracking(value);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotBaselineOffset()
@@ -2929,11 +2588,7 @@
 			m_selection[i]->setBaselineOffset(qRound(value));
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotHyphenChar()
@@ -2949,11 +2604,7 @@
 			m_selection[i]->setHyphenChar(ch);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotSmallestWord()
@@ -2968,11 +2619,7 @@
 			m_selection[i]->setHyphenWordMin(sw);
 	}
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotFont(const QString& s)
@@ -2987,11 +2634,7 @@
 			m_selection[i]->setFont(sf);
 	}
 	
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotParentChanged(const QString &parent)
@@ -3029,11 +2672,7 @@
 
 	selected(sel);
 
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+	slotSelectionDirty();
 }
 
 void SMCharacterStyle::slotFontFeatures()
@@ -3048,11 +2687,16 @@
 		for (int i = 0; i < m_selection.count(); ++i)
 			m_selection[i]->setFontFeatures(fontfeatures);
 	}
-	if (!m_selectionIsDirty)
-	{
-		m_selectionIsDirty = true;
-		emit selectionDirty();
-	}
+
+	slotSelectionDirty();
+}
+
+void SMCharacterStyle::slotSelectionDirty()
+{
+	if (m_selectionIsDirty)
+		return;
+	m_selectionIsDirty = true;
+	emit selectionDirty();
 }
 
 SMCharacterStyle::~SMCharacterStyle()

Modified: trunk/Scribus/scribus/ui/smtextstyles.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23881&path=/trunk/Scribus/scribus/ui/smtextstyles.h
==============================================================================
--- trunk/Scribus/scribus/ui/smtextstyles.h	(original)
+++ trunk/Scribus/scribus/ui/smtextstyles.h	Thu Jun  4 16:43:53 2020
@@ -208,6 +208,7 @@
 	void slotFont(const QString& s);
 	void slotParentChanged(const QString &parent);
 	void slotFontFeatures();
+	void slotSelectionDirty();
 };
 
 #endif




More information about the scribus-commit mailing list