r21148 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Fri Apr 1 17:46:34 UTC 2016


Author: jghali
Date: Fri Apr  1 17:46:34 2016
New Revision: 21148

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21148
Log:
#13895: Bulleted list paragraph effects' first line text offset is not the same as the other lines

Modified:
    trunk/Scribus/scribus/pageitem_textframe.cpp

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21148&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp	(original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp	Fri Apr  1 17:46:34 2016
@@ -1382,6 +1382,13 @@
 		if (itemText.hasObject(a))
 			gl.xadvance = itemText.object(a)->width() + itemText.object(a)->lineWidth();
 
+		if (a == 0 || itemText.text(a - 1) == SpecialChars::PARSEP)
+		{
+			ParagraphStyle style = itemText.paragraphStyle(a);
+			if (style.hasBullet() || style.hasNum())
+				gl.xadvance += style.parEffectOffset();
+		}
+
 		run.glyphs().append(gl);
 
 		glyphRuns.append(run);
@@ -1709,7 +1716,7 @@
 					continue;
 				}
 				else
-					itemText.clearFlag(a, ScLayout_SuppressSpace);
+					glyphRuns[i].clearFlag(ScLayout_SuppressSpace);
 			}
 			else // from 134 on use NBSPACE for this effect
 			{
@@ -1720,7 +1727,7 @@
 					continue;
 				}
 				else
-					itemText.clearFlag(a, ScLayout_SuppressSpace);
+					glyphRuns[i].clearFlag(ScLayout_SuppressSpace);
 			}
 			if (current.isEmpty)
 			{
@@ -2636,7 +2643,6 @@
 			if ((DropCmode || BulNumMode) && !outs)
 			{
 				current.xPos += style.parEffectOffset();
-				lastGlyph.xadvance += style.parEffectOffset();
 				if (DropCmode)
 				{
 					DropCmode = false;




More information about the scribus-commit mailing list