diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-03-02 23:11:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-21 16:34:05 +0000 |
commit | 29b783dc6844a3fed9bcf434ae3901e986b44991 (patch) | |
tree | f7795c0c6bef2d2fd5aefa71e79d8637bb900e5c | |
parent | 73d241d9b876bf464176878d76ae6f6497341a13 (diff) |
tdf#101178 sw: DOCX export: fix crash
These conditions in DocxAttributeOutput::EndRun() are apparently not
mutually exclusive, so don't increment m_nFieldsInHyperlink twice.
Whether the m_nFieldsInHyperlink makes any sense considering there are
*2* hyperlinks then, i can't tell.
(cherry picked from commit 103efac8110be7e6f42fffcecc74abdcae4df7f9)
Change-Id: I5030f3303bd83633fcb044573860bc8ecaacae32
Reviewed-on: https://gerrit.libreoffice.org/34838
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index bdfaac4604fd..af9d6fd49d04 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1141,12 +1141,9 @@ void DocxAttributeOutput::EndRun() continue; } - if (m_startedHyperlink) - ++m_nFieldsInHyperlink; - - if ( m_pHyperlinkAttrList.is() ) + if (m_startedHyperlink || m_pHyperlinkAttrList.is()) { - m_nFieldsInHyperlink++; + ++m_nFieldsInHyperlink; } } ++pIt; |