diff options
author | Oliver-Rainer Wittmann <orw@apache.org> | 2012-06-27 10:07:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-15 12:05:40 +0100 |
commit | a0aef8dc44a9ff5899dc920c31a39caeb92043c4 (patch) | |
tree | 944365136f7cf89cad75c4e46ef914ad566e63cb | |
parent | ce4ada6e7f4088de9ac2ed22dc2d2312918d3701 (diff) |
Resolves: #i119803# 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>
(cherry picked from commit 4536f0b98bc01850bf016dc1f60f0156cb7eb99e)
Conflicts:
sw/source/filter/ww8/rtfattributeoutput.cxx
Change-Id: I1cde654dadd26e214a1c097fe2e0aeaa376195c2
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index c4bcba154fc3..d726cb57f3ba 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -3119,8 +3119,21 @@ void RtfAttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir void RtfAttributeOutput::WriteExpand( const SwField* pFld ) { SAL_INFO("sw.rtf", OSL_THIS_FUNC); - String sCmd; - m_rExport.OutputField(pFld, ww::eUNKNOWN, sCmd); + String sCmd; // for optional Parameters + switch (pFld->GetTyp()->Which()) + { + //#i119803# Export user field and DB field for RTF filter + case RES_DBFLD: + sCmd = FieldString(ww::eMERGEFIELD); + // no break !! + case RES_USERFLD: + sCmd += pFld->GetTyp()->GetName(); + m_rExport.OutputField(pFld, ww::eNONE, sCmd); + break; + default: + m_rExport.OutputField(pFld, ww::eUNKNOWN, sCmd); + break; + } } void RtfAttributeOutput::RefField( const SwField& /*rFld*/, const String& /*rRef*/ ) |