diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2010-11-25 17:51:28 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2010-11-25 17:52:00 +0100 |
commit | d2286b157c2fe9c9d4199a87baed336647733cb5 (patch) | |
tree | 731d3fc4fa59f5b5ece9b4ace6ea9b2fd7d2b8c5 /sw/source | |
parent | 2b20a3ef7a0b2ff030945d679b897c2062d7e0ff (diff) |
fix incorrect double line spacing saving (bnc#654209)
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 7 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 424ba625e660..323b26b0f91e 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 88d990cd0eaa..5dffa8d42cac 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 ); } |