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

Miklos Vajna vmiklos at kemper.freedesktop.org
Wed Oct 20 12:04:35 PDT 2010


 sw/source/filter/ww8/rtfexport.cxx |   19 +++++++++++++++++--
 sw/source/filter/ww8/rtfexport.hxx |    1 +
 2 files changed, 18 insertions(+), 2 deletions(-)

New commits:
commit c948afc129ac3dd80f0e0eb9b635bc32dbdaee9f
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Wed Oct 20 18:31:51 2010 +0200

    RTF: fix order of entries in the revtbl

diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 7b5962e..79606d9 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 e87d008..bf65371 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 );
commit 5bdae7c4e9960e7e6bbf2d502b8bb87592230964
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Wed Oct 20 03:42:43 2010 +0200

     #i66619# fix title pages

diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index b1aed21..7b5962e 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -1155,6 +1155,7 @@ void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset,
     if( pAktPageDesc != &rPgDsc )
     {
         pAktPageDesc = &rPgDsc;
+        Strm() << OOO_STRING_SVTOOLS_RTF_TITLEPG;
         if( pAktPageDesc->GetMaster().GetAttrSet().GetItemState( RES_HEADER,
                     FALSE, &pItem ) == SFX_ITEM_SET )
             WriteHeaderFooter(*pItem, true);


More information about the Libreoffice-commits mailing list