summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2010-10-20 18:31:51 +0200
committerMiklos Vajna <vmiklos@frugalware.org>2010-10-20 18:34:11 +0200
commitc948afc129ac3dd80f0e0eb9b635bc32dbdaee9f (patch)
treed615ac26c94a45ae0530674d7461078badd9efc4 /sw
parent5bdae7c4e9960e7e6bbf2d502b8bb87592230964 (diff)
RTF: fix order of entries in the revtbl
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx18
-rw-r--r--sw/source/filter/ww8/rtfexport.hxx1
2 files changed, 17 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 7b5962e5d4..79606d961d 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 e87d0081a2..bf65371ce6 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 );