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

List:       koffice-devel
Subject:    Re: Regarding KWord RTF export filter
From:       David Faure <faure () kde ! org>
Date:       2006-05-17 13:33:25
Message-ID: 200605171533.26171.faure () kde ! org
[Download RAW message or body]

On Wednesday 17 May 2006 13:33, Aron Stansvik wrote:
> 1) The m_prefix (which contain the "\par") is at some point not
> correctly reset to QString::null before
> RTFWorker::ProcessParagraphData makes a recursive call to itself.

Right, due to the recursion it probably needs to be saved/reset before, and restored after.

This patch seems to fix the issue.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

["ExportFilter.cc.diff" (text/x-diff)]

Index: ExportFilter.cc
===================================================================
--- ExportFilter.cc	(revision 536499)
+++ ExportFilter.cc	(working copy)
@@ -374,7 +374,7 @@ QString RTFWorker::ProcessParagraphData 
         markup += "\\intbl";
 
 //lists
-if (layout.counter.style)
+    if (layout.counter.style)
         {
         markup += "{\\pntext\\pard\\plain";
         if( layout.formatData.text.fontSize >= 0)
@@ -725,8 +725,11 @@ if (layout.counter.style)
                         QString fstr;
                         QValueList<ParaData>::ConstIterator it;
 						QValueList<ParaData>::ConstIterator end(paraList->end());
+                        const QString prefixSaved = m_prefix;
+                        m_prefix = QString::null;
                         for (it=paraList->begin();it!=end;++it)
                             fstr += ProcessParagraphData( (*it).text, \
(*it).layout,(*it).formattingList); +                        m_prefix = prefixSaved;
                         content += "{\\super ";
                         content += automatic ? "\\chftn " : value;
                         content += "{\\footnote ";



_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


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

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