diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2010-10-20 18:31:51 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@frugalware.org> | 2010-10-20 18:34:11 +0200 |
commit | 94186a4cd1afe78a21c877d5dcdfc086528f3c74 (patch) | |
tree | 02b7e77a0ba28dcc10ca9a84ae2cb186e0df77d7 /sw | |
parent | ff871457b076334706556454f6a0aa935b6d28b4 (diff) |
RTF: fix order of entries in the revtbl
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/rtfexport.cxx | 18 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfexport.hxx | 1 |
2 files changed, 17 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 3c14de7389bd..4fdf35b486e4 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -283,8 +283,14 @@ void RtfExport::WriteRevTab() // Now write the table Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_REVTBL << ' '; - for(std::map<String,USHORT>::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter) - Strm() << '{' << OutString((*aIter).first, eDefaultEncoding) << ";}"; + for(USHORT i = 0; i < m_aRedlineTbl.size(); ++i) + { + const String* pAuthor = GetRedline(i); + Strm() << '{'; + if (pAuthor) + Strm() << OutString(*pAuthor, eDefaultEncoding); + Strm() << ";}"; + } Strm() << '}' << sNewLine; } @@ -1116,6 +1122,14 @@ USHORT RtfExport::GetRedline( const String& rAuthor ) } } +const String* RtfExport::GetRedline( USHORT nId ) +{ + for(std::map<String,USHORT>::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter) + if ((*aIter).second == nId) + return &(*aIter).first; + return NULL; +} + void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage ) { OSL_TRACE("%s start", OSL_THIS_FUNC); diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx index e87d0081a207..bf65371ce6ac 100644 --- a/sw/source/filter/ww8/rtfexport.hxx +++ b/sw/source/filter/ww8/rtfexport.hxx @@ -182,6 +182,7 @@ public: void InsColorLine( const SvxBoxItem& rBox ); void OutColorTable(); USHORT GetRedline( const String& rAuthor ); + const String* GetRedline( USHORT nId ); void InsStyle( USHORT nId, const rtl::OString& rStyle ); rtl::OString* GetStyle( USHORT nId ); |