writerfilter/source/rtftok/rtfdocumentimpl.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 44f7c5ddf9d730c899f480ca644ddc29c7de9dc6
Author: Miklos Vajna <vmik...@suse.cz>
Date:   Wed Feb 29 16:14:34 2012 +0100

    Related: fdo#46662 fix RTF import of leveltext destination
    
    After leveltext is imported, the levelnumbers group modifies the
    contents of the previous group, but this modification was lost when the
    stack was popped.

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 7342010..fbe257c 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2887,6 +2887,7 @@ int RTFDocumentImpl::popState()
     bool bListLevelEnd = false;
     bool bListOverrideEntryEnd = false;
     bool bLevelTextEnd = false;
+    bool bLevelNumbersEnd = false;
     RTFShape aShape;
     RTFPicture aPicture;
     bool bPopShapeProperties = false;
@@ -3027,6 +3028,8 @@ int RTFDocumentImpl::popState()
                 aBuf.append(aOrig.copy(i, 1));
         }
         pValue->setString(aBuf.makeStringAndClear());
+        aSprms = m_aStates.top().aTableSprms;
+        bLevelNumbersEnd = true;
     }
     else if (m_aStates.top().nDestinationState == DESTINATION_SHAPEPROPERTYNAME
             || m_aStates.top().nDestinationState == 
DESTINATION_SHAPEPROPERTYVALUE
@@ -3303,6 +3306,8 @@ int RTFDocumentImpl::popState()
         RTFValue::Pointer_t pValue(new RTFValue(aAttributes));
         
m_aStates.top().aTableSprms->push_back(make_pair(NS_ooxml::LN_CT_Lvl_lvlText, 
pValue));
     }
+    else if (bLevelNumbersEnd)
+        m_aStates.top().aTableSprms = aSprms;
     else if (bPopShapeProperties)
     {
         m_aStates.top().aShape = aShape;
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to