writerfilter/source/rtftok/rtfdocumentimpl.cxx |   14 ++++++++------
 writerfilter/source/rtftok/rtftokenizer.cxx    |    4 ++--
 2 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit 375de2b8bcd591d013c3411ead2e24dc23a8115e
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Wed Jan 11 00:15:51 2012 -0500

    fdo#41034 improve RTF import of table cell spacings
    
    1) for empty cells, not only paragraph properties, but but character 
properties should be emitted as well (e.g. font)
    2) \sb and \sb is an attribute, not an sprm (it was ignored)
    3) \sl was ~ignored due to a typo
    (cherry picked from commit 9f15592e08f17908b1e54fed200d0ec6aff29509)

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 3dd41c0..82b2a31 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1351,9 +1351,11 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
             {
                 if (m_bNeedPap)
                 {
-                    // There were no runs in the cell, so we need to send 
paragraph properties here.
-                    RTFValue::Pointer_t pValue(new 
RTFValue(m_aStates.top().aParagraphAttributes, 
m_aStates.top().aParagraphSprms));
-                    m_aTableBuffer.push_back(make_pair(BUFFER_PROPS, pValue));
+                    // There were no runs in the cell, so we need to send 
paragraph and character properties here.
+                    RTFValue::Pointer_t pPValue(new 
RTFValue(m_aStates.top().aParagraphAttributes, 
m_aStates.top().aParagraphSprms));
+                    m_aTableBuffer.push_back(make_pair(BUFFER_PROPS, pPValue));
+                    RTFValue::Pointer_t pCValue(new 
RTFValue(m_aStates.top().aCharacterAttributes, 
m_aStates.top().aCharacterSprms));
+                    m_aTableBuffer.push_back(make_pair(BUFFER_PROPS, pCValue));
                 }
 
                 RTFValue::Pointer_t pValue;
@@ -1955,8 +1957,6 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, 
int nParam)
         case RTF_LIN: nSprm = 0x845e; break;
         case RTF_RI: nSprm = NS_sprm::LN_PDxaRight; break;
         case RTF_RIN: nSprm = 0x845d; break;
-        case RTF_SB: nSprm = NS_sprm::LN_PDyaBefore; break;
-        case RTF_SA: nSprm = NS_sprm::LN_PDyaAfter; break;
         case RTF_ITAP: nSprm = NS_sprm::LN_PTableDepth; break;
         default: break;
     }
@@ -1974,6 +1974,8 @@ 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)
@@ -2163,7 +2165,7 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, 
int nParam)
             if (nParam > 0)
             {
                 // NS_sprm::LN_PDyaLine could be used, but that won't work 
with slmult
-                
m_aStates.top().aParagraphAttributes->push_back(make_pair(nSprm, pIntValue));
+                
m_aStates.top().aParagraphAttributes->push_back(make_pair(NS_ooxml::LN_CT_Spacing_line,
 pIntValue));
             }
             break;
         case RTF_SLMULT:
diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx 
b/writerfilter/source/rtftok/rtftokenizer.cxx
index 0a989d8..897e316 100644
--- a/writerfilter/source/rtftok/rtftokenizer.cxx
+++ b/writerfilter/source/rtftok/rtftokenizer.cxx
@@ -65,8 +65,8 @@ int RTFTokenizer::resolveParse()
     int ret;
     // for hex chars
     int b = 0, count = 2;
-    sal_uInt32 nPercentSize;
-    sal_uInt32 nLastPos;
+    sal_uInt32 nPercentSize = 0;
+    sal_uInt32 nLastPos = 0;
 
     if (m_xStatusIndicator.is())
     {
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to