summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/rtfattributeoutput.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2011-12-18 02:33:54 +0100
committerMiklos Vajna <vmiklos@frugalware.org>2011-12-18 02:34:41 +0100
commit6ab183533ef543ea96e15fcc5155321298c758a8 (patch)
treed0dacdac5fc15013db0524270d7ba2ec313d138b /sw/source/filter/ww8/rtfattributeoutput.cxx
parent122940aba7392bfba17b04a4c166b28ebbc3bd1f (diff)
fdo#37498 RTF export: handle url fields without a field result
Diffstat (limited to 'sw/source/filter/ww8/rtfattributeoutput.cxx')
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 2cd6033b60d7..17b2de326cbf 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -460,6 +460,7 @@ bool RtfAttributeOutput::StartURL( const String& rUrl, const String& rTarget )
}
m_aStyles.append("}");
+ m_bHadFieldResult = false;
return true;
}
@@ -468,7 +469,8 @@ bool RtfAttributeOutput::EndURL()
OSL_TRACE("%s", OSL_THIS_FUNC);
// close the fldrslt group
- m_aRunText.append('}');
+ if (m_bHadFieldResult)
+ m_aRunText.append('}');
// close the field group
m_aRunText.append('}');
return true;
@@ -2249,6 +2251,7 @@ void RtfAttributeOutput::TextINetFormat( const SwFmtINetFmt& rURL )
const SwTxtINetFmt* pTxtAtr = rURL.GetTxtINetFmt();
m_aStyles.append("{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " ");
+ m_bHadFieldResult = true;
if( pTxtAtr && 0 != ( pFmt = pTxtAtr->GetCharFmt() ))
{
sal_uInt16 nStyle = m_rExport.GetId( *pFmt );
@@ -2989,7 +2992,8 @@ RtfAttributeOutput::RtfAttributeOutput( RtfExport &rExport )
m_bBufferSectionBreaks( false ),
m_bBufferSectionHeaders( false ),
m_bLastTable( true ),
- m_bWroteCellInfo( false )
+ m_bWroteCellInfo( false ),
+ m_bHadFieldResult( false )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
}