Bug 52546 - RTF Export erases braces characters
Summary: RTF Export erases braces characters
Status: RESOLVED FIXED
Alias: None
Product: kword
Classification: Miscellaneous
Component: filters (show other bugs)
Version: 1.5 or before
Platform: Mandrake RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Ariya Hidayat
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-03 11:28 UTC by Flavio Gargiulo
Modified: 2003-01-10 18:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Flavio Gargiulo 2003-01-03 11:28:03 UTC
Version:           1.2, 1.2.1 e previous ones (using KDE KDE 3.0.3)
Installed from:    Mandrake RPMs
Compiler:          gcc 3.2 

Whichever document type I save in RTF, every brace {} character (left and right, it's the same) is not exported and is erased or hidden from the document.
Maybe are there escape characters missing in the RTF export filter?
Comment 1 Nicolas Goutte 2003-01-04 00:46:47 UTC
It works the new RTF export filter of the developement version of KOffice. 
 
As for the "old" filter, I am going to look at it tomorrow. 
Comment 2 Nicolas Goutte 2003-01-04 17:31:32 UTC
Subject: Re:  RTF Export erases braces characters

Yes, the "old" filter has a problem. However for now, I do not understand why 
the escaping is not working.

Have a nice day/evening/night!

On Saturday 04 January 2003 00:46, Nicolas Goutte wrote:
(...)
> ------- Additional Comments From nicolasg@snafu.de  2003-01-04 00:46
> ------- It works the new RTF export filter of the developement version of
> KOffice.
>
> As for the "old" filter, I am going to look at it tomorrow.

Comment 3 Flavio Gargiulo 2003-01-04 23:42:34 UTC
Do you mean the last CVS code? 
Comment 4 Ariya Hidayat 2003-01-05 11:17:05 UTC
Subject: Re:  RTF Export erases braces characters

> ------- Additional Comments From flagar@libero.it  2003-01-04 23:42 -------
> Do you mean the last CVS code?

Yes, CVS version of KWord has a completely new RTF export filter,  a rewrite 
of the old one.

Comment 5 Nicolas Goutte 2003-01-05 15:45:57 UTC
Subject: Re:  RTF Export erases braces characters

I meant:
- the (new) filter in the developement version works correctly with braces.
- the (old) filter in KOffice 1.2.x does not work correctly with braces. 
(However, I have no idea why because in the KOffice 1.2 filter, the code to 
escape braces exists and is called.)

Have a nice day/evening/night!

On Saturday 04 January 2003 23:42, Flavio Gargiulo wrote:
> ------- 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=52546
>
>
>
>
> ------- Additional Comments From flagar@libero.it  2003-01-04 23:42 -------
> Do you mean the last CVS code?

Comment 6 Nicolas Goutte 2003-01-10 18:52:41 UTC
Subject: koffice/filters/kword/rtf/oldexport

CVS commit by goutte: 

Fix the export of the {, } and \ characters
(Problem: these characters are special for QRegExp too!)
CCMAIL: 52546-close@bugs.kde.org


  M +3 -3      rtfexport.cc   1.4


--- koffice/filters/kword/rtf/oldexport/rtfexport.cc  #1.3:1.4
@@ -811,7 +811,7 @@ QString escapeRTFsymbols(const QString& 
    QString text1(text);
 
-   text1 = text1.replace( QRegExp( "\\"), "\\\\");
-   text1 = text1.replace( QRegExp( "{"), "\\{");
-   text1 = text1.replace( QRegExp( "}"), "\\}");
+   text1.replace( QRegExp( "\\\\"), "\\\\");
+   text1.replace( QRegExp( "\\{"), "\\{");
+   text1.replace( QRegExp( "\\}"), "\\}");
    return text1;
 }  // end escapeRTFsymbols()