[Libreoffice-commits] .: Branch 'libreoffice-3-5' - writerfilter/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Feb 16 03:53:57 PST 2012


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

New commits:
commit e21cd8ac21062485bc36f63998d2b15674c71a89
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
    (cherry picked from commit c32b9cd2139249f0c680f664a0ceac3702dd0e73)
    
    Signed-off-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index df60ff7..7f1569e 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));


More information about the Libreoffice-commits mailing list