Bug 48362

Summary: It fails the filter for WordPerfect
Product: kword Reporter: Antonio C. <ac_z01>
Component: filtersAssignee: Ariya Hidayat <ariya>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.5 or before   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: chistes.kwd
CHISTES.WPD

Description Antonio C. 2002-09-27 13:42:29 UTC
Version:           1.2 (using KDE 3.0.3)
Installed from:    SuSE
Compiler:          gcc version 2.95.3 20010315 (SuSE)
OS:          Linux (i686) release 2.4.18-4GB

It fails the filter for WordPerfect letters with accent of spanish text and other Spanish characters 

original text      import text
-------------     ------------
    m
Comment 1 Ariya Hidayat 2002-11-25 06:37:59 UTC
Thanks for your bug report. 
If possible, could you perhaps attach the Spanish WordPerfect document which 
shows the problem ? Alternatively, you can directly mail to me: ariya@kde.org 
Comment 2 Antonio C. 2002-11-25 23:19:06 UTC
Subject: Re:  It fails the filter for WordPerfect

El Lunes 25 Noviembre 2002 06:38, escribi
Comment 3 Ariya Hidayat 2003-06-01 14:32:38 UTC
Subject: koffice/filters/kword/wordperfect/import

CVS commit by ariya: 

flush text before appending token
solve problems with WP international characters

CCMAIL: 48362-done@bugs.kde.org


  M +7 -0      parser.cpp   1.6


--- koffice/filters/kword/wordperfect/import/parser.cpp  #1.5:1.6
@@ -599,4 +599,11 @@ Parser::parseDocWP6 (const QString & fil
       else if ((code >= 1) && (code <= 32))
         {
+          // flush previous text first
+          if (!text.isEmpty ())
+            {
+              tokens.append (new Token (text));
+              text = "";
+            }
+
           int xlate[] = {
             35, 34, 7, 36, 31, 30, 27, 33, 29, 77, 76, 39, 38, 45, 41, 40,