[Libreoffice-commits] .: sw/source

Lubos Lunak llunak at kemper.freedesktop.org
Thu Nov 25 08:52:11 PST 2010


 sw/source/filter/ww8/docxattributeoutput.cxx |    7 ++++++-
 sw/source/filter/ww8/ww8atr.cxx              |    4 +++-
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 1c4884546c72bca9b442fc1f66e23f887fbdc68d
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Thu Nov 25 17:51:28 2010 +0100

    fix incorrect double line spacing saving (bnc#654209)

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 424ba62..323b26b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3154,7 +3154,7 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes )
 
 }
 
-void DocxAttributeOutput::ParaLineSpacing_Impl( short nSpace, short /*nMulti*/ )
+void DocxAttributeOutput::ParaLineSpacing_Impl( short nSpace, short nMulti )
 {
     if ( !m_pSpacingAttrList )
         m_pSpacingAttrList = m_pSerializer->createAttrList();
@@ -3164,6 +3164,11 @@ void DocxAttributeOutput::ParaLineSpacing_Impl( short nSpace, short /*nMulti*/ )
         m_pSpacingAttrList->add( FSNS( XML_w, XML_lineRule ), "exact" );
         m_pSpacingAttrList->add( FSNS( XML_w, XML_line ), OString::valueOf( sal_Int32( -nSpace ) ) );
     }
+    else if( nMulti )
+    {
+        m_pSpacingAttrList->add( FSNS( XML_w, XML_lineRule ), "auto" );
+        m_pSpacingAttrList->add( FSNS( XML_w, XML_line ), OString::valueOf( sal_Int32( nSpace ) ) );
+    }
     else if ( nSpace > 0 )
     {
         m_pSpacingAttrList->add( FSNS( XML_w, XML_lineRule ), "atLeast" );
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 88d990c..5dffa8d 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4506,7 +4506,9 @@ void AttributeOutputBase::ParaLineSpacing( const SvxLineSpacingItem& rSpacing )
         }
         break;
     }
-
+    // if nSpace is negative, it is a fixed size in 1/20 of a point
+    // if nSpace is positive and nMulti is 1, it is 1/240 of a single line height
+    // otherwise, I have no clue what the heck it is
     ParaLineSpacing_Impl( nSpace, nMulti );
 }
 


More information about the Libreoffice-commits mailing list