You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2012/06/27 13:07:50 UTC

svn commit: r1354421 - /incubator/ooo/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx

Author: orw
Date: Wed Jun 27 11:07:50 2012
New Revision: 1354421

URL: http://svn.apache.org/viewvc?rev=1354421&view=rev
Log:
#119803# - RTF export for User Fields: implementation for method <RtfAttributeOutput::WriteExpand(..)>

         Found by: ej197us at gmail dot com
         Patch by: yuanlin <yuanlin.ibm at gmail dot com>
         Review by: Oliver <orw at apache dot org>

Modified:
    incubator/ooo/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx?rev=1354421&r1=1354420&r2=1354421&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/rtfattributeoutput.cxx Wed Jun 27 11:07:50 2012
@@ -2933,9 +2933,20 @@ void RtfAttributeOutput::FormatFrameDire
     }
 }
 
-void RtfAttributeOutput::WriteExpand( const SwField* /*pFld*/ )
+void RtfAttributeOutput::WriteExpand( const SwField* pFld )
 {
-    OSL_TRACE("TODO: %s", OSL_THIS_FUNC);
+    String sStr;        // fuer optionale Parameter
+    switch (pFld->GetTyp()->Which())
+    {
+        //#119803# Export user field and DB field for RTF filter
+        case RES_DBFLD:
+            sStr = FieldString(ww::eMERGEFIELD);
+            // kein break !!
+        case RES_USERFLD:
+            sStr += pFld->GetTyp()->GetName();
+            m_rExport.OutputField(pFld, ww::eNONE, sStr);
+            break;
+    }
 }
 
 void RtfAttributeOutput::RefField( const SwField& /*rFld*/, const String& /*rRef*/ )