View Issue Details

IDProjectCategoryView StatusLast Update
0007766ScribusScripterpublic2009-02-01 21:30
Reporterale Assigned Toale  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.5svn 
Fixed in Version1.3.5svn 
Summary0007766: scribus.textOverflows() returns 0 despite text overflows
Descriptionif there is no place for an overflow mark (a 10px high text frame with normal font size) scribus.textOverflows() returns 0 even if the text does not fit in the frame (indeed, no text is shown)
Additional Information* in plugins/scriptplugin/cmdtext.cpp::scribus_istextoverflowing() there is a outcommented code which imho should be removed
* this was big was probably introduced when fixing 0006991 :-)
TagsNo tags attached.
Patch

Activities

ale

2009-01-31 11:33

manager   ~0021051

fix is attached to this bug report

jghali

2009-01-31 11:50

administrator   ~0021052

The check "Backbox == NULL" check looks wrong to me. The back box has nothing to do with text overflowing or not in a particular box.

ale

2009-01-31 13:35

manager   ~0021054

well... now that i think about it, you may be right...
i've put that condition, in order to not undo 0006991...

i guess, scribus still suffers from the reported bug for a linked frame which is too small to contain any char...
i see if i can get a better fix, then!

till later
a.l.e

2009-01-31 13:53

 

pageitem.diff (798 bytes)   
--- pageitem.cpp~	2009-01-31 12:29:03.000000000 +0100
+++ pageitem.cpp	2009-01-31 14:51:29.000000000 +0100
@@ -701,15 +701,15 @@
 }
 
 
-/// returns true if text overflows
+/// returns true if text overflows:
 bool PageItem::frameOverflows() const
 {
 #ifndef NLS_PROTO
 	// Fix #6991 : "Text overflow" warning when there is a text underflow in fact
-	/*return NextBox == NULL && itemText.length() > static_cast<int>(MaxChars);*/
+	// Fix #7766 : scribus.textOverflows() returns 0 if there is no place for the overflow mark
 	return ( NextBox == NULL )
 	       && ( static_cast<int> ( firstChar ) < itemText.length() )
-	       && ( firstChar < MaxChars )
+	       && ( firstChar <= MaxChars )
 	       && ( itemText.length() > static_cast<int> ( MaxChars ) );
 #else
 	return false; // FIXME:NLS
pageitem.diff (798 bytes)   

ale

2009-01-31 13:53

manager   ~0021055

let's try with a 1 char fix :-)

... seems to work here!

(diff replaced with a new one)

jghali

2009-02-01 12:57

administrator   ~0021059

Fix committed, changing subject as the overflow mark has nothing to do here.

Issue History

Date Modified Username Field Change
2009-01-31 11:01 ale New Issue
2009-01-31 11:02 ale Status new => assigned
2009-01-31 11:02 ale Assigned To => ale
2009-01-31 11:33 ale File Added: pageitem.diff
2009-01-31 11:33 ale Note Added: 0021051
2009-01-31 11:50 jghali Note Added: 0021052
2009-01-31 13:35 ale Note Added: 0021054
2009-01-31 13:52 ale File Deleted: pageitem.diff
2009-01-31 13:53 ale File Added: pageitem.diff
2009-01-31 13:53 ale Note Added: 0021055
2009-02-01 12:57 jghali Note Added: 0021059
2009-02-01 12:57 jghali Summary scribus.textOverflows() returns 0 if there is no place for the overflow mark => scribus.textOverflows() returns 0 despite text overflows
2009-02-01 12:57 jghali Status assigned => resolved
2009-02-01 12:57 jghali Fixed in Version => 1.3.5svn
2009-02-01 12:57 jghali Resolution open => fixed
2009-02-01 21:30 cbradney Status resolved => closed