diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2011-12-18 02:33:54 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@frugalware.org> | 2011-12-18 02:34:41 +0100 |
commit | 6ab183533ef543ea96e15fcc5155321298c758a8 (patch) | |
tree | d0dacdac5fc15013db0524270d7ba2ec313d138b | |
parent | 122940aba7392bfba17b04a4c166b28ebbc3bd1f (diff) |
fdo#37498 RTF export: handle url fields without a field result
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.hxx | 4 |
2 files changed, 10 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); } diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx index 856b14f289e0..c96de2c4c81d 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.hxx +++ b/sw/source/filter/ww8/rtfattributeoutput.hxx @@ -529,6 +529,10 @@ private: */ bool m_bWroteCellInfo; + /* + * If we had a field result in the URL. + */ + bool m_bHadFieldResult; public: RtfAttributeOutput( RtfExport &rExport ); |