[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 74601] kword doesn't recognize PRE-tags in HTML
From:       tstaerk <dev () staerk ! de>
Date:       2007-04-30 21:39:36
Message-ID: 20070430213936.6636.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=74601         
dev staerk de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From dev staerk de  2007-04-30 23:39 -------
SVN commit 659834 by tstaerk:

enable pre-tags for html import
BUGS:74601


 M  +12 -5     kwdwriter.cpp  
 A             test/pretext.htm  


--- branches/koffice/1.6/koffice/filters/kword/html/import/kwdwriter.cpp \
#659833:659834  @ -428,12 +428,16  @
 	if (temp.isNull()) { kdDebug(30503) << "no text" << endl; return; }
 	QString oldtext=currentText.data();
 	int oldLength=oldtext.length();
-	if (keep_formatting) {
-		if (oldLength) {
+	if (keep_formatting) 
+        {
+		if (oldLength)  
+                {
 			++oldLength;
 			oldtext.append('\n');
 		}
-	} else {
+	}  
+        else 
+        {
 		if (oldLength)
 			++oldLength; // add new trailing space char
 		text=text.simplifyWhiteSpace(); // drop all unprintable chars
 @ -441,9 +445,12  @
 	QString newtext;
 	if (keep_formatting)
 		newtext=oldtext + text;
-	else {
+	else  
+        {
 		newtext=oldtext + " " + text;
-		newtext=newtext.simplifyWhiteSpace(); // strip possible new space at beginning.
+		// strip possible newline at beginning.
+                while (newtext.left(1)=="\n" || newtext.left(1)==" ") \
newtext=newtext.right(newtext.length()-1); +
 	}
 	currentText.setData(newtext);
 	int newLength=text.length();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic