[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - sw/source

Miklos Vajna vmiklos at suse.cz
Mon Feb 25 07:53:05 PST 2013


 sw/source/filter/ww8/rtfattributeoutput.cxx |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 6b13c3f7c4281150748601e9548bfac40a4b0d9a
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Thu Nov 29 17:12:54 2012 +0100

    sw: fix RTF export of text frames anchored to empty paragraphs
    
    Regression from d4069372484f18b242a42a1996767f57b031fff6
    
    Reported-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 049933c035157129cc0409bb100dfc5353847a63)
    
    Conflicts:
    	sw/qa/extras/rtfexport/rtfexport.cxx
    
    Change-Id: I28e095819e0c2f1a4b110741ace366329937f863
    Reviewed-on: https://gerrit.libreoffice.org/2391
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 6944bbb..0537275 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -389,7 +389,7 @@ void RtfAttributeOutput::EndParagraphProperties()
 
 void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData, bool bSingleEmptyRun )
 {
-    SAL_INFO("sw.rtf", OSL_THIS_FUNC);
+    SAL_INFO("sw.rtf", OSL_THIS_FUNC << ", bSingleEmptyRun: " << bSingleEmptyRun);
 
     m_bInRun = true;
     m_bSingleEmptyRun = bSingleEmptyRun;
@@ -427,7 +427,7 @@ void RtfAttributeOutput::EndRunProperties( const SwRedlineData* /*pRedlineData*/
 
 void RtfAttributeOutput::RunText( const String& rText, rtl_TextEncoding /*eCharSet*/ )
 {
-    SAL_INFO("sw.rtf", OSL_THIS_FUNC);
+    SAL_INFO("sw.rtf", OSL_THIS_FUNC << ", rText: " << rText);
     RawText( rText, 0, m_rExport.eCurrentEncoding );
 }
 
@@ -1519,6 +1519,11 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
                  * would be there, causing a problem later.
                  */
                 OString aSave = m_aRun.makeStringAndClear();
+                // Also back m_bInRun and m_bSingleEmptyRun up.
+                bool bInRunOrig = m_bInRun;
+                m_bInRun = false;
+                bool bSingleEmptyRunOrig = m_bSingleEmptyRun;
+                m_bSingleEmptyRun = false;
                 m_rExport.bRTFFlySyntax = true;
 
                 const SwFrmFmt& rFrmFmt = rFrame.GetFrmFmt( );
@@ -1534,6 +1539,8 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
                 m_rExport.bRTFFlySyntax = false;
                 m_aRun->append(aSave);
                 m_aRunText.clear();
+                m_bInRun = bInRunOrig;
+                m_bSingleEmptyRun = bSingleEmptyRunOrig;
             }
 
             m_rExport.mpParentFrame = NULL;


More information about the Libreoffice-commits mailing list