sw/source/filter/ww8/docxattributeoutput.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit 6d50c6ccdf85e7d01f16d3edb957eed2a4ad5e47 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jun 2 16:00:59 2015 +0100 move ++m_nFieldsInHyperlink from StartField_Impl to callers no logic change at all, justs makes it clear the dubiousness of this unconditional increment Change-Id: I32e3cb2c45b1b45826a59642c33ab850d698c206 diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 8d7632a..16068b0 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1058,6 +1058,9 @@ void DocxAttributeOutput::EndRun() { StartField_Impl( *pIt ); + if (m_startedHyperlink) + ++m_nFieldsInHyperlink; + // Remove the field from the stack if only the start has to be written // Unknown fields should be removed too if ( !pIt->bClose || ( pIt->eType == ww::eUNKNOWN ) ) @@ -1123,6 +1126,9 @@ void DocxAttributeOutput::EndRun() { StartField_Impl( *pIt, true ); + if (m_startedHyperlink) + ++m_nFieldsInHyperlink; + // Remove the field if no end needs to be written if ( !pIt->bClose ) { pIt = m_Fields.erase( pIt ); @@ -1412,8 +1418,6 @@ void DocxAttributeOutput::WriteFFData( const FieldInfos& rInfos ) void DocxAttributeOutput::StartField_Impl( FieldInfos& rInfos, bool bWriteRun ) { - if ( m_startedHyperlink ) - ++m_nFieldsInHyperlink; if ( rInfos.pField && rInfos.eType == ww::eUNKNOWN ) { // Expand unsupported fields
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits