[Libreoffice-commits] .: sw/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Thu May 10 02:53:17 PDT 2012


 sw/source/filter/ww8/rtfattributeoutput.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1173bb0dc01ef504ea453a272b77b0b4d92a662f
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Thu May 10 11:50:39 2012 +0200

    fdo#49692 fix RTF export of empty paragraph numbering rules
    
    When there is a numbering rule, the fallback text is constructed so that
    whitespace separates the numbering and the paragraph text. When the
    numbering is empty, we don't need that separator.
    
    Change-Id: I17a11ddd73addc8c95a0c2b54402e6dd2705d094

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 0012294..3629384 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2513,10 +2513,9 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
             else
                 sTxt = pTxtNd->GetNumString();
 
-            m_aStyles.append(' ');
-
             if (sTxt.Len())
             {
+                m_aStyles.append(' ');
                 m_aStyles.append(m_rExport.OutString(sTxt, m_rExport.eDefaultEncoding));
             }
 
@@ -2524,7 +2523,8 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
             {
                 if( OUTLINE_RULE != pRule->GetRuleType() )
                 {
-                    m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TAB);
+                    if (sTxt.Len())
+                        m_aStyles.append(OOO_STRING_SVTOOLS_RTF_TAB);
                     m_aStyles.append('}');
                     m_aStyles.append(OOO_STRING_SVTOOLS_RTF_ILVL);
                     if( nLvl > 8 )            // RTF knows only 9 levels


More information about the Libreoffice-commits mailing list