[Libreoffice-commits] .: writerfilter/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Thu Feb 9 02:26:00 PST 2012


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

New commits:
commit c32b9cd2139249f0c680f664a0ceac3702dd0e73
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Thu Feb 9 11:18:34 2012 +0100

    fdo#45553 fix RTF import of space-before/after tokens

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 4f6cde5..f83f5f7 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2035,8 +2035,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)
@@ -2600,6 +2598,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:
             SAL_INFO("writerfilter", OSL_THIS_FUNC << ": TODO handle value '" << lcl_RtfToString(nKeyword) << "'");
             aSkip.setParsed(false);


More information about the Libreoffice-commits mailing list