[Libreoffice-commits] .: sw/source writerfilter/source

Miklos Vajna vmiklos at kemper.freedesktop.org
Tue Apr 3 00:17:21 PDT 2012


 sw/source/filter/ww8/rtfattributeoutput.cxx      |    5 +++--
 writerfilter/source/dmapper/NumberingManager.cxx |    6 ++++--
 writerfilter/source/dmapper/NumberingManager.hxx |    2 +-
 writerfilter/source/dmapper/PropertyIds.cxx      |    1 +
 writerfilter/source/dmapper/PropertyIds.hxx      |    1 +
 writerfilter/source/rtftok/rtfdocumentimpl.cxx   |    4 +++-
 6 files changed, 13 insertions(+), 6 deletions(-)

New commits:
commit 290654cc232d5d035f1c7278267ce32ffc39043e
Author: Brennan Vincent <brennanv at email.arizona.edu>
Date:   Mon Apr 2 07:42:07 2012 -0700

    Fix RTF levelfollow import and export

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 1eb0803..09705d9 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1319,7 +1319,7 @@ void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
         sal_uInt16 nNumberingType,
         SvxAdjust eAdjust,
         const sal_uInt8 * pNumLvlPos,
-        sal_uInt8 /*nFollow*/,
+        sal_uInt8 nFollow,
         const wwFont * pFont,
         const SfxItemSet * pOutSet,
         sal_Int16 nIndentAt,
@@ -1364,7 +1364,8 @@ void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
     m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LEVELSTARTAT;
     m_rExport.OutULong( nStart );
 
-    m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LEVELFOLLOW << "0";
+    m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_LEVELFOLLOW;
+    m_rExport.OutULong( nFollow );
 
     // leveltext group
     m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LEVELTEXT << ' ';
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 85ef2f2..27572f5 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -282,7 +282,9 @@ uno::Sequence< beans::PropertyValue > ListLevel::GetLevelProperties( )
 
 //    TODO: sRGBXchNums;     array of inherited numbers
 
-//    TODO: nXChFollow; following character 0 - tab, 1 - space, 2 - nothing
+//  nXChFollow; following character 0 - tab, 1 - space, 2 - nothing
+    aNumberingProperties.push_back( MAKE_PROPVAL( PROP_LEVEL_FOLLOW, m_nXChFollow ));
+
 
     _PropertyMap::const_iterator aMapIter = begin();
     _PropertyMap::const_iterator aEndIter = end();
@@ -816,7 +818,7 @@ void ListsManager::lcl_sprm( Sprm& rSprm )
                 writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
                 if(pProperties.get())
                     pProperties->resolve(*this);
-                }
+            }
             break;
             case NS_rtf::LN_RGBXCHNUMS: break;
             case NS_rtf::LN_ISTARTAT:
diff --git a/writerfilter/source/dmapper/NumberingManager.hxx b/writerfilter/source/dmapper/NumberingManager.hxx
index e2953fb..e46ee1c 100644
--- a/writerfilter/source/dmapper/NumberingManager.hxx
+++ b/writerfilter/source/dmapper/NumberingManager.hxx
@@ -30,7 +30,7 @@ class ListLevel : public PropertyMap
     sal_Int32                                     m_nFPrevSpace;     //LN_FPREVSPACE
     sal_Int32                                     m_nFWord6;         //LN_FWORD6
     ::rtl::OUString                               m_sRGBXchNums;     //LN_RGBXCHNUMS
-    sal_Int32                                     m_nXChFollow;      //LN_IXCHFOLLOW
+    sal_Int16                                     m_nXChFollow;      //LN_IXCHFOLLOW
     ::rtl::OUString                               m_sBulletChar;
     sal_Int32                                     m_nTabstop;
     boost::shared_ptr< StyleSheetEntry >          m_pParaStyle;
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index 12958b4..4c176cb 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -244,6 +244,7 @@ const rtl::OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const
             case PROP_DISTANCE               :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Distance")); break;
             case PROP_NUMBER_POSITION        :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NumberPosition")); break;
             case PROP_LEVEL                  :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Level")); break;
+            case PROP_LEVEL_FOLLOW           :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LabelFollowedBy")); break;
             case PROP_LEVEL_PARAGRAPH_STYLES :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LevelParagraphStyles")); break;
             case PROP_LEVEL_FORMAT           :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LevelFormat")); break;
             case PROP_TOKEN_TYPE             :    sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TokenType")); break;
diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx
index e440660..686cf7e 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -192,6 +192,7 @@ enum PropertyIds
         ,PROP_LEFT_BORDER_DISTANCE
         ,PROP_LEFT_MARGIN
         ,PROP_LEVEL
+        ,PROP_LEVEL_FOLLOW
         ,PROP_LEVEL_FORMAT
         ,PROP_LEVEL_PARAGRAPH_STYLES
         ,PROP_LISTTAB_STOP_POSITION
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 038ead9..f75d8eb 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2389,8 +2389,10 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
             }
             break;
         case RTF_LEVELFOLLOW:
+            m_aStates.top().aTableAttributes->push_back(make_pair(NS_rtf::LN_IXCHFOLLOW, pIntValue));
+            break;
         case RTF_LISTOVERRIDECOUNT:
-            // Ignore these for now, the exporter always emits them with a zero parameter.
+            // Ignore this for now, the exporter always emits it with a zero parameter.
             break;
         case RTF_PICSCALEX:
             m_aStates.top().aPicture.nScaleX = nParam;


More information about the Libreoffice-commits mailing list