summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
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