[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sw/qa sw/source

Caolán McNamara caolanm at redhat.com
Tue May 26 01:31:12 PDT 2015


 sw/qa/extras/ooxmlexport/data/hyperlink-field.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx         |    8 ++++++++
 sw/source/filter/ww8/docxattributeoutput.cxx      |   10 +++++-----
 3 files changed, 13 insertions(+), 5 deletions(-)

New commits:
commit 064b29e381dc48c5fcad027549159bdaeaa49c80
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon May 25 11:06:46 2015 +0100

    fix assert on export of ooo40760-1.sxw to docx
    
    and a pile more
    
    Change-Id: I7334233c789bb0ed7a60387ef7d84dd34ab5a187
    (cherry picked from commit 3185b6c8caf97afa602c864f588d079cbbe04038)
    Reviewed-on: https://gerrit.libreoffice.org/15891
    Tested-by: David Tardon <dtardon at redhat.com>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/sw/qa/extras/ooxmlexport/data/hyperlink-field.odt b/sw/qa/extras/ooxmlexport/data/hyperlink-field.odt
new file mode 100644
index 0000000..0c265cf
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/hyperlink-field.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 20e3a00..4b1a79e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -230,6 +230,14 @@ DECLARE_OOXMLEXPORT_TEST(testFloatingTable, "fdo77887.docx")
 }
 
 
+DECLARE_OOXMLEXPORT_TEST(testHyperlinkContainingPlaceholderField, "hyperlink-field.odt")
+{
+    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+
+    if (!pXmlDoc)
+       return;
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTablePreferredWidth, "tablePreferredWidth.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index d6ad76d..171d08c 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1040,11 +1040,6 @@ void DocxAttributeOutput::EndRun()
         {
             StartField_Impl( *pIt );
 
-            if ( m_pHyperlinkAttrList )
-            {
-                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 ) )
@@ -1054,6 +1049,11 @@ void DocxAttributeOutput::EndRun()
                 pIt = m_Fields.erase( pIt );
                 continue;
             }
+
+            if ( m_pHyperlinkAttrList )
+            {
+                m_nFieldsInHyperlink++;
+            }
         }
         ++pIt;
     }


More information about the Libreoffice-commits mailing list