summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-06-02 16:00:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-06-02 17:40:02 +0100
commit6d50c6ccdf85e7d01f16d3edb957eed2a4ad5e47 (patch)
tree73fc72b731e681251415845acd0442b9b58c3e15 /sw
parent2dd0c65cb20ed42b31e854b7da1afd6fc03b4325 (diff)
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
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 8d7632a8aea0..16068b00f912 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