diff options
author | Brennan Vincent <brennanv@email.arizona.edu> | 2012-04-02 07:42:07 -0700 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-04-03 09:17:48 +0200 |
commit | 290654cc232d5d035f1c7278267ce32ffc39043e (patch) | |
tree | b426cb077e126e523286e341d231bf1b9bf44ef8 | |
parent | 844b4520a9f0879d7b756654cef8fdbaa03a9000 (diff) |
Fix RTF levelfollow import and export
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 5 | ||||
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/NumberingManager.hxx | 2 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyIds.cxx | 1 | ||||
-rw-r--r-- | writerfilter/source/dmapper/PropertyIds.hxx | 1 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 4 |
6 files changed, 13 insertions, 6 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 1eb080341981..09705d907625 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 85ef2f2661e9..27572f5323a4 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 e2953fb67dad..e46ee1c98b47 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 12958b488eeb..4c176cb0760b 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 e44066079424..686cf7eef48f 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 038ead9792d7..f75d8ebcd2e3 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; |