Kaydet (Commit) 77df4faa authored tarafından Caolán McNamara's avatar Caolán McNamara

fix crash on export of ooo39845-7.sxw to .docx

only bump m_nFieldsInHyperlink if the field isn't erased
from the stack

Change-Id: Idb75d087f6fa3ce3cd399623d8ace1e7f3899b5c
üst 8fbb45c9
......@@ -677,6 +677,13 @@ DECLARE_OOXMLEXPORT_TEST(testOO34469, "ooo34469-1.odt")
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink[1]", "anchor", "2.9.2.Creating New files|outline");
}
DECLARE_OOXMLEXPORT_TEST(testOO39845, "ooo39845-7.odt")
{
if (xmlDocPtr pXmlDoc = parseExport())
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink[1]", "anchor", "Figure4|graphic");
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -1058,9 +1058,6 @@ 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 ) )
......@@ -1069,6 +1066,9 @@ void DocxAttributeOutput::EndRun()
continue;
}
if (m_startedHyperlink)
++m_nFieldsInHyperlink;
if ( m_pHyperlinkAttrList )
{
m_nFieldsInHyperlink++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment