summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKorrawit Pruegsanusak <detective.conan.1412@gmail.com>2012-10-12 21:09:42 +0700
committerPetr Mladek <pmladek@suse.cz>2012-10-19 17:03:43 +0200
commitd401dcc51cec798c8c19febcc25c4325ddafa178 (patch)
tree105b8bddd7ca76c7ae84b0626184f5d319f5329c
parent68628c7d714110e4474ed61982d6423e936b56aa (diff)
Fix fdo#47669: also check if we started the tag before ending it
The problem is we created imbalance end tag </w:hyperlink> which shouldn't be there. So, place a check before inserting end tag should help. Inspired by (read: copied from) c1c2688912e769dfd7654e11e87dae380a8ce1eb ;) (cherry picked from commit 3b042335208cb2c995f4860bf8ba3bd1e2f2e859) Change-Id: Ic933f6da44c788cba48bb2fe6fa29658985310b6 Signed-off-by: Petr Mladek <pmladek@suse.cz>
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 7149e4934da6..78ee6cf8238d 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -550,7 +550,11 @@ void DocxAttributeOutput::EndRun()
if ( m_closeHyperlinkInPreviousRun )
{
- m_pSerializer->endElementNS( XML_w, XML_hyperlink );
+ if ( m_startedHyperlink )
+ {
+ m_pSerializer->endElementNS( XML_w, XML_hyperlink );
+ m_startedHyperlink = false;
+ }
m_closeHyperlinkInPreviousRun = false;
}