Bug 54694 - RTF filter cannot import tables
Summary: RTF filter cannot import tables
Status: CLOSED FIXED
Alias: None
Product: kword
Classification: Miscellaneous
Component: filters (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Ariya Hidayat
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-15 23:06 UTC by Nicolas Goutte
Modified: 2003-03-01 21:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
RTF file with table (3.88 KB, text/rtf)
2003-02-23 21:33 UTC, Nicolas Goutte
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Goutte 2003-02-15 23:06:36 UTC
Version:           KOffice CVS HEAD 2003-02-14 (using KDE KDE 3.1)
Installed from:    Compiled From Sources
Compiler:          gcc 3.2 -march=pentium2
OS:          Linux

KWord's RTF import filter cannot write a correct KWord file if a table exist in the RTF file.

The problem is that garbage character appears, either being non-UTF-8-compatible or escaping the following < by shifiting it somewhere else in the Unicode file. The result is that the file is not XML anymore and XML parsers complain (QT or xmllint.)

As far as I can see, the garbage never happens before or in the table but always after. Curiouls too, it appears always before < of a closing tag.

Have a nice day/evening/night!
Comment 1 Nicolas Goutte 2003-02-23 21:33:33 UTC
Created attachment 1033 [details]
RTF file with table

The table was created in AbiWord and exported as RTF.
Comment 2 Nicolas Goutte 2003-02-28 17:53:59 UTC
Subject: Re: Problem with RTF import

With \intbl, it gives the same problem.

However I have tried to use -march=i386 instead of -march=pentium2 and found 
out that it crashes without \intbl. (I suppose that it see what you 
are seeing.) With \intbl, it gives the same symptoms than I have described in 
the bug report.

It would be nice if someone having Valgrind at hand could check the problem.

Have a nice day/evening/night!

On Friday 28 February 2003 14:28, Tomasz Grobelny wrote:
> On sob 15. lutego 2003 23:08, Nicolas Goutte wrote:
> > That is now bug #54694: http://bugs.kde.org/show_bug.cgi?id=54694
>
> Could you please check if replacing "\cell" with "\intbl\cell"  makes the
> bigger files import? It does work (not correctly but doesn't crash) for the
> test doc you attached to the bug report.
>
> Tomek
> --------------r-e-k-l-a-m-a-----------------
>
>
> Tanie bilety lotnicze!
> http://samoloty.onet.pl
> _______________________________________________
> koffice-devel mailing list
> koffice-devel@mail.kde.org
> http://mail.kde.org/mailman/listinfo/koffice-devel

Comment 3 Nicolas Goutte 2003-03-01 21:27:49 UTC
Subject: koffice/filters/kword/rtf/import

CVS commit by goutte: 

Fix the problem with importing RTF files

Unlike what I thought, it has nothing to do with tables. The bug triggers
with any empty node. 

It might be a QT Bug. (QT Issue number pending.)

CCMAIL: 54694-done@bugs.kde.org


  M +1 -1      rtfimport_dom.cpp   1.4


--- koffice/filters/kword/rtf/import/rtfimport_dom.cpp  #1.3:1.4
@@ -48,5 +48,5 @@ void DomNode::clear( int level )
     array.truncate( 0 );
     setBuffer( array );
-    open( IO_WriteOnly | IO_Truncate );
+    open( IO_WriteOnly ); // do *not* use IO_Truncate (QT 3.1.x resize QBuffer to 1)
     documentLevel       = level;
     hasChildren         = true;