summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2012-02-09 11:18:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-02-16 11:53:41 +0000
commite21cd8ac21062485bc36f63998d2b15674c71a89 (patch)
treec458f39d3a4cdf1188fc9a2e84036d5b21f6cc47
parente49275751bde6410dcd9f0c543c03f57b068e1cd (diff)
fdo#45553 fix RTF import of space-before/after tokens
(cherry picked from commit c32b9cd2139249f0c680f664a0ceac3702dd0e73) Signed-off-by: Caolán McNamara <caolanm@redhat.com>
-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 df60ff790f17..7f1569e0baf6 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2039,8 +2039,6 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
{
case RTF_SBASEDON: nSprm = NS_rtf::LN_ISTDBASE; break;
case RTF_SNEXT: nSprm = NS_rtf::LN_ISTDNEXT; break;
- case RTF_SB: nSprm = NS_ooxml::LN_CT_Spacing_before; break;
- case RTF_SA: nSprm = NS_ooxml::LN_CT_Spacing_after; break;
default: break;
}
if (nSprm > 0)
@@ -2604,6 +2602,14 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case RTF_WMETAFILE:
m_aStates.top().aPicture.eWMetafile = nParam;
break;
+ case RTF_SB:
+ lcl_putNestedAttribute(m_aStates.top().aParagraphSprms,
+ NS_ooxml::LN_CT_PPrBase_spacing, NS_ooxml::LN_CT_Spacing_before, pIntValue);
+ break;
+ case RTF_SA:
+ lcl_putNestedAttribute(m_aStates.top().aParagraphSprms,
+ NS_ooxml::LN_CT_PPrBase_spacing, NS_ooxml::LN_CT_Spacing_after, pIntValue);
+ break;
default:
#if OSL_DEBUG_LEVEL > 1
OSL_TRACE("%s: TODO handle value '%s'", OSL_THIS_FUNC, lcl_RtfToString(nKeyword));