writerfilter/source/rtftok/rtfdocumentimpl.cxx |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit beef79827164be4e5a60310515fa6aaf8d76237c
Author: Miklos Vajna <[email protected]>
Date:   Sat Apr 21 12:53:22 2012 +0200

    fdo#48876 fix RTF import of \sl without \slmult
    
    (backport of 99b875aee04a808fb28715fb0e143a2b00332832)

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index ff81727..fd57905 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2404,9 +2404,15 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, 
int nParam)
             }
             break;
         case RTF_SL:
-            if (nParam > 0)
             {
-                // NS_sprm::LN_PDyaLine could be used, but that won't work 
with slmult
+                // This is similar to RTF_ABSH, negative value means 'exact', 
positive means 'at least'.
+                RTFValue::Pointer_t pValue(new 
RTFValue(NS_ooxml::LN_Value_wordprocessingml_ST_LineSpacingRule_atLeast));
+                if (nParam < 0)
+                {
+                    pValue.reset(new 
RTFValue(NS_ooxml::LN_Value_wordprocessingml_ST_LineSpacingRule_exact));
+                    pIntValue.reset(new RTFValue(-nParam));
+                }
+                
m_aStates.top().aParagraphAttributes->push_back(make_pair(NS_ooxml::LN_CT_Spacing_lineRule,
 pValue));
                 
m_aStates.top().aParagraphAttributes->push_back(make_pair(NS_ooxml::LN_CT_Spacing_line,
 pIntValue));
             }
             break;
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to