summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-04-21 12:53:22 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-04-21 14:38:03 +0200
commit99b875aee04a808fb28715fb0e143a2b00332832 (patch)
treebb646cef4a8847e1d04b965d76defc974ef26046 /writerfilter
parent29042d096a2c5812ae179e1553367afd21b0f71e (diff)
fdo#48876 fix RTF import of \sl without \slmult
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index e50cc1fea177..750e473d17c9 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2379,9 +2379,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;